@timardex/cluemart-server-shared 1.0.293 → 1.0.295

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.d.mts CHANGED
@@ -831,8 +831,8 @@ declare function createAffiliateReward(rewardType: EnumAffiliateRewardType, crea
831
831
  /**
832
832
  * Loads the affiliate whose `affiliateCode` matches the given promo code.
833
833
  *
834
- * Includes inactive affiliates (`active: false`) so resource referrals work before
835
- * admin approval. Soft-deleted affiliates (`deletedAt` set) are excluded.
834
+ * Affiliate codes are assigned on admin activation, so referrals only resolve after
835
+ * a code exists. Soft-deleted affiliates (`deletedAt` set) are excluded.
836
836
  *
837
837
  * @param promoCode - Normalized affiliate promo code to resolve.
838
838
  * @returns The matching affiliate document, or `null` when not found.
package/dist/index.d.ts CHANGED
@@ -831,8 +831,8 @@ declare function createAffiliateReward(rewardType: EnumAffiliateRewardType, crea
831
831
  /**
832
832
  * Loads the affiliate whose `affiliateCode` matches the given promo code.
833
833
  *
834
- * Includes inactive affiliates (`active: false`) so resource referrals work before
835
- * admin approval. Soft-deleted affiliates (`deletedAt` set) are excluded.
834
+ * Affiliate codes are assigned on admin activation, so referrals only resolve after
835
+ * a code exists. Soft-deleted affiliates (`deletedAt` set) are excluded.
836
836
  *
837
837
  * @param promoCode - Normalized affiliate promo code to resolve.
838
838
  * @returns The matching affiliate document, or `null` when not found.
package/dist/index.mjs CHANGED
@@ -9329,7 +9329,7 @@ var schema17 = new MongooseSchema25(
9329
9329
  required: false,
9330
9330
  type: [affiliateRewardSchema]
9331
9331
  },
9332
- affiliateCode: { required: true, type: String },
9332
+ affiliateCode: { default: null, required: false, type: String },
9333
9333
  affiliateDetails: { required: false, type: affiliateDetailsSchema },
9334
9334
  affiliateResources: {
9335
9335
  default: [],