@singi-labs/sifa-sdk 0.12.9 → 0.12.11

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
@@ -1230,21 +1230,56 @@ interface StreamExternalLink {
1230
1230
  title?: string;
1231
1231
  thumb?: string;
1232
1232
  }
1233
+ /**
1234
+ * One span of a rich-text body. Built from `app.bsky.richtext.facet`-style
1235
+ * facets (byte-offset ranges over the plain `text`). Plain runs carry only
1236
+ * `text`; enriched runs additionally carry exactly one of `link` (resolved
1237
+ * URL), `mention` (DID), or `tag` (hashtag). `body.text` always holds the full
1238
+ * plain string, so a renderer can ignore `richSegments` and still show content.
1239
+ */
1240
+ interface StreamRichSegment {
1241
+ text: string;
1242
+ link?: string;
1243
+ mention?: string;
1244
+ tag?: string;
1245
+ }
1246
+ /** A geo coordinate pair (beacon `location`). */
1247
+ interface StreamGeo {
1248
+ latitude: number;
1249
+ longitude: number;
1250
+ }
1251
+ /** A structured postal address (beacon `addressDetails`). All parts optional. */
1252
+ interface StreamAddress {
1253
+ name?: string;
1254
+ street?: string;
1255
+ locality?: string;
1256
+ region?: string;
1257
+ country?: string;
1258
+ postalCode?: string;
1259
+ }
1233
1260
  /**
1234
1261
  * The primary content body. A small discriminated union so both the React and
1235
1262
  * the string-HTML renderer switch on one field. `track` is reserved (dame
1236
- * music scrobbles; no sifa-web card uses it yet). App-specific variants
1237
- * (github-pr, book, event-rsvp, ...) layer in additively in later milestones.
1263
+ * music scrobbles; no sifa-web card uses it yet). The app-specific variants
1264
+ * (`github-pr`, `book`, ...) carry only structured data enums, raw NSIDs,
1265
+ * dates, blob/URL refs — never pre-localized strings or built URLs, so each
1266
+ * surface renders identically.
1238
1267
  */
