@singi-labs/sifa-sdk 0.10.3 → 0.10.5

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.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as ProfileSkill, L as LocationValue, a as PdsProviderInfo, b as Profile } from './index-DYUYJxOs.cjs';
2
- export { A as ActiveApp, c as Endorsement, d as EndorsementData, E as ExternalAccount, e as ExternalAccountKeytraceClaim, F as FeedItem, f as LanguageProficiency, g as ProfileCertification, h as ProfileCourse, i as ProfileEducation, j as ProfileHonor, k as ProfileIndustry, l as ProfileLanguage, m as ProfileLocation, n as ProfileOverrideSource, o as ProfilePosition, p as ProfileProject, q as ProfilePublication, r as ProfileVolunteering, s as PublicationContributor, t as SkillRef, S as SkillSuggestion, T as TrustStat, V as VerifiedAccount } from './index-DYUYJxOs.cjs';
1
+ import { P as ProfileSkill, L as LocationValue, a as PdsProviderInfo, b as Profile } from './adult-content-BjbP46ad.cjs';
2
+ export { c as ADULT_CONTENT_LABELS, d as ActiveApp, A as ActivityLabel, e as AdultContentLabel, f as Endorsement, g as EndorsementData, E as ExternalAccount, h as ExternalAccountKeytraceClaim, F as FeedItem, i as LanguageProficiency, j as ProfileCertification, k as ProfileCourse, l as ProfileEducation, m as ProfileHonor, n as ProfileIndustry, o as ProfileLanguage, p as ProfileLocation, q as ProfileOverrideSource, r as ProfilePosition, s as ProfileProject, t as ProfilePublication, u as ProfileVolunteering, v as PublicationContributor, w as SkillRef, S as SkillSuggestion, T as TrustStat, V as VerifiedAccount, x as hasAdultContent } from './adult-content-BjbP46ad.cjs';
3
3
  export { EndorsementConfirmationRecord, EndorsementConfirmationRecordSchema, EndorsementRecord, EndorsementRecordSchema, GraphFollowRecord, GraphFollowRecordSchema, ProfileCertificationRecord, ProfileCertificationRecordSchema, ProfileCourseRecord, ProfileCourseRecordSchema, ProfileEducationRecord, ProfileEducationRecordSchema, ProfileExternalAccountRecord, ProfileExternalAccountRecordSchema, ProfileHonorRecord, ProfileHonorRecordSchema, ProfileLanguageRecord, ProfileLanguageRecordSchema, ProfilePositionRecord, ProfilePositionRecordSchema, ProfileProjectRecord, ProfileProjectRecordSchema, ProfilePublicationRecord, ProfilePublicationRecordSchema, ProfileSelfRecord, ProfileSelfRecordSchema, ProfileSkillRecord, ProfileSkillRecordSchema, ProfileVolunteeringRecord, ProfileVolunteeringRecordSchema, PublicationAuthor, PublicationAuthorSchema, atUriSchema, cidSchema, datetimeSchema, didSchema, languageTagSchema, makeGraphFollowRecordSchema, maxGraphemes, selfLabelsSchema, strongRefSchema, uriSchema } from './schemas/index.cjs';
4
4
  export { A as AtmosphereFeedItem, d as AtmosphereFeedItemSchema, e as FEATURE_FLAGS, b as FeatureAllowlistEntry, f as FeatureAllowlistEntrySchema, c as FeatureFlag, g as FeedActor, h as FeedActorSchema, i as FeedCursor, j as FollowFeedItem, k as FollowFeedItemSchema, F as FollowFeedPage, l as FollowFeedPageSchema, a as FollowProfileItem, m as FollowProfilePage, n as FollowProfilePageSchema, o as FollowProfileSchema, S as SifaFeedItem, p as SifaFeedItemSchema, q as decodeFeedCursor, r as encodeFeedCursor } from './feed-DHTy7fUN.cjs';
