@singi-labs/sifa-sdk 0.14.2 → 0.14.5
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/badge/index.cjs +1 -1
- package/dist/badge/index.cjs.map +1 -1
- package/dist/badge/index.js +1 -1
- package/dist/badge/index.js.map +1 -1
- package/dist/index.cjs +60 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +58 -4
- package/dist/index.d.ts +58 -4
- package/dist/index.js +57 -3
- package/dist/index.js.map +1 -1
- package/dist/jsonld/index.cjs +7 -5
- package/dist/jsonld/index.cjs.map +1 -1
- package/dist/jsonld/index.js +7 -5
- package/dist/jsonld/index.js.map +1 -1
- package/dist/query/fetchers/index.cjs +1 -1
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.js +1 -1
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/index.cjs +1 -1
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.js +1 -1
- package/dist/query/index.js.map +1 -1
- package/dist/schemas/write/index.cjs +13 -1
- package/dist/schemas/write/index.cjs.map +1 -1
- package/dist/schemas/write/index.d.cts +2 -0
- package/dist/schemas/write/index.d.ts +2 -0
- package/dist/schemas/write/index.js +13 -1
- package/dist/schemas/write/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -513,6 +513,36 @@ declare const PRESENTATION_ROLE_LABELS: Record<string, string>;
|
|
|
513
513
|
/** Resolve a label for a presentation-role token. Falls back to the raw value. */
|
|
514
514
|
declare function getPresentationRoleLabel(value: string | undefined | null): string | undefined;
|
|
515
515
|
|
|
516
|
+
/**
|
|
517
|
+
* Publication-type taxonomy. Mirrors `id.sifa.profile.publication.type`
|
|
518
|
+
* `knownValues` from sifa-lexicons.
|
|
519
|
+
*
|
|
520
|
+
* The values are ORCID's work-type vocabulary rather than `id.sifa.defs` tokens,
|
|
521
|
+
* unlike every other enum here. That is deliberate: the vocabulary is ORCID's,
|
|
522
|
+
* not Sifa's. It is what the data arrives in and what the AppView stores and
|
|
523
|
+
* serves unmapped, so a synced work round-trips with no translation table.
|
|
524
|
+
* Minting Sifa tokens would make Sifa the owner of a bibliographic vocabulary it
|
|
525
|
+
* did not design. COAR Resource Types stays the anchor a consumer maps to.
|
|
526
|
+
*
|
|
527
|
+
* The set is open. A publication that reached Sifa from Standard.site, RSS, or a
|
|
528
|
+
* hand-typed entry need not fit ORCID's list, so an unknown value is kept as
|
|
529
|
+
* written rather than dropped.
|
|
530
|
+
*/
|
|
531
|
+
interface PublicationTypeOption {
|
|
532
|
+
value: string;
|
|
533
|
+
label: string;
|
|
534
|
+
}
|
|
535
|
+
declare const PUBLICATION_TYPE_OPTIONS: PublicationTypeOption[];
|
|
536
|
+
declare const PUBLICATION_TYPE_LABELS: Record<string, string>;
|
|
537
|
+
/**
|
|
538
|
+
* Resolve a label for a publication type.
|
|
539
|
+
*
|
|
540
|
+
* An unrecognized value falls back to the generic label rather than being shown
|
|
541
|
+
* raw: an ORCID work type is a slug, and rendering "spin-off-company" verbatim
|
|
542
|
+
* on a card reads as a bug. A caller that wants the raw value already has it.
|
|
543
|
+
*/
|
|
544
|
+
declare function getPublicationTypeLabel(value: string | undefined | null): string | undefined;
|
|
545
|
+
|
|
516
546
|
/**
|
|
517
547
|
* Presentation link-type taxonomy. Mirrors
|
|
518
548
|
* `id.sifa.defs#presentationLinkType.knownValues` from sifa-lexicons. Used to
|
|
@@ -847,6 +877,25 @@ declare function certDateExtractor<T extends {
|
|
|
847
877
|
expiryDate?: string;
|
|
848
878
|
}>(item: T): DateRange;
|
|
849
879
|
|
|
880
|
+
/**
|
|
881
|
+
* Reduce a DOI to its bare form: `10.1234/example`, never
|
|
882
|
+
* `https://doi.org/10.1234/example` and never `doi:10.1234/example`.
|
|
883
|
+
*
|
|
884
|
+
* A DOI inside a URL is a link. Bare, it is an identifier, which is what lets
|
|
885
|
+
* two records describing one publication be matched on it. The lexicon stores
|
|
886
|
+
* the bare form for that reason.
|
|
887
|
+
*
|
|
888
|
+
* People paste the resolver URL, because that is what a publisher page and a
|
|
889
|
+
* citation manager both hand you, and citations carry the `doi:` scheme.
|
|
890
|
+
* Normalizing on the way in is the difference between a field that dedupes and
|
|
891
|
+
* a field holding three spellings of one value.
|
|
892
|
+
*
|
|
893
|
+
* Input that is not a DOI at all is trimmed and returned as-is. This is a
|
|
894
|
+
* normalizer, not a validator: rejecting here would fail a write over a field
|
|
895
|
+
* nothing depends on, and older registrants produce shapes worth not policing.
|
|
896
|
+
*/
|
|
897
|
+
declare function normalizeDoi(value: string): string;
|
|
898
|
+
|
|
850
899
|
/**
|
|
851
900
|
* Sanitize raw user input into a valid AT Protocol identifier (handle or DID).
|
|
852
901
|
*
|
|
@@ -1879,15 +1928,20 @@ declare function countFilledDimensions(input: ProfileDimensionInputs | Profile):
|
|
|
1879
1928
|
* <meta description>, JSON-LD) re-derived "primary" inconsistently and diverged
|
|
1880
1929
|
* for users with multiple concurrent roles.
|
|
1881
1930
|
*
|
|
1931
|
+
* A `hidden` position is one the user chose not to show on their public profile.
|
|
1932
|
+
* It is never surfaced as the featured role — hidden wins over `primary`, so a
|
|
1933
|
+
* role flagged both hidden and primary is excluded rather than featured.
|
|
1934
|
+
*
|
|
1882
1935
|
* Rules (in order):
|
|
1883
|
-
* 1. A position the user explicitly flagged `primary` AND that is still active.
|
|
1884
|
-
* 2. Otherwise, the active position with the most recent `startedAt`.
|
|
1885
|
-
* 3. Otherwise, undefined (no
|
|
1936
|
+
* 1. A position the user explicitly flagged `primary` AND that is still active AND not hidden.
|
|
1937
|
+
* 2. Otherwise, the active, non-hidden position with the most recent `startedAt`.
|
|
1938
|
+
* 3. Otherwise, undefined (no eligible position).
|
|
1886
1939
|
*/
|
|
1887
1940
|
interface PrimaryPositionCandidate {
|
|
1888
1941
|
startedAt?: string;
|
|
1889
1942
|
endedAt?: string;
|
|
1890
1943
|
primary?: boolean;
|
|
1944
|
+
hidden?: boolean;
|
|
1891
1945
|
}
|
|
1892
1946
|
declare function pickPrimaryPosition<T extends PrimaryPositionCandidate>(positions: readonly T[] | undefined): T | undefined;
|
|
1893
1947
|
|
|
@@ -2406,4 +2460,4 @@ declare function roadmapIssueUrl(issue: number): string;
|
|
|
2406
2460
|
*/
|
|
2407
2461
|
declare const SIFA_SDK_VERSION: string;
|
|
2408
2462
|
|
|
2409
|
-
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, AccountFacetMode, 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 DailyActivityCount, type DimensionKey, type DimensionMap, type DisambiguationFields, type DisplayUrl, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, ENTITY_REF_ANCHORS, type EmbedResult, type EmploymentTypeGroup, type EmploymentTypeOption, type EntityRefAnchor, EntitySearchResult, type FormatDisplayUrlOptions, INDUSTRY_OPTIONS, INVESTMENT_ROLE_LABELS, INVESTMENT_ROLE_OPTIONS, INVESTMENT_STAGE_LABELS, INVESTMENT_STAGE_OPTIONS, INVESTMENT_STATUS_LABELS, INVESTMENT_STATUS_OPTIONS, INVOLVEMENT_HEADING_ORDER, INVOLVEMENT_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, type IndustryOption, type InvestmentOption, type InvolvementGroup, type InvolvementKindOption, type KnownAppId, type LexiconEntry, type LocationSegment, type LocationSegmentKind, type LocationSegmentsOptions, LocationValue, MIN_SKILLS, type MergedProfileSkill, ON_BEHALF_OF_EMPLOYMENT_TYPES, 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 PersonalFacetContent, 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, ROADMAP_ISSUES_REPO, ROADMAP_ITEM_META, type RgbColor, type RoadmapItemMeta, SECTION_GROUPS, SECTION_LABELS, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, STREAM_VERBS, type SectionGroupId, type SectionId, type SkillCategory, type StreamAddress, type StreamAuthor, 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, type UrlPathPolicy, VERIFICATION_PROVIDERS, type VerificationProvider, type VerificationProviderId, type VerificationSource, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, type WorkplaceTypeOption, buildMetaDescription, buildTalkSlug, categoryForApp, certDateExtractor, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countRecentActivity, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, durationFromMinutes, entityDisambiguationLabel, entityResultKey, filterHidden, findIndustry, formatCompanyName, formatDateRange, formatDisplayUrl, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, formatTimelineDate, getActivityTaxonomyVersion, getActivityTier, getActivityVerbsVersion, getAppCategoryIcon, getAppIdForCollection, getArtifactLinkKindLabel, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getInvestmentRoleLabel, getInvestmentStageLabel, getInvestmentStatusLabel, getInvolvementKindHeading, getInvolvementKindLabel, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getVerificationProvider, getVisibleSectionIds, getWorkplaceTypeLabel, groupInvolvementByHeading, groupSkillsByCategory, groupSkillsBySubCategory, groupSkillsForDisplay, hasPersonalProfileContent, hoistPrimary, isAppCategory, isCompanyPageIndexable, isCompanyRequired, isKnownAppId, isKnownPlatform, isKnownVerificationProvider, isLinked, isOnBehalfOfApplicable, isPseudoEmployer, isRegistrableDomainHandle, isSectionPopulated, isValidRgbColor, isVisibleActivityItem, lexiconDateExtractor, limitCombiningMarks, locationSegments, looksLikeDomain, meetsContrastAA, normalizeCompanyKey, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeSkillCategory, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, parseTalkRkey, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, primaryVerification, profileToDimensionInputs, qualifiesAsOrg, relativeLuminance, rendersCompanyProfile, rendersPersonalProfile, resolveAccountFacetMode, resolveCardHealth, resolveCardUrl, resolveEmbed, resolveVerifierProvider, rgbToString, roadmapIssueUrl, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, singleDateExtractor, slugifyTitle, sortByActiveDateRange, sortByDateDesc, sortCertifications, sortEducation, sortHonors, sortLanguages, sortLanguagesByProficiency, sortPositions, sortProjects, sortPublications, streamAddressSchema, streamAuthorSchema, streamCardBodySchema, streamCardSubjectSchema, streamCardVMSchema, streamExternalLinkSchema, streamGeoSchema, streamMediaSchema, streamRichSegmentSchema, streamSourceSchema, streamThemeSchema, streamVerbSchema, stripHtmlToText, summarizePresentationDeliveries, toStreamCardVM, toStreamCardVMs, truncateGraphemes, verbForCollection, visibleItems, youtubeThumbnailUrl, youtubeVideoId };
|
|
2463
|
+
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, AccountFacetMode, 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 DailyActivityCount, type DimensionKey, type DimensionMap, type DisambiguationFields, type DisplayUrl, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, ENTITY_REF_ANCHORS, type EmbedResult, type EmploymentTypeGroup, type EmploymentTypeOption, type EntityRefAnchor, EntitySearchResult, type FormatDisplayUrlOptions, INDUSTRY_OPTIONS, INVESTMENT_ROLE_LABELS, INVESTMENT_ROLE_OPTIONS, INVESTMENT_STAGE_LABELS, INVESTMENT_STAGE_OPTIONS, INVESTMENT_STATUS_LABELS, INVESTMENT_STATUS_OPTIONS, INVOLVEMENT_HEADING_ORDER, INVOLVEMENT_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, type IndustryOption, type InvestmentOption, type InvolvementGroup, type InvolvementKindOption, type KnownAppId, type LexiconEntry, type LocationSegment, type LocationSegmentKind, type LocationSegmentsOptions, LocationValue, MIN_SKILLS, type MergedProfileSkill, ON_BEHALF_OF_EMPLOYMENT_TYPES, 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, PUBLICATION_TYPE_LABELS, PUBLICATION_TYPE_OPTIONS, PUBLISHERS, type ParsedDelivery, type ParsedPresentation, type PdsProvider, PdsProviderInfo, type PersonalFacetContent, 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 PublicationTypeOption, type Publisher, ROADMAP_ISSUES_REPO, ROADMAP_ITEM_META, type RgbColor, type RoadmapItemMeta, SECTION_GROUPS, SECTION_LABELS, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, STREAM_VERBS, type SectionGroupId, type SectionId, type SkillCategory, type StreamAddress, type StreamAuthor, 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, type UrlPathPolicy, VERIFICATION_PROVIDERS, type VerificationProvider, type VerificationProviderId, type VerificationSource, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, type WorkplaceTypeOption, buildMetaDescription, buildTalkSlug, categoryForApp, certDateExtractor, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countRecentActivity, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, durationFromMinutes, entityDisambiguationLabel, entityResultKey, filterHidden, findIndustry, formatCompanyName, formatDateRange, formatDisplayUrl, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, formatTimelineDate, getActivityTaxonomyVersion, getActivityTier, getActivityVerbsVersion, getAppCategoryIcon, getAppIdForCollection, getArtifactLinkKindLabel, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getInvestmentRoleLabel, getInvestmentStageLabel, getInvestmentStatusLabel, getInvolvementKindHeading, getInvolvementKindLabel, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublicationTypeLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getVerificationProvider, getVisibleSectionIds, getWorkplaceTypeLabel, groupInvolvementByHeading, groupSkillsByCategory, groupSkillsBySubCategory, groupSkillsForDisplay, hasPersonalProfileContent, hoistPrimary, isAppCategory, isCompanyPageIndexable, isCompanyRequired, isKnownAppId, isKnownPlatform, isKnownVerificationProvider, isLinked, isOnBehalfOfApplicable, isPseudoEmployer, isRegistrableDomainHandle, isSectionPopulated, isValidRgbColor, isVisibleActivityItem, lexiconDateExtractor, limitCombiningMarks, locationSegments, looksLikeDomain, meetsContrastAA, normalizeCompanyKey, normalizeDoi, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeSkillCategory, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, parseTalkRkey, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, primaryVerification, profileToDimensionInputs, qualifiesAsOrg, relativeLuminance, rendersCompanyProfile, rendersPersonalProfile, resolveAccountFacetMode, resolveCardHealth, resolveCardUrl, resolveEmbed, resolveVerifierProvider, rgbToString, roadmapIssueUrl, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, singleDateExtractor, slugifyTitle, sortByActiveDateRange, sortByDateDesc, sortCertifications, sortEducation, sortHonors, sortLanguages, sortLanguagesByProficiency, sortPositions, sortProjects, sortPublications, streamAddressSchema, streamAuthorSchema, streamCardBodySchema, streamCardSubjectSchema, streamCardVMSchema, streamExternalLinkSchema, streamGeoSchema, streamMediaSchema, streamRichSegmentSchema, streamSourceSchema, streamThemeSchema, streamVerbSchema, stripHtmlToText, summarizePresentationDeliveries, toStreamCardVM, toStreamCardVMs, truncateGraphemes, verbForCollection, visibleItems, youtubeThumbnailUrl, youtubeVideoId };
|
package/dist/index.d.ts
CHANGED
|
@@ -513,6 +513,36 @@ declare const PRESENTATION_ROLE_LABELS: Record<string, string>;
|
|
|
513
513
|
/** Resolve a label for a presentation-role token. Falls back to the raw value. */
|
|
514
514
|
declare function getPresentationRoleLabel(value: string | undefined | null): string | undefined;
|
|
515
515
|
|
|
516
|
+
/**
|
|
517
|
+
* Publication-type taxonomy. Mirrors `id.sifa.profile.publication.type`
|
|
518
|
+
* `knownValues` from sifa-lexicons.
|
|
519
|
+
*
|
|
520
|
+
* The values are ORCID's work-type vocabulary rather than `id.sifa.defs` tokens,
|
|
521
|
+
* unlike every other enum here. That is deliberate: the vocabulary is ORCID's,
|
|
522
|
+
* not Sifa's. It is what the data arrives in and what the AppView stores and
|
|
523
|
+
* serves unmapped, so a synced work round-trips with no translation table.
|
|
524
|
+
* Minting Sifa tokens would make Sifa the owner of a bibliographic vocabulary it
|
|
525
|
+
* did not design. COAR Resource Types stays the anchor a consumer maps to.
|
|
526
|
+
*
|
|
527
|
+
* The set is open. A publication that reached Sifa from Standard.site, RSS, or a
|
|
528
|
+
* hand-typed entry need not fit ORCID's list, so an unknown value is kept as
|
|
529
|
+
* written rather than dropped.
|
|
530
|
+
*/
|
|
531
|
+
interface PublicationTypeOption {
|
|
532
|
+
value: string;
|
|
533
|
+
label: string;
|
|
534
|
+
}
|
|
535
|
+
declare const PUBLICATION_TYPE_OPTIONS: PublicationTypeOption[];
|
|
536
|
+
declare const PUBLICATION_TYPE_LABELS: Record<string, string>;
|
|
537
|
+
/**
|
|
538
|
+
* Resolve a label for a publication type.
|
|
539
|
+
*
|
|
540
|
+
* An unrecognized value falls back to the generic label rather than being shown
|
|
541
|
+
* raw: an ORCID work type is a slug, and rendering "spin-off-company" verbatim
|
|
542
|
+
* on a card reads as a bug. A caller that wants the raw value already has it.
|
|
543
|
+
*/
|
|
544
|
+
declare function getPublicationTypeLabel(value: string | undefined | null): string | undefined;
|
|
545
|
+
|
|
516
546
|
/**
|
|
517
547
|
* Presentation link-type taxonomy. Mirrors
|
|
518
548
|
* `id.sifa.defs#presentationLinkType.knownValues` from sifa-lexicons. Used to
|
|
@@ -847,6 +877,25 @@ declare function certDateExtractor<T extends {
|
|
|
847
877
|
expiryDate?: string;
|
|
848
878
|
}>(item: T): DateRange;
|
|
849
879
|
|
|
880
|
+
/**
|
|
881
|
+
* Reduce a DOI to its bare form: `10.1234/example`, never
|
|
882
|
+
* `https://doi.org/10.1234/example` and never `doi:10.1234/example`.
|
|
883
|
+
*
|
|
884
|
+
* A DOI inside a URL is a link. Bare, it is an identifier, which is what lets
|
|
885
|
+
* two records describing one publication be matched on it. The lexicon stores
|
|
886
|
+
* the bare form for that reason.
|
|
887
|
+
*
|
|
888
|
+
* People paste the resolver URL, because that is what a publisher page and a
|
|
889
|
+
* citation manager both hand you, and citations carry the `doi:` scheme.
|
|
890
|
+
* Normalizing on the way in is the difference between a field that dedupes and
|
|
891
|
+
* a field holding three spellings of one value.
|
|
892
|
+
*
|
|
893
|
+
* Input that is not a DOI at all is trimmed and returned as-is. This is a
|
|
894
|
+
* normalizer, not a validator: rejecting here would fail a write over a field
|
|
895
|
+
* nothing depends on, and older registrants produce shapes worth not policing.
|
|
896
|
+
*/
|
|
897
|
+
declare function normalizeDoi(value: string): string;
|
|
898
|
+
|
|
850
899
|
/**
|
|
851
900
|
* Sanitize raw user input into a valid AT Protocol identifier (handle or DID).
|
|
852
901
|
*
|
|
@@ -1879,15 +1928,20 @@ declare function countFilledDimensions(input: ProfileDimensionInputs | Profile):
|
|
|
1879
1928
|
* <meta description>, JSON-LD) re-derived "primary" inconsistently and diverged
|
|
1880
1929
|
* for users with multiple concurrent roles.
|
|
1881
1930
|
*
|
|
1931
|
+
* A `hidden` position is one the user chose not to show on their public profile.
|
|
1932
|
+
* It is never surfaced as the featured role — hidden wins over `primary`, so a
|
|
1933
|
+
* role flagged both hidden and primary is excluded rather than featured.
|
|
1934
|
+
*
|
|
1882
1935
|
* Rules (in order):
|
|
1883
|
-
* 1. A position the user explicitly flagged `primary` AND that is still active.
|
|
1884
|
-
* 2. Otherwise, the active position with the most recent `startedAt`.
|
|
1885
|
-
* 3. Otherwise, undefined (no
|
|
1936
|
+
* 1. A position the user explicitly flagged `primary` AND that is still active AND not hidden.
|
|
1937
|
+
* 2. Otherwise, the active, non-hidden position with the most recent `startedAt`.
|
|
1938
|
+
* 3. Otherwise, undefined (no eligible position).
|
|
1886
1939
|
*/
|
|
1887
1940
|
interface PrimaryPositionCandidate {
|
|
1888
1941
|
startedAt?: string;
|
|
1889
1942
|
endedAt?: string;
|
|
1890
1943
|
primary?: boolean;
|
|
1944
|
+
hidden?: boolean;
|
|
1891
1945
|
}
|
|
1892
1946
|
declare function pickPrimaryPosition<T extends PrimaryPositionCandidate>(positions: readonly T[] | undefined): T | undefined;
|
|
1893
1947
|
|
|
@@ -2406,4 +2460,4 @@ declare function roadmapIssueUrl(issue: number): string;
|
|
|
2406
2460
|
*/
|
|
2407
2461
|
declare const SIFA_SDK_VERSION: string;
|
|
2408
2462
|
|
|
2409
|
-
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, AccountFacetMode, 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 DailyActivityCount, type DimensionKey, type DimensionMap, type DisambiguationFields, type DisplayUrl, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, ENTITY_REF_ANCHORS, type EmbedResult, type EmploymentTypeGroup, type EmploymentTypeOption, type EntityRefAnchor, EntitySearchResult, type FormatDisplayUrlOptions, INDUSTRY_OPTIONS, INVESTMENT_ROLE_LABELS, INVESTMENT_ROLE_OPTIONS, INVESTMENT_STAGE_LABELS, INVESTMENT_STAGE_OPTIONS, INVESTMENT_STATUS_LABELS, INVESTMENT_STATUS_OPTIONS, INVOLVEMENT_HEADING_ORDER, INVOLVEMENT_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, type IndustryOption, type InvestmentOption, type InvolvementGroup, type InvolvementKindOption, type KnownAppId, type LexiconEntry, type LocationSegment, type LocationSegmentKind, type LocationSegmentsOptions, LocationValue, MIN_SKILLS, type MergedProfileSkill, ON_BEHALF_OF_EMPLOYMENT_TYPES, 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 PersonalFacetContent, 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, ROADMAP_ISSUES_REPO, ROADMAP_ITEM_META, type RgbColor, type RoadmapItemMeta, SECTION_GROUPS, SECTION_LABELS, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, STREAM_VERBS, type SectionGroupId, type SectionId, type SkillCategory, type StreamAddress, type StreamAuthor, 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, type UrlPathPolicy, VERIFICATION_PROVIDERS, type VerificationProvider, type VerificationProviderId, type VerificationSource, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, type WorkplaceTypeOption, buildMetaDescription, buildTalkSlug, categoryForApp, certDateExtractor, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countRecentActivity, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, durationFromMinutes, entityDisambiguationLabel, entityResultKey, filterHidden, findIndustry, formatCompanyName, formatDateRange, formatDisplayUrl, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, formatTimelineDate, getActivityTaxonomyVersion, getActivityTier, getActivityVerbsVersion, getAppCategoryIcon, getAppIdForCollection, getArtifactLinkKindLabel, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getInvestmentRoleLabel, getInvestmentStageLabel, getInvestmentStatusLabel, getInvolvementKindHeading, getInvolvementKindLabel, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getVerificationProvider, getVisibleSectionIds, getWorkplaceTypeLabel, groupInvolvementByHeading, groupSkillsByCategory, groupSkillsBySubCategory, groupSkillsForDisplay, hasPersonalProfileContent, hoistPrimary, isAppCategory, isCompanyPageIndexable, isCompanyRequired, isKnownAppId, isKnownPlatform, isKnownVerificationProvider, isLinked, isOnBehalfOfApplicable, isPseudoEmployer, isRegistrableDomainHandle, isSectionPopulated, isValidRgbColor, isVisibleActivityItem, lexiconDateExtractor, limitCombiningMarks, locationSegments, looksLikeDomain, meetsContrastAA, normalizeCompanyKey, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeSkillCategory, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, parseTalkRkey, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, primaryVerification, profileToDimensionInputs, qualifiesAsOrg, relativeLuminance, rendersCompanyProfile, rendersPersonalProfile, resolveAccountFacetMode, resolveCardHealth, resolveCardUrl, resolveEmbed, resolveVerifierProvider, rgbToString, roadmapIssueUrl, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, singleDateExtractor, slugifyTitle, sortByActiveDateRange, sortByDateDesc, sortCertifications, sortEducation, sortHonors, sortLanguages, sortLanguagesByProficiency, sortPositions, sortProjects, sortPublications, streamAddressSchema, streamAuthorSchema, streamCardBodySchema, streamCardSubjectSchema, streamCardVMSchema, streamExternalLinkSchema, streamGeoSchema, streamMediaSchema, streamRichSegmentSchema, streamSourceSchema, streamThemeSchema, streamVerbSchema, stripHtmlToText, summarizePresentationDeliveries, toStreamCardVM, toStreamCardVMs, truncateGraphemes, verbForCollection, visibleItems, youtubeThumbnailUrl, youtubeVideoId };
|
|
2463
|
+
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, AccountFacetMode, 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 DailyActivityCount, type DimensionKey, type DimensionMap, type DisambiguationFields, type DisplayUrl, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, ENTITY_REF_ANCHORS, type EmbedResult, type EmploymentTypeGroup, type EmploymentTypeOption, type EntityRefAnchor, EntitySearchResult, type FormatDisplayUrlOptions, INDUSTRY_OPTIONS, INVESTMENT_ROLE_LABELS, INVESTMENT_ROLE_OPTIONS, INVESTMENT_STAGE_LABELS, INVESTMENT_STAGE_OPTIONS, INVESTMENT_STATUS_LABELS, INVESTMENT_STATUS_OPTIONS, INVOLVEMENT_HEADING_ORDER, INVOLVEMENT_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, type IndustryOption, type InvestmentOption, type InvolvementGroup, type InvolvementKindOption, type KnownAppId, type LexiconEntry, type LocationSegment, type LocationSegmentKind, type LocationSegmentsOptions, LocationValue, MIN_SKILLS, type MergedProfileSkill, ON_BEHALF_OF_EMPLOYMENT_TYPES, 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, PUBLICATION_TYPE_LABELS, PUBLICATION_TYPE_OPTIONS, PUBLISHERS, type ParsedDelivery, type ParsedPresentation, type PdsProvider, PdsProviderInfo, type PersonalFacetContent, 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 PublicationTypeOption, type Publisher, ROADMAP_ISSUES_REPO, ROADMAP_ITEM_META, type RgbColor, type RoadmapItemMeta, SECTION_GROUPS, SECTION_LABELS, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, STREAM_VERBS, type SectionGroupId, type SectionId, type SkillCategory, type StreamAddress, type StreamAuthor, 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, type UrlPathPolicy, VERIFICATION_PROVIDERS, type VerificationProvider, type VerificationProviderId, type VerificationSource, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, type WorkplaceTypeOption, buildMetaDescription, buildTalkSlug, categoryForApp, certDateExtractor, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countRecentActivity, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, durationFromMinutes, entityDisambiguationLabel, entityResultKey, filterHidden, findIndustry, formatCompanyName, formatDateRange, formatDisplayUrl, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, formatTimelineDate, getActivityTaxonomyVersion, getActivityTier, getActivityVerbsVersion, getAppCategoryIcon, getAppIdForCollection, getArtifactLinkKindLabel, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getInvestmentRoleLabel, getInvestmentStageLabel, getInvestmentStatusLabel, getInvolvementKindHeading, getInvolvementKindLabel, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublicationTypeLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getVerificationProvider, getVisibleSectionIds, getWorkplaceTypeLabel, groupInvolvementByHeading, groupSkillsByCategory, groupSkillsBySubCategory, groupSkillsForDisplay, hasPersonalProfileContent, hoistPrimary, isAppCategory, isCompanyPageIndexable, isCompanyRequired, isKnownAppId, isKnownPlatform, isKnownVerificationProvider, isLinked, isOnBehalfOfApplicable, isPseudoEmployer, isRegistrableDomainHandle, isSectionPopulated, isValidRgbColor, isVisibleActivityItem, lexiconDateExtractor, limitCombiningMarks, locationSegments, looksLikeDomain, meetsContrastAA, normalizeCompanyKey, normalizeDoi, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeSkillCategory, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, parseTalkRkey, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, primaryVerification, profileToDimensionInputs, qualifiesAsOrg, relativeLuminance, rendersCompanyProfile, rendersPersonalProfile, resolveAccountFacetMode, resolveCardHealth, resolveCardUrl, resolveEmbed, resolveVerifierProvider, rgbToString, roadmapIssueUrl, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, singleDateExtractor, slugifyTitle, sortByActiveDateRange, sortByDateDesc, sortCertifications, sortEducation, sortHonors, sortLanguages, sortLanguagesByProficiency, sortPositions, sortProjects, sortPublications, streamAddressSchema, streamAuthorSchema, streamCardBodySchema, streamCardSubjectSchema, streamCardVMSchema, streamExternalLinkSchema, streamGeoSchema, streamMediaSchema, streamRichSegmentSchema, streamSourceSchema, streamThemeSchema, streamVerbSchema, stripHtmlToText, summarizePresentationDeliveries, toStreamCardVM, toStreamCardVMs, truncateGraphemes, verbForCollection, visibleItems, youtubeThumbnailUrl, youtubeVideoId };
|
package/dist/index.js
CHANGED
|
@@ -2003,6 +2003,55 @@ function getPresentationRoleLabel(value) {
|
|
|
2003
2003
|
return PRESENTATION_ROLE_LABELS[value] ?? value;
|
|
2004
2004
|
}
|
|
2005
2005
|
|
|
2006
|
+
// src/taxonomy/publication-type.ts
|
|
2007
|
+
var PUBLICATION_TYPE_OPTIONS = [
|
|
2008
|
+
{ value: "journal-article", label: "Journal Article" },
|
|
2009
|
+
{ value: "conference-paper", label: "Conference Paper" },
|
|
2010
|
+
{ value: "conference-abstract", label: "Conference Abstract" },
|
|
2011
|
+
{ value: "conference-poster", label: "Conference Poster" },
|
|
2012
|
+
{ value: "book", label: "Book" },
|
|
2013
|
+
{ value: "book-chapter", label: "Book Chapter" },
|
|
2014
|
+
{ value: "book-review", label: "Book Review" },
|
|
2015
|
+
{ value: "edited-book", label: "Edited Book" },
|
|
2016
|
+
{ value: "dissertation", label: "Dissertation" },
|
|
2017
|
+
{ value: "preprint", label: "Preprint" },
|
|
2018
|
+
{ value: "dataset", label: "Dataset" },
|
|
2019
|
+
{ value: "report", label: "Report" },
|
|
2020
|
+
{ value: "review", label: "Review" },
|
|
2021
|
+
{ value: "patent", label: "Patent" },
|
|
2022
|
+
{ value: "software", label: "Software" },
|
|
2023
|
+
{ value: "working-paper", label: "Working Paper" },
|
|
2024
|
+
{ value: "artistic-performance", label: "Artistic Performance" },
|
|
2025
|
+
{ value: "lecture-speech", label: "Lecture/Speech" },
|
|
2026
|
+
{ value: "online-resource", label: "Online Resource" },
|
|
2027
|
+
{ value: "newspaper-article", label: "Newspaper Article" },
|
|
2028
|
+
{ value: "research-technique", label: "Research Technique" },
|
|
2029
|
+
{ value: "standards-and-policy", label: "Standards & Policy" },
|
|
2030
|
+
{ value: "technical-standard", label: "Technical Standard" },
|
|
2031
|
+
{ value: "registered-copyright", label: "Registered Copyright" },
|
|
2032
|
+
{ value: "translation", label: "Translation" },
|
|
2033
|
+
{ value: "dictionary-entry", label: "Dictionary Entry" },
|
|
2034
|
+
{ value: "encyclopedia-entry", label: "Encyclopedia Entry" },
|
|
2035
|
+
{ value: "supervised-student-publication", label: "Supervised Student Publication" },
|
|
2036
|
+
{ value: "annotation", label: "Annotation" },
|
|
2037
|
+
{ value: "test", label: "Test" },
|
|
2038
|
+
{ value: "spin-off-company", label: "Spin-off Company" },
|
|
2039
|
+
{ value: "disclosure", label: "Disclosure" },
|
|
2040
|
+
{ value: "license", label: "License" },
|
|
2041
|
+
{ value: "trademark", label: "Trademark" },
|
|
2042
|
+
{ value: "design", label: "Design" },
|
|
2043
|
+
// ORCID's catch-all. Labelled "Publication" rather than "Other" because it is
|
|
2044
|
+
// what shows on the card, and a badge reading "Other" tells a reader nothing.
|
|
2045
|
+
{ value: "other", label: "Publication" }
|
|
2046
|
+
];
|
|
2047
|
+
var PUBLICATION_TYPE_LABELS = Object.fromEntries(
|
|
2048
|
+
PUBLICATION_TYPE_OPTIONS.map((o) => [o.value, o.label])
|
|
2049
|
+
);
|
|
2050
|
+
function getPublicationTypeLabel(value) {
|
|
2051
|
+
if (!value) return void 0;
|
|
2052
|
+
return PUBLICATION_TYPE_LABELS[value] ?? "Publication";
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2006
2055
|
// src/taxonomy/presentation-link-type.ts
|
|
2007
2056
|
var PRESENTATION_LINK_TYPE_OPTIONS = [
|
|
2008
2057
|
{ value: "id.sifa.defs#linkSlides", label: "Slides" },
|
|
@@ -2443,6 +2492,11 @@ function certDateExtractor(item) {
|
|
|
2443
2492
|
return { startDate: item.issueDate, endDate: item.expiryDate ?? item.issueDate };
|
|
2444
2493
|
}
|
|
2445
2494
|
|
|
2495
|
+
// src/format/doi.ts
|
|
2496
|
+
function normalizeDoi(value) {
|
|
2497
|
+
return value.trim().replace(/^https?:\/\/(dx\.)?doi\.org\//i, "").replace(/^doi:\s*/i, "");
|
|
2498
|
+
}
|
|
2499
|
+
|
|
2446
2500
|
// src/format/handle-utils.ts
|
|
2447
2501
|
function sanitizeHandleInput(raw) {
|
|
2448
2502
|
let identifier = raw.trim().replace(/^https?:\/\/bsky\.app\/profile\//i, "").replace(/^at:\/\//i, "").replace(/^@/, "").replace(/^https?:\/\//i, "");
|
|
@@ -2726,7 +2780,7 @@ function parseTalkRkey(segment) {
|
|
|
2726
2780
|
// src/logic/primary-position.ts
|
|
2727
2781
|
function pickPrimaryPosition(positions) {
|
|
2728
2782
|
if (!positions || positions.length === 0) return void 0;
|
|
2729
|
-
const active = positions.filter((p) => !p.endedAt);
|
|
2783
|
+
const active = positions.filter((p) => !p.endedAt && !p.hidden);
|
|
2730
2784
|
if (active.length === 0) return void 0;
|
|
2731
2785
|
const flagged = active.find((p) => p.primary === true);
|
|
2732
2786
|
if (flagged) return flagged;
|
|
@@ -5877,8 +5931,8 @@ function describeSifaRecord(collection, value) {
|
|
|
5877
5931
|
}
|
|
5878
5932
|
|
|
5879
5933
|
// src/index.ts
|
|
5880
|
-
var SIFA_SDK_VERSION = "0.14.
|
|
5934
|
+
var SIFA_SDK_VERSION = "0.14.5";
|
|
5881
5935
|
|
|
5882
|
-
export { ACTIVITY_TIERS, ACTIVITY_VERBS, ACTIVITY_VISIBILITY_RULES, ADULT_CONTENT_LABELS, ALL_SECTIONS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, ARTIFACT_LINK_KIND_LABELS, ARTIFACT_LINK_KIND_OPTIONS, ArtifactLinkSchema, AtmosphereFeedItemSchema, BlobRefSchema, CALENDAR_EVENT_MODE_LABELS, CALENDAR_EVENT_STATUS_LABELS, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, COMPANY_OPTIONAL_EMPLOYMENT_TYPES, COMPANY_PAGE_MIN_FIRMOGRAPHIC_FIELDS, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, DIMENSIONS_MAX_SCORE, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, ENTITY_REF_ANCHORS, EndorsementConfirmationRecordSchema, EndorsementRecordSchema, EntityImportSearchResponseSchema, EntityMintDomainResponseSchema, EntityResolveDomainRequestSchema, EntityResolveDomainResponseSchema, EntitySearchResponseSchema, EntitySearchResultSchema, EntitySelectRequestSchema, EntitySelectResponseSchema, FEATURE_FLAGS, FeatureAllowlistEntrySchema, FeedActorSchema, FollowFeedItemSchema, FollowFeedPageSchema, FollowProfilePageSchema, FollowProfileSchema, GraphFollowRecordSchema, INDUSTRY_OPTIONS, INVESTMENT_ROLE_LABELS, INVESTMENT_ROLE_OPTIONS, INVESTMENT_STAGE_LABELS, INVESTMENT_STAGE_OPTIONS, INVESTMENT_STATUS_LABELS, INVESTMENT_STATUS_OPTIONS, INVOLVEMENT_HEADING_ORDER, INVOLVEMENT_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, InvestmentAmountSchema, MIN_SKILLS, ON_BEHALF_OF_EMPLOYMENT_TYPES, OPEN_TO_OPTIONS, OPEN_TO_TOKENS, OPEN_TO_TOKEN_TO_VALUE, OPEN_TO_VALUE_TO_TOKEN, OrgEmploymentAttestationRecordSchema, OrgProfileRecordSchema, PLATFORM_LABELS, PLATFORM_OPTIONS, PRESENTATION_LINK_TYPE_LABELS, PRESENTATION_LINK_TYPE_OPTIONS, PRESENTATION_ROLE_LABELS, PRESENTATION_ROLE_OPTIONS, PROFILE_INVESTMENT_NSID, PROFILE_INVOLVEMENT_NSID, PROJECT_ROLES, PUBLISHERS, PresentationDurationSchema, PresentationLinkSchema, ProfileCertificationRecordSchema, ProfileCourseRecordSchema, ProfileEducationRecordSchema, ProfileExternalAccountRecordSchema, ProfileHonorRecordSchema, ProfileInvestmentRecordSchema, ProfileInvolvementRecordSchema, ProfileLanguageRecordSchema, ProfilePositionRecordSchema, ProfilePresentationDeliveryRecordSchema, ProfilePresentationRecordSchema, ProfileProjectRecordSchema, ProfilePublicationRecordSchema, ProfileSelfRecordSchema, ProfileSkillRecordSchema, ProfileVolunteeringRecordSchema, PublicationAuthorSchema, ROADMAP_ISSUES_REPO, ROADMAP_ITEM_META, SECTION_GROUPS, SECTION_LABELS, SIFA_REPO_GROUPS, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, STREAM_VERBS, SifaFeedItemSchema, VERIFICATION_PROVIDERS, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, atUriSchema, buildMetaDescription, buildTalkSlug, categoryForApp, certDateExtractor, cidSchema, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countRecentActivity, countryCodeToFlag, dateRangeExtractor, datetimeSchema, decodeFeedCursor, dedupeSkills, describeSifaRecord, detectPdsProvider, didSchema, dimensionsFromInputs, durationFromMinutes, encodeFeedCursor, entityDisambiguationLabel, entityResultKey, externalRecordRefSchema, filterHidden, findIndustry, formatCompanyName, formatDateRange, formatDisplayUrl, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, formatTimelineDate, getActivityTaxonomyVersion, getActivityTier, getActivityVerbsVersion, getAppCategoryIcon, getAppIdForCollection, getArtifactLinkKindLabel, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getInvestmentRoleLabel, getInvestmentStageLabel, getInvestmentStatusLabel, getInvolvementKindHeading, getInvolvementKindLabel, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getVerificationProvider, getVisibleSectionIds, getWorkplaceTypeLabel, groupInvolvementByHeading, groupSkillsByCategory, groupSkillsBySubCategory, groupSkillsForDisplay, hasAdultContent, hasPersonalProfileContent, hoistPrimary, isAppCategory, isCompanyPageIndexable, isCompanyRequired, isKnownAppId, isKnownPlatform, isKnownVerificationProvider, isLinked, isOnBehalfOfApplicable, isPseudoEmployer, isRegistrableDomainHandle, isSectionPopulated, isValidRgbColor, isVisibleActivityItem, languageTagSchema, lexiconDateExtractor, limitCombiningMarks, locationSegments, looksLikeDomain, makeGraphFollowRecordSchema, maxGraphemes, meetsContrastAA, normalizeCompanyKey, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeSkillCategory, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, parseTalkRkey, partialDateSchema, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, primaryVerification, profileToDimensionInputs, qualifiesAsOrg, relativeLuminance, rendersCompanyProfile, rendersPersonalProfile, repoGroupForCollection, resolveAccountFacetMode, resolveCardHealth, resolveCardUrl, resolveEmbed, resolveVerifierProvider, rgbToString, roadmapIssueUrl, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, selfLabelsSchema, singleDateExtractor, skillRefSchema, slugifyTitle, sortByActiveDateRange, sortByDateDesc, sortCertifications, sortEducation, sortHonors, sortLanguages, sortLanguagesByProficiency, sortPositions, sortProjects, sortPublications, streamAddressSchema, streamAuthorSchema, streamCardBodySchema, streamCardSubjectSchema, streamCardVMSchema, streamExternalLinkSchema, streamGeoSchema, streamMediaSchema, streamRichSegmentSchema, streamSourceSchema, streamThemeSchema, streamVerbSchema, stripHtmlToText, strongRefSchema, summarizePresentationDeliveries, summarizeProfileView, toStreamCardVM, toStreamCardVMs, truncateGraphemes, uriSchema, verbForCollection, visibleItems, youtubeThumbnailUrl, youtubeVideoId };
|
|
5936
|
+
export { ACTIVITY_TIERS, ACTIVITY_VERBS, ACTIVITY_VISIBILITY_RULES, ADULT_CONTENT_LABELS, ALL_SECTIONS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, ARTIFACT_LINK_KIND_LABELS, ARTIFACT_LINK_KIND_OPTIONS, ArtifactLinkSchema, AtmosphereFeedItemSchema, BlobRefSchema, CALENDAR_EVENT_MODE_LABELS, CALENDAR_EVENT_STATUS_LABELS, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, COMPANY_OPTIONAL_EMPLOYMENT_TYPES, COMPANY_PAGE_MIN_FIRMOGRAPHIC_FIELDS, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, DIMENSIONS_MAX_SCORE, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, ENTITY_REF_ANCHORS, EndorsementConfirmationRecordSchema, EndorsementRecordSchema, EntityImportSearchResponseSchema, EntityMintDomainResponseSchema, EntityResolveDomainRequestSchema, EntityResolveDomainResponseSchema, EntitySearchResponseSchema, EntitySearchResultSchema, EntitySelectRequestSchema, EntitySelectResponseSchema, FEATURE_FLAGS, FeatureAllowlistEntrySchema, FeedActorSchema, FollowFeedItemSchema, FollowFeedPageSchema, FollowProfilePageSchema, FollowProfileSchema, GraphFollowRecordSchema, INDUSTRY_OPTIONS, INVESTMENT_ROLE_LABELS, INVESTMENT_ROLE_OPTIONS, INVESTMENT_STAGE_LABELS, INVESTMENT_STAGE_OPTIONS, INVESTMENT_STATUS_LABELS, INVESTMENT_STATUS_OPTIONS, INVOLVEMENT_HEADING_ORDER, INVOLVEMENT_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, InvestmentAmountSchema, MIN_SKILLS, ON_BEHALF_OF_EMPLOYMENT_TYPES, OPEN_TO_OPTIONS, OPEN_TO_TOKENS, OPEN_TO_TOKEN_TO_VALUE, OPEN_TO_VALUE_TO_TOKEN, OrgEmploymentAttestationRecordSchema, OrgProfileRecordSchema, PLATFORM_LABELS, PLATFORM_OPTIONS, PRESENTATION_LINK_TYPE_LABELS, PRESENTATION_LINK_TYPE_OPTIONS, PRESENTATION_ROLE_LABELS, PRESENTATION_ROLE_OPTIONS, PROFILE_INVESTMENT_NSID, PROFILE_INVOLVEMENT_NSID, PROJECT_ROLES, PUBLICATION_TYPE_LABELS, PUBLICATION_TYPE_OPTIONS, PUBLISHERS, PresentationDurationSchema, PresentationLinkSchema, ProfileCertificationRecordSchema, ProfileCourseRecordSchema, ProfileEducationRecordSchema, ProfileExternalAccountRecordSchema, ProfileHonorRecordSchema, ProfileInvestmentRecordSchema, ProfileInvolvementRecordSchema, ProfileLanguageRecordSchema, ProfilePositionRecordSchema, ProfilePresentationDeliveryRecordSchema, ProfilePresentationRecordSchema, ProfileProjectRecordSchema, ProfilePublicationRecordSchema, ProfileSelfRecordSchema, ProfileSkillRecordSchema, ProfileVolunteeringRecordSchema, PublicationAuthorSchema, ROADMAP_ISSUES_REPO, ROADMAP_ITEM_META, SECTION_GROUPS, SECTION_LABELS, SIFA_REPO_GROUPS, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, STREAM_VERBS, SifaFeedItemSchema, VERIFICATION_PROVIDERS, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, atUriSchema, buildMetaDescription, buildTalkSlug, categoryForApp, certDateExtractor, cidSchema, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countRecentActivity, countryCodeToFlag, dateRangeExtractor, datetimeSchema, decodeFeedCursor, dedupeSkills, describeSifaRecord, detectPdsProvider, didSchema, dimensionsFromInputs, durationFromMinutes, encodeFeedCursor, entityDisambiguationLabel, entityResultKey, externalRecordRefSchema, filterHidden, findIndustry, formatCompanyName, formatDateRange, formatDisplayUrl, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, formatTimelineDate, getActivityTaxonomyVersion, getActivityTier, getActivityVerbsVersion, getAppCategoryIcon, getAppIdForCollection, getArtifactLinkKindLabel, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getInvestmentRoleLabel, getInvestmentStageLabel, getInvestmentStatusLabel, getInvolvementKindHeading, getInvolvementKindLabel, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublicationTypeLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getVerificationProvider, getVisibleSectionIds, getWorkplaceTypeLabel, groupInvolvementByHeading, groupSkillsByCategory, groupSkillsBySubCategory, groupSkillsForDisplay, hasAdultContent, hasPersonalProfileContent, hoistPrimary, isAppCategory, isCompanyPageIndexable, isCompanyRequired, isKnownAppId, isKnownPlatform, isKnownVerificationProvider, isLinked, isOnBehalfOfApplicable, isPseudoEmployer, isRegistrableDomainHandle, isSectionPopulated, isValidRgbColor, isVisibleActivityItem, languageTagSchema, lexiconDateExtractor, limitCombiningMarks, locationSegments, looksLikeDomain, makeGraphFollowRecordSchema, maxGraphemes, meetsContrastAA, normalizeCompanyKey, normalizeDoi, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeSkillCategory, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, parseTalkRkey, partialDateSchema, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, primaryVerification, profileToDimensionInputs, qualifiesAsOrg, relativeLuminance, rendersCompanyProfile, rendersPersonalProfile, repoGroupForCollection, resolveAccountFacetMode, resolveCardHealth, resolveCardUrl, resolveEmbed, resolveVerifierProvider, rgbToString, roadmapIssueUrl, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, selfLabelsSchema, singleDateExtractor, skillRefSchema, slugifyTitle, sortByActiveDateRange, sortByDateDesc, sortCertifications, sortEducation, sortHonors, sortLanguages, sortLanguagesByProficiency, sortPositions, sortProjects, sortPublications, streamAddressSchema, streamAuthorSchema, streamCardBodySchema, streamCardSubjectSchema, streamCardVMSchema, streamExternalLinkSchema, streamGeoSchema, streamMediaSchema, streamRichSegmentSchema, streamSourceSchema, streamThemeSchema, streamVerbSchema, stripHtmlToText, strongRefSchema, summarizePresentationDeliveries, summarizeProfileView, toStreamCardVM, toStreamCardVMs, truncateGraphemes, uriSchema, verbForCollection, visibleItems, youtubeThumbnailUrl, youtubeVideoId };
|
|
5883
5937
|
//# sourceMappingURL=index.js.map
|
|
5884
5938
|
//# sourceMappingURL=index.js.map
|