@cshah18/sdk 3.0.3 → 3.0.4

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.
@@ -2636,6 +2636,7 @@ var CoBuySDK = (function (exports) {
2636
2636
  }
2637
2637
  /** Fetch latest group data and re-render containers */
2638
2638
  async refreshGroupDataFromRealtime() {
2639
+ console.log("request group data realtime callledddd");
2639
2640
  // Debounce rapid refreshes to prevent loops and reduce API load
2640
2641
  const now = Date.now();
2641
2642
  if (now - this.lastGroupDataRefreshTime < this.GROUP_REFRESH_DEBOUNCE) {
@@ -3050,6 +3051,7 @@ var CoBuySDK = (function (exports) {
3050
3051
  let groupData = null;
3051
3052
  if (this.apiClient) {
3052
3053
  rewardData = await this.fetchRewardWithRetry(options.productId);
3054
+ console.log("from renderrrr");
3053
3055
  groupData = await this.fetchPrimaryGroup(options.productId);
3054
3056
  this.currentGroupData = groupData;
3055
3057
  this.currentGroupId = (groupData === null || groupData === void 0 ? void 0 : groupData.id) || null;
@@ -3306,6 +3308,7 @@ var CoBuySDK = (function (exports) {
3306
3308
  */
3307
3309
  async fetchPrimaryGroup(productId) {
3308
3310
  var _a;
3311
+ console.log("fetch primary group called");
3309
3312
  if (!this.apiClient) {
3310
3313
  return null;
3311
3314
  }
@@ -8951,7 +8954,9 @@ var CoBuySDK = (function (exports) {
8951
8954
  const ref = window.localStorage.getItem(key);
8952
8955
  if (ref) {
8953
8956
  this.logger.debug(`[SDK] Retrieved checkout reference via prefix: ${key}`);
8954
- const parsedGroupId = key.startsWith(`${basePrefix}_`) ? key.substring(basePrefix.length + 1) : null;
8957
+ const parsedGroupId = key.startsWith(`${basePrefix}_`)
8958
+ ? key.substring(basePrefix.length + 1)
8959
+ : null;
8955
8960
  return { key, checkoutRef: ref, groupId: parsedGroupId };
8956
8961
  }
8957
8962
  }
@@ -9372,6 +9377,7 @@ var CoBuySDK = (function (exports) {
9372
9377
  const pid = typeof w.getProductId === "function" ? w.getProductId() : null;
9373
9378
  if (!productId || pid === productId) {
9374
9379
  if (typeof w.requestRefresh === "function") {
9380
+ console.log("calling refresshh now");
9375
9381
  refreshPromises.push(w.requestRefresh());
9376
9382
  }
9377
9383
  }