@singi-labs/sifa-sdk 0.19.14 → 0.19.15

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
@@ -1591,6 +1591,17 @@ interface ActivityItem {
1591
1591
  * a `StreamCardVM` too.
1592
1592
  */
1593
1593
  subject?: ActivityItem;
1594
+ /**
1595
+ * Resolved title of the record this one references (the commented-on document,
1596
+ * the replied-to post), set by sifa-api. Shown on the two-tier line as the
1597
+ * subject clause ("Commented on {subjectTitle}").
1598
+ */
1599
+ subjectTitle?: string;
1600
+ /**
1601
+ * Canonical http(s) URL of the referenced record, set by sifa-api, so the
1602
+ * subject clause links out to what was acted on (the blog post, the event).
1603
+ */
1604
+ subjectUrl?: string;
1594
1605
  /**
1595
1606
  * Hypercert claim enrichment, set by sifa-api. Absent for non-hypercert
1596
1607
  * items, for claims with neither contributors nor attachments, and for
@@ -1888,6 +1899,7 @@ type StreamCardSubject = {
1888
1899
  kind: 'record';
1889
1900
  uri: string;
1890
1901
  title?: string;
1902
+ url?: string;
1891
1903
  };
1892
1904
  /**
1893
1905
  * Presentation-ready, framework-free, serializable view-model for one activity
package/dist/index.d.ts CHANGED
@@ -1591,6 +1591,17 @@ interface ActivityItem {
1591
1591
  * a `StreamCardVM` too.
1592
1592
  */
1593
1593
  subject?: ActivityItem;
1594
+ /**
1595
+ * Resolved title of the record this one references (the commented-on document,
1596
+ * the replied-to post), set by sifa-api. Shown on the two-tier line as the
1597
+ * subject clause ("Commented on {subjectTitle}").
1598
+ */
1599
+ subjectTitle?: string;
1600
+ /**
1601
+ * Canonical http(s) URL of the referenced record, set by sifa-api, so the
1602
+ * subject clause links out to what was acted on (the blog post, the event).
1603
+ */
1604
+ subjectUrl?: string;
1594
1605
  /**
1595
1606
  * Hypercert claim enrichment, set by sifa-api. Absent for non-hypercert
1596
1607
  * items, for claims with neither contributors nor attachments, and for
@@ -1888,6 +1899,7 @@ type StreamCardSubject = {
1888
1899
  kind: 'record';
1889
1900
  uri: string;
1890
1901
  title?: string;
1902
+ url?: string;
1891
1903
  };
1892
1904
  /**
1893
1905
  * Presentation-ready, framework-free, serializable view-model for one activity
package/dist/index.js CHANGED
@@ -4288,7 +4288,8 @@ var streamCardSubjectSchema = z.discriminatedUnion("kind", [
4288
4288
  z.object({
4289
4289
  kind: z.literal("record"),
4290
4290
  uri: z.string(),
4291
- title: z.string().optional()
4291
+ title: z.string().optional(),
4292
+ url: z.string().optional()
4292
4293
  })
4293
4294
  ]);
4294
4295
  var hypercertDetailsSchema = z.object({
@@ -4764,6 +4765,14 @@ function applyEventRsvp(vm, record) {
4764
4765
  if (locationCountry) body.locationCountry = locationCountry;
4765
4766
  }
4766
4767
  vm.body = body;
4768
+ const eventUri = nonBlankString(asRecord(record.subject)?.uri);
4769
+ if (eventUri) {
4770
+ vm.subject = {
4771
+ kind: "record",
4772
+ uri: eventUri,
4773
+ ...body.eventName ? { title: body.eventName } : {}
4774
+ };
4775
+ }
4767
4776
  return vm;
4768
4777
  }
4769
4778
  function applyKeytraceVerification(vm, record) {
@@ -4972,8 +4981,16 @@ function genericSubject(record) {
4972
4981
  }
4973
4982
  const uri = nonBlankString(asRecord(subject)?.uri);
4974
4983
  if (uri && uri.startsWith("at://")) return { kind: "record", uri };
4984
+ const parentUri = nonBlankString(asRecord(asRecord(record.reply)?.parent)?.uri);
4985
+ if (parentUri && parentUri.startsWith("at://")) return { kind: "record", uri: parentUri };
4975
4986
  return void 0;
4976
4987
  }
4988
+ function withResolvedSubjectMeta(subject, item) {
4989
+ if (subject.kind !== "record") return subject;
4990
+ const title = nonBlankString(item.subjectTitle) ?? subject.title;
4991
+ const url = nonBlankString(item.subjectUrl);
4992
+ return { ...subject, ...title ? { title } : {}, ...url ? { url } : {} };
4993
+ }
4977
4994
  function parseFacetFeature(features) {
4978
4995
  for (const raw of features) {
4979
4996
  const feat = asRecord(raw);
@@ -5046,7 +5063,7 @@ function applyGeneric(vm, item, record) {
5046
5063
  if (externalLink) vm.externalLink = externalLink;
5047
5064
  if (!vm.subject) {
5048
5065
  const subject = genericSubject(record);
5049
- if (subject) vm.subject = subject;
5066
+ if (subject) vm.subject = withResolvedSubjectMeta(subject, item);
5050
5067
  }
5051
5068
  let body;
5052
5069
  if (text) {
@@ -6566,7 +6583,7 @@ function describeSifaRecord(collection, value) {
6566
6583
  }
6567
6584
 
6568
6585
  // src/index.ts
6569
- var SIFA_SDK_VERSION = "0.19.14";
6586
+ var SIFA_SDK_VERSION = "0.19.15";
6570
6587
 
6571
6588
  export { ACTIVITY_TIERS, ACTIVITY_VERBS, ACTIVITY_VISIBILITY_RULES, ADULT_CONTENT_LABELS, ALL_SECTIONS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, ARTIFACT_LINK_KIND_LABELS, ARTIFACT_LINK_KIND_OPTIONS, ArtifactLinkSchema, AtmosphereFeedItemSchema, BlobRefSchema, CALENDAR_EVENT_MODE_LABELS, CALENDAR_EVENT_STATUS_LABELS, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, COMPANY_OPTIONAL_EMPLOYMENT_TYPES, COMPANY_PAGE_MIN_FIRMOGRAPHIC_FIELDS, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, DIMENSIONS_MAX_SCORE, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, ENTITY_REF_ANCHORS, EndorsementConfirmationRecordSchema, EndorsementRecordSchema, EntityImportSearchResponseSchema, EntityMintDomainResponseSchema, EntityResolveDomainRequestSchema, EntityResolveDomainResponseSchema, EntitySearchResponseSchema, EntitySearchResultSchema, EntitySelectRequestSchema, EntitySelectResponseSchema, FEATURE_FLAGS, FeatureAllowlistEntrySchema, FeedActorSchema, FollowFeedItemSchema, FollowFeedPageSchema, FollowProfilePageSchema, FollowProfileSchema, GraphFollowRecordSchema, INDUSTRY_OPTIONS, INVESTMENT_ROLE_LABELS, INVESTMENT_ROLE_OPTIONS, INVESTMENT_STAGE_LABELS, INVESTMENT_STAGE_OPTIONS, INVESTMENT_STATUS_LABELS, INVESTMENT_STATUS_OPTIONS, INVOLVEMENT_HEADING_ORDER, INVOLVEMENT_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, InvestmentAmountSchema, MIN_SKILLS, ON_BEHALF_OF_EMPLOYMENT_TYPES, OPEN_TO_OPTIONS, OPEN_TO_TOKENS, OPEN_TO_TOKEN_TO_VALUE, OPEN_TO_VALUE_TO_TOKEN, OrgEmploymentAttestationRecordSchema, OrgProfileRecordSchema, PLATFORM_LABELS, PLATFORM_OPTIONS, PRESENTATION_LINK_TYPE_LABELS, PRESENTATION_LINK_TYPE_OPTIONS, PRESENTATION_ROLE_LABELS, PRESENTATION_ROLE_OPTIONS, PROFILE_INVESTMENT_NSID, PROFILE_INVOLVEMENT_NSID, PROJECT_ROLES, PUBLICATION_TYPE_LABELS, PUBLICATION_TYPE_OPTIONS, PUBLISHERS, PresentationDurationSchema, PresentationLinkSchema, ProfileCertificationRecordSchema, ProfileCourseRecordSchema, ProfileEducationRecordSchema, ProfileExternalAccountRecordSchema, ProfileHonorRecordSchema, ProfileInvestmentRecordSchema, ProfileInvolvementRecordSchema, ProfileLanguageRecordSchema, ProfilePositionRecordSchema, ProfilePresentationDeliveryRecordSchema, ProfilePresentationRecordSchema, ProfileProjectRecordSchema, ProfilePublicationRecordSchema, ProfileSelfRecordSchema, ProfileSkillRecordSchema, ProfileVolunteeringRecordSchema, PublicationAuthorSchema, ROADMAP_ISSUES_REPO, ROADMAP_ITEM_META, SECTION_GROUPS, SECTION_LABELS, SELF_APP_ID, SIFA_REPO_GROUPS, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, STREAM_VERBS, SifaFeedItemSchema, VERIFICATION_PROVIDERS, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, actorShowsIdentity, agentRefSchema, atUriSchema, buildMetaDescription, buildProfileHighlights, buildTalkSlug, categoryForApp, certDateExtractor, cidSchema, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countRecentActivity, countryCodeToFlag, dateRangeExtractor, datetimeSchema, decodeFeedCursor, dedupeSkills, describeSifaRecord, detectPdsProvider, didSchema, dimensionsFromInputs, durationFromMinutes, encodeFeedCursor, entityDisambiguationLabel, entityResultKey, excludeSelfApp, externalRecordRefSchema, filterHidden, findIndustry, formatCompanyName, formatDateRange, formatDisplayUrl, formatDistanceToNow, formatEventDate, formatLocation, formatPresentationDuration, formatRelationship, formatRelativeTime, formatSingleDate, formatSpanDate, formatTimelineDate, getActivityTaxonomyVersion, getActivityTier, getActivityVerbsVersion, getAppCategoryIcon, getAppIdForCollection, getArtifactLinkKindLabel, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getInvestmentRoleLabel, getInvestmentStageLabel, getInvestmentStatusLabel, getInvolvementKindHeading, getInvolvementKindLabel, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublicationTypeLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getVerificationProvider, getVisibleSectionIds, getWorkplaceTypeLabel, groupInvolvementByHeading, groupSkillsByCategory, groupSkillsBySubCategory, groupSkillsForDisplay, hasAdultContent, hasPersonalProfileContent, hoistPrimary, isAppCategory, isCompanyPageIndexable, isCompanyRequired, isKnownAppId, isKnownPlatform, isKnownVerificationProvider, isLinked, isOnBehalfOfApplicable, isPseudoEmployer, isRegistrableDomainHandle, isRelationalActivity, isRoleLineRedundant, isSectionPopulated, isSelfAuthoredRich, isValidRgbColor, isVisibleActivityItem, languageTagSchema, lexiconDateExtractor, limitCombiningMarks, locationSegments, looksLikeDomain, makeGraphFollowRecordSchema, maxGraphemes, meetsContrastAA, normalizeCompanyKey, normalizeDoi, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeSkillCategory, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseEndorsementComment, parseIntendedAudiences, parseLocationString, parsePresentationDuration, parseTalkRkey, partialDateSchema, pdsProviderFromApi, pickPrimaryFlagged, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, primaryVerification, profileToDimensionInputs, qualifiesAsOrg, relativeLuminance, renderAsLine, rendersCompanyProfile, rendersPersonalProfile, repoGroupForCollection, resolveAccountFacetMode, resolveAgentRef, resolveCardHealth, resolveCardUrl, resolveEmbed, resolveVerifierProvider, rgbToString, roadmapIssueUrl, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, selfLabelsSchema, shouldRenderHighlights, singleDateExtractor, skillRefSchema, slugifyTitle, sortByActiveDateRange, sortByDateDesc, sortCertifications, sortEducation, sortHonors, sortLanguages, sortLanguagesByProficiency, sortPositions, sortProjects, sortPublications, streamAddressSchema, streamAuthorSchema, streamCardBodySchema, streamCardSubjectSchema, streamCardVMSchema, streamExternalLinkSchema, streamGeoSchema, streamMediaSchema, streamRichSegmentSchema, streamSourceSchema, streamThemeSchema, streamVerbSchema, stripHtmlToText, strongRefSchema, summarizePresentationDeliveries, summarizeProfileView, toStreamCardVM, toStreamCardVMs, truncateGraphemes, uriSchema, verbForCollection, visibleItems, youtubeThumbnailUrl, youtubeVideoId };
6572
6589
  //# sourceMappingURL=index.js.map