@singi-labs/sifa-sdk 0.17.0 → 0.18.1

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
@@ -460,6 +460,7 @@ declare const APP_CATEGORY_MAP: {
460
460
  readonly certified: "Endorsements";
461
461
  readonly impactindexer: "Reviews";
462
462
  readonly pinksea: "Art";
463
+ readonly dropanchor: "Places";
463
464
  readonly linkat: "Links";
464
465
  readonly kipclip: "Links";
465
466
  readonly statusphere: "Social";
@@ -1471,6 +1472,44 @@ interface HypercertDetailsView {
1471
1472
  contributorCount: number;
1472
1473
  attachments: HypercertAttachmentView[];
1473
1474
  }
1475
+ /** An account a Certified record points at: a badge recipient, or a group. */
1476
+ interface CertifiedActorView {
1477
+ did: string;
1478
+ /**
1479
+ * The account's handle. Falls back to the DID when nothing resolved. Note
1480
+ * that some accounts in this ecosystem are not on Bluesky at all (the
1481
+ * Hypercerts Foundation's own account resolves only through its DID
1482
+ * document), so a Bluesky-only lookup is not sufficient.
1483
+ */
1484
+ handle: string;
1485
+ displayName?: string;
1486
+ avatar?: string;
1487
+ }
1488
+ /** The badge definition behind an award: what the badge is, and why. */
1489
+ interface CertifiedBadgeView {
1490
+ title: string;
1491
+ /** Why the badge exists, straight from the definition record. */
1492
+ description?: string;
1493
+ /** Emoji from the definition, e.g. a medal. */
1494
+ icon?: string;
1495
+ /** e.g. "endorsement", "evaluator". */
1496
+ badgeType?: string;
1497
+ }
1498
+ /**
1499
+ * Certified enrichment, resolved by sifa-api. Covers both directions: a badge
1500
+ * the person awarded to someone else, and one they received and accepted.
1501
+ */
1502
+ interface CertifiedDetailsView {
1503
+ badge?: CertifiedBadgeView;
1504
+ /** Who received the badge, for an award the person issued. */
1505
+ recipient?: CertifiedActorView;
1506
+ /** Who issued the badge, for one the person received and accepted. */
1507
+ issuer?: CertifiedActorView;
1508
+ /** The group joined, for a membership record. */
1509
+ group?: CertifiedActorView;
1510
+ /** Role on a membership, e.g. "owner", "admin", "member". */
1511
+ role?: string;
1512
+ }
1474
1513
  interface ActivityItem {
1475
1514
  /** Full at-uri of the record: stable key + permalink source. */
1476
1515
  uri: string;
@@ -1520,6 +1559,11 @@ interface ActivityItem {
1520
1559
  * responses predating the field.
1521
1560
  */
1522
1561
  hypercertDetails?: HypercertDetailsView;
1562
+ /**
1563
+ * Certified enrichment: the badge behind an award and the resolved accounts
1564
+ * it points at. Absent for non-Certified items and legacy responses.
1565
+ */
1566
+ certifiedDetails?: CertifiedDetailsView;
1523
1567
  }
1524
1568
 
1525
1569
  /**
@@ -1837,6 +1881,11 @@ interface StreamCardVM {
1837
1881
  * and the claim's outbound links instead of a bare contributor count.
1838
1882
  */
1839
1883
  hypercertDetails?: HypercertDetailsView;
1884
+ /**
1885
+ * Certified badge + resolved accounts, passed through from the ActivityItem
1886
+ * sifa-api hydrated.
1887
+ */
1888
+ certifiedDetails?: CertifiedDetailsView;
1840
1889
  }
1841
1890
 
1842
1891
  declare const streamSourceSchema: z.ZodType<StreamSource>;
package/dist/index.d.ts CHANGED
@@ -460,6 +460,7 @@ declare const APP_CATEGORY_MAP: {
460
460
  readonly certified: "Endorsements";
461
461
  readonly impactindexer: "Reviews";
462
462
  readonly pinksea: "Art";
463
+ readonly dropanchor: "Places";
463
464
  readonly linkat: "Links";
464
465
  readonly kipclip: "Links";
465
466
  readonly statusphere: "Social";
@@ -1471,6 +1472,44 @@ interface HypercertDetailsView {
1471
1472
  contributorCount: number;
1472
1473
  attachments: HypercertAttachmentView[];
1473
1474
  }
1475
+ /** An account a Certified record points at: a badge recipient, or a group. */
1476
+ interface CertifiedActorView {
1477
+ did: string;
1478
+ /**
1479
+ * The account's handle. Falls back to the DID when nothing resolved. Note
1480
+ * that some accounts in this ecosystem are not on Bluesky at all (the
1481
+ * Hypercerts Foundation's own account resolves only through its DID
1482
+ * document), so a Bluesky-only lookup is not sufficient.
1483
+ */
1484
+ handle: string;
1485
+ displayName?: string;
1486
+ avatar?: string;
1487
+ }
1488
+ /** The badge definition behind an award: what the badge is, and why. */
1489
+ interface CertifiedBadgeView {
1490
+ title: string;
1491
+ /** Why the badge exists, straight from the definition record. */
1492
+ description?: string;
1493
+ /** Emoji from the definition, e.g. a medal. */
1494
+ icon?: string;
1495
+ /** e.g. "endorsement", "evaluator". */
1496
+ badgeType?: string;
1497
+ }
1498
+ /**
1499
+ * Certified enrichment, resolved by sifa-api. Covers both directions: a badge
1500
+ * the person awarded to someone else, and one they received and accepted.
1501
+ */
1502
+ interface CertifiedDetailsView {
1503
+ badge?: CertifiedBadgeView;
1504
+ /** Who received the badge, for an award the person issued. */
1505
+ recipient?: CertifiedActorView;
1506
+ /** Who issued the badge, for one the person received and accepted. */
1507
+ issuer?: CertifiedActorView;
1508
+ /** The group joined, for a membership record. */
1509
+ group?: CertifiedActorView;
1510
+ /** Role on a membership, e.g. "owner", "admin", "member". */
1511
+ role?: string;
1512
+ }
1474
1513
  interface ActivityItem {
1475
1514
  /** Full at-uri of the record: stable key + permalink source. */
1476
1515
  uri: string;
@@ -1520,6 +1559,11 @@ interface ActivityItem {
1520
1559
  * responses predating the field.
1521
1560
  */
1522
1561
  hypercertDetails?: HypercertDetailsView;
1562
+ /**
1563
+ * Certified enrichment: the badge behind an award and the resolved accounts
1564
+ * it points at. Absent for non-Certified items and legacy responses.
1565
+ */
1566
+ certifiedDetails?: CertifiedDetailsView;
1523
1567
  }
1524
1568
 
1525
1569
  /**
@@ -1837,6 +1881,11 @@ interface StreamCardVM {
1837
1881
  * and the claim's outbound links instead of a bare contributor count.
1838
1882
  */
1839
1883
  hypercertDetails?: HypercertDetailsView;
1884
+ /**
1885
+ * Certified badge + resolved accounts, passed through from the ActivityItem
1886
+ * sifa-api hydrated.
1887
+ */
1888
+ certifiedDetails?: CertifiedDetailsView;
1840
1889
  }
1841
1890
 
1842
1891
  declare const streamSourceSchema: z.ZodType<StreamSource>;
package/dist/index.js CHANGED
@@ -1136,6 +1136,9 @@ var APP_CATEGORY_MAP = {
1136
1136
  // org.impactindexer.review.comment — written reviews of a hypercert claim
1137
1137
  pinksea: "Art",
1138
1138
  // com.shinolabs.pinksea.oekaki — hand-drawn artwork posted to the PinkSea oekaki BBS
1139
+ // Onboard from the tijs.org profile audit.
1140
+ dropanchor: "Places",
1141
+ // app.dropanchor.checkin — location check-ins (place, geo, optional review text)
1139
1142
  // Web-only (rendered in pills/cards via sifa-web atproto-apps.ts;
1140
1143
  // no backend scan collection yet)
1141
1144
  linkat: "Links",
@@ -1152,7 +1155,7 @@ function categoryForApp(appId) {
1152
1155
  // src/taxonomy/activity-tiers.json
1153
1156
  var activity_tiers_default = {
1154
1157
  $schema: "https://sifa.id/schemas/activity-tiers/v1.json",
1155
- version: "1.2.0",
1158
+ version: "1.3.0",
1156
1159
  updated: "2026-08-25",
1157
1160
  tiers: {
1158
1161
  creation: {
@@ -1256,11 +1259,21 @@ var activity_tiers_default = {
1256
1259
  app: "certified",
1257
1260
  notes: "An endorsement issued to another DID. A trust signal the actor contributes, like a Bluesky verification."
1258
1261
  },
1262
+ "app.certified.badge.response": {
1263
+ tier: "creation",
1264
+ app: "certified",
1265
+ notes: "The recipient's acceptance of a badge someone else awarded them. An accepted badge is a credential the person holds; rejected ones are hidden by an ACTIVITY_VISIBILITY_RULES predicate."
1266
+ },
1259
1267
  "app.collectivesocial.feed.list": {
1260
1268
  tier: "creation",
1261
1269
  app: "collectivesocial",
1262
1270
  notes: "Auto-created default Inbox lists are filtered at the consumer layer via isDefault=true predicate."
1263
1271
  },
1272
+ "app.dropanchor.checkin": {
1273
+ tier: "creation",
1274
+ app: "dropanchor",
1275
+ notes: "A location check-in (place, geo, category, optional review text). Authored, so creation. app.dropanchor.like is excluded backend-side."
1276
+ },
1264
1277
  "app.mcp.server": {
1265
1278
  tier: "creation",
1266
1279
  app: "mcp"
@@ -3423,6 +3436,12 @@ var APP_URL_PATTERNS = Object.freeze({
3423
3436
  // are pre-encoded as literals here rather than resolved bespoke.
3424
3437
  urlPattern: "https://chive.pub/eprints/at%3A%2F%2F{did}%2Fpub.chive.eprint.submission%2F{rkey}",
3425
3438
  profileUrlPattern: "https://chive.pub/authors/{did}"
3439
+ },
3440
+ dropanchor: {
3441
+ // Dropanchor (dropanchor.app) renders each check-in at /checkin/{rkey} —
3442
+ // the record's own rkey, no did/handle needed. Documented as the OG-tagged
3443
+ // share URL in the dropanchorapp repos. A self-permalink for this record.
3444
+ urlPattern: "https://dropanchor.app/checkin/{rkey}"
3426
3445
  }
3427
3446
  });
3428
3447
  var COLLECTION_TO_APP = [
@@ -3504,7 +3523,9 @@ var COLLECTION_TO_APP = [
3504
3523
  ["org.hypercerts.", "hypercerts"],
3505
3524
  ["app.certified.", "certified"],
3506
3525
  ["org.impactindexer.", "impactindexer"],
3507
- ["com.shinolabs.pinksea.", "pinksea"]
3526
+ ["com.shinolabs.pinksea.", "pinksea"],
3527
+ // Onboard from tijs.org profile audit.
3528
+ ["app.dropanchor.", "dropanchor"]
3508
3529
  ];
3509
3530
 
3510
3531
  // src/cards/resolve-card-url.ts
@@ -3703,11 +3724,15 @@ function marginAnnotationHasBody(record) {
3703
3724
  }
3704
3725
  return false;
3705
3726
  }
3727
+ function certifiedBadgeAccepted(record) {
3728
+ return record.response === "accepted";
3729
+ }
3706
3730
  var ACTIVITY_VISIBILITY_RULES = Object.freeze({
3707
3731
  "buzz.bookhive.book": bookhiveHasOpinion,
3708
3732
  "app.beaconbits.beacon": beaconbitsHasContent,
3709
3733
  "at.margin.bookmark": marginBookmarkHasSource,
3710
- "at.margin.annotation": marginAnnotationHasBody
3734
+ "at.margin.annotation": marginAnnotationHasBody,
3735
+ "app.certified.badge.response": certifiedBadgeAccepted
3711
3736
  });
3712
3737
  function isVisibleActivityItem(collection, record) {
3713
3738
  if (record === null || typeof record !== "object") return false;
@@ -4080,6 +4105,24 @@ var hypercertDetailsSchema = z.object({
4080
4105
  contributorCount: z.number(),
4081
4106
  attachments: z.array(z.object({ title: z.string().optional(), url: z.string() }))
4082
4107
  });
4108
+ var certifiedActorSchema = z.object({
4109
+ did: z.string(),
4110
+ handle: z.string(),
4111
+ displayName: z.string().optional(),
4112
+ avatar: z.string().optional()
4113
+ });
4114
+ var certifiedDetailsSchema = z.object({
4115
+ badge: z.object({
4116
+ title: z.string(),
4117
+ description: z.string().optional(),
4118
+ icon: z.string().optional(),
4119
+ badgeType: z.string().optional()
4120
+ }).optional(),
4121
+ recipient: certifiedActorSchema.optional(),
4122
+ issuer: certifiedActorSchema.optional(),
4123
+ group: certifiedActorSchema.optional(),
4124
+ role: z.string().optional()
4125
+ });
4083
4126
  var streamCardVMSchema = z.lazy(
4084
4127
  () => z.object({
4085
4128
  uri: z.string(),
@@ -4096,7 +4139,8 @@ var streamCardVMSchema = z.lazy(
4096
4139
  externalLink: streamExternalLinkSchema.optional(),
4097
4140
  theme: streamThemeSchema.optional(),
4098
4141
  subject: z.lazy(() => streamCardSubjectSchema).optional(),
4099
- hypercertDetails: hypercertDetailsSchema.optional()
4142
+ hypercertDetails: hypercertDetailsSchema.optional(),
4143
+ certifiedDetails: certifiedDetailsSchema.optional()
4100
4144
  })
4101
4145
  );
4102
4146
  function maxGraphemes(max) {
@@ -4820,6 +4864,7 @@ function toStreamCardVM(item, options = {}) {
4820
4864
  if (sourceUrl) vm.sourceUrl = sourceUrl;
4821
4865
  }
4822
4866
  if (item.hypercertDetails) vm.hypercertDetails = item.hypercertDetails;
4867
+ if (item.certifiedDetails) vm.certifiedDetails = item.certifiedDetails;
4823
4868
  if (item.subject) {
4824
4869
  vm.subject = { kind: "post", post: toStreamCardVM(item.subject, options) };
4825
4870
  }
@@ -6036,7 +6081,7 @@ function describeSifaRecord(collection, value) {
6036
6081
  }
6037
6082
 
6038
6083
  // src/index.ts
6039
- var SIFA_SDK_VERSION = "0.17.0";
6084
+ var SIFA_SDK_VERSION = "0.18.1";
6040
6085
 
6041
6086
  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 };
6042
6087
  //# sourceMappingURL=index.js.map