@singi-labs/sifa-sdk 0.16.0 → 0.17.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.d.cts CHANGED
@@ -1444,6 +1444,33 @@ declare function getPublisherFromSiteUrl(siteUrl: string): Publisher;
1444
1444
  * embeds, content labels) are layered on in sifa-web and are not part of the
1445
1445
  * shared contract.
1446
1446
  */
1447
+ interface HypercertContributorView {
1448
+ displayName: string;
1449
+ imageUrl?: string;
1450
+ /**
1451
+ * Where the contributor lives. A GitHub profile URL on every
1452
+ * `contributorInformation` record sampled to date, never a DID or atproto
1453
+ * handle, so this does not resolve to a Sifa profile.
1454
+ */
1455
+ identifier?: string;
1456
+ /** Percentage share of the claim; weights across a claim sum to 100. */
1457
+ weight?: number;
1458
+ }
1459
+ interface HypercertAttachmentView {
1460
+ title?: string;
1461
+ url: string;
1462
+ }
1463
+ /**
1464
+ * Contributor and attachment detail for an `org.hypercerts.claim.activity`
1465
+ * record, resolved by sifa-api out of sidecar records in the claim's own repo.
1466
+ * A card cannot reach them itself.
1467
+ */
1468
+ interface HypercertDetailsView {
1469
+ contributors: HypercertContributorView[];
1470
+ /** Total before truncation, so a renderer can show "+N more". */
1471
+ contributorCount: number;
1472
+ attachments: HypercertAttachmentView[];
1473
+ }
1447
1474
  interface ActivityItem {
1448
1475
  /** Full at-uri of the record: stable key + permalink source. */
1449
1476
  uri: string;
@@ -1487,6 +1514,12 @@ interface ActivityItem {
1487
1514
  * a `StreamCardVM` too.
1488
1515
  */
1489
1516
  subject?: ActivityItem;
1517
+ /**
1518
+ * Hypercert claim enrichment, set by sifa-api. Absent for non-hypercert
1519
+ * items, for claims with neither contributors nor attachments, and for
1520
+ * responses predating the field.
1521
+ */
1522
+ hypercertDetails?: HypercertDetailsView;
1490
1523
  }
1491
1524
 
1492
1525
  /**
@@ -1798,6 +1831,12 @@ interface StreamCardVM {
1798
1831
  externalLink?: StreamExternalLink;
1799
1832
  theme?: StreamTheme;
1800
1833
  subject?: StreamCardSubject;
1834
+ /**
1835
+ * Contributor and attachment detail for a hypercert claim, passed through
1836
+ * from the `ActivityItem` sifa-api hydrated. Renderers show a credit roll
1837
+ * and the claim's outbound links instead of a bare contributor count.
1838
+ */
1839
+ hypercertDetails?: HypercertDetailsView;
1801
1840
  }
1802
1841
 
1803
1842
  declare const streamSourceSchema: z.ZodType<StreamSource>;
package/dist/index.d.ts CHANGED
@@ -1444,6 +1444,33 @@ declare function getPublisherFromSiteUrl(siteUrl: string): Publisher;
1444
1444
  * embeds, content labels) are layered on in sifa-web and are not part of the
1445
1445
  * shared contract.
1446
1446
  */
1447
+ interface HypercertContributorView {
1448
+ displayName: string;
1449
+ imageUrl?: string;
1450
+ /**
1451
+ * Where the contributor lives. A GitHub profile URL on every
1452
+ * `contributorInformation` record sampled to date, never a DID or atproto
1453
+ * handle, so this does not resolve to a Sifa profile.
1454
+ */
1455
+ identifier?: string;
1456
+ /** Percentage share of the claim; weights across a claim sum to 100. */
1457
+ weight?: number;
1458
+ }
1459
+ interface HypercertAttachmentView {
1460
+ title?: string;
1461
+ url: string;
1462
+ }
1463
+ /**
1464
+ * Contributor and attachment detail for an `org.hypercerts.claim.activity`
1465
+ * record, resolved by sifa-api out of sidecar records in the claim's own repo.
1466
+ * A card cannot reach them itself.
1467
+ */
1468
+ interface HypercertDetailsView {
1469
+ contributors: HypercertContributorView[];
1470
+ /** Total before truncation, so a renderer can show "+N more". */
1471
+ contributorCount: number;
1472
+ attachments: HypercertAttachmentView[];
1473
+ }
1447
1474
  interface ActivityItem {
1448
1475
  /** Full at-uri of the record: stable key + permalink source. */
1449
1476
  uri: string;
@@ -1487,6 +1514,12 @@ interface ActivityItem {
1487
1514
  * a `StreamCardVM` too.
1488
1515
  */
1489
1516
  subject?: ActivityItem;
1517
+ /**
1518
+ * Hypercert claim enrichment, set by sifa-api. Absent for non-hypercert
1519
+ * items, for claims with neither contributors nor attachments, and for
1520
+ * responses predating the field.
1521
+ */
1522
+ hypercertDetails?: HypercertDetailsView;
1490
1523
  }
1491
1524
 
1492
1525
  /**
@@ -1798,6 +1831,12 @@ interface StreamCardVM {
1798
1831
  externalLink?: StreamExternalLink;
1799
1832
  theme?: StreamTheme;
1800
1833
  subject?: StreamCardSubject;
1834
+ /**
1835
+ * Contributor and attachment detail for a hypercert claim, passed through
1836
+ * from the `ActivityItem` sifa-api hydrated. Renderers show a credit roll
1837
+ * and the claim's outbound links instead of a bare contributor count.
1838
+ */
1839
+ hypercertDetails?: HypercertDetailsView;
1801
1840
  }
