@singi-labs/sifa-sdk 0.11.13 → 0.11.14
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/README.md +43 -0
- package/dist/{feed-DHTy7fUN.d.cts → feed-BaHtJXYR.d.cts} +98 -1
- package/dist/{feed-DHTy7fUN.d.ts → feed-BaHtJXYR.d.ts} +98 -1
- package/dist/index.cjs +102 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -2
- package/dist/index.d.ts +26 -2
- package/dist/index.js +94 -2
- package/dist/index.js.map +1 -1
- package/dist/{keys-DuICaiIq.d.ts → keys-C0AracRc.d.ts} +6 -2
- package/dist/{keys-K8kCuA5J.d.cts → keys-DLxYsNCp.d.cts} +6 -2
- package/dist/query/fetchers/index.cjs +83 -0
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +22 -4
- package/dist/query/fetchers/index.d.ts +22 -4
- package/dist/query/fetchers/index.js +81 -1
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/hooks/index.cjs +118 -0
- package/dist/query/hooks/index.cjs.map +1 -1
- package/dist/query/hooks/index.d.cts +73 -4
- package/dist/query/hooks/index.d.ts +73 -4
- package/dist/query/hooks/index.js +116 -2
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/index.cjs +119 -0
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +5 -5
- package/dist/query/index.d.ts +5 -5
- package/dist/query/index.js +114 -2
- package/dist/query/index.js.map +1 -1
- package/dist/schemas/index.cjs +47 -0
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +1 -1
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.js +43 -1
- package/dist/schemas/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2,7 +2,8 @@ import { P as ProfileSkill, b as ProfilePresentationDelivery, L as LocationValue
|
|
|
2
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-BpZD_3ow.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';
|
|
6
|
+
export { A as AtmosphereFeedItem, d as AtmosphereFeedItemSchema, e as EntityImportSearchResponse, f as EntityImportSearchResponseSchema, g as EntitySearchResponse, h as EntitySearchResponseSchema, i as EntitySearchResultSchema, j as EntitySelectRequest, k as EntitySelectRequestSchema, l as EntitySelectResponse, m as EntitySelectResponseSchema, n as FEATURE_FLAGS, b as FeatureAllowlistEntry, o as FeatureAllowlistEntrySchema, c as FeatureFlag, p as FeedActor, q as FeedActorSchema, r as FeedCursor, s as FollowFeedItem, t as FollowFeedItemSchema, F as FollowFeedPage, u as FollowFeedPageSchema, a as FollowProfileItem, v as FollowProfilePage, w as FollowProfilePageSchema, x as FollowProfileSchema, S as SifaFeedItem, y as SifaFeedItemSchema, z as decodeFeedCursor, B as encodeFeedCursor } from './feed-BaHtJXYR.cjs';
|
|
6
7
|
import 'zod';
|
|
7
8
|
|
|
8
9
|
type ContinentCode = 'AF' | 'AN' | 'AS' | 'EU' | 'NA' | 'OC' | 'SA';
|
|
@@ -1017,6 +1018,29 @@ interface PrimaryPositionCandidate {
|
|
|
1017
1018
|
}
|
|
1018
1019
|
declare function pickPrimaryPosition<T extends PrimaryPositionCandidate>(positions: readonly T[] | undefined): T | undefined;
|
|
1019
1020
|
|
|
1021
|
+
/** True when the whole employer string is a self-employment / pseudo employer. */
|
|
1022
|
+
declare function isPseudoEmployer(company: string): boolean;
|
|
1023
|
+
|
|
1024
|
+
/**
|
|
1025
|
+
* Disambiguation-display helpers for the org typeahead (#159, Flow 1A-2). Two
|
|
1026
|
+
* same-name orgs must be told apart at a glance, so each row shows its domain,
|
|
1027
|
+
* country, and parent where known.
|
|
1028
|
+
*/
|
|
1029
|
+
interface DisambiguationFields {
|
|
1030
|
+
domain?: string | null;
|
|
1031
|
+
country?: string | null;
|
|
1032
|
+
parentName?: string | null;
|
|
1033
|
+
}
|
|
1034
|
+
/**
|
|
1035
|
+
* Build the muted secondary line for a typeahead row, e.g.
|
|
1036
|
+
* `spryker.com · DE · part of Spryker Holding`. Empty when nothing to show.
|
|
1037
|
+
*/
|
|
1038
|
+
declare function entityDisambiguationLabel(fields: DisambiguationFields): string;
|
|
1039
|
+
/** Convenience over {@link entityDisambiguationLabel} for a search result row. */
|
|
1040
|
+
declare function searchResultDisambiguation(result: EntitySearchResult): string;
|
|
1041
|
+
/** Stable per-row identity for React keys and dedupe (entity id or PDL id). */
|
|
1042
|
+
declare function entityResultKey(result: EntitySearchResult): string;
|
|
1043
|
+
|
|
1020
1044
|
/**
|
|
1021
1045
|
* Sifa SDK -- public client library for the Sifa AppView on AT Protocol.
|
|
1022
1046
|
*
|
|
@@ -1026,4 +1050,4 @@ declare function pickPrimaryPosition<T extends PrimaryPositionCandidate>(positio
|
|
|
1026
1050
|
*/
|
|
1027
1051
|
declare const SIFA_SDK_VERSION: string;
|
|
1028
1052
|
|
|
1029
|
-
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, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, type EmploymentTypeGroup, type EmploymentTypeOption, 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, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, durationFromMinutes, findIndustry, 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, 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, singleDateExtractor, sortByDateDesc, stripHtmlToText, summarizePresentationDeliveries, truncateGraphemes };
|
|
1053
|
+
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, type EmploymentTypeGroup, type EmploymentTypeOption, 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, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, durationFromMinutes, entityDisambiguationLabel, entityResultKey, findIndustry, 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, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ import { P as ProfileSkill, b as ProfilePresentationDelivery, L as LocationValue
|
|
|
2
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-BpZD_3ow.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';
|
|
6
|
+
export { A as AtmosphereFeedItem, d as AtmosphereFeedItemSchema, e as EntityImportSearchResponse, f as EntityImportSearchResponseSchema, g as EntitySearchResponse, h as EntitySearchResponseSchema, i as EntitySearchResultSchema, j as EntitySelectRequest, k as EntitySelectRequestSchema, l as EntitySelectResponse, m as EntitySelectResponseSchema, n as FEATURE_FLAGS, b as FeatureAllowlistEntry, o as FeatureAllowlistEntrySchema, c as FeatureFlag, p as FeedActor, q as FeedActorSchema, r as FeedCursor, s as FollowFeedItem, t as FollowFeedItemSchema, F as FollowFeedPage, u as FollowFeedPageSchema, a as FollowProfileItem, v as FollowProfilePage, w as FollowProfilePageSchema, x as FollowProfileSchema, S as SifaFeedItem, y as SifaFeedItemSchema, z as decodeFeedCursor, B as encodeFeedCursor } from './feed-BaHtJXYR.js';
|
|
6
7
|
import 'zod';
|
|
7
8
|
|
|
8
9
|
type ContinentCode = 'AF' | 'AN' | 'AS' | 'EU' | 'NA' | 'OC' | 'SA';
|
|
@@ -1017,6 +1018,29 @@ interface PrimaryPositionCandidate {
|
|
|
1017
1018
|
}
|
|
1018
1019
|
declare function pickPrimaryPosition<T extends PrimaryPositionCandidate>(positions: readonly T[] | undefined): T | undefined;
|
|
1019
1020
|
|
|
1021
|
+
/** True when the whole employer string is a self-employment / pseudo employer. */
|
|
1022
|
+
declare function isPseudoEmployer(company: string): boolean;
|
|
1023
|
+
|
|
1024
|
+
/**
|
|
1025
|
+
* Disambiguation-display helpers for the org typeahead (#159, Flow 1A-2). Two
|
|
1026
|
+
* same-name orgs must be told apart at a glance, so each row shows its domain,
|
|
1027
|
+
* country, and parent where known.
|
|
1028
|
+
*/
|
|
1029
|
+
interface DisambiguationFields {
|
|
1030
|
+
domain?: string | null;
|
|
1031
|
+
country?: string | null;
|
|
1032
|
+
parentName?: string | null;
|
|
1033
|
+
}
|
|
1034
|
+
/**
|
|
1035
|
+
* Build the muted secondary line for a typeahead row, e.g.
|
|
1036
|
+
* `spryker.com · DE · part of Spryker Holding`. Empty when nothing to show.
|
|
1037
|
+
*/
|
|
1038
|
+
declare function entityDisambiguationLabel(fields: DisambiguationFields): string;
|
|
1039
|
+
/** Convenience over {@link entityDisambiguationLabel} for a search result row. */
|
|
1040
|
+
declare function searchResultDisambiguation(result: EntitySearchResult): string;
|
|
1041
|
+
/** Stable per-row identity for React keys and dedupe (entity id or PDL id). */
|
|
1042
|
+
declare function entityResultKey(result: EntitySearchResult): string;
|
|
1043
|
+
|
|
1020
1044
|
/**
|
|
1021
1045
|
* Sifa SDK -- public client library for the Sifa AppView on AT Protocol.
|
|
1022
1046
|
*
|
|
@@ -1026,4 +1050,4 @@ declare function pickPrimaryPosition<T extends PrimaryPositionCandidate>(positio
|
|
|
1026
1050
|
*/
|
|
1027
1051
|
declare const SIFA_SDK_VERSION: string;
|
|
1028
1052
|
|
|
1029
|
-
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, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, type EmploymentTypeGroup, type EmploymentTypeOption, 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, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, durationFromMinutes, findIndustry, 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, 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, singleDateExtractor, sortByDateDesc, stripHtmlToText, summarizePresentationDeliveries, truncateGraphemes };
|
|
1053
|
+
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, type EmploymentTypeGroup, type EmploymentTypeOption, 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, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, durationFromMinutes, entityDisambiguationLabel, entityResultKey, findIndustry, 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, 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 };
|
package/dist/index.js
CHANGED
|
@@ -2402,6 +2402,56 @@ function pickPrimaryPosition(positions) {
|
|
|
2402
2402
|
if (flagged) return flagged;
|
|
2403
2403
|
return [...active].sort((a, b) => (b.startedAt ?? "").localeCompare(a.startedAt ?? ""))[0];
|
|
2404
2404
|
}
|
|
2405
|
+
|
|
2406
|
+
// src/logic/pseudo-employer.ts
|
|
2407
|
+
var PSEUDO_EMPLOYERS = /* @__PURE__ */ new Set([
|
|
2408
|
+
"self",
|
|
2409
|
+
"self employed",
|
|
2410
|
+
"selfemployed",
|
|
2411
|
+
"self employment",
|
|
2412
|
+
"self employed freelance",
|
|
2413
|
+
"freelance",
|
|
2414
|
+
"freelancer",
|
|
2415
|
+
"freelancing",
|
|
2416
|
+
"freelance work",
|
|
2417
|
+
"independent",
|
|
2418
|
+
"independent contractor",
|
|
2419
|
+
"independent consultant",
|
|
2420
|
+
"independent professional",
|
|
2421
|
+
"sole proprietor",
|
|
2422
|
+
"sole proprietorship",
|
|
2423
|
+
"sole trader",
|
|
2424
|
+
"own business",
|
|
2425
|
+
"my own business",
|
|
2426
|
+
"self employed consultant"
|
|
2427
|
+
]);
|
|
2428
|
+
function normalizePseudo(value) {
|
|
2429
|
+
return value.toLowerCase().replace(/[^a-z0-9]+/g, " ").trim().replace(/\s+/g, " ");
|
|
2430
|
+
}
|
|
2431
|
+
function isPseudoEmployer(company) {
|
|
2432
|
+
const normalized = normalizePseudo(company);
|
|
2433
|
+
if (!normalized) return false;
|
|
2434
|
+
return PSEUDO_EMPLOYERS.has(normalized);
|
|
2435
|
+
}
|
|
2436
|
+
|
|
2437
|
+
// src/logic/entity-disambiguation.ts
|
|
2438
|
+
function entityDisambiguationLabel(fields) {
|
|
2439
|
+
const parts = [];
|
|
2440
|
+
if (fields.domain) parts.push(fields.domain);
|
|
2441
|
+
if (fields.country) parts.push(fields.country);
|
|
2442
|
+
if (fields.parentName) parts.push(`part of ${fields.parentName}`);
|
|
2443
|
+
return parts.join(" \xB7 ");
|
|
2444
|
+
}
|
|
2445
|
+
function searchResultDisambiguation(result) {
|
|
2446
|
+
return entityDisambiguationLabel({
|
|
2447
|
+
domain: result.domain,
|
|
2448
|
+
country: result.country,
|
|
2449
|
+
parentName: result.parentName
|
|
2450
|
+
});
|
|
2451
|
+
}
|
|
2452
|
+
function entityResultKey(result) {
|
|
2453
|
+
return result.source === "entity" ? `entity:${result.entityId}` : `pdl:${result.pdlId}`;
|
|
2454
|
+
}
|
|
2405
2455
|
function maxGraphemes(max) {
|
|
2406
2456
|
return (value) => {
|
|
2407
2457
|
const segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
@@ -2437,6 +2487,48 @@ var EndorsementConfirmationRecordSchema = z.object({
|
|
|
2437
2487
|
endorsement: strongRefSchema,
|
|
2438
2488
|
createdAt: datetimeSchema
|
|
2439
2489
|
});
|
|
2490
|
+
var httpUrlNullable = z.string().refine((s) => /^https?:\/\//i.test(s), { message: "must be an http(s) URL" }).nullable();
|
|
2491
|
+
var searchResultCommon = {
|
|
2492
|
+
kind: z.string(),
|
|
2493
|
+
name: z.string(),
|
|
2494
|
+
domain: z.string().nullable(),
|
|
2495
|
+
country: z.string().nullable(),
|
|
2496
|
+
logoUrl: httpUrlNullable,
|
|
2497
|
+
parentName: z.string().nullable()
|
|
2498
|
+
};
|
|
2499
|
+
var EntitySearchResultSchema = z.discriminatedUnion("source", [
|
|
2500
|
+
z.object({
|
|
2501
|
+
source: z.literal("entity"),
|
|
2502
|
+
entityId: z.number().int().positive(),
|
|
2503
|
+
...searchResultCommon
|
|
2504
|
+
}),
|
|
2505
|
+
z.object({
|
|
2506
|
+
source: z.literal("pdl"),
|
|
2507
|
+
pdlId: z.string().min(1),
|
|
2508
|
+
...searchResultCommon
|
|
2509
|
+
})
|
|
2510
|
+
]);
|
|
2511
|
+
var EntitySearchResponseSchema = z.object({
|
|
2512
|
+
results: z.array(EntitySearchResultSchema),
|
|
2513
|
+
hasMore: z.boolean()
|
|
2514
|
+
});
|
|
2515
|
+
var EntitySelectRequestSchema = z.object({
|
|
2516
|
+
entityId: z.number().int().positive().optional(),
|
|
2517
|
+
pdlId: z.string().min(1).optional()
|
|
2518
|
+
}).refine((v) => v.entityId != null !== (v.pdlId != null), {
|
|
2519
|
+
message: "exactly one of entityId or pdlId is required"
|
|
2520
|
+
});
|
|
2521
|
+
var EntitySelectResponseSchema = z.object({
|
|
2522
|
+
entityId: z.number().int().positive(),
|
|
2523
|
+
slug: z.string(),
|
|
2524
|
+
kind: z.string(),
|
|
2525
|
+
canonicalName: z.string(),
|
|
2526
|
+
domain: z.string().nullable(),
|
|
2527
|
+
entityRef: httpUrlNullable
|
|
2528
|
+
});
|
|
2529
|
+
var EntityImportSearchResponseSchema = z.object({
|
|
2530
|
+
results: z.array(EntitySearchResultSchema)
|
|
2531
|
+
});
|
|
2440
2532
|
var EndorsementRecordSchema = z.object({
|
|
2441
2533
|
subject: didSchema,
|
|
2442
2534
|
skill: strongRefSchema,
|
|
@@ -2703,8 +2795,8 @@ var ProfileVolunteeringRecordSchema = z.object({
|
|
|
2703
2795
|
});
|
|
2704
2796
|
|
|
2705
2797
|
// src/index.ts
|
|
2706
|
-
var SIFA_SDK_VERSION = "0.11.
|
|
2798
|
+
var SIFA_SDK_VERSION = "0.11.14";
|
|
2707
2799
|
|
|
2708
|
-
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, EndorsementConfirmationRecordSchema, EndorsementRecordSchema, 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, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, datetimeSchema, decodeFeedCursor, dedupeSkills, detectPdsProvider, didSchema, dimensionsFromInputs, durationFromMinutes, encodeFeedCursor, externalRecordRefSchema, findIndustry, 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, 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, selfLabelsSchema, singleDateExtractor, sortByDateDesc, stripHtmlToText, strongRefSchema, summarizePresentationDeliveries, truncateGraphemes, uriSchema };
|
|
2800
|
+
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, 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, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, datetimeSchema, decodeFeedCursor, dedupeSkills, detectPdsProvider, didSchema, dimensionsFromInputs, durationFromMinutes, encodeFeedCursor, entityDisambiguationLabel, entityResultKey, externalRecordRefSchema, findIndustry, 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, 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 };
|
|
2709
2801
|
//# sourceMappingURL=index.js.map
|
|
2710
2802
|
//# sourceMappingURL=index.js.map
|