@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.
@@ -39,7 +39,7 @@ import {
39
39
  socialShareResourceSchema,
40
40
  termsAgreementSchema,
41
41
  userLicenseSchema
42
- } from "../chunk-GQWLGM2W.mjs";
42
+ } from "../chunk-7X5A335O.mjs";
43
43
  export {
44
44
  APP_SETTINGS_ID,
45
45
  AdModel,
@@ -39,6 +39,7 @@ __export(service_exports, {
39
39
  findAffiliateByPromoCode: () => findAffiliateByPromoCode,
40
40
  findEventOrImportedMarketById: () => findEventOrImportedMarketById,
41
41
  getSubscriptionRewardPeriodBounds: () => getSubscriptionRewardPeriodBounds,
42
+ isValidObjectId: () => isValidObjectId,
42
43
  mapVendorLicenceToSubscriptionRewardType: () => mapVendorLicenceToSubscriptionRewardType,
43
44
  normalizeAffiliatePromoCodes: () => normalizeAffiliatePromoCodes,
44
45
  normalizePromoCode: () => normalizePromoCode,
@@ -7338,12 +7339,16 @@ var AFFILIATE_RESOURCE_FIELDS_FRAGMENT = gql`
7338
7339
  resourceDeletedAt
7339
7340
  resourceId
7340
7341
  resourceName
7342
+ resourceOwner {
7343
+ ...OwnerFields
7344
+ }
7341
7345
  resourceType
7342
7346
  rewards {
7343
7347
  ...AffiliateRewardFields
7344
7348
  }
7345
7349
  }
7346
7350
  ${AFFILIATE_REWARD_FIELDS_FRAGMENT}
7351
+ ${OWNER_FIELDS_FRAGMENT}
7347
7352
  `;
7348
7353
  var AFFILIATE_BANK_ACCOUNT_DETAILS_FIELDS_FRAGMENT = gql`
7349
7354
  fragment AffiliateBankAccountDetailsFields on AffiliateBankAccountDetailsType {
@@ -7398,6 +7403,7 @@ var AFFILIATE_FIELDS_FRAGMENT = gql`
7398
7403
  createdAt
7399
7404
  deletedAt
7400
7405
  redeemHistory {
7406
+ paidAt
7401
7407
  redeemedAt
7402
7408
  rewardValue
7403
7409
  }
@@ -9204,6 +9210,10 @@ var affiliateResourceSchema = new MongooseSchema25(
9204
9210
  type: import_mongoose25.default.Schema.Types.ObjectId
9205
9211
  },
9206
9212
  resourceName: { required: true, type: String },
9213
+ resourceOwner: {
9214
+ required: true,
9215
+ type: OwnerTypeSchema
9216
+ },
9207
9217
  resourceType: {
9208
9218
  enum: Object.values(EnumResourceType),
9209
9219
  required: true,
@@ -9255,6 +9265,7 @@ var affiliateDetailsSchema = new MongooseSchema25(
9255
9265
  );
9256
9266
  var redeemHistorySchema = new MongooseSchema25(
9257
9267
  {
9268
+ paidAt: { default: null, required: false, type: Date },
9258
9269
  redeemedAt: { required: true, type: Date },
9259
9270
  rewardValue: { required: true, type: Number }
9260
9271
  },
@@ -9369,7 +9380,7 @@ var SHARE_RESOURCE_LABEL2 = {
9369
9380
  school: "School"
9370
9381
  };
9371
9382
 
9372
- // node_modules/@timardex/cluemart-shared/dist/chunk-43SLZVBF.mjs
9383
+ // node_modules/@timardex/cluemart-shared/dist/chunk-OBZTGPBJ.mjs
9373
9384
  var PROMO_CODE_PREFIX2 = "CM-";
9374
9385
  var OBJECT_ID_PATH_SEGMENT2 = "[a-f0-9]{24}";
9375
9386
  var OBJECT_ID_PATH_SEGMENT_END2 = `${OBJECT_ID_PATH_SEGMENT2}$`;
@@ -9471,7 +9482,7 @@ var gameScreenIdentifierList2 = [
9471
9482
  }
9472
9483
  ];
9473
9484
 
9474
- // node_modules/@timardex/cluemart-shared/dist/chunk-MLNJAQVM.mjs
9485
+ // node_modules/@timardex/cluemart-shared/dist/chunk-QBU7N4P2.mjs
9475
9486
  var import_dayjs4 = __toESM(require("dayjs"), 1);
9476
9487
  var statusOptions2 = [
9477
9488
  ...Object.values(EnumInviteStatus2).map((status) => ({
@@ -11032,6 +11043,9 @@ async function updateVendorBasedOnUserLicense(userId, licenceType) {
11032
11043
 
11033
11044
  // src/service/objectIdToString.ts
11034
11045
  var import_mongoose33 = __toESM(require("mongoose"));
11046
+ function isValidObjectId(value) {
11047
+ return import_mongoose33.default.Types.ObjectId.isValid(value);
11048
+ }
11035
11049
  function convertObjectIdsToStrings(obj) {
11036
11050
  if (obj === null || obj === void 0) {
11037
11051
  return obj;
@@ -11228,6 +11242,7 @@ function updateRelationDatesToUnavailable(relationDates, eventDateTime) {
11228
11242
  findAffiliateByPromoCode,
11229
11243
  findEventOrImportedMarketById,
11230
11244
  getSubscriptionRewardPeriodBounds,
11245
+ isValidObjectId,
11231
11246
  mapVendorLicenceToSubscriptionRewardType,
11232
11247
  normalizeAffiliatePromoCodes,
11233
11248
  normalizePromoCode,