@singi-labs/sifa-sdk 0.19.21 → 0.19.23
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 +37 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +37 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1632,12 +1632,13 @@ interface ActivityItem {
|
|
|
1632
1632
|
* standard-site; "posted" spans Bluesky and Picosky) so a day-grouped feed
|
|
1633
1633
|
* reads like sentences.
|
|
1634
1634
|
*/
|
|
1635
|
-
declare const STREAM_VERBS: readonly ["posted", "reposted", "published", "presented", "endorsed", "joined", "shipped", "reviewed", "created", "commented", "replied", "rsvped", "liked", "followed", "bookmarked", "registered", "annotated"];
|
|
1635
|
+
declare const STREAM_VERBS: readonly ["posted", "reposted", "published", "presented", "endorsed", "joined", "shipped", "reviewed", "created", "commented", "replied", "rsvped", "liked", "followed", "bookmarked", "registered", "annotated", "streamed", "wrote", "wasAt", "metWith", "supported", "verified"];
|
|
1636
1636
|
type StreamVerb = (typeof STREAM_VERBS)[number];
|
|
1637
1637
|
/** Zod enum for a {@link StreamVerb}, shared with the view-model schema. */
|
|
1638
1638
|
declare const streamVerbSchema: z.ZodEnum<{
|
|
1639
1639
|
created: "created";
|
|
1640
1640
|
joined: "joined";
|
|
1641
|
+
wasAt: "wasAt";
|
|
1641
1642
|
replied: "replied";
|
|
1642
1643
|
posted: "posted";
|
|
1643
1644
|
reposted: "reposted";
|
|
@@ -1645,14 +1646,19 @@ declare const streamVerbSchema: z.ZodEnum<{
|
|
|
1645
1646
|
annotated: "annotated";
|
|
1646
1647
|
bookmarked: "bookmarked";
|
|
1647
1648
|
registered: "registered";
|
|
1648
|
-
|
|
1649
|
+
metWith: "metWith";
|
|
1650
|
+
wrote: "wrote";
|
|
1649
1651
|
reviewed: "reviewed";
|
|
1650
1652
|
published: "published";
|
|
1651
1653
|
rsvped: "rsvped";
|
|
1652
1654
|
commented: "commented";
|
|
1655
|
+
verified: "verified";
|
|
1656
|
+
supported: "supported";
|
|
1653
1657
|
endorsed: "endorsed";
|
|
1654
1658
|
presented: "presented";
|
|
1659
|
+
streamed: "streamed";
|
|
1655
1660
|
liked: "liked";
|
|
1661
|
+
followed: "followed";
|
|
1656
1662
|
}>;
|
|
1657
1663
|
interface ActivityVerbMap {
|
|
1658
1664
|
version: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1632,12 +1632,13 @@ interface ActivityItem {
|
|
|
1632
1632
|
* standard-site; "posted" spans Bluesky and Picosky) so a day-grouped feed
|
|
1633
1633
|
* reads like sentences.
|
|
1634
1634
|
*/
|
|
1635
|
-
declare const STREAM_VERBS: readonly ["posted", "reposted", "published", "presented", "endorsed", "joined", "shipped", "reviewed", "created", "commented", "replied", "rsvped", "liked", "followed", "bookmarked", "registered", "annotated"];
|
|
1635
|
+
declare const STREAM_VERBS: readonly ["posted", "reposted", "published", "presented", "endorsed", "joined", "shipped", "reviewed", "created", "commented", "replied", "rsvped", "liked", "followed", "bookmarked", "registered", "annotated", "streamed", "wrote", "wasAt", "metWith", "supported", "verified"];
|
|
1636
1636
|
type StreamVerb = (typeof STREAM_VERBS)[number];
|
|
1637
1637
|
/** Zod enum for a {@link StreamVerb}, shared with the view-model schema. */
|
|
1638
1638
|
declare const streamVerbSchema: z.ZodEnum<{
|
|
1639
1639
|
created: "created";
|
|
1640
1640
|
joined: "joined";
|
|
1641
|
+
wasAt: "wasAt";
|
|
1641
1642
|
replied: "replied";
|
|
1642
1643
|
posted: "posted";
|
|
1643
1644
|
reposted: "reposted";
|
|
@@ -1645,14 +1646,19 @@ declare const streamVerbSchema: z.ZodEnum<{
|
|
|
1645
1646
|
annotated: "annotated";
|
|
1646
1647
|
bookmarked: "bookmarked";
|
|
1647
1648
|
registered: "registered";
|
|
1648
|
-
|
|
1649
|
+
metWith: "metWith";
|
|
1650
|
+
wrote: "wrote";
|
|
1649
1651
|
reviewed: "reviewed";
|
|
1650
1652
|
published: "published";
|
|
1651
1653
|
rsvped: "rsvped";
|
|
1652
1654
|
commented: "commented";
|
|
1655
|
+
verified: "verified";
|
|
1656
|
+
supported: "supported";
|
|
1653
1657
|
endorsed: "endorsed";
|
|
1654
1658
|
presented: "presented";
|
|
1659
|
+
streamed: "streamed";
|
|
1655
1660
|
liked: "liked";
|
|
1661
|
+
followed: "followed";
|
|
1656
1662
|
}>;
|
|
1657
1663
|
interface ActivityVerbMap {
|
|
1658
1664
|
version: string;
|
package/dist/index.js
CHANGED
|
@@ -4012,11 +4012,12 @@ function getPublisherFromSiteUrl(siteUrl) {
|
|
|
4012
4012
|
// src/stream/verbs.json
|
|
4013
4013
|
var verbs_default = {
|
|
4014
4014
|
$schema: "https://sifa.id/schemas/activity-verbs/v1.json",
|
|
4015
|
-
version: "1.
|
|
4016
|
-
updated: "2026-09-
|
|
4015
|
+
version: "1.6.0",
|
|
4016
|
+
updated: "2026-09-20",
|
|
4017
4017
|
defaultVerb: "created",
|
|
4018
4018
|
verbs: {
|
|
4019
4019
|
"agency.portable.membership": "joined",
|
|
4020
|
+
"app.beaconbits.beacon": "wasAt",
|
|
4020
4021
|
"app.atmobb.discussion.reply": "replied",
|
|
4021
4022
|
"app.bsky.feed.post": "posted",
|
|
4022
4023
|
"app.bsky.feed.repost": "reposted",
|
|
@@ -4027,7 +4028,8 @@ var verbs_default = {
|
|
|
4027
4028
|
"at.margin.bookmark": "bookmarked",
|
|
4028
4029
|
"at.margin.note": "annotated",
|
|
4029
4030
|
"at.marque.domain": "registered",
|
|
4030
|
-
"at.youandme.connection": "
|
|
4031
|
+
"at.youandme.connection": "metWith",
|
|
4032
|
+
"blog.pckt.mini.post": "wrote",
|
|
4031
4033
|
"blue.flashes.feed.post": "posted",
|
|
4032
4034
|
"buzz.bookhive.book": "reviewed",
|
|
4033
4035
|
"com.whtwnd.blog.entry": "published",
|
|
@@ -4036,9 +4038,12 @@ var verbs_default = {
|
|
|
4036
4038
|
"community.nooki.membership": "joined",
|
|
4037
4039
|
"community.opensocial.membership": "joined",
|
|
4038
4040
|
"computer.aetheros.page": "published",
|
|
4041
|
+
"dev.keytrace.claim": "verified",
|
|
4039
4042
|
"eu.atcommons.member": "joined",
|
|
4040
4043
|
"fm.plyr.comment": "commented",
|
|
4041
4044
|
"forum.barazo.post": "posted",
|
|
4045
|
+
"fund.at.graph.endorse": "supported",
|
|
4046
|
+
"fyi.atstore.listing.review": "reviewed",
|
|
4042
4047
|
"fyi.unravel.frontpage.post": "posted",
|
|
4043
4048
|
"id.sifa.endorsement": "endorsed",
|
|
4044
4049
|
"id.sifa.graph.connection": "joined",
|
|
@@ -4052,6 +4057,8 @@ var verbs_default = {
|
|
|
4052
4057
|
"sh.tangled.repo.pull": "shipped",
|
|
4053
4058
|
"site.standard.document": "published",
|
|
4054
4059
|
"social.colibri.membership": "joined",
|
|
4060
|
+
"social.grain.gallery": "posted",
|
|
4061
|
+
"place.stream.livestream": "streamed",
|
|
4055
4062
|
"social.kut.community.membership": "joined",
|
|
4056
4063
|
"social.popfeed.feed.note": "posted",
|
|
4057
4064
|
"social.popfeed.feed.post": "posted",
|
|
@@ -4081,7 +4088,13 @@ var STREAM_VERBS = [
|
|
|
4081
4088
|
"followed",
|
|
4082
4089
|
"bookmarked",
|
|
4083
4090
|
"registered",
|
|
4084
|
-
"annotated"
|
|
4091
|
+
"annotated",
|
|
4092
|
+
"streamed",
|
|
4093
|
+
"wrote",
|
|
4094
|
+
"wasAt",
|
|
4095
|
+
"metWith",
|
|
4096
|
+
"supported",
|
|
4097
|
+
"verified"
|
|
4085
4098
|
];
|
|
4086
4099
|
var streamVerbSchema = z.enum(STREAM_VERBS);
|
|
4087
4100
|
var verbMapSchema = z.object({
|
|
@@ -4539,7 +4552,13 @@ var TITLE_BY_VERB = {
|
|
|
4539
4552
|
followed: () => "Followed",
|
|
4540
4553
|
bookmarked: () => "Bookmarked",
|
|
4541
4554
|
registered: () => "Registered",
|
|
4542
|
-
annotated: () => "Annotated"
|
|
4555
|
+
annotated: () => "Annotated",
|
|
4556
|
+
streamed: () => "Streamed",
|
|
4557
|
+
wrote: () => "Wrote",
|
|
4558
|
+
wasAt: () => "Was at",
|
|
4559
|
+
metWith: () => "Met with",
|
|
4560
|
+
supported: () => "Supported",
|
|
4561
|
+
verified: () => "Verified"
|
|
4543
4562
|
};
|
|
4544
4563
|
function buildTitle(verb, label, hasSubject) {
|
|
4545
4564
|
return TITLE_BY_VERB[verb](label, hasSubject);
|
|
@@ -4795,6 +4814,15 @@ function applyKeytraceVerification(vm, record) {
|
|
|
4795
4814
|
const profileUrl = asNonEmptyString(identity.profileUrl);
|
|
4796
4815
|
if (profileUrl) body.profileUrl = profileUrl;
|
|
4797
4816
|
vm.body = body;
|
|
4817
|
+
const accountLabel = subjectLabel ?? asNonEmptyString(record.type);
|
|
4818
|
+
if (accountLabel) {
|
|
4819
|
+
vm.subject = {
|
|
4820
|
+
kind: "record",
|
|
4821
|
+
uri: "",
|
|
4822
|
+
title: accountLabel,
|
|
4823
|
+
...profileUrl ? { url: profileUrl } : {}
|
|
4824
|
+
};
|
|
4825
|
+
}
|
|
4798
4826
|
return vm;
|
|
4799
4827
|
}
|
|
4800
4828
|
function applyBskyVerification(vm, record) {
|
|
@@ -4887,9 +4915,9 @@ function applyStandardSite(vm, record) {
|
|
|
4887
4915
|
vm.body = body;
|
|
4888
4916
|
return vm;
|
|
4889
4917
|
}
|
|
4890
|
-
function applyYouAndMe(vm, record) {
|
|
4918
|
+
function applyYouAndMe(vm, record, item) {
|
|
4891
4919
|
const did = asNonEmptyString(record.subject);
|
|
4892
|
-
if (did) vm.subject = { kind: "person", did };
|
|
4920
|
+
if (did) vm.subject = withResolvedSubjectMeta({ kind: "person", did }, item);
|
|
4893
4921
|
vm.body = { kind: "generic" };
|
|
4894
4922
|
return vm;
|
|
4895
4923
|
}
|
|
@@ -5157,7 +5185,7 @@ function toStreamCardVM(item, options = {}) {
|
|
|
5157
5185
|
case "site.standard.document":
|
|
5158
5186
|
return record ? applyStandardSite(vm, record) : withGeneric(vm);
|
|
5159
5187
|
case "at.youandme.connection":
|
|
5160
|
-
return record ? applyYouAndMe(vm, record) : withGeneric(vm);
|
|
5188
|
+
return record ? applyYouAndMe(vm, record, item) : withGeneric(vm);
|
|
5161
5189
|
case "fyi.asq.answer":
|
|
5162
5190
|
return record ? applyAsqAnswer(vm, record) : withGeneric(vm);
|
|
5163
5191
|
case "fediverse.post":
|
|
@@ -6607,7 +6635,7 @@ function describeSifaRecord(collection, value) {
|
|
|
6607
6635
|
}
|
|
6608
6636
|
|
|
6609
6637
|
// src/index.ts
|
|
6610
|
-
var SIFA_SDK_VERSION = "0.19.
|
|
6638
|
+
var SIFA_SDK_VERSION = "0.19.23";
|
|
6611
6639
|
|
|
6612
6640
|
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 };
|
|
6613
6641
|
//# sourceMappingURL=index.js.map
|