@singi-labs/sifa-sdk 0.10.8 → 0.10.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -66,6 +66,16 @@ interface OpenToOption {
66
66
  group: OpenToGroup;
67
67
  }
68
68
  declare const OPEN_TO_OPTIONS: OpenToOption[];
69
+ /** Map short token (e.g. "fullTime") -> lex value (e.g. "id.sifa.defs#fullTimeRoles"). */
70
+ declare const OPEN_TO_TOKEN_TO_VALUE: Record<string, string>;
71
+ /** Map lex value -> short token. */
72
+ declare const OPEN_TO_VALUE_TO_TOKEN: Record<string, string>;
73
+ /** All valid tokens, useful for runtime validation. */
74
+ declare const OPEN_TO_TOKENS: readonly string[];
75
+ /** Resolve a token to its lex value, returning `undefined` if unknown. */
76
+ declare function openToTokenToValue(token: string | undefined | null): string | undefined;
77
+ /** Resolve a lex value to its token, returning `undefined` if unknown. */
78
+ declare function openToValueToToken(value: string | undefined | null): string | undefined;
69
79
  /**
70
80
  * Resolve a `labelKey` for an `openToWorkStatus` token. Returns `undefined`
71
81
  * for tokens not in the canonical set or the legacy alias map, so callers
@@ -790,4 +800,4 @@ declare function pickPrimaryPosition<T extends PrimaryPositionCandidate>(positio
790
800
  */
791
801
  declare const SIFA_SDK_VERSION: string;
792
802
 
793
- 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, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, type ContinentCode, 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, type OpenToOption, PLATFORM_LABELS, PLATFORM_OPTIONS, PUBLISHERS, type PdsProvider, PdsProviderInfo, type PlatformId, type PrimaryPositionCandidate, Profile, type ProfileCompletion, type ProfileDimensionInputs, 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, findIndustry, formatDistanceToNow, formatLocation, formatRelativeTime, getActivityTaxonomyVersion, getActivityTier, getAppCategoryIcon, getAppIdForCollection, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getWorkplaceTypeLabel, groupSkillsByCategory, isAppCategory, isKnownAppId, isKnownPlatform, isValidRgbColor, isVisibleActivityItem, lexiconDateExtractor, limitCombiningMarks, meetsContrastAA, parseLocationString, pdsProviderFromApi, pickPrimaryPosition, profileToDimensionInputs, relativeLuminance, resolveCardUrl, rgbToString, sanitizeDisplayText, sanitizeHandleInput, singleDateExtractor, sortByDateDesc, truncateGraphemes };
803
+ 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, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, type ContinentCode, 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, PUBLISHERS, type PdsProvider, PdsProviderInfo, type PlatformId, type PrimaryPositionCandidate, Profile, type ProfileCompletion, type ProfileDimensionInputs, 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, findIndustry, formatDistanceToNow, formatLocation, formatRelativeTime, getActivityTaxonomyVersion, getActivityTier, getAppCategoryIcon, getAppIdForCollection, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getWorkplaceTypeLabel, groupSkillsByCategory, isAppCategory, isKnownAppId, isKnownPlatform, isValidRgbColor, isVisibleActivityItem, lexiconDateExtractor, limitCombiningMarks, meetsContrastAA, openToTokenToValue, openToValueToToken, parseLocationString, pdsProviderFromApi, pickPrimaryPosition, profileToDimensionInputs, relativeLuminance, resolveCardUrl, rgbToString, sanitizeDisplayText, sanitizeHandleInput, singleDateExtractor, sortByDateDesc, truncateGraphemes };
package/dist/index.d.ts CHANGED
@@ -66,6 +66,16 @@ interface OpenToOption {
66
66
  group: OpenToGroup;
67
67
  }
68
68
  declare const OPEN_TO_OPTIONS: OpenToOption[];
