@singi-labs/sifa-sdk 0.7.10 → 0.8.1
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 +66 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -1
- package/dist/index.d.ts +34 -1
- package/dist/index.js +61 -2
- package/dist/index.js.map +1 -1
- package/dist/query/fetchers/index.cjs +33 -0
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +81 -1
- package/dist/query/fetchers/index.d.ts +81 -1
- package/dist/query/fetchers/index.js +30 -1
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/index.cjs +33 -0
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/query/index.js +30 -1
- package/dist/query/index.js.map +1 -1
- package/package.json +24 -17
package/dist/index.d.cts
CHANGED
|
@@ -16,6 +16,24 @@ declare const COUNTRIES: ReadonlyArray<{
|
|
|
16
16
|
name: string;
|
|
17
17
|
}>;
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* Employment-type taxonomy. Mirrors `id.sifa.defs#employmentType.knownValues`
|
|
21
|
+
* from sifa-lexicons. Surfaces both a flat NSID→label map (for read-only
|
|
22
|
+
* display) and a grouped structure (for editor dropdowns).
|
|
23
|
+
*/
|
|
24
|
+
interface EmploymentTypeOption {
|
|
25
|
+
value: string;
|
|
26
|
+
label: string;
|
|
27
|
+
}
|
|
28
|
+
interface EmploymentTypeGroup {
|
|
29
|
+
label: string;
|
|
30
|
+
items: EmploymentTypeOption[];
|
|
31
|
+
}
|
|
32
|
+
declare const EMPLOYMENT_TYPE_GROUPS: EmploymentTypeGroup[];
|
|
33
|
+
declare const EMPLOYMENT_TYPE_LABELS: Record<string, string>;
|
|
34
|
+
/** Resolve a label for an employment-type token. Falls back to the raw value. */
|
|
35
|
+
declare function getEmploymentTypeLabel(value: string | undefined | null): string | undefined;
|
|
36
|
+
|
|
19
37
|
/** Two-level industry/domain taxonomy for profile classification. */
|
|
20
38
|
interface IndustryOption {
|
|
21
39
|
value: string;
|
|
@@ -31,6 +49,21 @@ declare function findIndustry(value: string | undefined | null): IndustryOption
|
|
|
31
49
|
/** Get the label key for an industry or domain token, falling back to the raw value. */
|
|
32
50
|
declare function getIndustryLabelKey(value: string): string;
|
|
33
51
|
|
|
52
|
+
/**
|
|
53
|
+
* Workplace-type taxonomy. Mirrors `id.sifa.defs#workplaceType.knownValues`
|
|
54
|
+
* from sifa-lexicons. `remote` is retained for legacy records but the scoped
|
|
55
|
+
* variants (`remoteLocal`, `remoteRegion`, `remoteGlobal`) are preferred for
|
|
56
|
+
* new records per the lexicon description.
|
|
57
|
+
*/
|
|
58
|
+
interface WorkplaceTypeOption {
|
|
59
|
+
value: string;
|
|
60
|
+
label: string;
|
|
61
|
+
}
|
|
62
|
+
declare const WORKPLACE_TYPE_OPTIONS: WorkplaceTypeOption[];
|
|
63
|
+
declare const WORKPLACE_TYPE_LABELS: Record<string, string>;
|
|
64
|
+
/** Resolve a label for a workplace-type token. Falls back to the raw value. */
|
|
65
|
+
declare function getWorkplaceTypeLabel(value: string | undefined | null): string | undefined;
|
|
66
|
+
|
|
34
67
|
/**
|
|
35
68
|
* Platform identifiers, labels, and URL helpers used in profile external accounts.
|
|
36
69
|
*
|
|
@@ -340,4 +373,4 @@ declare function countFilledDimensions(input: ProfileDimensionInputs | Profile):
|
|
|
340
373
|
*/
|
|
341
374
|
declare const SIFA_SDK_VERSION: string;
|
|
342
375
|
|
|
343
|
-
export { CATEGORY_LABELS, CATEGORY_ORDER, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, type ContinentCode, DIMENSIONS_MAX_SCORE, type DimensionKey, type DimensionMap, 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, certDateExtractor, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, findIndustry, formatDistanceToNow, formatLocation, formatRelativeTime, getContinent, getDisplayLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getPdsDisplayName, getPlatformLabel, groupSkillsByCategory, isKnownPlatform, isValidRgbColor, lexiconDateExtractor, meetsContrastAA, parseLocationString, pdsProviderFromApi, profileToDimensionInputs, relativeLuminance, rgbToString, sanitizeHandleInput, singleDateExtractor, sortByDateDesc, truncateGraphemes };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,24 @@ declare const COUNTRIES: ReadonlyArray<{
|
|
|
16
16
|
name: string;
|
|
17
17
|
}>;
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* Employment-type taxonomy. Mirrors `id.sifa.defs#employmentType.knownValues`
|
|
21
|
+
* from sifa-lexicons. Surfaces both a flat NSID→label map (for read-only
|
|
22
|
+
* display) and a grouped structure (for editor dropdowns).
|
|
23
|
+
*/
|
|
24
|
+
interface EmploymentTypeOption {
|
|
25
|
+
value: string;
|
|
26
|
+
label: string;
|
|
27
|
+
}
|
|
28
|
+
interface EmploymentTypeGroup {
|
|
29
|
+
label: string;
|
|
30
|
+
items: EmploymentTypeOption[];
|
|
31
|
+
}
|
|
32
|
+
declare const EMPLOYMENT_TYPE_GROUPS: EmploymentTypeGroup[];
|
|
33
|
+
declare const EMPLOYMENT_TYPE_LABELS: Record<string, string>;
|
|
34
|
+
/** Resolve a label for an employment-type token. Falls back to the raw value. */
|
|
35
|
+
declare function getEmploymentTypeLabel(value: string | undefined | null): string | undefined;
|
|
36
|
+
|
|
19
37
|
/** Two-level industry/domain taxonomy for profile classification. */
|
|
20
38
|
interface IndustryOption {
|
|
21
39
|
value: string;
|
|
@@ -31,6 +49,21 @@ declare function findIndustry(value: string | undefined | null): IndustryOption
|
|
|
31
49
|
/** Get the label key for an industry or domain token, falling back to the raw value. */
|
|
32
50
|
declare function getIndustryLabelKey(value: string): string;
|
|
33
51
|
|
|
52
|
+
/**
|
|
53
|
+
* Workplace-type taxonomy. Mirrors `id.sifa.defs#workplaceType.knownValues`
|
|
54
|
+
* from sifa-lexicons. `remote` is retained for legacy records but the scoped
|
|
55
|
+
* variants (`remoteLocal`, `remoteRegion`, `remoteGlobal`) are preferred for
|
|
56
|
+
* new records per the lexicon description.
|
|
57
|
+
*/
|
|
58
|
+
interface WorkplaceTypeOption {
|
|
59
|
+
value: string;
|
|
60
|
+
label: string;
|
|
61
|
+
}
|
|
62
|
+
declare const WORKPLACE_TYPE_OPTIONS: WorkplaceTypeOption[];
|
|
63
|
+
declare const WORKPLACE_TYPE_LABELS: Record<string, string>;
|
|
64
|
+
/** Resolve a label for a workplace-type token. Falls back to the raw value. */
|
|
65
|
+
declare function getWorkplaceTypeLabel(value: string | undefined | null): string | undefined;
|
|
66
|
+
|
|
34
67
|
/**
|
|
35
68
|
* Platform identifiers, labels, and URL helpers used in profile external accounts.
|
|
36
69
|
*
|
|
@@ -340,4 +373,4 @@ declare function countFilledDimensions(input: ProfileDimensionInputs | Profile):
|
|
|
340
373
|
*/
|
|
341
374
|
declare const SIFA_SDK_VERSION: string;
|
|
342
375
|
|
|
343
|
-
export { CATEGORY_LABELS, CATEGORY_ORDER, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, type ContinentCode, DIMENSIONS_MAX_SCORE, type DimensionKey, type DimensionMap, 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, certDateExtractor, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, findIndustry, formatDistanceToNow, formatLocation, formatRelativeTime, getContinent, getDisplayLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getPdsDisplayName, getPlatformLabel, groupSkillsByCategory, isKnownPlatform, isValidRgbColor, lexiconDateExtractor, meetsContrastAA, parseLocationString, pdsProviderFromApi, profileToDimensionInputs, relativeLuminance, rgbToString, sanitizeHandleInput, singleDateExtractor, sortByDateDesc, truncateGraphemes };
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -411,6 +411,48 @@ var COUNTRIES = [
|
|
|
411
411
|
{ code: "ZW", name: "Zimbabwe" }
|
|
412
412
|
];
|
|
413
413
|
|
|
414
|
+
// src/taxonomy/employment-type.ts
|
|
415
|
+
var EMPLOYMENT_TYPE_GROUPS = [
|
|
416
|
+
{
|
|
417
|
+
label: "Employee",
|
|
418
|
+
items: [
|
|
419
|
+
{ value: "id.sifa.defs#fullTime", label: "Full-time" },
|
|
420
|
+
{ value: "id.sifa.defs#partTime", label: "Part-time" },
|
|
421
|
+
{ value: "id.sifa.defs#temporary", label: "Temporary" },
|
|
422
|
+
{ value: "id.sifa.defs#seasonal", label: "Seasonal" }
|
|
423
|
+
]
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
label: "Independent",
|
|
427
|
+
items: [
|
|
428
|
+
{ value: "id.sifa.defs#contract", label: "Contract" },
|
|
429
|
+
{ value: "id.sifa.defs#freelance", label: "Freelance" },
|
|
430
|
+
{ value: "id.sifa.defs#selfEmployed", label: "Self-employed" },
|
|
431
|
+
{ value: "id.sifa.defs#independentWork", label: "Independent work" }
|
|
432
|
+
]
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
label: "Training & early-career",
|
|
436
|
+
items: [
|
|
437
|
+
{ value: "id.sifa.defs#internship", label: "Internship" },
|
|
438
|
+
{ value: "id.sifa.defs#apprenticeship", label: "Apprenticeship" },
|
|
439
|
+
{ value: "id.sifa.defs#fellowship", label: "Fellowship" },
|
|
440
|
+
{ value: "id.sifa.defs#trainee", label: "Trainee" }
|
|
441
|
+
]
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
label: "Other",
|
|
445
|
+
items: [{ value: "id.sifa.defs#volunteer", label: "Volunteer" }]
|
|
446
|
+
}
|
|
447
|
+
];
|
|
448
|
+
var EMPLOYMENT_TYPE_LABELS = Object.fromEntries(
|
|
449
|
+
EMPLOYMENT_TYPE_GROUPS.flatMap((g) => g.items).map((o) => [o.value, o.label])
|
|
450
|
+
);
|
|
451
|
+
function getEmploymentTypeLabel(value) {
|
|
452
|
+
if (!value) return void 0;
|
|
453
|
+
return EMPLOYMENT_TYPE_LABELS[value] ?? value;
|
|
454
|
+
}
|
|
455
|
+
|
|
414
456
|
// src/taxonomy/industry-taxonomy.ts
|
|
415
457
|
var INDUSTRY_OPTIONS = [
|
|
416
458
|
{
|
|
@@ -605,6 +647,23 @@ function getIndustryLabelKey(value) {
|
|
|
605
647
|
return value;
|
|
606
648
|
}
|
|
607
649
|
|
|
650
|
+
// src/taxonomy/workplace-type.ts
|
|
651
|
+
var WORKPLACE_TYPE_OPTIONS = [
|
|
652
|
+
{ value: "id.sifa.defs#onSite", label: "On-site" },
|
|
653
|
+
{ value: "id.sifa.defs#hybrid", label: "Hybrid" },
|
|
654
|
+
{ value: "id.sifa.defs#remoteLocal", label: "Remote (same country)" },
|
|
655
|
+
{ value: "id.sifa.defs#remoteRegion", label: "Remote (same region)" },
|
|
656
|
+
{ value: "id.sifa.defs#remoteGlobal", label: "Remote (anywhere)" }
|
|
657
|
+
];
|
|
658
|
+
var WORKPLACE_TYPE_LABELS = {
|
|
659
|
+
...Object.fromEntries(WORKPLACE_TYPE_OPTIONS.map((o) => [o.value, o.label])),
|
|
660
|
+
"id.sifa.defs#remote": "Remote"
|
|
661
|
+
};
|
|
662
|
+
function getWorkplaceTypeLabel(value) {
|
|
663
|
+
if (!value) return void 0;
|
|
664
|
+
return WORKPLACE_TYPE_LABELS[value] ?? value;
|
|
665
|
+
}
|
|
666
|
+
|
|
608
667
|
// src/taxonomy/platforms.ts
|
|
609
668
|
var PLATFORM_LABELS = {
|
|
610
669
|
bluesky: "Bluesky",
|
|
@@ -1145,8 +1204,8 @@ var ProfileVolunteeringRecordSchema = z.object({
|
|
|
1145
1204
|
});
|
|
1146
1205
|
|
|
1147
1206
|
// src/index.ts
|
|
1148
|
-
var SIFA_SDK_VERSION = "0.
|
|
1207
|
+
var SIFA_SDK_VERSION = "0.8.1";
|
|
1149
1208
|
|
|
1150
|
-
export { CATEGORY_LABELS, CATEGORY_ORDER, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, DIMENSIONS_MAX_SCORE, 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, atUriSchema, certDateExtractor, cidSchema, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, datetimeSchema, dedupeSkills, detectPdsProvider, didSchema, dimensionsFromInputs, findIndustry, formatDistanceToNow, formatLocation, formatRelativeTime, getContinent, getDisplayLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getPdsDisplayName, getPlatformLabel, groupSkillsByCategory, isKnownPlatform, isValidRgbColor, languageTagSchema, lexiconDateExtractor, maxGraphemes, meetsContrastAA, parseLocationString, pdsProviderFromApi, profileToDimensionInputs, relativeLuminance, rgbToString, sanitizeHandleInput, selfLabelsSchema, singleDateExtractor, sortByDateDesc, strongRefSchema, truncateGraphemes, uriSchema };
|
|
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 };
|
|
1151
1210
|
//# sourceMappingURL=index.js.map
|
|
1152
1211
|
//# sourceMappingURL=index.js.map
|