@singi-labs/sifa-sdk 0.11.32 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +68 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +72 -1
- package/dist/index.d.ts +72 -1
- package/dist/index.js +64 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -507,6 +507,77 @@ declare const ARTIFACT_LINK_KIND_LABELS: Record<string, string>;
|
|
|
507
507
|
/** Resolve a label for an artifact-link-kind value. Falls back to the raw value. */
|
|
508
508
|
declare function getArtifactLinkKindLabel(value: string | undefined | null): string | undefined;
|
|
509
509
|
|
|
510
|
+
/**
|
|
511
|
+
* Verification providers -- the trust roots Sifa recognizes for AT Protocol
|
|
512
|
+
* `app.bsky.graph.verification` records.
|
|
513
|
+
*
|
|
514
|
+
* Framing (see decisions/2026-07-13-third-party-verification-providers.md, D4):
|
|
515
|
+
* a verification checkmark is ONE low-tier trust layer, not Sifa's headline.
|
|
516
|
+
* Most of what it certifies is "this account is who they claim to be" -- useful,
|
|
517
|
+
* and worth carrying because it's an already-recognized network signal, but low
|
|
518
|
+
* value on its own. It sits among Sifa's other trust signals and never becomes a
|
|
519
|
+
* score or a gate. This registry only decides which issuers Sifa displays and
|
|
520
|
+
* with what provenance.
|
|
521
|
+
*
|
|
522
|
+
* Data-only: badge colors and icons are consumer concerns (React DOM on web,
|
|
523
|
+
* React Native on mobile), same split as {@link PLATFORM_LABELS}. Consumers map
|
|
524
|
+
* a provider id to a token/color.
|
|
525
|
+
*/
|
|
526
|
+
type VerificationProviderId = 'bluesky' | 'mu';
|
|
527
|
+
/** How Sifa learns about a provider's verifications. */
|
|
528
|
+
type VerificationSource = 'bluesky-api' | 'firehose';
|
|
529
|
+
interface VerificationProvider {
|
|
530
|
+
id: VerificationProviderId;
|
|
531
|
+
/** Human label for the badge popover, e.g. "Bluesky", "mu (Eurosky)". */
|
|
532
|
+
label: string;
|
|
533
|
+
/**
|
|
534
|
+
* Primary-display priority (D1): when an account holds verifications from
|
|
535
|
+
* multiple providers, the lowest number wins the single inline badge and the
|
|
536
|
+
* rest move into the popover. Must be unique across providers.
|
|
537
|
+
*/
|
|
538
|
+
priority: number;
|
|
539
|
+
/**
|
|
540
|
+
* - `bluesky-api`: sourced from Bluesky's public-API `verifiedStatus`. Bluesky
|
|
541
|
+
* maintains its own trusted-verifier set, so Sifa keeps no local DID list.
|
|
542
|
+
* - `firehose`: sourced from the Jetstream, gated on {@link verifierDids}.
|
|
543
|
+
*/
|
|
544
|
+
source: VerificationSource;
|
|
545
|
+
/**
|
|
546
|
+
* Trusted verifier DIDs for firehose-sourced providers. A verification record
|
|
547
|
+
* counts only if its ISSUER DID is in this list. Empty for `bluesky-api`
|
|
548
|
+
* providers (Bluesky's AppView owns that decision). DIDs, not handles: a handle
|
|
549
|
+
* takeover must never confer verifier status.
|
|
550
|
+
*/
|
|
551
|
+
verifierDids: readonly string[];
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* A verification held by an account, as surfaced to the UI. `issuerDid` is
|
|
555
|
+
* present for firehose-sourced providers and absent for `bluesky-api`.
|
|
556
|
+
*/
|
|
557
|
+
interface AccountVerification {
|
|
558
|
+
provider: VerificationProviderId;
|
|
559
|
+
verifiedAt?: string | null;
|
|
560
|
+
issuerDid?: string | null;
|
|
561
|
+
}
|
|
562
|
+
declare const VERIFICATION_PROVIDERS: Record<VerificationProviderId, VerificationProvider>;
|
|
563
|
+
declare function isKnownVerificationProvider(id: string): id is VerificationProviderId;
|
|
564
|
+
declare function getVerificationProvider(id: string): VerificationProvider | undefined;
|
|
565
|
+
/**
|
|
566
|
+
* The firehose issuer gate: given the DID that authored an
|
|
567
|
+
* `app.bsky.graph.verification` record, return the provider it verifies for, or
|
|
568
|
+
* `null` if the issuer is not a recognized firehose verifier. API-sourced
|
|
569
|
+
* providers (Bluesky) are never matched here -- their verifications do not enter
|
|
570
|
+
* through the firehose, so a self-issued record cannot resolve to them.
|
|
571
|
+
*/
|
|
572
|
+
declare function resolveVerifierProvider(issuerDid: string): VerificationProviderId | null;
|
|
573
|
+
/**
|
|
574
|
+
* D1 primary-provider selection: from all verifications an account holds, pick
|
|
575
|
+
* the one whose provider has the highest priority (lowest `priority` number) for
|
|
576
|
+
* the single inline badge. The rest belong in the popover. Verifications from
|
|
577
|
+
* unknown providers are ignored. Returns `null` when nothing is displayable.
|
|
578
|
+
*/
|
|
579
|
+
declare function primaryVerification(verifications: readonly AccountVerification[]): AccountVerification | null;
|
|
580
|
+
|
|
510
581
|
/**
|
|
511
582
|
* Best-effort title-case for a company display name.
|
|
512
583
|
*
|
|
@@ -1196,4 +1267,4 @@ declare function isLinked(entityRef: string | null | undefined): boolean;
|
|
|
1196
1267
|
*/
|
|
1197
1268
|
declare const SIFA_SDK_VERSION: string;
|
|
1198
1269
|
|
|
1199
|
-
export { ACTIVITY_TIERS, ACTIVITY_VISIBILITY_RULES, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, ARTIFACT_LINK_KIND_LABELS, ARTIFACT_LINK_KIND_OPTIONS, type ActivityItemForUrl, type ActivityTaxonomy, type ActivityTier, 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, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, type CardHealth, type CardHealthStrategy, 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_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, type IndustryOption, 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, 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, type ProfileCompletion, type ProfileDimensionInputs, ProfilePresentationDelivery, ProfilePresentationDeliveryRecord, ProfilePresentationRecord, ProfileSkill, type Publisher, type RgbColor, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, type SkillCategory, type TierMeta, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, type WorkplaceTypeOption, categoryForApp, certDateExtractor, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, durationFromMinutes, entityDisambiguationLabel, entityResultKey, findIndustry, formatCompanyName, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, getActivityTaxonomyVersion, getActivityTier, getAppCategoryIcon, getAppIdForCollection, getArtifactLinkKindLabel, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getInvolvementKindHeading, getInvolvementKindLabel, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getWorkplaceTypeLabel, groupSkillsByCategory, isAppCategory, isCompanyRequired, isKnownAppId, isKnownPlatform, isLinked, isPseudoEmployer, isValidRgbColor, isVisibleActivityItem, lexiconDateExtractor, limitCombiningMarks, looksLikeDomain, meetsContrastAA, normalizeCompanyKey, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, profileToDimensionInputs, relativeLuminance, resolveCardHealth, resolveCardUrl, rgbToString, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, singleDateExtractor, sortByDateDesc, stripHtmlToText, summarizePresentationDeliveries, truncateGraphemes };
|
|
1270
|
+
export { ACTIVITY_TIERS, ACTIVITY_VISIBILITY_RULES, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, ARTIFACT_LINK_KIND_LABELS, ARTIFACT_LINK_KIND_OPTIONS, type AccountVerification, type ActivityItemForUrl, type ActivityTaxonomy, type ActivityTier, 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, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, type CardHealth, type CardHealthStrategy, 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_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, type IndustryOption, 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, 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, type ProfileCompletion, type ProfileDimensionInputs, ProfilePresentationDelivery, ProfilePresentationDeliveryRecord, ProfilePresentationRecord, ProfileSkill, type Publisher, type RgbColor, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, type SkillCategory, type TierMeta, 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, findIndustry, formatCompanyName, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, getActivityTaxonomyVersion, getActivityTier, 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, getWorkplaceTypeLabel, groupSkillsByCategory, isAppCategory, isCompanyRequired, isKnownAppId, isKnownPlatform, isKnownVerificationProvider, isLinked, isPseudoEmployer, isValidRgbColor, isVisibleActivityItem, lexiconDateExtractor, limitCombiningMarks, looksLikeDomain, meetsContrastAA, normalizeCompanyKey, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, primaryVerification, profileToDimensionInputs, relativeLuminance, resolveCardHealth, resolveCardUrl, resolveVerifierProvider, rgbToString, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, singleDateExtractor, sortByDateDesc, stripHtmlToText, summarizePresentationDeliveries, truncateGraphemes };
|
package/dist/index.d.ts
CHANGED
|
@@ -507,6 +507,77 @@ declare const ARTIFACT_LINK_KIND_LABELS: Record<string, string>;
|
|
|
507
507
|
/** Resolve a label for an artifact-link-kind value. Falls back to the raw value. */
|
|
508
508
|
declare function getArtifactLinkKindLabel(value: string | undefined | null): string | undefined;
|
|
509
509
|
|
|
510
|
+
/**
|
|
511
|
+
* Verification providers -- the trust roots Sifa recognizes for AT Protocol
|
|
512
|
+
* `app.bsky.graph.verification` records.
|
|
513
|
+
*
|
|
514
|
+
* Framing (see decisions/2026-07-13-third-party-verification-providers.md, D4):
|
|
515
|
+
* a verification checkmark is ONE low-tier trust layer, not Sifa's headline.
|
|
516
|
+
* Most of what it certifies is "this account is who they claim to be" -- useful,
|
|
517
|
+
* and worth carrying because it's an already-recognized network signal, but low
|
|
518
|
+
* value on its own. It sits among Sifa's other trust signals and never becomes a
|
|
519
|
+
* score or a gate. This registry only decides which issuers Sifa displays and
|
|
520
|
+
* with what provenance.
|
|
521
|
+
*
|
|
522
|
+
* Data-only: badge colors and icons are consumer concerns (React DOM on web,
|
|
523
|
+
* React Native on mobile), same split as {@link PLATFORM_LABELS}. Consumers map
|
|
524
|
+
* a provider id to a token/color.
|
|
525
|
+
*/
|
|
526
|
+
type VerificationProviderId = 'bluesky' | 'mu';
|
|
527
|
+
/** How Sifa learns about a provider's verifications. */
|
|
528
|
+
type VerificationSource = 'bluesky-api' | 'firehose';
|
|
529
|
+
interface VerificationProvider {
|
|
530
|
+
id: VerificationProviderId;
|
|
531
|
+
/** Human label for the badge popover, e.g. "Bluesky", "mu (Eurosky)". */
|
|
532
|
+
label: string;
|
|
533
|
+
/**
|
|
534
|
+
* Primary-display priority (D1): when an account holds verifications from
|
|
535
|
+
* multiple providers, the lowest number wins the single inline badge and the
|
|
536
|
+
* rest move into the popover. Must be unique across providers.
|
|
537
|
+
*/
|
|
538
|
+
priority: number;
|
|
539
|
+
/**
|
|
540
|
+
* - `bluesky-api`: sourced from Bluesky's public-API `verifiedStatus`. Bluesky
|
|
541
|
+
* maintains its own trusted-verifier set, so Sifa keeps no local DID list.
|
|
542
|
+
* - `firehose`: sourced from the Jetstream, gated on {@link verifierDids}.
|
|
543
|
+
*/
|
|
544
|
+
source: VerificationSource;
|
|
545
|
+
/**
|
|
546
|
+
* Trusted verifier DIDs for firehose-sourced providers. A verification record
|
|
547
|
+
* counts only if its ISSUER DID is in this list. Empty for `bluesky-api`
|
|
548
|
+
* providers (Bluesky's AppView owns that decision). DIDs, not handles: a handle
|
|
549
|
+
* takeover must never confer verifier status.
|
|
550
|
+
*/
|
|
551
|
+
verifierDids: readonly string[];
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* A verification held by an account, as surfaced to the UI. `issuerDid` is
|
|
555
|
+
* present for firehose-sourced providers and absent for `bluesky-api`.
|
|
556
|
+
*/
|
|
557
|
+
interface AccountVerification {
|
|
558
|
+
provider: VerificationProviderId;
|
|
559
|
+
verifiedAt?: string | null;
|
|
560
|
+
issuerDid?: string | null;
|
|
561
|
+
}
|
|
562
|
+
declare const VERIFICATION_PROVIDERS: Record<VerificationProviderId, VerificationProvider>;
|
|
563
|
+
declare function isKnownVerificationProvider(id: string): id is VerificationProviderId;
|
|
564
|
+
declare function getVerificationProvider(id: string): VerificationProvider | undefined;
|
|
565
|
+
/**
|
|
566
|
+
* The firehose issuer gate: given the DID that authored an
|
|
567
|
+
* `app.bsky.graph.verification` record, return the provider it verifies for, or
|
|
568
|
+
* `null` if the issuer is not a recognized firehose verifier. API-sourced
|
|
569
|
+
* providers (Bluesky) are never matched here -- their verifications do not enter
|
|
570
|
+
* through the firehose, so a self-issued record cannot resolve to them.
|
|
571
|
+
*/
|
|
572
|
+
declare function resolveVerifierProvider(issuerDid: string): VerificationProviderId | null;
|
|
573
|
+
/**
|
|
574
|
+
* D1 primary-provider selection: from all verifications an account holds, pick
|
|
575
|
+
* the one whose provider has the highest priority (lowest `priority` number) for
|
|
576
|
+
* the single inline badge. The rest belong in the popover. Verifications from
|
|
577
|
+
* unknown providers are ignored. Returns `null` when nothing is displayable.
|
|
578
|
+
*/
|
|
579
|
+
declare function primaryVerification(verifications: readonly AccountVerification[]): AccountVerification | null;
|
|
580
|
+
|
|
510
581
|
/**
|
|
511
582
|
* Best-effort title-case for a company display name.
|
|
512
583
|
*
|
|
@@ -1196,4 +1267,4 @@ declare function isLinked(entityRef: string | null | undefined): boolean;
|
|
|
1196
1267
|
*/
|
|
1197
1268
|
declare const SIFA_SDK_VERSION: string;
|
|
1198
1269
|
|
|
1199
|
-
export { ACTIVITY_TIERS, ACTIVITY_VISIBILITY_RULES, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, ARTIFACT_LINK_KIND_LABELS, ARTIFACT_LINK_KIND_OPTIONS, type ActivityItemForUrl, type ActivityTaxonomy, type ActivityTier, 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, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, type CardHealth, type CardHealthStrategy, 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_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, type IndustryOption, 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, 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, type ProfileCompletion, type ProfileDimensionInputs, ProfilePresentationDelivery, ProfilePresentationDeliveryRecord, ProfilePresentationRecord, ProfileSkill, type Publisher, type RgbColor, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, type SkillCategory, type TierMeta, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, type WorkplaceTypeOption, categoryForApp, certDateExtractor, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, durationFromMinutes, entityDisambiguationLabel, entityResultKey, findIndustry, formatCompanyName, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, getActivityTaxonomyVersion, getActivityTier, getAppCategoryIcon, getAppIdForCollection, getArtifactLinkKindLabel, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getInvolvementKindHeading, getInvolvementKindLabel, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getWorkplaceTypeLabel, groupSkillsByCategory, isAppCategory, isCompanyRequired, isKnownAppId, isKnownPlatform, isLinked, isPseudoEmployer, isValidRgbColor, isVisibleActivityItem, lexiconDateExtractor, limitCombiningMarks, looksLikeDomain, meetsContrastAA, normalizeCompanyKey, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, profileToDimensionInputs, relativeLuminance, resolveCardHealth, resolveCardUrl, rgbToString, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, singleDateExtractor, sortByDateDesc, stripHtmlToText, summarizePresentationDeliveries, truncateGraphemes };
|
|
1270
|
+
export { ACTIVITY_TIERS, ACTIVITY_VISIBILITY_RULES, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, ARTIFACT_LINK_KIND_LABELS, ARTIFACT_LINK_KIND_OPTIONS, type AccountVerification, type ActivityItemForUrl, type ActivityTaxonomy, type ActivityTier, 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, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, type CardHealth, type CardHealthStrategy, 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_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, type IndustryOption, 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, 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, type ProfileCompletion, type ProfileDimensionInputs, ProfilePresentationDelivery, ProfilePresentationDeliveryRecord, ProfilePresentationRecord, ProfileSkill, type Publisher, type RgbColor, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, type SkillCategory, type TierMeta, 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, findIndustry, formatCompanyName, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, getActivityTaxonomyVersion, getActivityTier, 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, getWorkplaceTypeLabel, groupSkillsByCategory, isAppCategory, isCompanyRequired, isKnownAppId, isKnownPlatform, isKnownVerificationProvider, isLinked, isPseudoEmployer, isValidRgbColor, isVisibleActivityItem, lexiconDateExtractor, limitCombiningMarks, looksLikeDomain, meetsContrastAA, normalizeCompanyKey, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, primaryVerification, profileToDimensionInputs, relativeLuminance, resolveCardHealth, resolveCardUrl, resolveVerifierProvider, rgbToString, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, singleDateExtractor, sortByDateDesc, stripHtmlToText, summarizePresentationDeliveries, truncateGraphemes };
|
package/dist/index.js
CHANGED
|
@@ -1479,6 +1479,68 @@ function getArtifactLinkKindLabel(value) {
|
|
|
1479
1479
|
return ARTIFACT_LINK_KIND_LABELS[value] ?? value;
|
|
1480
1480
|
}
|
|
1481
1481
|
|
|
1482
|
+
// src/taxonomy/verification-providers.ts
|
|
1483
|
+
var MU_VERIFIER_DIDS = [
|
|
1484
|
+
"did:plc:ooensn4mr5mhznzypvxelfa3",
|
|
1485
|
+
// eurosky.social -- coordinates the trusted-verifier program
|
|
1486
|
+
"did:plc:durcipmx2rwgzzagbiumobs5",
|
|
1487
|
+
// france-atmosphe.re
|
|
1488
|
+
"did:plc:zsf5p7rqilz2qvyd7ezmxrfj",
|
|
1489
|
+
// belgium-atmosphe.re
|
|
1490
|
+
"did:plc:hd564mpf6bekrwzyhvujs54b",
|
|
1491
|
+
// medsky.network
|
|
1492
|
+
"did:plc:u5zp7npt5kpueado77kuihyz",
|
|
1493
|
+
// npmx.dev
|
|
1494
|
+
"did:plc:6tndl5lqrzjrx7ahjom2gjbq",
|
|
1495
|
+
// stewardshiplab.org
|
|
1496
|
+
"did:plc:vnycpb2e4lh4tc7oyr3n2jvh",
|
|
1497
|
+
// newsmastfoundation.org
|
|
1498
|
+
"did:plc:dsiqe4pszk5ldbjk66fyryjv"
|
|
1499
|
+
// cpesr.fr
|
|
1500
|
+
];
|
|
1501
|
+
var VERIFICATION_PROVIDERS = {
|
|
1502
|
+
bluesky: {
|
|
1503
|
+
id: "bluesky",
|
|
1504
|
+
label: "Bluesky",
|
|
1505
|
+
priority: 0,
|
|
1506
|
+
source: "bluesky-api",
|
|
1507
|
+
verifierDids: []
|
|
1508
|
+
},
|
|
1509
|
+
mu: {
|
|
1510
|
+
id: "mu",
|
|
1511
|
+
label: "mu (Eurosky)",
|
|
1512
|
+
priority: 1,
|
|
1513
|
+
source: "firehose",
|
|
1514
|
+
verifierDids: MU_VERIFIER_DIDS
|
|
1515
|
+
}
|
|
1516
|
+
};
|
|
1517
|
+
function isKnownVerificationProvider(id) {
|
|
1518
|
+
return Object.hasOwn(VERIFICATION_PROVIDERS, id);
|
|
1519
|
+
}
|
|
1520
|
+
function getVerificationProvider(id) {
|
|
1521
|
+
return isKnownVerificationProvider(id) ? VERIFICATION_PROVIDERS[id] : void 0;
|
|
1522
|
+
}
|
|
1523
|
+
function resolveVerifierProvider(issuerDid) {
|
|
1524
|
+
for (const provider of Object.values(VERIFICATION_PROVIDERS)) {
|
|
1525
|
+
if (provider.source !== "firehose") continue;
|
|
1526
|
+
if (provider.verifierDids.includes(issuerDid)) return provider.id;
|
|
1527
|
+
}
|
|
1528
|
+
return null;
|
|
1529
|
+
}
|
|
1530
|
+
function primaryVerification(verifications) {
|
|
1531
|
+
let best = null;
|
|
1532
|
+
let bestPriority = Number.POSITIVE_INFINITY;
|
|
1533
|
+
for (const verification of verifications) {
|
|
1534
|
+
const provider = getVerificationProvider(verification.provider);
|
|
1535
|
+
if (!provider) continue;
|
|
1536
|
+
if (provider.priority < bestPriority) {
|
|
1537
|
+
best = verification;
|
|
1538
|
+
bestPriority = provider.priority;
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
return best;
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1482
1544
|
// src/format/company-name.ts
|
|
1483
1545
|
var SMALL_WORDS = /* @__PURE__ */ new Set([
|
|
1484
1546
|
"a",
|
|
@@ -3105,8 +3167,8 @@ var ProfileVolunteeringRecordSchema = z.object({
|
|
|
3105
3167
|
});
|
|
3106
3168
|
|
|
3107
3169
|
// src/index.ts
|
|
3108
|
-
var SIFA_SDK_VERSION = "0.
|
|
3170
|
+
var SIFA_SDK_VERSION = "0.12.0";
|
|
3109
3171
|
|
|
3110
|
-
export { ACTIVITY_TIERS, ACTIVITY_VISIBILITY_RULES, ADULT_CONTENT_LABELS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, ARTIFACT_LINK_KIND_LABELS, ARTIFACT_LINK_KIND_OPTIONS, ArtifactLinkSchema, AtmosphereFeedItemSchema, CALENDAR_EVENT_MODE_LABELS, CALENDAR_EVENT_STATUS_LABELS, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, COMPANY_OPTIONAL_EMPLOYMENT_TYPES, 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, INVOLVEMENT_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, MIN_SKILLS, OPEN_TO_OPTIONS, OPEN_TO_TOKENS, OPEN_TO_TOKEN_TO_VALUE, OPEN_TO_VALUE_TO_TOKEN, PLATFORM_LABELS, PLATFORM_OPTIONS, PRESENTATION_LINK_TYPE_LABELS, PRESENTATION_LINK_TYPE_OPTIONS, PRESENTATION_ROLE_LABELS, PRESENTATION_ROLE_OPTIONS, PROFILE_INVOLVEMENT_NSID, PUBLISHERS, PresentationDurationSchema, PresentationLinkSchema, ProfileCertificationRecordSchema, ProfileCourseRecordSchema, ProfileEducationRecordSchema, ProfileExternalAccountRecordSchema, ProfileHonorRecordSchema, ProfileInvolvementRecordSchema, ProfileLanguageRecordSchema, ProfilePositionRecordSchema, ProfilePresentationDeliveryRecordSchema, ProfilePresentationRecordSchema, ProfileProjectRecordSchema, ProfilePublicationRecordSchema, ProfileSelfRecordSchema, ProfileSkillRecordSchema, ProfileVolunteeringRecordSchema, PublicationAuthorSchema, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, SifaFeedItemSchema, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, atUriSchema, categoryForApp, certDateExtractor, cidSchema, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, datetimeSchema, decodeFeedCursor, dedupeSkills, detectPdsProvider, didSchema, dimensionsFromInputs, durationFromMinutes, encodeFeedCursor, entityDisambiguationLabel, entityResultKey, externalRecordRefSchema, findIndustry, formatCompanyName, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, getActivityTaxonomyVersion, getActivityTier, getAppCategoryIcon, getAppIdForCollection, getArtifactLinkKindLabel, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getInvolvementKindHeading, getInvolvementKindLabel, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getWorkplaceTypeLabel, groupSkillsByCategory, hasAdultContent, isAppCategory, isCompanyRequired, isKnownAppId, isKnownPlatform, isLinked, isPseudoEmployer, isValidRgbColor, isVisibleActivityItem, languageTagSchema, lexiconDateExtractor, limitCombiningMarks, looksLikeDomain, makeGraphFollowRecordSchema, maxGraphemes, meetsContrastAA, normalizeCompanyKey, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, partialDateSchema, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, profileToDimensionInputs, relativeLuminance, resolveCardHealth, resolveCardUrl, rgbToString, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, selfLabelsSchema, singleDateExtractor, sortByDateDesc, stripHtmlToText, strongRefSchema, summarizePresentationDeliveries, truncateGraphemes, uriSchema };
|
|
3172
|
+
export { ACTIVITY_TIERS, ACTIVITY_VISIBILITY_RULES, ADULT_CONTENT_LABELS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, ARTIFACT_LINK_KIND_LABELS, ARTIFACT_LINK_KIND_OPTIONS, ArtifactLinkSchema, AtmosphereFeedItemSchema, CALENDAR_EVENT_MODE_LABELS, CALENDAR_EVENT_STATUS_LABELS, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, COMPANY_OPTIONAL_EMPLOYMENT_TYPES, 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, INVOLVEMENT_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, MIN_SKILLS, OPEN_TO_OPTIONS, OPEN_TO_TOKENS, OPEN_TO_TOKEN_TO_VALUE, OPEN_TO_VALUE_TO_TOKEN, PLATFORM_LABELS, PLATFORM_OPTIONS, PRESENTATION_LINK_TYPE_LABELS, PRESENTATION_LINK_TYPE_OPTIONS, PRESENTATION_ROLE_LABELS, PRESENTATION_ROLE_OPTIONS, PROFILE_INVOLVEMENT_NSID, PUBLISHERS, PresentationDurationSchema, PresentationLinkSchema, ProfileCertificationRecordSchema, ProfileCourseRecordSchema, ProfileEducationRecordSchema, ProfileExternalAccountRecordSchema, ProfileHonorRecordSchema, ProfileInvolvementRecordSchema, ProfileLanguageRecordSchema, ProfilePositionRecordSchema, ProfilePresentationDeliveryRecordSchema, ProfilePresentationRecordSchema, ProfileProjectRecordSchema, ProfilePublicationRecordSchema, ProfileSelfRecordSchema, ProfileSkillRecordSchema, ProfileVolunteeringRecordSchema, PublicationAuthorSchema, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, SifaFeedItemSchema, VERIFICATION_PROVIDERS, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, atUriSchema, categoryForApp, certDateExtractor, cidSchema, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, datetimeSchema, decodeFeedCursor, dedupeSkills, detectPdsProvider, didSchema, dimensionsFromInputs, durationFromMinutes, encodeFeedCursor, entityDisambiguationLabel, entityResultKey, externalRecordRefSchema, findIndustry, formatCompanyName, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, getActivityTaxonomyVersion, getActivityTier, 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, getWorkplaceTypeLabel, groupSkillsByCategory, hasAdultContent, isAppCategory, isCompanyRequired, isKnownAppId, isKnownPlatform, isKnownVerificationProvider, isLinked, isPseudoEmployer, isValidRgbColor, isVisibleActivityItem, languageTagSchema, lexiconDateExtractor, limitCombiningMarks, looksLikeDomain, makeGraphFollowRecordSchema, maxGraphemes, meetsContrastAA, normalizeCompanyKey, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, partialDateSchema, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, primaryVerification, profileToDimensionInputs, relativeLuminance, resolveCardHealth, resolveCardUrl, resolveVerifierProvider, rgbToString, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, selfLabelsSchema, singleDateExtractor, sortByDateDesc, stripHtmlToText, strongRefSchema, summarizePresentationDeliveries, truncateGraphemes, uriSchema };
|
|
3111
3173
|
//# sourceMappingURL=index.js.map
|
|
3112
3174
|
//# sourceMappingURL=index.js.map
|