@singi-labs/sifa-sdk 0.12.9 → 0.12.10
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 +476 -38
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +117 -5
- package/dist/index.d.ts +117 -5
- package/dist/index.js +475 -39
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1230,11 +1230,27 @@ interface StreamExternalLink {
|
|
|
1230
1230
|
title?: string;
|
|
1231
1231
|
thumb?: string;
|
|
1232
1232
|
}
|
|
1233
|
+
/** A geo coordinate pair (beacon `location`). */
|
|
1234
|
+
interface StreamGeo {
|
|
1235
|
+
latitude: number;
|
|
1236
|
+
longitude: number;
|
|
1237
|
+
}
|
|
1238
|
+
/** A structured postal address (beacon `addressDetails`). All parts optional. */
|
|
1239
|
+
interface StreamAddress {
|
|
1240
|
+
name?: string;
|
|
1241
|
+
street?: string;
|
|
1242
|
+
locality?: string;
|
|
1243
|
+
region?: string;
|
|
1244
|
+
country?: string;
|
|
1245
|
+
postalCode?: string;
|
|
1246
|
+
}
|
|
1233
1247
|
/**
|
|
1234
1248
|
* The primary content body. A small discriminated union so both the React and
|
|
1235
1249
|
* the string-HTML renderer switch on one field. `track` is reserved (dame
|
|
1236
|
-
* music scrobbles; no sifa-web card uses it yet).
|
|
1237
|
-
* (github-pr
|
|
1250
|
+
* music scrobbles; no sifa-web card uses it yet). The app-specific variants
|
|
1251
|
+
* (`github-pr`, `book`, ...) carry only structured data — enums, raw NSIDs,
|
|
1252
|
+
* dates, blob/URL refs — never pre-localized strings or built URLs, so each
|
|
1253
|
+
* surface renders identically.
|
|
1238
1254
|
*/
|
|
1239
1255
|
type StreamCardBody = {
|
|
1240
1256
|
kind: 'text';
|
|
@@ -1253,6 +1269,97 @@ type StreamCardBody = {
|
|
|
1253
1269
|
} | {
|
|
1254
1270
|
kind: 'generic';
|
|
1255
1271
|
text?: string;
|
|
1272
|
+
} | {
|
|
1273
|
+
kind: 'github-pr';
|
|
1274
|
+
repoOwner: string;
|
|
1275
|
+
repoName: string;
|
|
1276
|
+
prNumber: number;
|
|
1277
|
+
title: string;
|
|
1278
|
+
url?: string;
|
|
1279
|
+
/** GitHub language name (renderer maps to a color dot). */
|
|
1280
|
+
language?: string;
|
|
1281
|
+
additions: number;
|
|
1282
|
+
deletions: number;
|
|
1283
|
+
/** The card's display date is `mergedAt`, not `createdAt`. */
|
|
1284
|
+
mergedAt?: string;
|
|
1285
|
+
} | {
|
|
1286
|
+
kind: 'book';
|
|
1287
|
+
title: string;
|
|
1288
|
+
authors: string[];
|
|
1289
|
+
/** Rating on the lexicon's 1-10 scale. */
|
|
1290
|
+
stars?: number;
|
|
1291
|
+
/** Raw reading-status NSID, e.g. `buzz.bookhive.defs#finished`. */
|
|
1292
|
+
status?: string;
|
|
1293
|
+
review?: string;
|
|
1294
|
+
} | {
|
|
1295
|
+
kind: 'media-review';
|
|
1296
|
+
/** Which popfeed collection this came from (drives the action label). */
|
|
1297
|
+
reviewKind: 'review' | 'post' | 'note' | 'other';
|
|
1298
|
+
title?: string;
|
|
1299
|
+
/** Raw creative-work type, e.g. `movie` (renderer maps to a label + icon). */
|
|
1300
|
+
mediaType?: string;
|
|
1301
|
+
/** Rating on the 1-10 scale. */
|
|
1302
|
+
rating?: number;
|
|
1303
|
+
mainCredit?: string;
|
|
1304
|
+
reviewText?: string;
|
|
1305
|
+
isRevisit: boolean;
|
|
1306
|
+
} | {
|
|
1307
|
+
kind: 'event-rsvp';
|
|
1308
|
+
rsvpStatus: 'going' | 'interested' | 'notgoing' | 'unknown';
|
|
1309
|
+
eventName?: string;
|
|
1310
|
+
startsAt?: string;
|
|
1311
|
+
endsAt?: string;
|
|
1312
|
+
mode?: 'inperson' | 'virtual' | 'hybrid';
|
|
1313
|
+
locationName?: string;
|
|
1314
|
+
locationLocality?: string;
|
|
1315
|
+
locationCountry?: string;
|
|
1316
|
+
} | {
|
|
1317
|
+
kind: 'verification';
|
|
1318
|
+
/** Keytrace claim type (`github`, `dns`, ...) or `bluesky` for a bsky verification. */
|
|
1319
|
+
platform: string;
|
|
1320
|
+
verified: boolean;
|
|
1321
|
+
subjectLabel?: string;
|
|
1322
|
+
/** The verified handle (Bluesky verifications only). */
|
|
1323
|
+
handle?: string;
|
|
1324
|
+
profileUrl?: string;
|
|
1325
|
+
} | {
|
|
1326
|
+
kind: 'membership';
|
|
1327
|
+
communityName?: string;
|
|
1328
|
+
description?: string;
|
|
1329
|
+
/** The community record's at-uri (renderer builds the outbound link). */
|
|
1330
|
+
communityUri?: string;
|
|
1331
|
+
} | {
|
|
1332
|
+
kind: 'location';
|
|
1333
|
+
venueName?: string;
|
|
1334
|
+
shout?: string;
|
|
1335
|
+
address?: StreamAddress;
|
|
1336
|
+
geo?: StreamGeo;
|
|
1337
|
+
} | {
|
|
1338
|
+
kind: 'travel';
|
|
1339
|
+
origin?: string;
|
|
1340
|
+
destination?: string;
|
|
1341
|
+
/** Raw transportation mode, e.g. `flight` (renderer maps to a label). */
|
|
1342
|
+
transportation?: string;
|
|
1343
|
+
carrier?: string;
|
|
1344
|
+
carrierCode?: string;
|
|
1345
|
+
startDate?: string;
|
|
1346
|
+
endDate?: string;
|
|
1347
|
+
} | {
|
|
1348
|
+
kind: 'standard-site';
|
|
1349
|
+
title?: string;
|
|
1350
|
+
description?: string;
|
|
1351
|
+
/** Publication base URL (renderer derives host / builds the canonical link). */
|
|
1352
|
+
siteUrl?: string;
|
|
1353
|
+
path?: string;
|
|
1354
|
+
/** Resolved from the publisher registry when the host is allowlisted. */
|
|
1355
|
+
publisherName?: string;
|
|
1356
|
+
/** Publication icon — a resolved CDN URL added by AppView enrichment. */
|
|
1357
|
+
icon?: string;
|
|
1358
|
+
/** Document cover — a resolved CDN URL added by AppView enrichment. */
|
|
1359
|
+
coverImageUrl?: string;
|
|
1360
|
+
/** Estimated reading time in minutes. */
|
|
1361
|
+
readingTime?: number;
|
|
1362
|
+
publishedAt?: string;
|
|
1256
1363
|
};
|
|
1257
1364
|
/**
|
|
1258
1365
|
* A repost / reply / quote target. Three shapes: a full post (normalized
|
|
@@ -1300,6 +1407,8 @@ declare const streamSourceSchema: z.ZodType<StreamSource>;
|
|
|
1300
1407
|
declare const streamThemeSchema: z.ZodType<StreamTheme>;
|
|
1301
1408
|
declare const streamMediaSchema: z.ZodType<StreamMedia>;
|
|
1302
1409
|
declare const streamExternalLinkSchema: z.ZodType<StreamExternalLink>;
|
|
1410
|
+
declare const streamGeoSchema: z.ZodType<StreamGeo>;
|
|
1411
|
+
declare const streamAddressSchema: z.ZodType<StreamAddress>;
|
|
1303
1412
|
declare const streamCardBodySchema: z.ZodType<StreamCardBody>;
|
|
1304
1413
|
/**
|
|
1305
1414
|
* A stream item's repost / reply / quote target. The `post` variant nests a
|
|
@@ -1328,8 +1437,11 @@ interface ToStreamCardVMOptions {
|
|
|
1328
1437
|
*
|
|
1329
1438
|
* Reference implementations: the generic/unknown case, `app.bsky.feed.post`
|
|
1330
1439
|
* (text + images + external embed), and reposts (whose `subject` is normalized
|
|
1331
|
-
* through this same function).
|
|
1332
|
-
*
|
|
1440
|
+
* through this same function). Collections with a typed body variant
|
|
1441
|
+
* (`github-pr`, `book`, `media-review`, `event-rsvp`, `verification`,
|
|
1442
|
+
* `membership`, `location`, `travel`, `standard-site`) are enriched from their
|
|
1443
|
+
* raw record below; `at.youandme.connection` and `fyi.asq.answer` populate a
|
|
1444
|
+
* person / record `subject`. Everything else falls through to `generic`.
|
|
1333
1445
|
*/
|
|
1334
1446
|
declare function toStreamCardVM(item: ActivityItem, options?: ToStreamCardVMOptions): StreamCardVM;
|
|
1335
1447
|
/**
|
|
@@ -1807,4 +1919,4 @@ declare function groupInvolvementByHeading(items: ProfileInvolvement[]): Involve
|
|
|
1807
1919
|
*/
|
|
1808
1920
|
declare const SIFA_SDK_VERSION: string;
|
|
1809
1921
|
|
|
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 };
|
|
1922
|
+
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 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, streamSourceSchema, streamThemeSchema, streamVerbSchema, stripHtmlToText, summarizePresentationDeliveries, toStreamCardVM, toStreamCardVMs, truncateGraphemes, verbForCollection, visibleItems };
|
package/dist/index.d.ts
CHANGED
|
@@ -1230,11 +1230,27 @@ interface StreamExternalLink {
|
|
|
1230
1230
|
title?: string;
|
|
1231
1231
|
thumb?: string;
|
|
1232
1232
|
}
|
|
1233
|
+
/** A geo coordinate pair (beacon `location`). */
|
|
1234
|
+
interface StreamGeo {
|
|
1235
|
+
latitude: number;
|
|
1236
|
+
longitude: number;
|
|
1237
|
+
}
|
|
1238
|
+
/** A structured postal address (beacon `addressDetails`). All parts optional. */
|
|
1239
|
+
interface StreamAddress {
|
|
1240
|
+
name?: string;
|
|
1241
|
+
street?: string;
|
|
1242
|
+
locality?: string;
|
|
1243
|
+
region?: string;
|
|
1244
|
+
country?: string;
|
|
1245
|
+
postalCode?: string;
|
|
1246
|
+
}
|
|
1233
1247
|
/**
|
|
1234
1248
|
* The primary content body. A small discriminated union so both the React and
|
|
1235
1249
|
* the string-HTML renderer switch on one field. `track` is reserved (dame
|
|
1236
|
-
* music scrobbles; no sifa-web card uses it yet).
|
|
1237
|
-
* (github-pr
|
|
1250
|
+
* music scrobbles; no sifa-web card uses it yet). The app-specific variants
|
|
1251
|
+
* (`github-pr`, `book`, ...) carry only structured data — enums, raw NSIDs,
|
|
1252
|
+
* dates, blob/URL refs — never pre-localized strings or built URLs, so each
|
|
1253
|
+
* surface renders identically.
|
|
1238
1254
|
*/
|
|
1239
1255
|
type StreamCardBody = {
|
|
1240
1256
|
kind: 'text';
|
|
@@ -1253,6 +1269,97 @@ type StreamCardBody = {
|
|
|
1253
1269
|
} | {
|
|
1254
1270
|
kind: 'generic';
|
|
1255
1271
|
text?: string;
|
|
1272
|
+
} | {
|
|
1273
|
+
kind: 'github-pr';
|
|
1274
|
+
repoOwner: string;
|
|
1275
|
+
repoName: string;
|
|
1276
|
+
prNumber: number;
|
|
1277
|
+
title: string;
|
|
1278
|
+
url?: string;
|
|
1279
|
+
/** GitHub language name (renderer maps to a color dot). */
|
|
1280
|
+
language?: string;
|
|
1281
|
+
additions: number;
|
|
1282
|
+
deletions: number;
|
|
1283
|
+
/** The card's display date is `mergedAt`, not `createdAt`. */
|
|
1284
|
+
mergedAt?: string;
|
|
1285
|
+
} | {
|
|
1286
|
+
kind: 'book';
|
|
1287
|
+
title: string;
|
|
1288
|
+
authors: string[];
|
|
1289
|
+
/** Rating on the lexicon's 1-10 scale. */
|
|
1290
|
+
stars?: number;
|
|
1291
|
+
/** Raw reading-status NSID, e.g. `buzz.bookhive.defs#finished`. */
|
|
1292
|
+
status?: string;
|
|
1293
|
+
review?: string;
|
|
1294
|
+
} | {
|
|
1295
|
+
kind: 'media-review';
|
|
1296
|
+
/** Which popfeed collection this came from (drives the action label). */
|
|
1297
|
+
reviewKind: 'review' | 'post' | 'note' | 'other';
|
|
1298
|
+
title?: string;
|
|
1299
|
+
/** Raw creative-work type, e.g. `movie` (renderer maps to a label + icon). */
|
|
1300
|
+
mediaType?: string;
|
|
1301
|
+
/** Rating on the 1-10 scale. */
|
|
1302
|
+
rating?: number;
|
|
1303
|
+
mainCredit?: string;
|
|
1304
|
+
reviewText?: string;
|
|
1305
|
+
isRevisit: boolean;
|
|
1306
|
+
} | {
|
|
1307
|
+
kind: 'event-rsvp';
|
|
1308
|
+
rsvpStatus: 'going' | 'interested' | 'notgoing' | 'unknown';
|
|
1309
|
+
eventName?: string;
|
|
1310
|
+
startsAt?: string;
|
|
1311
|
+
endsAt?: string;
|
|
1312
|
+
mode?: 'inperson' | 'virtual' | 'hybrid';
|
|
1313
|
+
locationName?: string;
|
|
1314
|
+
locationLocality?: string;
|
|
1315
|
+
locationCountry?: string;
|
|
1316
|
+
} | {
|
|
1317
|
+
kind: 'verification';
|
|
1318
|
+
/** Keytrace claim type (`github`, `dns`, ...) or `bluesky` for a bsky verification. */
|
|
1319
|
+
platform: string;
|
|
1320
|
+
verified: boolean;
|
|
1321
|
+
subjectLabel?: string;
|
|
1322
|
+
/** The verified handle (Bluesky verifications only). */
|
|
1323
|
+
handle?: string;
|
|
1324
|
+
profileUrl?: string;
|
|
1325
|
+
} | {
|
|
1326
|
+
kind: 'membership';
|
|
1327
|
+
communityName?: string;
|
|
1328
|
+
description?: string;
|
|
1329
|
+
/** The community record's at-uri (renderer builds the outbound link). */
|
|
1330
|
+
communityUri?: string;
|
|
1331
|
+
} | {
|
|
1332
|
+
kind: 'location';
|
|
1333
|
+
venueName?: string;
|
|
1334
|
+
shout?: string;
|
|
1335
|
+
address?: StreamAddress;
|
|
1336
|
+
geo?: StreamGeo;
|
|
1337
|
+
} | {
|
|
1338
|
+
kind: 'travel';
|
|
1339
|
+
origin?: string;
|
|
1340
|
+
destination?: string;
|
|
1341
|
+
/** Raw transportation mode, e.g. `flight` (renderer maps to a label). */
|
|
1342
|
+
transportation?: string;
|
|
1343
|
+
carrier?: string;
|
|
1344
|
+
carrierCode?: string;
|
|
1345
|
+
startDate?: string;
|
|
1346
|
+
endDate?: string;
|
|
1347
|
+
} | {
|
|
1348
|
+
kind: 'standard-site';
|
|
1349
|
+
title?: string;
|
|
1350
|
+
description?: string;
|
|
1351
|
+
/** Publication base URL (renderer derives host / builds the canonical link). */
|
|
1352
|
+
siteUrl?: string;
|
|
1353
|
+
path?: string;
|
|
1354
|
+
/** Resolved from the publisher registry when the host is allowlisted. */
|
|
1355
|
+
publisherName?: string;
|
|
1356
|
+
/** Publication icon — a resolved CDN URL added by AppView enrichment. */
|
|
1357
|
+
icon?: string;
|
|
1358
|
+
/** Document cover — a resolved CDN URL added by AppView enrichment. */
|
|
1359
|
+
coverImageUrl?: string;
|
|
1360
|
+
/** Estimated reading time in minutes. */
|
|
1361
|
+
readingTime?: number;
|
|
1362
|
+
publishedAt?: string;
|
|
1256
1363
|
};
|
|
1257
1364
|
/**
|
|
1258
1365
|
* A repost / reply / quote target. Three shapes: a full post (normalized
|
|
@@ -1300,6 +1407,8 @@ declare const streamSourceSchema: z.ZodType<StreamSource>;
|
|
|
1300
1407
|
declare const streamThemeSchema: z.ZodType<StreamTheme>;
|
|
1301
1408
|
declare const streamMediaSchema: z.ZodType<StreamMedia>;
|
|
1302
1409
|
declare const streamExternalLinkSchema: z.ZodType<StreamExternalLink>;
|
|
1410
|
+
declare const streamGeoSchema: z.ZodType<StreamGeo>;
|
|
1411
|
+
declare const streamAddressSchema: z.ZodType<StreamAddress>;
|
|
1303
1412
|
declare const streamCardBodySchema: z.ZodType<StreamCardBody>;
|
|
1304
1413
|
/**
|
|
1305
1414
|
* A stream item's repost / reply / quote target. The `post` variant nests a
|
|
@@ -1328,8 +1437,11 @@ interface ToStreamCardVMOptions {
|
|
|
1328
1437
|
*
|
|
1329
1438
|
* Reference implementations: the generic/unknown case, `app.bsky.feed.post`
|
|
1330
1439
|
* (text + images + external embed), and reposts (whose `subject` is normalized
|
|
1331
|
-
* through this same function).
|
|
1332
|
-
*
|
|
1440
|
+
* through this same function). Collections with a typed body variant
|
|
1441
|
+
* (`github-pr`, `book`, `media-review`, `event-rsvp`, `verification`,
|
|
1442
|
+
* `membership`, `location`, `travel`, `standard-site`) are enriched from their
|
|
1443
|
+
* raw record below; `at.youandme.connection` and `fyi.asq.answer` populate a
|
|
1444
|
+
* person / record `subject`. Everything else falls through to `generic`.
|
|
1333
1445
|
*/
|
|
1334
1446
|
declare function toStreamCardVM(item: ActivityItem, options?: ToStreamCardVMOptions): StreamCardVM;
|
|
1335
1447
|
/**
|
|
@@ -1807,4 +1919,4 @@ declare function groupInvolvementByHeading(items: ProfileInvolvement[]): Involve
|
|
|
1807
1919
|
*/
|
|
1808
1920
|
declare const SIFA_SDK_VERSION: string;
|
|
1809
1921
|
|
|
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 };
|
|
1922
|
+
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 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, streamSourceSchema, streamThemeSchema, streamVerbSchema, stripHtmlToText, summarizePresentationDeliveries, toStreamCardVM, toStreamCardVMs, truncateGraphemes, verbForCollection, visibleItems };
|