@singi-labs/sifa-sdk 0.19.103 → 0.19.104

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
@@ -5689,8 +5689,8 @@ function applyTravel(vm, record) {
5689
5689
  const body = { kind: "travel" };
5690
5690
  const origin = asNonEmptyString(record.originTransportCode);
5691
5691
  if (origin) body.origin = origin;
5692
- const destination = asNonEmptyString(record.destinationTransportCode);
5693
- if (destination) body.destination = destination;
5692
+ const destination2 = asNonEmptyString(record.destinationTransportCode);
5693
+ if (destination2) body.destination = destination2;
5694
5694
  const transportation = asNonEmptyString(record.transportation);
5695
5695
  if (transportation) body.transportation = transportation;
5696
5696
  const carrier = asNonEmptyString(record.carrier);
@@ -6080,6 +6080,21 @@ function streamCardContent(vm) {
6080
6080
  return { text: streamCardBodyContent(vm.body), url: vm.sourceUrl ?? null };
6081
6081
  }
6082
6082
 
6083
+ // src/stream/timeline-worthy.ts
6084
+ function destination(vm) {
6085
+ const subject = vm.subject;
6086
+ if (subject?.kind === "person") return subject.handle ? `/p/${subject.handle}` : null;
6087
+ if (subject?.kind === "record") return subject.url ?? vm.sourceUrl ?? null;
6088
+ if (subject?.kind === "post") return subject.post.sourceUrl ?? vm.sourceUrl ?? null;
6089
+ return vm.sourceUrl ?? vm.externalLink?.url ?? null;
6090
+ }
6091
+ function isTimelineWorthy(vm) {
6092
+ if (!destination(vm)) return false;
6093
+ if (isSelfAuthoredRich(vm)) return true;
6094
+ if (vm.verb === "joined") return true;
6095
+ return streamCardContent(vm).text !== null;
6096
+ }
6097
+
6083
6098
  // src/logic/profile-completeness.ts
6084
6099
  var COMPLETENESS_MAX_SCORE = 6;
6085
6100
  function completenessScore(c) {
@@ -7796,7 +7811,7 @@ function describeSifaRecord(collection, value) {
7796
7811
  }
7797
7812
 
7798
7813
  // src/index.ts
7799
- var SIFA_SDK_VERSION = "0.19.103";
7814
+ var SIFA_SDK_VERSION = "0.19.104";
7800
7815
 
7801
7816
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
7802
7817
  exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
@@ -8052,6 +8067,7 @@ exports.isSectionPopulated = isSectionPopulated;
8052
8067
  exports.isSelfAuthoredRich = isSelfAuthoredRich;
8053
8068
  exports.isSiteActivityPresetActive = isSiteActivityPresetActive;
8054
8069
  exports.isTeachingCourse = isTeachingCourse;
8070
+ exports.isTimelineWorthy = isTimelineWorthy;
8055
8071
  exports.isUpcomingStart = isUpcomingStart;
8056
8072
  exports.isValidRgbColor = isValidRgbColor;
8057
8073
  exports.isVisibleActivityItem = isVisibleActivityItem;