@singi-labs/sifa-sdk 0.11.19 → 0.11.21
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/{adult-content-Qf1-uAyx.d.cts → adult-content-B6aagF8N.d.cts} +8 -0
- package/dist/{adult-content-Qf1-uAyx.d.ts → adult-content-B6aagF8N.d.ts} +8 -0
- package/dist/index.cjs +30 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -3
- package/dist/index.d.ts +30 -3
- package/dist/index.js +30 -10
- package/dist/index.js.map +1 -1
- package/dist/{keys-CYYLvHnh.d.cts → keys-D3urUnj8.d.cts} +1 -1
- package/dist/{keys-BTitrLGA.d.ts → keys-cT1ORNOu.d.ts} +1 -1
- package/dist/query/fetchers/index.d.cts +3 -3
- package/dist/query/fetchers/index.d.ts +3 -3
- package/dist/query/hooks/index.d.cts +3 -3
- package/dist/query/hooks/index.d.ts +3 -3
- package/dist/query/index.d.cts +3 -3
- package/dist/query/index.d.ts +3 -3
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as ProfileSkill, b as ProfilePresentationDelivery, L as LocationValue, c as PdsProviderInfo, d as Profile } from './adult-content-
|
|
2
|
-
export { e as ADULT_CONTENT_LABELS, f as ActiveApp, a as ActivityLabel, A as AdultContentLabel, C as CoSpeaker, g as Endorsement, h as EndorsementData, E as ExternalAccount, i as ExternalAccountKeytraceClaim, F as FeedItem, j as LanguageProficiency, k as PresentationLinkView, l as ProfileCertification, m as ProfileCourse, n as ProfileEducation, o as ProfileHonor, p as ProfileIndustry, q as ProfileLanguage, r as ProfileLocation, s as ProfileOverrideSource, t as ProfilePosition, u as ProfilePresentation, v as ProfileProject, w as ProfilePublication, x as ProfileVolunteering, y as PublicationContributor, z as SkillRef, S as SkillSuggestion, T as TrustStat, V as VerifiedAccount, B as hasAdultContent } from './adult-content-
|
|
1
|
+
import { P as ProfileSkill, b as ProfilePresentationDelivery, L as LocationValue, c as PdsProviderInfo, d as Profile } from './adult-content-B6aagF8N.cjs';
|
|
2
|
+
export { e as ADULT_CONTENT_LABELS, f as ActiveApp, a as ActivityLabel, A as AdultContentLabel, C as CoSpeaker, g as Endorsement, h as EndorsementData, E as ExternalAccount, i as ExternalAccountKeytraceClaim, F as FeedItem, j as LanguageProficiency, k as PresentationLinkView, l as ProfileCertification, m as ProfileCourse, n as ProfileEducation, o as ProfileHonor, p as ProfileIndustry, q as ProfileLanguage, r as ProfileLocation, s as ProfileOverrideSource, t as ProfilePosition, u as ProfilePresentation, v as ProfileProject, w as ProfilePublication, x as ProfileVolunteering, y as PublicationContributor, z as SkillRef, S as SkillSuggestion, T as TrustStat, V as VerifiedAccount, B as hasAdultContent } from './adult-content-B6aagF8N.cjs';
|
|
3
3
|
import { PresentationDuration, ProfilePresentationDeliveryRecord, ProfilePresentationRecord } from './schemas/index.cjs';
|
|
4
4
|
export { EndorsementConfirmationRecord, EndorsementConfirmationRecordSchema, EndorsementRecord, EndorsementRecordSchema, GraphFollowRecord, GraphFollowRecordSchema, PresentationDurationSchema, PresentationLink, PresentationLinkSchema, ProfileCertificationRecord, ProfileCertificationRecordSchema, ProfileCourseRecord, ProfileCourseRecordSchema, ProfileEducationRecord, ProfileEducationRecordSchema, ProfileExternalAccountRecord, ProfileExternalAccountRecordSchema, ProfileHonorRecord, ProfileHonorRecordSchema, ProfileLanguageRecord, ProfileLanguageRecordSchema, ProfilePositionRecord, ProfilePositionRecordSchema, ProfilePresentationDeliveryRecordSchema, ProfilePresentationRecordSchema, ProfileProjectRecord, ProfileProjectRecordSchema, ProfilePublicationRecord, ProfilePublicationRecordSchema, ProfileSelfRecord, ProfileSelfRecordSchema, ProfileSkillRecord, ProfileSkillRecordSchema, ProfileVolunteeringRecord, ProfileVolunteeringRecordSchema, PublicationAuthor, PublicationAuthorSchema, atUriSchema, cidSchema, datetimeSchema, didSchema, externalRecordRefSchema, languageTagSchema, makeGraphFollowRecordSchema, maxGraphemes, selfLabelsSchema, strongRefSchema, uriSchema } from './schemas/index.cjs';
|
|
5
5
|
import { E as EntitySearchResult } from './feed-BaHtJXYR.cjs';
|
|
@@ -482,9 +482,36 @@ declare function getCalendarEventStatusLabel(value: string | undefined | null):
|
|
|
482
482
|
* It is intentionally not a canonicalizer: acronyms it can't know about stay
|
|
483
483
|
* word-cased ("gmbh" -> "Gmbh"). The user's own custom display name is the
|
|
484
484
|
* escape hatch when the heuristic is wrong.
|
|
485
|
+
*
|
|
486
|
+
* Scoped to ASCII-Latin case-bearing strings (decision D8): any name
|
|
487
|
+
* containing a non-ASCII letter (accented Latin, Cyrillic, Greek, CJK,
|
|
488
|
+
* Turkish dotted/dotless i, etc) is returned unchanged. Locale-dependent
|
|
489
|
+
* casing rules (Turkish i/İ vs ı/I is the canonical trap) make naive
|
|
490
|
+
* `toUpperCase`/`toLowerCase` unsafe outside ASCII, and this formatter has
|
|
491
|
+
* no reliable way to pick the right locale for an arbitrary company name.
|
|
492
|
+
*
|
|
493
|
+
* Known limitation: this does not (and cannot) distinguish an intentional
|
|
494
|
+
* all-lowercase ASCII wordmark ("adidas", "thyssenkrupp") from a
|
|
495
|
+
* PDL-lowercased name that should be title-cased ("spryker" -> "Spryker").
|
|
496
|
+
* Both are pure ASCII, so both still get title-cased. See sifa-workspace#235.
|
|
485
497
|
*/
|
|
486
498
|
declare function formatCompanyName(name: string): string;
|
|
487
499
|
|
|
500
|
+
/**
|
|
501
|
+
* Build a stable dedup/prefix key for a company name (decision D8).
|
|
502
|
+
*
|
|
503
|
+
* NFC-normalizes, case-folds, and strips Latin diacritics so that visually
|
|
504
|
+
* or logically equivalent spellings collapse to one key: "Nestlé", "Nestle",
|
|
505
|
+
* and "NESTLE" all produce the same value. Non-Latin scripts (Cyrillic, CJK,
|
|
506
|
+
* etc) have no Latin diacritics to strip, so they pass through case-folded
|
|
507
|
+
* and NFC-normalized only.
|
|
508
|
+
*
|
|
509
|
+
* This is a pure SDK helper for the in-memory/dedup key. Persisting it as a
|
|
510
|
+
* dedicated column on the sifa-api side is tracked separately
|
|
511
|
+
* (sifa-workspace#229) and out of scope here.
|
|
512
|
+
*/
|
|
513
|
+
declare function normalizeCompanyKey(name: string): string;
|
|
514
|
+
|
|
488
515
|
/**
|
|
489
516
|
* Format a date string as a relative time (e.g. "5m ago", "3d ago").
|
|
490
517
|
* Returns an empty string for invalid or future dates.
|
|
@@ -1093,4 +1120,4 @@ declare function isLinked(entityRef: string | null | undefined): boolean;
|
|
|
1093
1120
|
*/
|
|
1094
1121
|
declare const SIFA_SDK_VERSION: string;
|
|
1095
1122
|
|
|
1096
|
-
export { ACTIVITY_TIERS, ACTIVITY_VISIBILITY_RULES, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, type ActivityItemForUrl, type ActivityTaxonomy, type ActivityTier, type AppCategoryId, type AppUrlPatterns, 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, type IndustryOption, 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, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getWorkplaceTypeLabel, groupSkillsByCategory, isAppCategory, isCompanyRequired, isKnownAppId, isKnownPlatform, isLinked, isPseudoEmployer, isValidRgbColor, isVisibleActivityItem, lexiconDateExtractor, limitCombiningMarks, meetsContrastAA, 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 };
|
|
1123
|
+
export { ACTIVITY_TIERS, ACTIVITY_VISIBILITY_RULES, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, type ActivityItemForUrl, type ActivityTaxonomy, type ActivityTier, type AppCategoryId, type AppUrlPatterns, 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, type IndustryOption, 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, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getWorkplaceTypeLabel, groupSkillsByCategory, isAppCategory, isCompanyRequired, isKnownAppId, isKnownPlatform, isLinked, isPseudoEmployer, isValidRgbColor, isVisibleActivityItem, lexiconDateExtractor, limitCombiningMarks, meetsContrastAA, normalizeCompanyKey, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as ProfileSkill, b as ProfilePresentationDelivery, L as LocationValue, c as PdsProviderInfo, d as Profile } from './adult-content-
|
|
2
|
-
export { e as ADULT_CONTENT_LABELS, f as ActiveApp, a as ActivityLabel, A as AdultContentLabel, C as CoSpeaker, g as Endorsement, h as EndorsementData, E as ExternalAccount, i as ExternalAccountKeytraceClaim, F as FeedItem, j as LanguageProficiency, k as PresentationLinkView, l as ProfileCertification, m as ProfileCourse, n as ProfileEducation, o as ProfileHonor, p as ProfileIndustry, q as ProfileLanguage, r as ProfileLocation, s as ProfileOverrideSource, t as ProfilePosition, u as ProfilePresentation, v as ProfileProject, w as ProfilePublication, x as ProfileVolunteering, y as PublicationContributor, z as SkillRef, S as SkillSuggestion, T as TrustStat, V as VerifiedAccount, B as hasAdultContent } from './adult-content-
|
|
1
|
+
import { P as ProfileSkill, b as ProfilePresentationDelivery, L as LocationValue, c as PdsProviderInfo, d as Profile } from './adult-content-B6aagF8N.js';
|
|
2
|
+
export { e as ADULT_CONTENT_LABELS, f as ActiveApp, a as ActivityLabel, A as AdultContentLabel, C as CoSpeaker, g as Endorsement, h as EndorsementData, E as ExternalAccount, i as ExternalAccountKeytraceClaim, F as FeedItem, j as LanguageProficiency, k as PresentationLinkView, l as ProfileCertification, m as ProfileCourse, n as ProfileEducation, o as ProfileHonor, p as ProfileIndustry, q as ProfileLanguage, r as ProfileLocation, s as ProfileOverrideSource, t as ProfilePosition, u as ProfilePresentation, v as ProfileProject, w as ProfilePublication, x as ProfileVolunteering, y as PublicationContributor, z as SkillRef, S as SkillSuggestion, T as TrustStat, V as VerifiedAccount, B as hasAdultContent } from './adult-content-B6aagF8N.js';
|
|
3
3
|
import { PresentationDuration, ProfilePresentationDeliveryRecord, ProfilePresentationRecord } from './schemas/index.js';
|
|
4
4
|
export { EndorsementConfirmationRecord, EndorsementConfirmationRecordSchema, EndorsementRecord, EndorsementRecordSchema, GraphFollowRecord, GraphFollowRecordSchema, PresentationDurationSchema, PresentationLink, PresentationLinkSchema, ProfileCertificationRecord, ProfileCertificationRecordSchema, ProfileCourseRecord, ProfileCourseRecordSchema, ProfileEducationRecord, ProfileEducationRecordSchema, ProfileExternalAccountRecord, ProfileExternalAccountRecordSchema, ProfileHonorRecord, ProfileHonorRecordSchema, ProfileLanguageRecord, ProfileLanguageRecordSchema, ProfilePositionRecord, ProfilePositionRecordSchema, ProfilePresentationDeliveryRecordSchema, ProfilePresentationRecordSchema, ProfileProjectRecord, ProfileProjectRecordSchema, ProfilePublicationRecord, ProfilePublicationRecordSchema, ProfileSelfRecord, ProfileSelfRecordSchema, ProfileSkillRecord, ProfileSkillRecordSchema, ProfileVolunteeringRecord, ProfileVolunteeringRecordSchema, PublicationAuthor, PublicationAuthorSchema, atUriSchema, cidSchema, datetimeSchema, didSchema, externalRecordRefSchema, languageTagSchema, makeGraphFollowRecordSchema, maxGraphemes, selfLabelsSchema, strongRefSchema, uriSchema } from './schemas/index.js';
|
|
5
5
|
import { E as EntitySearchResult } from './feed-BaHtJXYR.js';
|
|
@@ -482,9 +482,36 @@ declare function getCalendarEventStatusLabel(value: string | undefined | null):
|
|
|
482
482
|
* It is intentionally not a canonicalizer: acronyms it can't know about stay
|
|
483
483
|
* word-cased ("gmbh" -> "Gmbh"). The user's own custom display name is the
|
|
484
484
|
* escape hatch when the heuristic is wrong.
|
|
485
|
+
*
|
|
486
|
+
* Scoped to ASCII-Latin case-bearing strings (decision D8): any name
|
|
487
|
+
* containing a non-ASCII letter (accented Latin, Cyrillic, Greek, CJK,
|
|
488
|
+
* Turkish dotted/dotless i, etc) is returned unchanged. Locale-dependent
|
|
489
|
+
* casing rules (Turkish i/İ vs ı/I is the canonical trap) make naive
|
|
490
|
+
* `toUpperCase`/`toLowerCase` unsafe outside ASCII, and this formatter has
|
|
491
|
+
* no reliable way to pick the right locale for an arbitrary company name.
|
|
492
|
+
*
|
|
493
|
+
* Known limitation: this does not (and cannot) distinguish an intentional
|
|
494
|
+
* all-lowercase ASCII wordmark ("adidas", "thyssenkrupp") from a
|
|
495
|
+
* PDL-lowercased name that should be title-cased ("spryker" -> "Spryker").
|
|
496
|
+
* Both are pure ASCII, so both still get title-cased. See sifa-workspace#235.
|
|
485
497
|
*/
|
|
486
498
|
declare function formatCompanyName(name: string): string;
|
|
487
499
|
|
|
500
|
+
/**
|
|
501
|
+
* Build a stable dedup/prefix key for a company name (decision D8).
|
|
502
|
+
*
|
|
503
|
+
* NFC-normalizes, case-folds, and strips Latin diacritics so that visually
|
|
504
|
+
* or logically equivalent spellings collapse to one key: "Nestlé", "Nestle",
|
|
505
|
+
* and "NESTLE" all produce the same value. Non-Latin scripts (Cyrillic, CJK,
|
|
506
|
+
* etc) have no Latin diacritics to strip, so they pass through case-folded
|
|
507
|
+
* and NFC-normalized only.
|
|
508
|
+
*
|
|
509
|
+
* This is a pure SDK helper for the in-memory/dedup key. Persisting it as a
|
|
510
|
+
* dedicated column on the sifa-api side is tracked separately
|
|
511
|
+
* (sifa-workspace#229) and out of scope here.
|
|
512
|
+
*/
|
|
513
|
+
declare function normalizeCompanyKey(name: string): string;
|
|
514
|
+
|
|
488
515
|
/**
|
|
489
516
|
* Format a date string as a relative time (e.g. "5m ago", "3d ago").
|
|
490
517
|
* Returns an empty string for invalid or future dates.
|
|
@@ -1093,4 +1120,4 @@ declare function isLinked(entityRef: string | null | undefined): boolean;
|
|
|
1093
1120
|
*/
|
|
1094
1121
|
declare const SIFA_SDK_VERSION: string;
|
|
1095
1122
|
|
|
1096
|
-
export { ACTIVITY_TIERS, ACTIVITY_VISIBILITY_RULES, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, type ActivityItemForUrl, type ActivityTaxonomy, type ActivityTier, type AppCategoryId, type AppUrlPatterns, 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, type IndustryOption, 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, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getWorkplaceTypeLabel, groupSkillsByCategory, isAppCategory, isCompanyRequired, isKnownAppId, isKnownPlatform, isLinked, isPseudoEmployer, isValidRgbColor, isVisibleActivityItem, lexiconDateExtractor, limitCombiningMarks, meetsContrastAA, 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 };
|
|
1123
|
+
export { ACTIVITY_TIERS, ACTIVITY_VISIBILITY_RULES, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, type ActivityItemForUrl, type ActivityTaxonomy, type ActivityTier, type AppCategoryId, type AppUrlPatterns, 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, type IndustryOption, 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, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getWorkplaceTypeLabel, groupSkillsByCategory, isAppCategory, isCompanyRequired, isKnownAppId, isKnownPlatform, isLinked, isPseudoEmployer, isValidRgbColor, isVisibleActivityItem, lexiconDateExtractor, limitCombiningMarks, meetsContrastAA, normalizeCompanyKey, 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 };
|
package/dist/index.js
CHANGED
|
@@ -439,15 +439,19 @@ var EMPLOYMENT_TYPE_GROUPS = [
|
|
|
439
439
|
{ value: "id.sifa.defs#fellowship", label: "Fellowship" },
|
|
440
440
|
{ value: "id.sifa.defs#trainee", label: "Trainee" }
|
|
441
441
|
]
|
|
442
|
-
},
|
|
443
|
-
{
|
|
444
|
-
label: "Other",
|
|
445
|
-
items: [{ value: "id.sifa.defs#volunteer", label: "Volunteer" }]
|
|
446
442
|
}
|
|
447
443
|
];
|
|
448
|
-
var EMPLOYMENT_TYPE_LABELS =
|
|
449
|
-
|
|
450
|
-
)
|
|
444
|
+
var EMPLOYMENT_TYPE_LABELS = {
|
|
445
|
+
...Object.fromEntries(
|
|
446
|
+
EMPLOYMENT_TYPE_GROUPS.flatMap((g) => g.items).map((o) => [o.value, o.label])
|
|
447
|
+
),
|
|
448
|
+
// `volunteer` is retained for legacy records but no longer offered in the
|
|
449
|
+
// editor dropdown. Volunteering is a distinct thing (no payroll, no formal
|
|
450
|
+
// role, no obligation) rather than a kind of employment, so it lives in the
|
|
451
|
+
// dedicated `id.sifa.profile.volunteering` section, not on the employment-type
|
|
452
|
+
// axis. Kept here so old positions still render a human label, not the raw NSID.
|
|
453
|
+
"id.sifa.defs#volunteer": "Volunteer"
|
|
454
|
+
};
|
|
451
455
|
function getEmploymentTypeLabel(value) {
|
|
452
456
|
if (!value) return void 0;
|
|
453
457
|
return EMPLOYMENT_TYPE_LABELS[value] ?? value;
|
|
@@ -1459,6 +1463,13 @@ var SMALL_WORDS = /* @__PURE__ */ new Set([
|
|
|
1459
1463
|
"le",
|
|
1460
1464
|
"y"
|
|
1461
1465
|
]);
|
|
1466
|
+
function hasNonAsciiLetter(value) {
|
|
1467
|
+
for (const char of value) {
|
|
1468
|
+
const codePoint = char.codePointAt(0) ?? 0;
|
|
1469
|
+
if (codePoint > 127 && /\p{L}/u.test(char)) return true;
|
|
1470
|
+
}
|
|
1471
|
+
return false;
|
|
1472
|
+
}
|
|
1462
1473
|
function capitalizeWord(word) {
|
|
1463
1474
|
return word.replace(
|
|
1464
1475
|
/^([^\p{L}\p{N}]*)(\p{L})/u,
|
|
@@ -1467,7 +1478,7 @@ function capitalizeWord(word) {
|
|
|
1467
1478
|
}
|
|
1468
1479
|
function formatCompanyName(name) {
|
|
1469
1480
|
const trimmed = name.trim();
|
|
1470
|
-
if (!trimmed || trimmed !== trimmed.toLowerCase()) return trimmed;
|
|
1481
|
+
if (!trimmed || hasNonAsciiLetter(trimmed) || trimmed !== trimmed.toLowerCase()) return trimmed;
|
|
1471
1482
|
let seenWord = false;
|
|
1472
1483
|
return trimmed.split(/(\s+)/).map((token) => {
|
|
1473
1484
|
if (token.length === 0 || /^\s+$/.test(token)) return token;
|
|
@@ -1478,6 +1489,15 @@ function formatCompanyName(name) {
|
|
|
1478
1489
|
}).join("");
|
|
1479
1490
|
}
|
|
1480
1491
|
|
|
1492
|
+
// src/format/normalize-company-key.ts
|
|
1493
|
+
var COMBINING_MARKS = /[\u0300-\u036f]/g;
|
|
1494
|
+
function normalizeCompanyKey(name) {
|
|
1495
|
+
const trimmed = name.trim();
|
|
1496
|
+
if (!trimmed) return "";
|
|
1497
|
+
const caseFolded = trimmed.normalize("NFC").toLowerCase();
|
|
1498
|
+
return caseFolded.normalize("NFD").replace(COMBINING_MARKS, "").normalize("NFC");
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1481
1501
|
// src/format/format-time.ts
|
|
1482
1502
|
function formatRelativeTime(dateString) {
|
|
1483
1503
|
const date = new Date(dateString);
|
|
@@ -2877,8 +2897,8 @@ var ProfileVolunteeringRecordSchema = z.object({
|
|
|
2877
2897
|
});
|
|
2878
2898
|
|
|
2879
2899
|
// src/index.ts
|
|
2880
|
-
var SIFA_SDK_VERSION = "0.11.
|
|
2900
|
+
var SIFA_SDK_VERSION = "0.11.21";
|
|
2881
2901
|
|
|
2882
|
-
export { ACTIVITY_TIERS, ACTIVITY_VISIBILITY_RULES, ADULT_CONTENT_LABELS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, 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, EntitySearchResponseSchema, EntitySearchResultSchema, EntitySelectRequestSchema, EntitySelectResponseSchema, FEATURE_FLAGS, FeatureAllowlistEntrySchema, FeedActorSchema, FollowFeedItemSchema, FollowFeedPageSchema, FollowProfilePageSchema, FollowProfileSchema, GraphFollowRecordSchema, INDUSTRY_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, PUBLISHERS, PresentationDurationSchema, PresentationLinkSchema, ProfileCertificationRecordSchema, ProfileCourseRecordSchema, ProfileEducationRecordSchema, ProfileExternalAccountRecordSchema, ProfileHonorRecordSchema, 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, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getWorkplaceTypeLabel, groupSkillsByCategory, hasAdultContent, isAppCategory, isCompanyRequired, isKnownAppId, isKnownPlatform, isLinked, isPseudoEmployer, isValidRgbColor, isVisibleActivityItem, languageTagSchema, lexiconDateExtractor, limitCombiningMarks, makeGraphFollowRecordSchema, maxGraphemes, meetsContrastAA, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, profileToDimensionInputs, relativeLuminance, resolveCardHealth, resolveCardUrl, rgbToString, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, selfLabelsSchema, singleDateExtractor, sortByDateDesc, stripHtmlToText, strongRefSchema, summarizePresentationDeliveries, truncateGraphemes, uriSchema };
|
|
2902
|
+
export { ACTIVITY_TIERS, ACTIVITY_VISIBILITY_RULES, ADULT_CONTENT_LABELS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, 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, EntitySearchResponseSchema, EntitySearchResultSchema, EntitySelectRequestSchema, EntitySelectResponseSchema, FEATURE_FLAGS, FeatureAllowlistEntrySchema, FeedActorSchema, FollowFeedItemSchema, FollowFeedPageSchema, FollowProfilePageSchema, FollowProfileSchema, GraphFollowRecordSchema, INDUSTRY_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, PUBLISHERS, PresentationDurationSchema, PresentationLinkSchema, ProfileCertificationRecordSchema, ProfileCourseRecordSchema, ProfileEducationRecordSchema, ProfileExternalAccountRecordSchema, ProfileHonorRecordSchema, 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, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getWorkplaceTypeLabel, groupSkillsByCategory, hasAdultContent, isAppCategory, isCompanyRequired, isKnownAppId, isKnownPlatform, isLinked, isPseudoEmployer, isValidRgbColor, isVisibleActivityItem, languageTagSchema, lexiconDateExtractor, limitCombiningMarks, makeGraphFollowRecordSchema, maxGraphemes, meetsContrastAA, normalizeCompanyKey, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, profileToDimensionInputs, relativeLuminance, resolveCardHealth, resolveCardUrl, rgbToString, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, selfLabelsSchema, singleDateExtractor, sortByDateDesc, stripHtmlToText, strongRefSchema, summarizePresentationDeliveries, truncateGraphemes, uriSchema };
|
|
2883
2903
|
//# sourceMappingURL=index.js.map
|
|
2884
2904
|
//# sourceMappingURL=index.js.map
|