5
5
  import 'zod';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as ProfileSkill, L as LocationValue, a as PdsProviderInfo, b as Profile } from './index-DYUYJxOs.js';
2
- export { A as ActiveApp, c as Endorsement, d as EndorsementData, E as ExternalAccount, e as ExternalAccountKeytraceClaim, F as FeedItem, f as LanguageProficiency, g as ProfileCertification, h as ProfileCourse, i as ProfileEducation, j as ProfileHonor, k as ProfileIndustry, l as ProfileLanguage, m as ProfileLocation, n as ProfileOverrideSource, o as ProfilePosition, p as ProfileProject, q as ProfilePublication, r as ProfileVolunteering, s as PublicationContributor, t as SkillRef, S as SkillSuggestion, T as TrustStat, V as VerifiedAccount } from './index-DYUYJxOs.js';
1
+ import { P as ProfileSkill, L as LocationValue, a as PdsProviderInfo, b as Profile } from './adult-content-BjbP46ad.js';
2
+ export { c as ADULT_CONTENT_LABELS, d as ActiveApp, A as ActivityLabel, e as AdultContentLabel, f as Endorsement, g as EndorsementData, E as ExternalAccount, h as ExternalAccountKeytraceClaim, F as FeedItem, i as LanguageProficiency, j as ProfileCertification, k as ProfileCourse, l as ProfileEducation, m as ProfileHonor, n as ProfileIndustry, o as ProfileLanguage, p as ProfileLocation, q as ProfileOverrideSource, r as ProfilePosition, s as ProfileProject, t as ProfilePublication, u as ProfileVolunteering, v as PublicationContributor, w as SkillRef, S as SkillSuggestion, T as TrustStat, V as VerifiedAccount, x as hasAdultContent } from './adult-content-BjbP46ad.js';
3
3
  export { EndorsementConfirmationRecord, EndorsementConfirmationRecordSchema, EndorsementRecord, EndorsementRecordSchema, GraphFollowRecord, GraphFollowRecordSchema, ProfileCertificationRecord, ProfileCertificationRecordSchema, ProfileCourseRecord, ProfileCourseRecordSchema, ProfileEducationRecord, ProfileEducationRecordSchema, ProfileExternalAccountRecord, ProfileExternalAccountRecordSchema, ProfileHonorRecord, ProfileHonorRecordSchema, ProfileLanguageRecord, ProfileLanguageRecordSchema, ProfilePositionRecord, ProfilePositionRecordSchema, ProfileProjectRecord, ProfileProjectRecordSchema, ProfilePublicationRecord, ProfilePublicationRecordSchema, ProfileSelfRecord, ProfileSelfRecordSchema, ProfileSkillRecord, ProfileSkillRecordSchema, ProfileVolunteeringRecord, ProfileVolunteeringRecordSchema, PublicationAuthor, PublicationAuthorSchema, atUriSchema, cidSchema, datetimeSchema, didSchema, languageTagSchema, makeGraphFollowRecordSchema, maxGraphemes, selfLabelsSchema, strongRefSchema, uriSchema } from './schemas/index.js';
4
4
  export { A as AtmosphereFeedItem, d as AtmosphereFeedItemSchema, e as FEATURE_FLAGS, b as FeatureAllowlistEntry, f as FeatureAllowlistEntrySchema, c as FeatureFlag, g as FeedActor, h as FeedActorSchema, i as FeedCursor, j as FollowFeedItem, k as FollowFeedItemSchema, F as FollowFeedPage, l as FollowFeedPageSchema, a as FollowProfileItem, m as FollowProfilePage, n as FollowProfilePageSchema, o as FollowProfileSchema, S as SifaFeedItem, p as SifaFeedItemSchema, q as decodeFeedCursor, r as encodeFeedCursor } from './feed-DHTy7fUN.js';
5
5
  import 'zod';
