@singi-labs/sifa-sdk 0.11.32 → 0.12.0
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 +68 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +72 -1
- package/dist/index.d.ts +72 -1
- package/dist/index.js +64 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1481,6 +1481,68 @@ function getArtifactLinkKindLabel(value) {
|
|
|
1481
1481
|
return ARTIFACT_LINK_KIND_LABELS[value] ?? value;
|
|
1482
1482
|
}
|
|
1483
1483
|
|
|
1484
|
+
// src/taxonomy/verification-providers.ts
|
|
1485
|
+
var MU_VERIFIER_DIDS = [
|
|
1486
|
+
"did:plc:ooensn4mr5mhznzypvxelfa3",
|
|
1487
|
+
// eurosky.social -- coordinates the trusted-verifier program
|
|
1488
|
+
"did:plc:durcipmx2rwgzzagbiumobs5",
|
|
1489
|
+
// france-atmosphe.re
|
|
1490
|
+
"did:plc:zsf5p7rqilz2qvyd7ezmxrfj",
|
|
1491
|
+
// belgium-atmosphe.re
|
|
1492
|
+
"did:plc:hd564mpf6bekrwzyhvujs54b",
|
|
1493
|
+
// medsky.network
|
|
1494
|
+
"did:plc:u5zp7npt5kpueado77kuihyz",
|
|
1495
|
+
// npmx.dev
|
|
1496
|
+
"did:plc:6tndl5lqrzjrx7ahjom2gjbq",
|
|
1497
|
+
// stewardshiplab.org
|
|
1498
|
+
"did:plc:vnycpb2e4lh4tc7oyr3n2jvh",
|
|
1499
|
+
// newsmastfoundation.org
|
|
1500
|
+
"did:plc:dsiqe4pszk5ldbjk66fyryjv"
|
|
1501
|
+
// cpesr.fr
|
|
1502
|
+
];
|
|
1503
|
+
var VERIFICATION_PROVIDERS = {
|
|
1504
|
+
bluesky: {
|
|
1505
|
+
id: "bluesky",
|
|
1506
|
+
label: "Bluesky",
|
|
1507
|
+
priority: 0,
|
|
1508
|
+
source: "bluesky-api",
|
|
1509
|
+
verifierDids: []
|
|
1510
|
+
},
|
|
1511
|
+
mu: {
|
|
1512
|
+
id: "mu",
|
|
1513
|
+
label: "mu (Eurosky)",
|
|
1514
|
+
priority: 1,
|
|
1515
|
+
source: "firehose",
|
|
1516
|
+
verifierDids: MU_VERIFIER_DIDS
|
|
1517
|
+
}
|
|
1518
|
+
};
|
|
1519
|
+
function isKnownVerificationProvider(id) {
|
|
1520
|
+
return Object.hasOwn(VERIFICATION_PROVIDERS, id);
|
|
1521
|
+
}
|
|
1522
|
+
function getVerificationProvider(id) {
|
|
1523
|
+
return isKnownVerificationProvider(id) ? VERIFICATION_PROVIDERS[id] : void 0;
|
|
1524
|
+
}
|
|
1525
|
+
function resolveVerifierProvider(issuerDid) {
|
|
1526
|
+
for (const provider of Object.values(VERIFICATION_PROVIDERS)) {
|
|
1527
|
+
if (provider.source !== "firehose") continue;
|
|
1528
|
+
if (provider.verifierDids.includes(issuerDid)) return provider.id;
|
|
1529
|
+
}
|
|
1530
|
+
return null;
|
|
1531
|
+
}
|
|
1532
|
+
function primaryVerification(verifications) {
|
|
1533
|
+
let best = null;
|
|
1534
|
+
let bestPriority = Number.POSITIVE_INFINITY;
|
|
1535
|
+
for (const verification of verifications) {
|
|
1536
|
+
const provider = getVerificationProvider(verification.provider);
|
|
1537
|
+
if (!provider) continue;
|
|
1538
|
+
if (provider.priority < bestPriority) {
|
|
1539
|
+
best = verification;
|
|
1540
|
+
bestPriority = provider.priority;
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1543
|
+
return best;
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1484
1546
|
// src/format/company-name.ts
|
|
1485
1547
|
var SMALL_WORDS = /* @__PURE__ */ new Set([
|
|
1486
1548
|
"a",
|
|
@@ -3107,7 +3169,7 @@ var ProfileVolunteeringRecordSchema = zod.z.object({
|
|
|
3107
3169
|
});
|
|
3108
3170
|
|
|
3109
3171
|
// src/index.ts
|
|
3110
|
-
var SIFA_SDK_VERSION = "0.
|
|
3172
|
+
var SIFA_SDK_VERSION = "0.12.0";
|
|
3111
3173
|
|
|
3112
3174
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
3113
3175
|
exports.ACTIVITY_VISIBILITY_RULES = ACTIVITY_VISIBILITY_RULES;
|
|
@@ -3190,6 +3252,7 @@ exports.SIFA_SDK_VERSION = SIFA_SDK_VERSION;
|
|
|
3190
3252
|
exports.SKILL_CATEGORIES = SKILL_CATEGORIES;
|
|
3191
3253
|
exports.STANDARD_PUBLISHER_ID = STANDARD_PUBLISHER_ID;
|
|
3192
3254
|
exports.SifaFeedItemSchema = SifaFeedItemSchema;
|
|
3255
|
+
exports.VERIFICATION_PROVIDERS = VERIFICATION_PROVIDERS;
|
|
3193
3256
|
exports.WORKPLACE_TYPE_LABELS = WORKPLACE_TYPE_LABELS;
|
|
3194
3257
|
exports.WORKPLACE_TYPE_OPTIONS = WORKPLACE_TYPE_OPTIONS;
|
|
3195
3258
|
exports.atUriSchema = atUriSchema;
|
|
@@ -3246,6 +3309,7 @@ exports.getPublisherByHost = getPublisherByHost;
|
|
|
3246
3309
|
exports.getPublisherById = getPublisherById;
|
|
3247
3310
|
exports.getPublisherFromSiteUrl = getPublisherFromSiteUrl;
|
|
3248
3311
|
exports.getTierMeta = getTierMeta;
|
|
3312
|
+
exports.getVerificationProvider = getVerificationProvider;
|
|
3249
3313
|
exports.getWorkplaceTypeLabel = getWorkplaceTypeLabel;
|
|
3250
3314
|
exports.groupSkillsByCategory = groupSkillsByCategory;
|
|
3251
3315
|
exports.hasAdultContent = hasAdultContent;
|
|
@@ -3253,6 +3317,7 @@ exports.isAppCategory = isAppCategory;
|
|
|
3253
3317
|
exports.isCompanyRequired = isCompanyRequired;
|
|
3254
3318
|
exports.isKnownAppId = isKnownAppId;
|
|
3255
3319
|
exports.isKnownPlatform = isKnownPlatform;
|
|
3320
|
+
exports.isKnownVerificationProvider = isKnownVerificationProvider;
|
|
3256
3321
|
exports.isLinked = isLinked;
|
|
3257
3322
|
exports.isPseudoEmployer = isPseudoEmployer;
|
|
3258
3323
|
exports.isValidRgbColor = isValidRgbColor;
|
|
@@ -3281,10 +3346,12 @@ exports.pdsProviderFromApi = pdsProviderFromApi;
|
|
|
3281
3346
|
exports.pickPrimaryPosition = pickPrimaryPosition;
|
|
3282
3347
|
exports.presentationCsvRowToRecord = presentationCsvRowToRecord;
|
|
3283
3348
|
exports.presentationDeliveryCsvRowToRecord = presentationDeliveryCsvRowToRecord;
|
|
3349
|
+
exports.primaryVerification = primaryVerification;
|
|
3284
3350
|
exports.profileToDimensionInputs = profileToDimensionInputs;
|
|
3285
3351
|
exports.relativeLuminance = relativeLuminance;
|
|
3286
3352
|
exports.resolveCardHealth = resolveCardHealth;
|
|
3287
3353
|
exports.resolveCardUrl = resolveCardUrl;
|
|
3354
|
+
exports.resolveVerifierProvider = resolveVerifierProvider;
|
|
3288
3355
|
exports.rgbToString = rgbToString;
|
|
3289
3356
|
exports.sanitizeDisplayText = sanitizeDisplayText;
|
|
3290
3357
|
exports.sanitizeHandleInput = sanitizeHandleInput;
|