1239
1268
  type StreamCardBody = {
1240
1269
  kind: 'text';
1241
1270
  text: string;
1271
+ /** Facet-derived spans over `text` (links/mentions/tags). Additive. */
1272
+ richSegments?: StreamRichSegment[];
1273
+ /** Hashtags carried alongside the text (e.g. asq questions). */
1274
+ tags?: string[];
1242
1275
  } | {
1243
1276
  kind: 'media';
1244
1277
  text?: string;
1278
+ tags?: string[];
1245
1279
  } | {
1246
1280
  kind: 'link';
1247
1281
  text?: string;
1282
+ tags?: string[];
1248
1283
  } | {
1249
1284
  kind: 'track';
1250
1285
  text?: string;
@@ -1253,6 +1288,98 @@ type StreamCardBody = {
1253
1288
  } | {
1254
1289
  kind: 'generic';
1255
1290
  text?: string;
1291
+ tags?: string[];
1292
+ } | {
1293
+ kind: 'github-pr';
1294
+ repoOwner: string;
1295
+ repoName: string;
1296
+ prNumber: number;
1297
+ title: string;
1298
+ url?: string;
1299
+ /** GitHub language name (renderer maps to a color dot). */
1300
+ language?: string;
1301
+ additions: number;
1302
+ deletions: number;
1303
+ /** The card's display date is `mergedAt`, not `createdAt`. */
1304
+ mergedAt?: string;
1305
+ } | {
1306
+ kind: 'book';
1307
+ title: string;
1308
+ authors: string[];
1309
+ /** Rating on the lexicon's 1-10 scale. */
1310
+ stars?: number;
1311
+ /** Raw reading-status NSID, e.g. `buzz.bookhive.defs#finished`. */
1312
+ status?: string;
1313
+ review?: string;
1314
+ } | {
1315
+ kind: 'media-review';
1316
+ /** Which popfeed collection this came from (drives the action label). */
1317
+ reviewKind: 'review' | 'post' | 'note' | 'other';
1318
+ title?: string;
1319
+ /** Raw creative-work type, e.g. `movie` (renderer maps to a label + icon). */
1320
+ mediaType?: string;
1321
+ /** Rating on the 1-10 scale. */
1322
+ rating?: number;
1323
+ mainCredit?: string;
1324
+ reviewText?: string;
1325
+ isRevisit: boolean;
1326
+ } | {
1327
+ kind: 'event-rsvp';
1328
+ rsvpStatus: 'going' | 'interested' | 'notgoing' | 'unknown';
1329
+ eventName?: string;
1330
+ startsAt?: string;
1331
+ endsAt?: string;
1332
+ mode?: 'inperson' | 'virtual' | 'hybrid';
1333
+ locationName?: string;
1334
+ locationLocality?: string;
1335
+ locationCountry?: string;
1336
+ } | {
1337
+ kind: 'verification';
1338
+ /** Keytrace claim type (`github`, `dns`, ...) or `bluesky` for a bsky verification. */
1339
+ platform: string;
1340
+ verified: boolean;
1341
+ subjectLabel?: string;
1342
+ /** The verified handle (Bluesky verifications only). */
1343
+ handle?: string;
1344
+ profileUrl?: string;
1345
+ } | {
1346
+ kind: 'membership';
1347
+ communityName?: string;
1348
+ description?: string;
1349
+ /** The community record's at-uri (renderer builds the outbound link). */
1350
+ communityUri?: string;
1351
+ } | {
1352
+ kind: 'location';
1353
+ venueName?: string;
1354
+ shout?: string;
1355
+ address?: StreamAddress;
1356
+ geo?: StreamGeo;
1357
+ } | {
1358
+ kind: 'travel';
1359
+ origin?: string;
1360
+ destination?: string;
1361
+ /** Raw transportation mode, e.g. `flight` (renderer maps to a label). */
1362
+ transportation?: string;
1363
+ carrier?: string;
1364
+ carrierCode?: string;
1365
+ startDate?: string;
1366
+ endDate?: string;
1367
+ } | {
1368
+ kind: 'standard-site';
1369
+ title?: string;
1370
+ description?: string;
1371
+ /** Publication base URL (renderer derives host / builds the canonical link). */
1372
+ siteUrl?: string;
1373
+ path?: string;
1374
+ /** Resolved from the publisher registry when the host is allowlisted. */
1375
+ publisherName?: string;
1376
+ /** Publication icon — a resolved CDN URL added by AppView enrichment. */
1377
+ icon?: string;
1378
+ /** Document cover — a resolved CDN URL added by AppView enrichment. */
1379
+ coverImageUrl?: string;
1380
+ /** Estimated reading time in minutes. */
1381
+ readingTime?: number;
1382
+ publishedAt?: string;
1256
1383
  };
1257
1384
  /**
1258
1385
  * A repost / reply / quote target. Three shapes: a full post (normalized
@@ -1300,6 +1427,9 @@ declare const streamSourceSchema: z.ZodType<StreamSource>;
1300
1427
  declare const streamThemeSchema: z.ZodType<StreamTheme>;
1301
1428
  declare const streamMediaSchema: z.ZodType<StreamMedia>;
1302
1429
  declare const streamExternalLinkSchema: z.ZodType<StreamExternalLink>;
1430
+ declare const streamGeoSchema: z.ZodType<StreamGeo>;
1431
+ declare const streamAddressSchema: z.ZodType<StreamAddress>;
1432
+ declare const streamRichSegmentSchema: z.ZodType<StreamRichSegment>;
1303
1433
  declare const streamCardBodySchema: z.ZodType<StreamCardBody>;
1304
1434
  /**
1305
1435
  * A stream item's repost / reply / quote target. The `post` variant nests a
@@ -1328,8 +1458,13 @@ interface ToStreamCardVMOptions {
1328
1458
  *
1329
1459
  * Reference implementations: the generic/unknown case, `app.bsky.feed.post`
1330
1460
  * (text + images + external embed), and reposts (whose `subject` is normalized
1331
- * through this same function). Other collections fall through to the generic
1332
- * body variant until M2 enriches them.
1461
+ * through this same function). Collections with a typed body variant
1462
+ * (`github-pr`, `book`, `media-review`, `event-rsvp`, `verification`,
1463
+ * `membership`, `location`, `travel`, `standard-site`) are enriched from their
1464
+ * raw record below; `at.youandme.connection` and `fyi.asq.answer` populate a
1465
+ * person / record `subject`. Everything else (base collections + unknown apps)
1466
+ * flows through {@link applyGeneric}, which extracts text / media / link /
1467
+ * subject from common record shapes, degrading to an empty generic body.
1333
1468
  */
1334
1469
  declare function toStreamCardVM(item: ActivityItem, options?: ToStreamCardVMOptions): StreamCardVM;
1335
1470
  /**
@@ -1807,4 +1942,4 @@ declare function groupInvolvementByHeading(items: ProfileInvolvement[]): Involve
1807
1942
  */
1808
1943
  declare const SIFA_SDK_VERSION: string;
1809
1944
 
1810
- export { ACTIVITY_TIERS, ACTIVITY_VERBS, ACTIVITY_VISIBILITY_RULES, ALL_SECTIONS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, ARTIFACT_LINK_KIND_LABELS, ARTIFACT_LINK_KIND_OPTIONS, type AccountVerification, type ActivityItem, type ActivityItemForUrl, type ActivityTaxonomy, type ActivityTier, type ActivityVerbMap, type AppCategoryId, type AppUrlPatterns, type ArtifactLinkKindOption, 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, type CardHealth, type CardHealthStrategy, type CompanyFirmographics, type ContinentCode, type CsvRow, DIMENSIONS_MAX_SCORE, type DimensionKey, type DimensionMap, type DisambiguationFields, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, ENTITY_REF_ANCHORS, type EmploymentTypeGroup, type EmploymentTypeOption, type EntityRefAnchor, EntitySearchResult, INDUSTRY_OPTIONS, INVOLVEMENT_HEADING_ORDER, INVOLVEMENT_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, type IndustryOption, type InvolvementGroup, type InvolvementKindOption, type KnownAppId, type LexiconEntry, LocationValue, MIN_SKILLS, type MergedProfileSkill, OPEN_TO_OPTIONS, OPEN_TO_TOKENS, OPEN_TO_TOKEN_TO_VALUE, OPEN_TO_VALUE_TO_TOKEN, type OpenToGroup, type OpenToOption, OrgProfileRecord, PLATFORM_LABELS, PLATFORM_OPTIONS, PRESENTATION_LINK_TYPE_LABELS, PRESENTATION_LINK_TYPE_OPTIONS, PRESENTATION_ROLE_LABELS, PRESENTATION_ROLE_OPTIONS, PUBLISHERS, type ParsedDelivery, type ParsedPresentation, type PdsProvider, PdsProviderInfo, type PlatformId, type PresentationDeliverySummary, PresentationDuration, type PresentationLinkTypeOption, type PresentationRoleOption, type PrimaryPositionCandidate, Profile, ProfileCertification, type ProfileCompletion, type ProfileDimensionInputs, ProfileEducation, ProfileHonor, ProfileInvolvement, ProfileLanguage, ProfilePosition, ProfilePresentationDelivery, ProfilePresentationDeliveryRecord, ProfilePresentationRecord, ProfileProject, ProfilePublication, ProfileSkill, type Publisher, type RgbColor, SECTION_GROUPS, SECTION_LABELS, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, STREAM_VERBS, type SectionGroupId, type SectionId, type SkillCategory, type StreamCardBody, type StreamCardSubject, type StreamCardVM, type StreamExternalLink, type StreamMedia, type StreamMediaBase, type StreamMediaBlob, type StreamMediaResolved, type StreamSource, type StreamTheme, type StreamVerb, type TierMeta, type ToStreamCardVMOptions, VERIFICATION_PROVIDERS, type VerificationProvider, type VerificationProviderId, type VerificationSource, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, type WorkplaceTypeOption, categoryForApp, certDateExtractor, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, durationFromMinutes, entityDisambiguationLabel, entityResultKey, filterHidden, findIndustry, formatCompanyName, formatDateRange, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, formatTimelineDate, getActivityTaxonomyVersion, getActivityTier, getActivityVerbsVersion, getAppCategoryIcon, getAppIdForCollection, getArtifactLinkKindLabel, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getInvolvementKindHeading, getInvolvementKindLabel, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getVerificationProvider, getVisibleSectionIds, getWorkplaceTypeLabel, groupInvolvementByHeading, groupSkillsByCategory, hoistPrimary, isAppCategory, isCompanyPageIndexable, isCompanyRequired, isKnownAppId, isKnownPlatform, isKnownVerificationProvider, isLinked, isPseudoEmployer, isRegistrableDomainHandle, isSectionPopulated, isValidRgbColor, isVisibleActivityItem, lexiconDateExtractor, limitCombiningMarks, looksLikeDomain, meetsContrastAA, normalizeCompanyKey, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, primaryVerification, profileToDimensionInputs, qualifiesAsOrg, relativeLuminance, resolveCardHealth, resolveCardUrl, resolveVerifierProvider, rgbToString, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, singleDateExtractor, sortByActiveDateRange, sortByDateDesc, sortCertifications, sortEducation, sortHonors, sortLanguages, sortLanguagesByProficiency, sortPositions, sortProjects, sortPublications, streamCardBodySchema, streamCardSubjectSchema, streamCardVMSchema, streamExternalLinkSchema, streamMediaSchema, streamSourceSchema, streamThemeSchema, streamVerbSchema, stripHtmlToText, summarizePresentationDeliveries, toStreamCardVM, toStreamCardVMs, truncateGraphemes, verbForCollection, visibleItems };
1945
+ export { ACTIVITY_TIERS, ACTIVITY_VERBS, ACTIVITY_VISIBILITY_RULES, ALL_SECTIONS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, ARTIFACT_LINK_KIND_LABELS, ARTIFACT_LINK_KIND_OPTIONS, type AccountVerification, type ActivityItem, type ActivityItemForUrl, type ActivityTaxonomy, type ActivityTier, type ActivityVerbMap, type AppCategoryId, type AppUrlPatterns, type ArtifactLinkKindOption, 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, type CardHealth, type CardHealthStrategy, type CompanyFirmographics, type ContinentCode, type CsvRow, DIMENSIONS_MAX_SCORE, type DimensionKey, type DimensionMap, type DisambiguationFields, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, ENTITY_REF_ANCHORS, type EmploymentTypeGroup, type EmploymentTypeOption, type EntityRefAnchor, EntitySearchResult, INDUSTRY_OPTIONS, INVOLVEMENT_HEADING_ORDER, INVOLVEMENT_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, type IndustryOption, type InvolvementGroup, type InvolvementKindOption, type KnownAppId, type LexiconEntry, LocationValue, MIN_SKILLS, type MergedProfileSkill, OPEN_TO_OPTIONS, OPEN_TO_TOKENS, OPEN_TO_TOKEN_TO_VALUE, OPEN_TO_VALUE_TO_TOKEN, type OpenToGroup, type OpenToOption, OrgProfileRecord, PLATFORM_LABELS, PLATFORM_OPTIONS, PRESENTATION_LINK_TYPE_LABELS, PRESENTATION_LINK_TYPE_OPTIONS, PRESENTATION_ROLE_LABELS, PRESENTATION_ROLE_OPTIONS, PUBLISHERS, type ParsedDelivery, type ParsedPresentation, type PdsProvider, PdsProviderInfo, type PlatformId, type PresentationDeliverySummary, PresentationDuration, type PresentationLinkTypeOption, type PresentationRoleOption, type PrimaryPositionCandidate, Profile, ProfileCertification, type ProfileCompletion, type ProfileDimensionInputs, ProfileEducation, ProfileHonor, ProfileInvolvement, ProfileLanguage, ProfilePosition, ProfilePresentationDelivery, ProfilePresentationDeliveryRecord, ProfilePresentationRecord, ProfileProject, ProfilePublication, ProfileSkill, type Publisher, type RgbColor, SECTION_GROUPS, SECTION_LABELS, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, STREAM_VERBS, type SectionGroupId, type SectionId, type SkillCategory, type StreamAddress, type StreamCardBody, type StreamCardSubject, type StreamCardVM, type StreamExternalLink, type StreamGeo, type StreamMedia, type StreamMediaBase, type StreamMediaBlob, type StreamMediaResolved, type StreamRichSegment, type StreamSource, type StreamTheme, type StreamVerb, type TierMeta, type ToStreamCardVMOptions, VERIFICATION_PROVIDERS, type VerificationProvider, type VerificationProviderId, type VerificationSource, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, type WorkplaceTypeOption, categoryForApp, certDateExtractor, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, durationFromMinutes, entityDisambiguationLabel, entityResultKey, filterHidden, findIndustry, formatCompanyName, formatDateRange, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, formatTimelineDate, getActivityTaxonomyVersion, getActivityTier, getActivityVerbsVersion, getAppCategoryIcon, getAppIdForCollection, getArtifactLinkKindLabel, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getInvolvementKindHeading, getInvolvementKindLabel, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getVerificationProvider, getVisibleSectionIds, getWorkplaceTypeLabel, groupInvolvementByHeading, groupSkillsByCategory, hoistPrimary, isAppCategory, isCompanyPageIndexable, isCompanyRequired, isKnownAppId, isKnownPlatform, isKnownVerificationProvider, isLinked, isPseudoEmployer, isRegistrableDomainHandle, isSectionPopulated, isValidRgbColor, isVisibleActivityItem, lexiconDateExtractor, limitCombiningMarks, looksLikeDomain, meetsContrastAA, normalizeCompanyKey, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, primaryVerification, profileToDimensionInputs, qualifiesAsOrg, relativeLuminance, resolveCardHealth, resolveCardUrl, resolveVerifierProvider, rgbToString, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, singleDateExtractor, sortByActiveDateRange, sortByDateDesc, sortCertifications, sortEducation, sortHonors, sortLanguages, sortLanguagesByProficiency, sortPositions, sortProjects, sortPublications, streamAddressSchema, streamCardBodySchema, streamCardSubjectSchema, streamCardVMSchema, streamExternalLinkSchema, streamGeoSchema, streamMediaSchema, streamRichSegmentSchema, streamSourceSchema, streamThemeSchema, streamVerbSchema, stripHtmlToText, summarizePresentationDeliveries, toStreamCardVM, toStreamCardVMs, truncateGraphemes, verbForCollection, visibleItems };
package/dist/index.d.ts CHANGED
@@ -1230,21 +1230,56 @@ interface StreamExternalLink {
1230
1230
  title?: string;
1231
1231
  thumb?: string;
1232
1232
  }
1233
+ /**
1234
+ * One span of a rich-text body. Built from `app.bsky.richtext.facet`-style
1235
+ * facets (byte-offset ranges over the plain `text`). Plain runs carry only
1236
+ * `text`; enriched runs additionally carry exactly one of `link` (resolved
1237
+ * URL), `mention` (DID), or `tag` (hashtag). `body.text` always holds the full
1238
+ * plain string, so a renderer can ignore `richSegments` and still show content.
1239
+ */
1240
+ interface StreamRichSegment {
1241
+ text: string;
1242
+ link?: string;
1243
+ mention?: string;
1244
+ tag?: string;
1245
+ }
1246
+ /** A geo coordinate pair (beacon `location`). */
1247
+ interface StreamGeo {
1248
+ latitude: number;
1249
+ longitude: number;
1250
+ }
1251
+ /** A structured postal address (beacon `addressDetails`). All parts optional. */
1252
+ interface StreamAddress {
1253
+ name?: string;
1254
+ street?: string;
1255
+ locality?: string;
1256
+ region?: string;
1257
+ country?: string;
1258
+ postalCode?: string;
1259
+ }
1233
1260
  /**
1234
1261
  * The primary content body. A small discriminated union so both the React and
1235
1262
  * the string-HTML renderer switch on one field. `track` is reserved (dame
1236
- * music scrobbles; no sifa-web card uses it yet). App-specific variants
1237
- * (github-pr, book, event-rsvp, ...) layer in additively in later milestones.
1263
+ * music scrobbles; no sifa-web card uses it yet). The app-specific variants
1264
+ * (`github-pr`, `book`, ...) carry only structured data enums, raw NSIDs,
1265
+ * dates, blob/URL refs — never pre-localized strings or built URLs, so each
1266
+ * surface renders identically.
1238
1267
  */
1239
1268
  type StreamCardBody = {
1240
1269
  kind: 'text';
1241
1270
  text: string;
1271
+ /** Facet-derived spans over `text` (links/mentions/tags). Additive. */
1272
+ richSegments?: StreamRichSegment[];
1273
+ /** Hashtags carried alongside the text (e.g. asq questions). */
1274
+ tags?: string[];
1242
1275
  } | {
1243
1276
  kind: 'media';
1244
1277
  text?: string;
1278
+ tags?: string[];
1245
1279
  } | {
1246
1280
  kind: 'link';
1247
1281
  text?: string;
1282
+ tags?: string[];
1248
1283
  } | {
1249
1284
  kind: 'track';
1250
1285
  text?: string;
@@ -1253,6 +1288,98 @@ type StreamCardBody = {
1253
1288
  } | {
1254
1289
  kind: 'generic';
1255
1290
  text?: string;
1291
+ tags?: string[];
1292
+ } | {
1293
+ kind: 'github-pr';
1294
+ repoOwner: string;
1295
+ repoName: string;
1296
+ prNumber: number;
1297
+ title: string;
1298
+ url?: string;
1299
+ /** GitHub language name (renderer maps to a color dot). */
1300
+ language?: string;
1301
+ additions: number;
1302
+ deletions: number;
1303
+ /** The card's display date is `mergedAt`, not `createdAt`. */
1304
+ mergedAt?: string;
1305
+ } | {
1306
+ kind: 'book';
1307
+ title: string;
1308
+ authors: string[];
1309
+ /** Rating on the lexicon's 1-10 scale. */
1310
+ stars?: number;
1311
+ /** Raw reading-status NSID, e.g. `buzz.bookhive.defs#finished`. */
1312
+ status?: string;
1313
+ review?: string;
1314
+ } | {
1315
+ kind: 'media-review';
1316
+ /** Which popfeed collection this came from (drives the action label). */
1317
+ reviewKind: 'review' | 'post' | 'note' | 'other';
1318
+ title?: string;
1319
+ /** Raw creative-work type, e.g. `movie` (renderer maps to a label + icon). */
1320
+ mediaType?: string;
1321
+ /** Rating on the 1-10 scale. */
1322
+ rating?: number;
1323
+ mainCredit?: string;
1324
+ reviewText?: string;
1325
+ isRevisit: boolean;
1326
+ } | {
1327
+ kind: 'event-rsvp';
1328
+ rsvpStatus: 'going' | 'interested' | 'notgoing' | 'unknown';
1329
+ eventName?: string;
1330
+ startsAt?: string;
1331
+ endsAt?: string;
1332
+ mode?: 'inperson' | 'virtual' | 'hybrid';
1333
+ locationName?: string;
1334
+ locationLocality?: string;
1335
+ locationCountry?: string;
1336
+ } | {
1337
+ kind: 'verification';
1338
+ /** Keytrace claim type (`github`, `dns`, ...) or `bluesky` for a bsky verification. */
1339
+ platform: string;
1340
+ verified: boolean;
1341
+ subjectLabel?: string;
1342
+ /** The verified handle (Bluesky verifications only). */
1343
+ handle?: string;
1344
+ profileUrl?: string;
1345
+ } | {
1346
+ kind: 'membership';
1347
+ communityName?: string;
1348
+ description?: string;
1349
+ /** The community record's at-uri (renderer builds the outbound link). */
1350
+ communityUri?: string;
1351
+ } | {
1352
+ kind: 'location';
1353
+ venueName?: string;
1354
+ shout?: string;
1355
+ address?: StreamAddress;
1356
+ geo?: StreamGeo;
1357
+ } | {
1358
+ kind: 'travel';
1359
+ origin?: string;
1360
+ destination?: string;
1361
+ /** Raw transportation mode, e.g. `flight` (renderer maps to a label). */
1362
+ transportation?: string;
1363
+ carrier?: string;
1364
+ carrierCode?: string;
1365
+ startDate?: string;
1366
+ endDate?: string;
1367
+ } | {
1368
+ kind: 'standard-site';
1369
+ title?: string;
1370
+ description?: string;
1371
+ /** Publication base URL (renderer derives host / builds the canonical link). */
1372
+ siteUrl?: string;
1373
+ path?: string;
1374
+ /** Resolved from the publisher registry when the host is allowlisted. */
1375
+ publisherName?: string;
1376
+ /** Publication icon — a resolved CDN URL added by AppView enrichment. */
1377
+ icon?: string;
1378
+ /** Document cover — a resolved CDN URL added by AppView enrichment. */
1379
+ coverImageUrl?: string;
1380
+ /** Estimated reading time in minutes. */
1381
+ readingTime?: number;
1382
+ publishedAt?: string;
1256
1383
  };
1257
1384
  /**
1258
1385
  * A repost / reply / quote target. Three shapes: a full post (normalized
@@ -1300,6 +1427,9 @@ declare const streamSourceSchema: z.ZodType<StreamSource>;
1300
1427
  declare const streamThemeSchema: z.ZodType<StreamTheme>;
1301
1428
  declare const streamMediaSchema: z.ZodType<StreamMedia>;
1302
1429
  declare const streamExternalLinkSchema: z.ZodType<StreamExternalLink>;
1430
+ declare const streamGeoSchema: z.ZodType<StreamGeo>;
1431
+ declare const streamAddressSchema: z.ZodType<StreamAddress>;
1432
+ declare const streamRichSegmentSchema: z.ZodType<StreamRichSegment>;
1303
1433
  declare const streamCardBodySchema: z.ZodType<StreamCardBody>;
1304
1434
  /**
1305
1435
  * A stream item's repost / reply / quote target. The `post` variant nests a
@@ -1328,8 +1458,13 @@ interface ToStreamCardVMOptions {
1328
1458
  *
1329
1459
  * Reference implementations: the generic/unknown case, `app.bsky.feed.post`
1330
1460
  * (text + images + external embed), and reposts (whose `subject` is normalized
1331
- * through this same function). Other collections fall through to the generic
1332
- * body variant until M2 enriches them.
1461
+ * through this same function). Collections with a typed body variant
1462
+ * (`github-pr`, `book`, `media-review`, `event-rsvp`, `verification`,
1463
+ * `membership`, `location`, `travel`, `standard-site`) are enriched from their
1464
+ * raw record below; `at.youandme.connection` and `fyi.asq.answer` populate a
1465
+ * person / record `subject`. Everything else (base collections + unknown apps)
1466
+ * flows through {@link applyGeneric}, which extracts text / media / link /
1467
+ * subject from common record shapes, degrading to an empty generic body.
1333
1468
  */
1334
1469
  declare function toStreamCardVM(item: ActivityItem, options?: ToStreamCardVMOptions): StreamCardVM;
1335
1470
  /**
@@ -1807,4 +1942,4 @@ declare function groupInvolvementByHeading(items: ProfileInvolvement[]): Involve
1807
1942
  */
1808
1943
  declare const SIFA_SDK_VERSION: string;
1809
1944
 
1810
- export { ACTIVITY_TIERS, ACTIVITY_VERBS, ACTIVITY_VISIBILITY_RULES, ALL_SECTIONS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, ARTIFACT_LINK_KIND_LABELS, ARTIFACT_LINK_KIND_OPTIONS, type AccountVerification, type ActivityItem, type ActivityItemForUrl, type ActivityTaxonomy, type ActivityTier, type ActivityVerbMap, type AppCategoryId, type AppUrlPatterns, type ArtifactLinkKindOption, 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, type CardHealth, type CardHealthStrategy, type CompanyFirmographics, type ContinentCode, type CsvRow, DIMENSIONS_MAX_SCORE, type DimensionKey, type DimensionMap, type DisambiguationFields, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, ENTITY_REF_ANCHORS, type EmploymentTypeGroup, type EmploymentTypeOption, type EntityRefAnchor, EntitySearchResult, INDUSTRY_OPTIONS, INVOLVEMENT_HEADING_ORDER, INVOLVEMENT_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, type IndustryOption, type InvolvementGroup, type InvolvementKindOption, type KnownAppId, type LexiconEntry, LocationValue, MIN_SKILLS, type MergedProfileSkill, OPEN_TO_OPTIONS, OPEN_TO_TOKENS, OPEN_TO_TOKEN_TO_VALUE, OPEN_TO_VALUE_TO_TOKEN, type OpenToGroup, type OpenToOption, OrgProfileRecord, PLATFORM_LABELS, PLATFORM_OPTIONS, PRESENTATION_LINK_TYPE_LABELS, PRESENTATION_LINK_TYPE_OPTIONS, PRESENTATION_ROLE_LABELS, PRESENTATION_ROLE_OPTIONS, PUBLISHERS, type ParsedDelivery, type ParsedPresentation, type PdsProvider, PdsProviderInfo, type PlatformId, type PresentationDeliverySummary, PresentationDuration, type PresentationLinkTypeOption, type PresentationRoleOption, type PrimaryPositionCandidate, Profile, ProfileCertification, type ProfileCompletion, type ProfileDimensionInputs, ProfileEducation, ProfileHonor, ProfileInvolvement, ProfileLanguage, ProfilePosition, ProfilePresentationDelivery, ProfilePresentationDeliveryRecord, ProfilePresentationRecord, ProfileProject, ProfilePublication, ProfileSkill, type Publisher, type RgbColor, SECTION_GROUPS, SECTION_LABELS, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, STREAM_VERBS, type SectionGroupId, type SectionId, type SkillCategory, type StreamCardBody, type StreamCardSubject, type StreamCardVM, type StreamExternalLink, type StreamMedia, type StreamMediaBase, type StreamMediaBlob, type StreamMediaResolved, type StreamSource, type StreamTheme, type StreamVerb, type TierMeta, type ToStreamCardVMOptions, VERIFICATION_PROVIDERS, type VerificationProvider, type VerificationProviderId, type VerificationSource, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, type WorkplaceTypeOption, categoryForApp, certDateExtractor, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, durationFromMinutes, entityDisambiguationLabel, entityResultKey, filterHidden, findIndustry, formatCompanyName, formatDateRange, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, formatTimelineDate, getActivityTaxonomyVersion, getActivityTier, getActivityVerbsVersion, getAppCategoryIcon, getAppIdForCollection, getArtifactLinkKindLabel, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getInvolvementKindHeading, getInvolvementKindLabel, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getVerificationProvider, getVisibleSectionIds, getWorkplaceTypeLabel, groupInvolvementByHeading, groupSkillsByCategory, hoistPrimary, isAppCategory, isCompanyPageIndexable, isCompanyRequired, isKnownAppId, isKnownPlatform, isKnownVerificationProvider, isLinked, isPseudoEmployer, isRegistrableDomainHandle, isSectionPopulated, isValidRgbColor, isVisibleActivityItem, lexiconDateExtractor, limitCombiningMarks, looksLikeDomain, meetsContrastAA, normalizeCompanyKey, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, primaryVerification, profileToDimensionInputs, qualifiesAsOrg, relativeLuminance, resolveCardHealth, resolveCardUrl, resolveVerifierProvider, rgbToString, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, singleDateExtractor, sortByActiveDateRange, sortByDateDesc, sortCertifications, sortEducation, sortHonors, sortLanguages, sortLanguagesByProficiency, sortPositions, sortProjects, sortPublications, streamCardBodySchema, streamCardSubjectSchema, streamCardVMSchema, streamExternalLinkSchema, streamMediaSchema, streamSourceSchema, streamThemeSchema, streamVerbSchema, stripHtmlToText, summarizePresentationDeliveries, toStreamCardVM, toStreamCardVMs, truncateGraphemes, verbForCollection, visibleItems };
1945
+ export { ACTIVITY_TIERS, ACTIVITY_VERBS, ACTIVITY_VISIBILITY_RULES, ALL_SECTIONS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, ARTIFACT_LINK_KIND_LABELS, ARTIFACT_LINK_KIND_OPTIONS, type AccountVerification, type ActivityItem, type ActivityItemForUrl, type ActivityTaxonomy, type ActivityTier, type ActivityVerbMap, type AppCategoryId, type AppUrlPatterns, type ArtifactLinkKindOption, 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, type CardHealth, type CardHealthStrategy, type CompanyFirmographics, type ContinentCode, type CsvRow, DIMENSIONS_MAX_SCORE, type DimensionKey, type DimensionMap, type DisambiguationFields, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, ENTITY_REF_ANCHORS, type EmploymentTypeGroup, type EmploymentTypeOption, type EntityRefAnchor, EntitySearchResult, INDUSTRY_OPTIONS, INVOLVEMENT_HEADING_ORDER, INVOLVEMENT_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, type IndustryOption, type InvolvementGroup, type InvolvementKindOption, type KnownAppId, type LexiconEntry, LocationValue, MIN_SKILLS, type MergedProfileSkill, OPEN_TO_OPTIONS, OPEN_TO_TOKENS, OPEN_TO_TOKEN_TO_VALUE, OPEN_TO_VALUE_TO_TOKEN, type OpenToGroup, type OpenToOption, OrgProfileRecord, PLATFORM_LABELS, PLATFORM_OPTIONS, PRESENTATION_LINK_TYPE_LABELS, PRESENTATION_LINK_TYPE_OPTIONS, PRESENTATION_ROLE_LABELS, PRESENTATION_ROLE_OPTIONS, PUBLISHERS, type ParsedDelivery, type ParsedPresentation, type PdsProvider, PdsProviderInfo, type PlatformId, type PresentationDeliverySummary, PresentationDuration, type PresentationLinkTypeOption, type PresentationRoleOption, type PrimaryPositionCandidate, Profile, ProfileCertification, type ProfileCompletion, type ProfileDimensionInputs, ProfileEducation, ProfileHonor, ProfileInvolvement, ProfileLanguage, ProfilePosition, ProfilePresentationDelivery, ProfilePresentationDeliveryRecord, ProfilePresentationRecord, ProfileProject, ProfilePublication, ProfileSkill, type Publisher, type RgbColor, SECTION_GROUPS, SECTION_LABELS, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, STREAM_VERBS, type SectionGroupId, type SectionId, type SkillCategory, type StreamAddress, type StreamCardBody, type StreamCardSubject, type StreamCardVM, type StreamExternalLink, type StreamGeo, type StreamMedia, type StreamMediaBase, type StreamMediaBlob, type StreamMediaResolved, type StreamRichSegment, type StreamSource, type StreamTheme, type StreamVerb, type TierMeta, type ToStreamCardVMOptions, VERIFICATION_PROVIDERS, type VerificationProvider, type VerificationProviderId, type VerificationSource, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, type WorkplaceTypeOption, categoryForApp, certDateExtractor, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, durationFromMinutes, entityDisambiguationLabel, entityResultKey, filterHidden, findIndustry, formatCompanyName, formatDateRange, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, formatTimelineDate, getActivityTaxonomyVersion, getActivityTier, getActivityVerbsVersion, getAppCategoryIcon, getAppIdForCollection, getArtifactLinkKindLabel, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getInvolvementKindHeading, getInvolvementKindLabel, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getVerificationProvider, getVisibleSectionIds, getWorkplaceTypeLabel, groupInvolvementByHeading, groupSkillsByCategory, hoistPrimary, isAppCategory, isCompanyPageIndexable, isCompanyRequired, isKnownAppId, isKnownPlatform, isKnownVerificationProvider, isLinked, isPseudoEmployer, isRegistrableDomainHandle, isSectionPopulated, isValidRgbColor, isVisibleActivityItem, lexiconDateExtractor, limitCombiningMarks, looksLikeDomain, meetsContrastAA, normalizeCompanyKey, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, primaryVerification, profileToDimensionInputs, qualifiesAsOrg, relativeLuminance, resolveCardHealth, resolveCardUrl, resolveVerifierProvider, rgbToString, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, singleDateExtractor, sortByActiveDateRange, sortByDateDesc, sortCertifications, sortEducation, sortHonors, sortLanguages, sortLanguagesByProficiency, sortPositions, sortProjects, sortPublications, streamAddressSchema, streamCardBodySchema, streamCardSubjectSchema, streamCardVMSchema, streamExternalLinkSchema, streamGeoSchema, streamMediaSchema, streamRichSegmentSchema, streamSourceSchema, streamThemeSchema, streamVerbSchema, stripHtmlToText, summarizePresentationDeliveries, toStreamCardVM, toStreamCardVMs, truncateGraphemes, verbForCollection, visibleItems };