@singi-labs/sifa-sdk 0.12.92 → 0.14.0

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
@@ -4943,6 +4943,13 @@ function isCompanyPageIndexable(company) {
4943
4943
  return present >= COMPANY_PAGE_MIN_FIRMOGRAPHIC_FIELDS;
4944
4944
  }
4945
4945
 
4946
+ // src/logic/recent-activity.ts
4947
+ var DAY_MS = 864e5;
4948
+ function countRecentActivity(days, windowDays, now = /* @__PURE__ */ new Date()) {
4949
+ const cutoff = new Date(now.getTime() - windowDays * DAY_MS).toISOString().slice(0, 10);
4950
+ return days.reduce((sum, day) => day.date >= cutoff ? sum + day.total : sum, 0);
4951
+ }
4952
+
4946
4953
  // src/profile/range-sort.ts
4947
4954
  var hasValue = (date) => !!date;
4948
4955
  function sortByActiveDateRange(items) {
@@ -5835,7 +5842,7 @@ function describeSifaRecord(collection, value) {
5835
5842
  }
5836
5843
 
5837
5844
  // src/index.ts
5838
- var SIFA_SDK_VERSION = "0.12.92";
5845
+ var SIFA_SDK_VERSION = "0.14.0";
5839
5846
 
5840
5847
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
5841
5848
  exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
@@ -5956,6 +5963,7 @@ exports.completenessPercent = completenessPercent;
5956
5963
  exports.completenessScore = completenessScore;
5957
5964
  exports.contrastRatio = contrastRatio;
5958
5965
  exports.countFilledDimensions = countFilledDimensions;
5966
+ exports.countRecentActivity = countRecentActivity;
5959
5967
  exports.countryCodeToFlag = countryCodeToFlag;
5960
5968
  exports.dateRangeExtractor = dateRangeExtractor;
5961
5969
  exports.datetimeSchema = datetimeSchema;