1802
1841
 
1803
1842
  declare const streamSourceSchema: z.ZodType<StreamSource>;
package/dist/index.js CHANGED
@@ -4068,6 +4068,18 @@ var streamCardSubjectSchema = z.discriminatedUnion("kind", [
4068
4068
  title: z.string().optional()
4069
4069
  })
4070
4070
  ]);
4071
+ var hypercertDetailsSchema = z.object({
4072
+ contributors: z.array(
4073
+ z.object({
4074
+ displayName: z.string(),
4075
+ imageUrl: z.string().optional(),
4076
+ identifier: z.string().optional(),
4077
+ weight: z.number().optional()
4078
+ })
4079
+ ),
4080
+ contributorCount: z.number(),
4081
+ attachments: z.array(z.object({ title: z.string().optional(), url: z.string() }))
4082
+ });
4071
4083
  var streamCardVMSchema = z.lazy(
4072
4084
  () => z.object({
4073
4085
  uri: z.string(),
@@ -4083,7 +4095,8 @@ var streamCardVMSchema = z.lazy(
4083
4095
  media: z.array(streamMediaSchema).optional(),
4084
4096
  externalLink: streamExternalLinkSchema.optional(),
4085
4097
  theme: streamThemeSchema.optional(),
4086
- subject: z.lazy(() => streamCardSubjectSchema).optional()
4098
+ subject: z.lazy(() => streamCardSubjectSchema).optional(),
4099
+ hypercertDetails: hypercertDetailsSchema.optional()
4087
4100
  })
4088
4101
  );
4089
4102
  function maxGraphemes(max) {
@@ -4806,6 +4819,7 @@ function toStreamCardVM(item, options = {}) {
4806
4819
  const sourceUrl = resolveSourceUrl(item, record);
4807
4820
  if (sourceUrl) vm.sourceUrl = sourceUrl;
4808
4821
  }
4822
+ if (item.hypercertDetails) vm.hypercertDetails = item.hypercertDetails;
4809
4823
  if (item.subject) {
4810
4824
  vm.subject = { kind: "post", post: toStreamCardVM(item.subject, options) };
4811
4825
  }
@@ -6022,7 +6036,7 @@ function describeSifaRecord(collection, value) {
6022
6036
  }
6023
6037
 
6024
6038
  // src/index.ts
6025
- var SIFA_SDK_VERSION = "0.16.0";
6039
+ var SIFA_SDK_VERSION = "0.17.0";
6026
6040
 
6027
6041
  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, SIFA_REPO_GROUPS, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, STREAM_VERBS, SifaFeedItemSchema, VERIFICATION_PROVIDERS, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, atUriSchema, buildMetaDescription, buildTalkSlug, categoryForApp, certDateExtractor, cidSchema, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countRecentActivity, countryCodeToFlag, dateRangeExtractor, datetimeSchema, decodeFeedCursor, dedupeSkills, describeSifaRecord, detectPdsProvider, didSchema, dimensionsFromInputs, durationFromMinutes, encodeFeedCursor, entityDisambiguationLabel, entityResultKey, externalRecordRefSchema, filterHidden, findIndustry, formatCompanyName, formatDateRange, formatDisplayUrl, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, 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, isRoleLineRedundant, isSectionPopulated, isValidRgbColor, isVisibleActivityItem, languageTagSchema, lexiconDateExtractor, limitCombiningMarks, locationSegments, looksLikeDomain, makeGraphFollowRecordSchema, maxGraphemes, meetsContrastAA, normalizeCompanyKey, normalizeDoi, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeSkillCategory, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, parseTalkRkey, partialDateSchema, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, primaryVerification, profileToDimensionInputs, qualifiesAsOrg, relativeLuminance, rendersCompanyProfile, rendersPersonalProfile, repoGroupForCollection, resolveAccountFacetMode, resolveCardHealth, resolveCardUrl, resolveEmbed, resolveVerifierProvider, rgbToString, roadmapIssueUrl, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, selfLabelsSchema, 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 };
6028
6042
  //# sourceMappingURL=index.js.map