@timardex/cluemart-server-shared 1.0.303 → 1.0.305

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
@@ -72,6 +72,7 @@ __export(index_exports, {
72
72
  findAffiliateByPromoCode: () => findAffiliateByPromoCode,
73
73
  findEventOrImportedMarketById: () => findEventOrImportedMarketById,
74
74
  getSubscriptionRewardPeriodBounds: () => getSubscriptionRewardPeriodBounds,
75
+ isValidObjectId: () => isValidObjectId,
75
76
  locationGeoSchema: () => locationGeoSchema,
76
77
  locationsSchema: () => locationsSchema,
77
78
  mapVendorLicenceToSubscriptionRewardType: () => mapVendorLicenceToSubscriptionRewardType,
@@ -7381,12 +7382,16 @@ var AFFILIATE_RESOURCE_FIELDS_FRAGMENT = gql`
7381
7382
  resourceDeletedAt
7382
7383
  resourceId
7383
7384
  resourceName
7385
+ resourceOwner {
7386
+ ...OwnerFields
7387
+ }
7384
7388
  resourceType
7385
7389
  rewards {
7386
7390
  ...AffiliateRewardFields
7387
7391
  }
7388
7392
  }
7389
7393
  ${AFFILIATE_REWARD_FIELDS_FRAGMENT}
7394
+ ${OWNER_FIELDS_FRAGMENT}
7390
7395
  `;
7391
7396
  var AFFILIATE_BANK_ACCOUNT_DETAILS_FIELDS_FRAGMENT = gql`
7392
7397
  fragment AffiliateBankAccountDetailsFields on AffiliateBankAccountDetailsType {
@@ -7441,6 +7446,7 @@ var AFFILIATE_FIELDS_FRAGMENT = gql`
7441
7446
  createdAt
7442
7447
  deletedAt
7443
7448
  redeemHistory {
7449
+ paidAt
7444
7450
  redeemedAt
7445
7451
  rewardValue
7446
7452
  }
@@ -9247,6 +9253,10 @@ var affiliateResourceSchema = new MongooseSchema25(
9247
9253
  type: import_mongoose25.default.Schema.Types.ObjectId
9248
9254
  },
9249
9255
  resourceName: { required: true, type: String },
9256
+ resourceOwner: {
9257
+ required: true,
9258
+ type: OwnerTypeSchema
9259
+ },
9250
9260
  resourceType: {
9251
9261
  enum: Object.values(EnumResourceType),
9252
9262
  required: true,
@@ -9298,6 +9308,7 @@ var affiliateDetailsSchema = new MongooseSchema25(
9298
9308
  );
9299
9309
  var redeemHistorySchema = new MongooseSchema25(
9300
9310
  {
9311
+ paidAt: { default: null, required: false, type: Date },
9301
9312
  redeemedAt: { required: true, type: Date },
9302
9313
  rewardValue: { required: true, type: Number }
9303
9314
  },
@@ -9412,7 +9423,7 @@ var SHARE_RESOURCE_LABEL2 = {
9412
9423
  school: "School"
9413
9424
  };
9414
9425
 
9415
- // node_modules/@timardex/cluemart-shared/dist/chunk-43SLZVBF.mjs
9426
+ // node_modules/@timardex/cluemart-shared/dist/chunk-OBZTGPBJ.mjs
9416
9427
  var PROMO_CODE_PREFIX2 = "CM-";
9417
9428
  var OBJECT_ID_PATH_SEGMENT2 = "[a-f0-9]{24}";
9418
9429
  var OBJECT_ID_PATH_SEGMENT_END2 = `${OBJECT_ID_PATH_SEGMENT2}$`;
@@ -9514,7 +9525,7 @@ var gameScreenIdentifierList2 = [
9514
9525
  }
9515
9526
  ];
9516
9527
 
9517
- // node_modules/@timardex/cluemart-shared/dist/chunk-MLNJAQVM.mjs
9528
+ // node_modules/@timardex/cluemart-shared/dist/chunk-QBU7N4P2.mjs
9518
9529
  var import_dayjs4 = __toESM(require("dayjs"), 1);
9519
9530
  var statusOptions2 = [
9520
9531
  ...Object.values(EnumInviteStatus2).map((status) => ({
@@ -11082,6 +11093,9 @@ async function updateVendorBasedOnUserLicense(userId, licenceType) {
11082
11093
 
11083
11094
  // src/service/objectIdToString.ts
11084
11095
  var import_mongoose33 = __toESM(require("mongoose"));
11096
+ function isValidObjectId(value) {
11097
+ return import_mongoose33.default.Types.ObjectId.isValid(value);
11098
+ }
11085
11099
  function convertObjectIdsToStrings(obj) {
11086
11100
  if (obj === null || obj === void 0) {
11087
11101
  return obj;
@@ -11311,6 +11325,7 @@ function updateRelationDatesToUnavailable(relationDates, eventDateTime) {
11311
11325
  findAffiliateByPromoCode,
11312
11326
  findEventOrImportedMarketById,
11313
11327
  getSubscriptionRewardPeriodBounds,
11328
+ isValidObjectId,
11314
11329
  locationGeoSchema,
11315
11330
  locationsSchema,
11316
11331
  mapVendorLicenceToSubscriptionRewardType,