@singi-labs/sifa-sdk 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +26 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.js +25 -2
- package/dist/index.js.map +1 -1
- package/dist/tokens/index.cjs +4 -2
- package/dist/tokens/index.cjs.map +1 -1
- package/dist/tokens/index.d.cts +2 -2
- package/dist/tokens/index.d.ts +2 -2
- package/dist/tokens/index.js +4 -2
- package/dist/tokens/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.cts
CHANGED
|
@@ -49,6 +49,26 @@ declare function findIndustry(value: string | undefined | null): IndustryOption
|
|
|
49
49
|
/** Get the label key for an industry or domain token, falling back to the raw value. */
|
|
50
50
|
declare function getIndustryLabelKey(value: string): string;
|
|
51
51
|
|
|
52
|
+
/**
|
|
53
|
+
* "Open to" taxonomy. Mirrors `id.sifa.defs#openToWorkStatus.knownValues` from
|
|
54
|
+
* sifa-lexicons. Surfaces a single source of truth for the editor (where the
|
|
55
|
+
* user picks values) and the IdentityCard (where badges are rendered).
|
|
56
|
+
*
|
|
57
|
+
* Shape matches `INDUSTRY_OPTIONS`: `{ value, labelKey }` so consumers can run
|
|
58
|
+
* `labelKey` through their own i18n layer (e.g. next-intl `useTranslations`).
|
|
59
|
+
*/
|
|
60
|
+
interface OpenToOption {
|
|
61
|
+
value: string;
|
|
62
|
+
labelKey: string;
|
|
63
|
+
}
|
|
64
|
+
declare const OPEN_TO_OPTIONS: OpenToOption[];
|
|
65
|
+
/**
|
|
66
|
+
* Resolve a `labelKey` for an `openToWorkStatus` token. Returns `undefined`
|
|
67
|
+
* for tokens not in the canonical set or the legacy alias map, so callers
|
|
68
|
+
* can choose their own fallback (e.g. render the raw value).
|
|
69
|
+
*/
|
|
70
|
+
declare function getOpenToLabelKey(value: string | undefined | null): string | undefined;
|
|
71
|
+
|
|
52
72
|
/**
|
|
53
73
|
* Workplace-type taxonomy. Mirrors `id.sifa.defs#workplaceType.knownValues`
|
|
54
74
|
* from sifa-lexicons. `remote` is retained for legacy records but the scoped
|
|
@@ -373,4 +393,4 @@ declare function countFilledDimensions(input: ProfileDimensionInputs | Profile):
|
|
|
373
393
|
*/
|
|
374
394
|
declare const SIFA_SDK_VERSION: string;
|
|
375
395
|
|
|
376
|
-
export { CATEGORY_LABELS, CATEGORY_ORDER, 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, LocationValue, MIN_SKILLS, type MergedProfileSkill, PLATFORM_LABELS, PLATFORM_OPTIONS, type PdsProvider, PdsProviderInfo, type PlatformId, Profile, type ProfileCompletion, type ProfileDimensionInputs, ProfileSkill, type RgbColor, SIFA_SDK_VERSION, SKILL_CATEGORIES, type SkillCategory, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, type WorkplaceTypeOption, certDateExtractor, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, findIndustry, formatDistanceToNow, formatLocation, formatRelativeTime, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getPdsDisplayName, getPlatformLabel, getWorkplaceTypeLabel, groupSkillsByCategory, isKnownPlatform, isValidRgbColor, lexiconDateExtractor, meetsContrastAA, parseLocationString, pdsProviderFromApi, profileToDimensionInputs, relativeLuminance, rgbToString, sanitizeHandleInput, singleDateExtractor, sortByDateDesc, truncateGraphemes };
|
|
396
|
+
export { CATEGORY_LABELS, CATEGORY_ORDER, 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, LocationValue, MIN_SKILLS, type MergedProfileSkill, OPEN_TO_OPTIONS, type OpenToOption, PLATFORM_LABELS, PLATFORM_OPTIONS, type PdsProvider, PdsProviderInfo, type PlatformId, Profile, type ProfileCompletion, type ProfileDimensionInputs, ProfileSkill, type RgbColor, SIFA_SDK_VERSION, SKILL_CATEGORIES, type SkillCategory, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, type WorkplaceTypeOption, certDateExtractor, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, findIndustry, formatDistanceToNow, formatLocation, formatRelativeTime, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getWorkplaceTypeLabel, groupSkillsByCategory, isKnownPlatform, isValidRgbColor, lexiconDateExtractor, meetsContrastAA, parseLocationString, pdsProviderFromApi, profileToDimensionInputs, relativeLuminance, rgbToString, sanitizeHandleInput, singleDateExtractor, sortByDateDesc, truncateGraphemes };
|
package/dist/index.d.ts
CHANGED
|
@@ -49,6 +49,26 @@ declare function findIndustry(value: string | undefined | null): IndustryOption
|
|
|
49
49
|
/** Get the label key for an industry or domain token, falling back to the raw value. */
|
|
50
50
|
declare function getIndustryLabelKey(value: string): string;
|
|
51
51
|
|
|
52
|
+
/**
|
|
53
|
+
* "Open to" taxonomy. Mirrors `id.sifa.defs#openToWorkStatus.knownValues` from
|
|
54
|
+
* sifa-lexicons. Surfaces a single source of truth for the editor (where the
|
|
55
|
+
* user picks values) and the IdentityCard (where badges are rendered).
|
|
56
|
+
*
|
|
57
|
+
* Shape matches `INDUSTRY_OPTIONS`: `{ value, labelKey }` so consumers can run
|
|
58
|
+
* `labelKey` through their own i18n layer (e.g. next-intl `useTranslations`).
|
|
59
|
+
*/
|
|
60
|
+
interface OpenToOption {
|
|
61
|
+
value: string;
|
|
62
|
+
labelKey: string;
|
|
63
|
+
}
|
|
64
|
+
declare const OPEN_TO_OPTIONS: OpenToOption[];
|
|
65
|
+
/**
|
|
66
|
+
* Resolve a `labelKey` for an `openToWorkStatus` token. Returns `undefined`
|
|
67
|
+
* for tokens not in the canonical set or the legacy alias map, so callers
|
|
68
|
+
* can choose their own fallback (e.g. render the raw value).
|
|
69
|
+
*/
|
|
70
|
+
declare function getOpenToLabelKey(value: string | undefined | null): string | undefined;
|
|
71
|
+
|
|
52
72
|
/**
|
|
53
73
|
* Workplace-type taxonomy. Mirrors `id.sifa.defs#workplaceType.knownValues`
|
|
54
74
|
* from sifa-lexicons. `remote` is retained for legacy records but the scoped
|
|
@@ -373,4 +393,4 @@ declare function countFilledDimensions(input: ProfileDimensionInputs | Profile):
|
|
|
373
393
|
*/
|
|
374
394
|
declare const SIFA_SDK_VERSION: string;
|
|
375
395
|
|
|
376
|
-
export { CATEGORY_LABELS, CATEGORY_ORDER, 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, LocationValue, MIN_SKILLS, type MergedProfileSkill, PLATFORM_LABELS, PLATFORM_OPTIONS, type PdsProvider, PdsProviderInfo, type PlatformId, Profile, type ProfileCompletion, type ProfileDimensionInputs, ProfileSkill, type RgbColor, SIFA_SDK_VERSION, SKILL_CATEGORIES, type SkillCategory, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, type WorkplaceTypeOption, certDateExtractor, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, findIndustry, formatDistanceToNow, formatLocation, formatRelativeTime, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getPdsDisplayName, getPlatformLabel, getWorkplaceTypeLabel, groupSkillsByCategory, isKnownPlatform, isValidRgbColor, lexiconDateExtractor, meetsContrastAA, parseLocationString, pdsProviderFromApi, profileToDimensionInputs, relativeLuminance, rgbToString, sanitizeHandleInput, singleDateExtractor, sortByDateDesc, truncateGraphemes };
|
|
396
|
+
export { CATEGORY_LABELS, CATEGORY_ORDER, 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, LocationValue, MIN_SKILLS, type MergedProfileSkill, OPEN_TO_OPTIONS, type OpenToOption, PLATFORM_LABELS, PLATFORM_OPTIONS, type PdsProvider, PdsProviderInfo, type PlatformId, Profile, type ProfileCompletion, type ProfileDimensionInputs, ProfileSkill, type RgbColor, SIFA_SDK_VERSION, SKILL_CATEGORIES, type SkillCategory, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, type WorkplaceTypeOption, certDateExtractor, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, findIndustry, formatDistanceToNow, formatLocation, formatRelativeTime, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getWorkplaceTypeLabel, groupSkillsByCategory, isKnownPlatform, isValidRgbColor, lexiconDateExtractor, meetsContrastAA, parseLocationString, pdsProviderFromApi, profileToDimensionInputs, relativeLuminance, rgbToString, sanitizeHandleInput, singleDateExtractor, sortByDateDesc, truncateGraphemes };
|
package/dist/index.js
CHANGED
|
@@ -647,6 +647,29 @@ function getIndustryLabelKey(value) {
|
|
|
647
647
|
return value;
|
|
648
648
|
}
|
|
649
649
|
|
|
650
|
+
// src/taxonomy/open-to.ts
|
|
651
|
+
var OPEN_TO_OPTIONS = [
|
|
652
|
+
{ value: "id.sifa.defs#fullTimeRoles", labelKey: "fullTimeRoles" },
|
|
653
|
+
{ value: "id.sifa.defs#partTimeRoles", labelKey: "partTimeRoles" },
|
|
654
|
+
{ value: "id.sifa.defs#contractRoles", labelKey: "contractRoles" },
|
|
655
|
+
{ value: "id.sifa.defs#commissions", labelKey: "commissions" },
|
|
656
|
+
{ value: "id.sifa.defs#boardPositions", labelKey: "boardPositions" },
|
|
657
|
+
{ value: "id.sifa.defs#mentoringOthers", labelKey: "mentoringOthers" },
|
|
658
|
+
{ value: "id.sifa.defs#beingMentored", labelKey: "beingMentored" },
|
|
659
|
+
{ value: "id.sifa.defs#collaborations", labelKey: "collaborations" }
|
|
660
|
+
];
|
|
661
|
+
var OPEN_TO_LEGACY_ALIASES = {
|
|
662
|
+
"id.sifa.defs#mentoring": "mentoringOthers"
|
|
663
|
+
};
|
|
664
|
+
var OPEN_TO_LABEL_KEY_MAP = {
|
|
665
|
+
...Object.fromEntries(OPEN_TO_OPTIONS.map((o) => [o.value, o.labelKey])),
|
|
666
|
+
...OPEN_TO_LEGACY_ALIASES
|
|
667
|
+
};
|
|
668
|
+
function getOpenToLabelKey(value) {
|
|
669
|
+
if (!value) return void 0;
|
|
670
|
+
return OPEN_TO_LABEL_KEY_MAP[value];
|
|
671
|
+
}
|
|
672
|
+
|
|
650
673
|
// src/taxonomy/workplace-type.ts
|
|
651
674
|
var WORKPLACE_TYPE_OPTIONS = [
|
|
652
675
|
{ value: "id.sifa.defs#onSite", label: "On-site" },
|
|
@@ -1204,8 +1227,8 @@ var ProfileVolunteeringRecordSchema = z.object({
|
|
|
1204
1227
|
});
|
|
1205
1228
|
|
|
1206
1229
|
// src/index.ts
|
|
1207
|
-
var SIFA_SDK_VERSION = "0.9.
|
|
1230
|
+
var SIFA_SDK_VERSION = "0.9.2";
|
|
1208
1231
|
|
|
1209
|
-
export { CATEGORY_LABELS, CATEGORY_ORDER, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, DIMENSIONS_MAX_SCORE, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, EndorsementConfirmationRecordSchema, EndorsementRecordSchema, GraphFollowRecordSchema, INDUSTRY_OPTIONS, MIN_SKILLS, PLATFORM_LABELS, PLATFORM_OPTIONS, ProfileCertificationRecordSchema, ProfileCourseRecordSchema, ProfileEducationRecordSchema, ProfileExternalAccountRecordSchema, ProfileHonorRecordSchema, ProfileLanguageRecordSchema, ProfilePositionRecordSchema, ProfileProjectRecordSchema, ProfilePublicationRecordSchema, ProfileSelfRecordSchema, ProfileSkillRecordSchema, ProfileVolunteeringRecordSchema, PublicationAuthorSchema, SIFA_SDK_VERSION, SKILL_CATEGORIES, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, atUriSchema, certDateExtractor, cidSchema, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, datetimeSchema, dedupeSkills, detectPdsProvider, didSchema, dimensionsFromInputs, findIndustry, formatDistanceToNow, formatLocation, formatRelativeTime, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getPdsDisplayName, getPlatformLabel, getWorkplaceTypeLabel, groupSkillsByCategory, isKnownPlatform, isValidRgbColor, languageTagSchema, lexiconDateExtractor, maxGraphemes, meetsContrastAA, parseLocationString, pdsProviderFromApi, profileToDimensionInputs, relativeLuminance, rgbToString, sanitizeHandleInput, selfLabelsSchema, singleDateExtractor, sortByDateDesc, strongRefSchema, truncateGraphemes, uriSchema };
|
|
1232
|
+
export { CATEGORY_LABELS, CATEGORY_ORDER, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, DIMENSIONS_MAX_SCORE, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, EndorsementConfirmationRecordSchema, EndorsementRecordSchema, GraphFollowRecordSchema, INDUSTRY_OPTIONS, MIN_SKILLS, OPEN_TO_OPTIONS, PLATFORM_LABELS, PLATFORM_OPTIONS, ProfileCertificationRecordSchema, ProfileCourseRecordSchema, ProfileEducationRecordSchema, ProfileExternalAccountRecordSchema, ProfileHonorRecordSchema, ProfileLanguageRecordSchema, ProfilePositionRecordSchema, ProfileProjectRecordSchema, ProfilePublicationRecordSchema, ProfileSelfRecordSchema, ProfileSkillRecordSchema, ProfileVolunteeringRecordSchema, PublicationAuthorSchema, SIFA_SDK_VERSION, SKILL_CATEGORIES, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, atUriSchema, certDateExtractor, cidSchema, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, datetimeSchema, dedupeSkills, detectPdsProvider, didSchema, dimensionsFromInputs, findIndustry, formatDistanceToNow, formatLocation, formatRelativeTime, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getWorkplaceTypeLabel, groupSkillsByCategory, isKnownPlatform, isValidRgbColor, languageTagSchema, lexiconDateExtractor, maxGraphemes, meetsContrastAA, parseLocationString, pdsProviderFromApi, profileToDimensionInputs, relativeLuminance, rgbToString, sanitizeHandleInput, selfLabelsSchema, singleDateExtractor, sortByDateDesc, strongRefSchema, truncateGraphemes, uriSchema };
|
|
1210
1233
|
//# sourceMappingURL=index.js.map
|
|
1211
1234
|
//# sourceMappingURL=index.js.map
|