package/dist/index.js CHANGED
@@ -1552,8 +1552,13 @@ var APP_URL_PATTERNS = Object.freeze({
1552
1552
  profileUrlPattern: "https://nooki.me/user/{handle}"
1553
1553
  },
1554
1554
  atstore: {
1555
- // SPA per-record URLs require JS routing. Profile fallback only.
1556
- profileUrlPattern: "https://atstore.fyi/@{handle}"
1555
+ // atstore.fyi has no user-profile pages (the legacy `/@{handle}` pattern
1556
+ // resolved to a 404), and no per-review deep link exists. The per-product
1557
+ // page (https://atstore.fyi/products/{slug}) is the most specific URL
1558
+ // available — resolveCardUrl builds it from record.listingMeta.slug,
1559
+ // which sifa-api enriches by resolving the review's `subject` to the
1560
+ // referenced listing.detail record.
1561
+ profileUrlPattern: "https://atstore.fyi"
1557
1562
  },
1558
1563
  plyr: {
1559
1564
  // SPA — per-record URLs require JS routing. plyr.fm doesn't expose a
@@ -1699,6 +1704,14 @@ function resolveCardUrl(item) {
1699
1704
  }
1700
1705
  return null;
1701
1706
  }
1707
+ if (collection === "fyi.atstore.listing.review") {
1708
+ const listingMeta = record.listingMeta;
1709
+ if (listingMeta != null && typeof listingMeta === "object") {
1710
+ const slug = stringOrNull(listingMeta.slug);
1711
+ if (slug) return `https://atstore.fyi/products/${encodeURIComponent(slug)}`;
1712
+ }
1713
+ return APP_URL_PATTERNS.atstore?.profileUrlPattern ?? null;
1714
+ }
1702
1715
  if (collection.startsWith("site.standard.")) {
1703
1716
  const siteUrl = stringOrNull(record.siteUrl);
1704
1717
  const path = stringOrNull(record.path);
@@ -1747,6 +1760,16 @@ function isVisibleActivityItem(collection, record) {
1747
1760
  return rule(record);
1748
1761
  }
1749
1762
 
1763
+ // src/cards/adult-content.ts
1764
+ var ADULT_CONTENT_LABELS = ["porn", "sexual", "nudity", "graphic-media"];
1765
+ function hasAdultContent(item) {
1766
+ const labels = item.labels;
1767
+ if (!labels || labels.length === 0) return false;
1768
+ return labels.some(
1769
+ (label) => !label.neg && ADULT_CONTENT_LABELS.includes(label.val)
1770
+ );
1771
+ }
1772
+
1750
1773
  // src/publishers/registry.ts
1751
1774
  var STANDARD_PUBLISHER_ID = "standard";
1752
1775
  var PUBLISHERS = Object.freeze([
@@ -2146,8 +2169,8 @@ var ProfileVolunteeringRecordSchema = z.object({
2146
2169
  });
2147
2170
 
2148
2171
  // src/index.ts
2149
- var SIFA_SDK_VERSION = "0.10.3";
2172
+ var SIFA_SDK_VERSION = "0.10.5";
2150
2173
 
2151
- export { ACTIVITY_TIERS, ACTIVITY_VISIBILITY_RULES, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, AtmosphereFeedItemSchema, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, DIMENSIONS_MAX_SCORE, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, EndorsementConfirmationRecordSchema, EndorsementRecordSchema, FEATURE_FLAGS, FeatureAllowlistEntrySchema, FeedActorSchema, FollowFeedItemSchema, FollowFeedPageSchema, FollowProfilePageSchema, FollowProfileSchema, GraphFollowRecordSchema, INDUSTRY_OPTIONS, MIN_SKILLS, OPEN_TO_OPTIONS, PLATFORM_LABELS, PLATFORM_OPTIONS, PUBLISHERS, ProfileCertificationRecordSchema, ProfileCourseRecordSchema, ProfileEducationRecordSchema, ProfileExternalAccountRecordSchema, ProfileHonorRecordSchema, ProfileLanguageRecordSchema, ProfilePositionRecordSchema, ProfileProjectRecordSchema, ProfilePublicationRecordSchema, ProfileSelfRecordSchema, ProfileSkillRecordSchema, ProfileVolunteeringRecordSchema, PublicationAuthorSchema, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, SifaFeedItemSchema, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, atUriSchema, categoryForApp, certDateExtractor, cidSchema, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, datetimeSchema, decodeFeedCursor, dedupeSkills, detectPdsProvider, didSchema, dimensionsFromInputs, encodeFeedCursor, findIndustry, formatDistanceToNow, formatLocation, formatRelativeTime, getActivityTaxonomyVersion, getActivityTier, getAppCategoryIcon, getAppIdForCollection, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getWorkplaceTypeLabel, groupSkillsByCategory, isAppCategory, isKnownAppId, isKnownPlatform, isValidRgbColor, isVisibleActivityItem, languageTagSchema, lexiconDateExtractor, limitCombiningMarks, makeGraphFollowRecordSchema, maxGraphemes, meetsContrastAA, parseLocationString, pdsProviderFromApi, pickPrimaryPosition, profileToDimensionInputs, relativeLuminance, resolveCardUrl, rgbToString, sanitizeDisplayText, sanitizeHandleInput, selfLabelsSchema, singleDateExtractor, sortByDateDesc, strongRefSchema, truncateGraphemes, uriSchema };
2174
+ export { ACTIVITY_TIERS, ACTIVITY_VISIBILITY_RULES, ADULT_CONTENT_LABELS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, AtmosphereFeedItemSchema, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, DIMENSIONS_MAX_SCORE, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, EndorsementConfirmationRecordSchema, EndorsementRecordSchema, FEATURE_FLAGS, FeatureAllowlistEntrySchema, FeedActorSchema, FollowFeedItemSchema, FollowFeedPageSchema, FollowProfilePageSchema, FollowProfileSchema, GraphFollowRecordSchema, INDUSTRY_OPTIONS, MIN_SKILLS, OPEN_TO_OPTIONS, PLATFORM_LABELS, PLATFORM_OPTIONS, PUBLISHERS, ProfileCertificationRecordSchema, ProfileCourseRecordSchema, ProfileEducationRecordSchema, ProfileExternalAccountRecordSchema, ProfileHonorRecordSchema, ProfileLanguageRecordSchema, ProfilePositionRecordSchema, ProfileProjectRecordSchema, ProfilePublicationRecordSchema, ProfileSelfRecordSchema, ProfileSkillRecordSchema, ProfileVolunteeringRecordSchema, PublicationAuthorSchema, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, SifaFeedItemSchema, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, atUriSchema, categoryForApp, certDateExtractor, cidSchema, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, datetimeSchema, decodeFeedCursor, dedupeSkills, detectPdsProvider, didSchema, dimensionsFromInputs, encodeFeedCursor, findIndustry, formatDistanceToNow, formatLocation, formatRelativeTime, getActivityTaxonomyVersion, getActivityTier, getAppCategoryIcon, getAppIdForCollection, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getWorkplaceTypeLabel, groupSkillsByCategory, hasAdultContent, isAppCategory, isKnownAppId, isKnownPlatform, isValidRgbColor, isVisibleActivityItem, languageTagSchema, lexiconDateExtractor, limitCombiningMarks, makeGraphFollowRecordSchema, maxGraphemes, meetsContrastAA, parseLocationString, pdsProviderFromApi, pickPrimaryPosition, profileToDimensionInputs, relativeLuminance, resolveCardUrl, rgbToString, sanitizeDisplayText, sanitizeHandleInput, selfLabelsSchema, singleDateExtractor, sortByDateDesc, strongRefSchema, truncateGraphemes, uriSchema };
2152
2175
  //# sourceMappingURL=index.js.map
2153
2176
  //# sourceMappingURL=index.js.map