69
+ /** Map short token (e.g. "fullTime") -> lex value (e.g. "id.sifa.defs#fullTimeRoles"). */
70
+ declare const OPEN_TO_TOKEN_TO_VALUE: Record<string, string>;
71
+ /** Map lex value -> short token. */
72
+ declare const OPEN_TO_VALUE_TO_TOKEN: Record<string, string>;
73
+ /** All valid tokens, useful for runtime validation. */
74
+ declare const OPEN_TO_TOKENS: readonly string[];
75
+ /** Resolve a token to its lex value, returning `undefined` if unknown. */
76
+ declare function openToTokenToValue(token: string | undefined | null): string | undefined;
77
+ /** Resolve a lex value to its token, returning `undefined` if unknown. */
78
+ declare function openToValueToToken(value: string | undefined | null): string | undefined;
69
79
  /**
70
80
  * Resolve a `labelKey` for an `openToWorkStatus` token. Returns `undefined`
71
81
  * for tokens not in the canonical set or the legacy alias map, so callers
@@ -790,4 +800,4 @@ declare function pickPrimaryPosition<T extends PrimaryPositionCandidate>(positio
790
800
  */
791
801
  declare const SIFA_SDK_VERSION: string;
792
802
 
793
- 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, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, type ContinentCode, 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, type OpenToOption, PLATFORM_LABELS, PLATFORM_OPTIONS, PUBLISHERS, type PdsProvider, PdsProviderInfo, type PlatformId, type PrimaryPositionCandidate, Profile, type ProfileCompletion, type ProfileDimensionInputs, 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, findIndustry, formatDistanceToNow, formatLocation, formatRelativeTime, getActivityTaxonomyVersion, getActivityTier, getAppCategoryIcon, getAppIdForCollection, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getWorkplaceTypeLabel, groupSkillsByCategory, isAppCategory, isKnownAppId, isKnownPlatform, isValidRgbColor, isVisibleActivityItem, lexiconDateExtractor, limitCombiningMarks, meetsContrastAA, parseLocationString, pdsProviderFromApi, pickPrimaryPosition, profileToDimensionInputs, relativeLuminance, resolveCardUrl, rgbToString, sanitizeDisplayText, sanitizeHandleInput, singleDateExtractor, sortByDateDesc, truncateGraphemes };
803
+ 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, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, type ContinentCode, 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, PUBLISHERS, type PdsProvider, PdsProviderInfo, type PlatformId, type PrimaryPositionCandidate, Profile, type ProfileCompletion, type ProfileDimensionInputs, 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, findIndustry, formatDistanceToNow, formatLocation, formatRelativeTime, getActivityTaxonomyVersion, getActivityTier, getAppCategoryIcon, getAppIdForCollection, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getWorkplaceTypeLabel, groupSkillsByCategory, isAppCategory, isKnownAppId, isKnownPlatform, isValidRgbColor, isVisibleActivityItem, lexiconDateExtractor, limitCombiningMarks, meetsContrastAA, openToTokenToValue, openToValueToToken, parseLocationString, pdsProviderFromApi, pickPrimaryPosition, profileToDimensionInputs, relativeLuminance, resolveCardUrl, rgbToString, sanitizeDisplayText, sanitizeHandleInput, singleDateExtractor, sortByDateDesc, truncateGraphemes };
package/dist/index.js CHANGED
@@ -698,13 +698,21 @@ var OPEN_TO_OPTIONS = [
698
698
  group: "peer"
699
699
  }
700
700
  ];
