@singi-labs/sifa-sdk 0.19.39 → 0.19.40
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 +1 -1
- package/dist/index.js +1 -1
- package/dist/jsonld/index.cjs +49 -2
- package/dist/jsonld/index.cjs.map +1 -1
- package/dist/jsonld/index.d.cts +14 -0
- package/dist/jsonld/index.d.ts +14 -0
- package/dist/jsonld/index.js +49 -2
- package/dist/jsonld/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7037,7 +7037,7 @@ function describeSifaRecord(collection, value) {
|
|
|
7037
7037
|
}
|
|
7038
7038
|
|
|
7039
7039
|
// src/index.ts
|
|
7040
|
-
var SIFA_SDK_VERSION = "0.19.
|
|
7040
|
+
var SIFA_SDK_VERSION = "0.19.40";
|
|
7041
7041
|
|
|
7042
7042
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
7043
7043
|
exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
|
package/dist/index.js
CHANGED
|
@@ -7035,7 +7035,7 @@ function describeSifaRecord(collection, value) {
|
|
|
7035
7035
|
}
|
|
7036
7036
|
|
|
7037
7037
|
// src/index.ts
|
|
7038
|
-
var SIFA_SDK_VERSION = "0.19.
|
|
7038
|
+
var SIFA_SDK_VERSION = "0.19.40";
|
|
7039
7039
|
|
|
7040
7040
|
export { ACTIVITY_TIERS, ACTIVITY_VERBS, ACTIVITY_VISIBILITY_RULES, ADULT_CONTENT_LABELS, ALL_SECTIONS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, ARTIFACT_LINK_KIND_LABELS, ARTIFACT_LINK_KIND_OPTIONS, ArtifactLinkSchema, AtmosphereFeedItemSchema, BlobRefSchema, CALENDAR_EVENT_MODE_LABELS, CALENDAR_EVENT_STATUS_LABELS, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, COMPANY_OPTIONAL_EMPLOYMENT_TYPES, COMPANY_PAGE_MIN_FIRMOGRAPHIC_FIELDS, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, COURSE_ROLE_LABELS, COURSE_ROLE_OPTIONS, COURSE_ROLE_TAKEN, COURSE_ROLE_TAUGHT, COURSE_ROLE_TEACHING_ASSISTANT, DIMENSIONS_MAX_SCORE, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, ENTITY_REF_ANCHORS, EQF_LEVEL_LABELS, EQF_LEVEL_OPTIONS, EndorsementConfirmationRecordSchema, EndorsementRecordSchema, EntityImportSearchResponseSchema, EntityMintDomainResponseSchema, EntityResolveDomainRequestSchema, EntityResolveDomainResponseSchema, EntitySearchResponseSchema, EntitySearchResultSchema, EntitySelectRequestSchema, EntitySelectResponseSchema, FEATURE_FLAGS, FeatureAllowlistEntrySchema, FeedActorSchema, FollowFeedItemSchema, FollowFeedPageSchema, FollowProfilePageSchema, FollowProfileSchema, GraphFollowRecordSchema, INDUSTRY_LABELS, INDUSTRY_OPTIONS, INVESTMENT_ROLE_LABELS, INVESTMENT_ROLE_OPTIONS, INVESTMENT_STAGE_LABELS, INVESTMENT_STAGE_OPTIONS, INVESTMENT_STATUS_LABELS, INVESTMENT_STATUS_OPTIONS, INVOLVEMENT_HEADING_ORDER, INVOLVEMENT_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, InvestmentAmountSchema, MIN_SKILLS, ON_BEHALF_OF_EMPLOYMENT_TYPES, OPEN_TO_GROUP_LABELS, OPEN_TO_OPTIONS, OPEN_TO_TOKENS, OPEN_TO_TOKEN_LABELS, OPEN_TO_TOKEN_TO_VALUE, OPEN_TO_VALUE_TO_TOKEN, OrgEmploymentAttestationRecordSchema, OrgProfileRecordSchema, PLATFORM_LABELS, PLATFORM_OPTIONS, PRESENTATION_LINK_TYPE_LABELS, PRESENTATION_LINK_TYPE_OPTIONS, PRESENTATION_ROLE_LABELS, PRESENTATION_ROLE_OPTIONS, PROFILE_INVESTMENT_NSID, PROFILE_INVOLVEMENT_NSID, PROJECT_ROLES, PUBLICATION_TYPE_LABELS, PUBLICATION_TYPE_OPTIONS, PUBLISHERS, PresentationDurationSchema, PresentationLinkSchema, ProfileCertificationRecordSchema, ProfileCourseRecordSchema, ProfileEducationRecordSchema, ProfileExternalAccountRecordSchema, ProfileHonorRecordSchema, ProfileInvestmentRecordSchema, ProfileInvolvementRecordSchema, ProfileLanguageRecordSchema, ProfilePositionRecordSchema, ProfilePresentationDeliveryRecordSchema, ProfilePresentationRecordSchema, ProfileProjectRecordSchema, ProfilePublicationRecordSchema, ProfileSelfRecordSchema, ProfileSkillRecordSchema, ProfileVolunteeringRecordSchema, PublicationAuthorSchema, ROADMAP_ISSUES_REPO, ROADMAP_ITEM_META, RelatedIdentifierSchema, SEARCH_FILTER_DEFS, SECTION_GROUPS, SECTION_LABELS, SELF_APP_ID, SIFA_REPO_GROUPS, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, STREAM_VERBS, SifaFeedItemSchema, VERIFICATION_PROVIDERS, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, actorShowsIdentity, agentRefSchema, atUriSchema, buildMetaDescription, buildProfileHighlights, buildTalkSlug, categoryForApp, certDateExtractor, cidSchema, classifyEntityRef, collapseContributors, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countRecentActivity, countryCodeToFlag, dateRangeExtractor, datetimeSchema, decodeFeedCursor, dedupeSkills, describeSifaRecord, detectPdsProvider, didSchema, dimensionsFromInputs, durationFromMinutes, encodeFeedCursor, entityDisambiguationLabel, entityResultKey, excludeSelfApp, externalRecordRefSchema, filterHidden, findIndustry, formatCompanyName, formatDateRange, formatDisplayUrl, formatDistanceToNow, formatEventDate, formatIsoTitle, formatLocation, formatPresentationDuration, formatRelationship, formatRelativeTime, formatSingleDate, formatSpanDate, formatTimelineDate, getActivityTaxonomyVersion, getActivityTier, getActivityVerbsVersion, getAppCategoryIcon, getAppIdForCollection, getArtifactLinkKindLabel, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getCourseRoleLabel, getDisplayLabel, getEmploymentTypeLabel, getEqfLevelLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabel, getIndustryLabelKey, getInvestmentRoleLabel, getInvestmentStageLabel, getInvestmentStatusLabel, getInvolvementKindHeading, getInvolvementKindLabel, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublicationTypeLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getVerificationProvider, getVisibleSectionIds, getWorkplaceTypeLabel, groupInvolvementByHeading, groupPublicationVersions, groupSkillsByCategory, groupSkillsBySubCategory, groupSkillsForDisplay, hasAdultContent, hasPersonalProfileContent, hoistPrimary, isAppCategory, isCompanyPageIndexable, isCompanyRequired, isKnownAppId, isKnownPlatform, isKnownVerificationProvider, isLinked, isOnBehalfOfApplicable, isPseudoEmployer, isRegistrableDomainHandle, isRelationalActivity, isRoleLineRedundant, isSectionPopulated, isSelfAuthoredRich, isTeachingCourse, isValidRgbColor, isVisibleActivityItem, languageTagSchema, lexiconDateExtractor, limitCombiningMarks, locationSegments, looksLikeDomain, makeGraphFollowRecordSchema, maxGraphemes, meetsContrastAA, normalizeCompanyKey, normalizeDoi, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeSkillCategory, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseEndorsementComment, parseIntendedAudiences, parseLocationString, parsePresentationDuration, parseTalkRkey, partialDateSchema, pdsProviderFromApi, pickPrimaryFlagged, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, primaryVerification, profileToDimensionInputs, qualifiesAsOrg, readEqfLevel, relativeLuminance, renderAsLine, rendersCompanyProfile, rendersPersonalProfile, repoGroupForCollection, resolveAccountFacetMode, resolveAgentRef, resolveCardHealth, resolveCardUrl, resolveEmbed, resolveVerifierProvider, rgbToString, roadmapIssueUrl, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, selfLabelsSchema, shouldRenderHighlights, singleDateExtractor, skillRefSchema, slugifyTitle, sortByActiveDateRange, sortByDateDesc, sortCertifications, sortEducation, sortHonors, sortLanguages, sortLanguagesByProficiency, sortPositions, sortProjects, sortPublications, splitCoursesByRole, streamAddressSchema, streamAuthorSchema, streamCardBodySchema, streamCardSubjectSchema, streamCardVMSchema, streamExternalLinkSchema, streamGeoSchema, streamMediaSchema, streamRichSegmentSchema, streamSourceSchema, streamThemeSchema, streamVerbSchema, stripHtmlToText, strongRefSchema, suggestEqfLevelFromDegree, summarizePresentationDeliveries, summarizeProfileView, toStreamCardVM, toStreamCardVMs, truncateGraphemes, uriSchema, verbForCollection, visibleItems, youtubeThumbnailUrl, youtubeVideoId };
|
|
7041
7041
|
//# sourceMappingURL=index.js.map
|
package/dist/jsonld/index.cjs
CHANGED
|
@@ -59,6 +59,13 @@ var term_mappings_default = {
|
|
|
59
59
|
match: "closeMatch",
|
|
60
60
|
terms: ["schema:hasCredential", "bibo:degree"]
|
|
61
61
|
},
|
|
62
|
+
{
|
|
63
|
+
lexicon: "id.sifa.profile.education",
|
|
64
|
+
field: "eqfLevel",
|
|
65
|
+
match: "closeMatch",
|
|
66
|
+
terms: ["schema:educationalLevel"],
|
|
67
|
+
note: "EQF is the value anchor."
|
|
68
|
+
},
|
|
62
69
|
{
|
|
63
70
|
lexicon: "id.sifa.profile.education",
|
|
64
71
|
field: "fieldOfStudy",
|
|
@@ -304,6 +311,12 @@ var term_mappings_default = {
|
|
|
304
311
|
match: "exactMatch",
|
|
305
312
|
terms: ["dcterms:publisher", "schema:publisher"]
|
|
306
313
|
},
|
|
314
|
+
{
|
|
315
|
+
lexicon: "id.sifa.profile.publication",
|
|
316
|
+
field: "relatedIdentifiers",
|
|
317
|
+
match: "closeMatch",
|
|
318
|
+
terms: ["dcterms:relation"]
|
|
319
|
+
},
|
|
307
320
|
{
|
|
308
321
|
lexicon: "id.sifa.profile.publication",
|
|
309
322
|
field: "subtitle",
|
|
@@ -499,6 +512,28 @@ function filterHidden(items) {
|
|
|
499
512
|
return (items ?? []).filter((i) => !i.hidden);
|
|
500
513
|
}
|
|
501
514
|
|
|
515
|
+
// src/taxonomy/eqf-level.ts
|
|
516
|
+
var EQF_LEVEL_OPTIONS = [
|
|
517
|
+
{ value: 1, label: "Primary education" },
|
|
518
|
+
{ value: 2, label: "Lower secondary" },
|
|
519
|
+
{ value: 3, label: "Vocational or partial upper secondary" },
|
|
520
|
+
{ value: 4, label: "Upper secondary" },
|
|
521
|
+
{ value: 5, label: "Associate or short-cycle degree" },
|
|
522
|
+
{ value: 6, label: "Bachelor" },
|
|
523
|
+
{ value: 7, label: "Master" },
|
|
524
|
+
{ value: 8, label: "Doctorate" }
|
|
525
|
+
];
|
|
526
|
+
var EQF_LEVEL_LABELS = Object.fromEntries(
|
|
527
|
+
EQF_LEVEL_OPTIONS.map((o) => [o.value, o.label])
|
|
528
|
+
);
|
|
529
|
+
function readEqfLevel(value) {
|
|
530
|
+
return Number.isInteger(value) && value >= 1 && value <= 8 ? value : void 0;
|
|
531
|
+
}
|
|
532
|
+
function getEqfLevelLabel(level) {
|
|
533
|
+
const valid = readEqfLevel(level);
|
|
534
|
+
return valid === void 0 ? void 0 : EQF_LEVEL_LABELS[valid];
|
|
535
|
+
}
|
|
536
|
+
|
|
502
537
|
// src/jsonld/url.ts
|
|
503
538
|
var DEFAULT_BASE_URL = "https://sifa.id";
|
|
504
539
|
function normaliseBaseUrl(baseUrl) {
|
|
@@ -514,6 +549,17 @@ function profileUrl(baseUrl, handle) {
|
|
|
514
549
|
// src/jsonld/profile.ts
|
|
515
550
|
var MAX_KNOWS_ABOUT = 20;
|
|
516
551
|
var MEANINGFUL_TEXT_RE = /[\p{L}\p{N}]/u;
|
|
552
|
+
var EQF_TERM_SET = "https://europass.europa.eu/en/europass-digital-tools/european-qualifications-framework";
|
|
553
|
+
function educationalLevel(eqfLevel) {
|
|
554
|
+
const level = readEqfLevel(eqfLevel);
|
|
555
|
+
if (level === void 0) return void 0;
|
|
556
|
+
return {
|
|
557
|
+
"@type": "DefinedTerm",
|
|
558
|
+
name: getEqfLevelLabel(level),
|
|
559
|
+
termCode: String(level),
|
|
560
|
+
inDefinedTermSet: EQF_TERM_SET
|
|
561
|
+
};
|
|
562
|
+
}
|
|
517
563
|
var identity = (input) => input;
|
|
518
564
|
function hasMeaningfulText(value) {
|
|
519
565
|
return typeof value === "string" && MEANINGFUL_TEXT_RE.test(value);
|
|
@@ -563,10 +609,11 @@ function buildPersonJsonLd(profile, options = {}) {
|
|
|
563
609
|
const knowsAbout = rankKnowsAbout(profile.skills, s);
|
|
564
610
|
const sameAs = buildSameAs(profile);
|
|
565
611
|
const hasCredential = [
|
|
566
|
-
...visible(profile.education).filter((e) => e.degree).map((e) => ({
|
|
612
|
+
...visible(profile.education).map((e) => ({ e, level: educationalLevel(e.eqfLevel) })).filter(({ e, level }) => e.degree || level).map(({ e, level }) => ({
|
|
567
613
|
"@type": "EducationalOccupationalCredential",
|
|
568
614
|
credentialCategory: "degree",
|
|
569
|
-
name: [e.degree, e.fieldOfStudy].filter(Boolean).join(" "),
|
|
615
|
+
name: e.degree ? [e.degree, e.fieldOfStudy].filter(Boolean).join(" ") : level.name,
|
|
616
|
+
...level && { educationalLevel: level },
|
|
570
617
|
...e.institution && {
|
|
571
618
|
recognizedBy: { "@type": "EducationalOrganization", name: s(e.institution) }
|
|
572
619
|
}
|