701
- Object.fromEntries(
701
+ var OPEN_TO_TOKEN_TO_VALUE = Object.fromEntries(
702
702
  OPEN_TO_OPTIONS.map((o) => [o.token, o.value])
703
703
  );
704
- Object.fromEntries(
704
+ var OPEN_TO_VALUE_TO_TOKEN = Object.fromEntries(
705
705
  OPEN_TO_OPTIONS.map((o) => [o.value, o.token])
706
706
  );
707
- OPEN_TO_OPTIONS.map((o) => o.token);
707
+ var OPEN_TO_TOKENS = OPEN_TO_OPTIONS.map((o) => o.token);
708
+ function openToTokenToValue(token) {
709
+ if (!token) return void 0;
710
+ return OPEN_TO_TOKEN_TO_VALUE[token];
711
+ }
712
+ function openToValueToToken(value) {
713
+ if (!value) return void 0;
714
+ return OPEN_TO_VALUE_TO_TOKEN[value];
715
+ }
708
716
  var OPEN_TO_LEGACY_ALIASES = {
709
717
  "id.sifa.defs#mentoring": "mentoringOthers"
710
718
  };
@@ -2225,8 +2233,8 @@ var ProfileVolunteeringRecordSchema = z.object({
2225
2233
  });
2226
2234
 
2227
2235
  // src/index.ts
2228
- var SIFA_SDK_VERSION = "0.10.8";
2236
+ var SIFA_SDK_VERSION = "0.10.9";
2229
2237
 
2230
- export { ACTIVITY_TIERS, ACTIVITY_VISIBILITY_RULES, ADULT_CONTENT_LABELS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, AtmosphereFeedItemSchema, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, 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, PLATFORM_LABELS, PLATFORM_OPTIONS, PUBLISHERS, ProfileCertificationRecordSchema, ProfileCourseRecordSchema, ProfileEducationRecordSchema, ProfileExternalAccountRecordSchema, ProfileHonorRecordSchema, ProfileLanguageRecordSchema, ProfilePositionRecordSchema, 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, encodeFeedCursor, findIndustry, formatDistanceToNow, formatLocation, formatRelativeTime, getActivityTaxonomyVersion, getActivityTier, getAppCategoryIcon, getAppIdForCollection, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getWorkplaceTypeLabel, groupSkillsByCategory, hasAdultContent, isAppCategory, isKnownAppId, isKnownPlatform, isValidRgbColor, isVisibleActivityItem, languageTagSchema, lexiconDateExtractor, limitCombiningMarks, makeGraphFollowRecordSchema, maxGraphemes, meetsContrastAA, parseLocationString, pdsProviderFromApi, pickPrimaryPosition, profileToDimensionInputs, relativeLuminance, resolveCardUrl, rgbToString, sanitizeDisplayText, sanitizeHandleInput, selfLabelsSchema, singleDateExtractor, sortByDateDesc, strongRefSchema, truncateGraphemes, uriSchema };
2238
+ export { ACTIVITY_TIERS, ACTIVITY_VISIBILITY_RULES, ADULT_CONTENT_LABELS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, AtmosphereFeedItemSchema, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, 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, PUBLISHERS, ProfileCertificationRecordSchema, ProfileCourseRecordSchema, ProfileEducationRecordSchema, ProfileExternalAccountRecordSchema, ProfileHonorRecordSchema, ProfileLanguageRecordSchema, ProfilePositionRecordSchema, 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, encodeFeedCursor, findIndustry, formatDistanceToNow, formatLocation, formatRelativeTime, getActivityTaxonomyVersion, getActivityTier, getAppCategoryIcon, getAppIdForCollection, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getWorkplaceTypeLabel, groupSkillsByCategory, hasAdultContent, isAppCategory, isKnownAppId, isKnownPlatform, isValidRgbColor, isVisibleActivityItem, languageTagSchema, lexiconDateExtractor, limitCombiningMarks, makeGraphFollowRecordSchema, maxGraphemes, meetsContrastAA, openToTokenToValue, openToValueToToken, parseLocationString, pdsProviderFromApi, pickPrimaryPosition, profileToDimensionInputs, relativeLuminance, resolveCardUrl, rgbToString, sanitizeDisplayText, sanitizeHandleInput, selfLabelsSchema, singleDateExtractor, sortByDateDesc, strongRefSchema, truncateGraphemes, uriSchema };
2231
2239
  //# sourceMappingURL=index.js.map
2232
2240
  //# sourceMappingURL=index.js.map