@singi-labs/sifa-sdk 0.12.52 → 0.12.53
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 +14 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5479,7 +5479,10 @@ function repoGroupForCollection(collection) {
|
|
|
5479
5479
|
// src/repo/labels.ts
|
|
5480
5480
|
var LABEL_RULES = {
|
|
5481
5481
|
"id.sifa.profile.self": { primary: ["headline"] },
|
|
5482
|
-
"id.sifa.profile.location": {
|
|
5482
|
+
"id.sifa.profile.location": {
|
|
5483
|
+
primary: ["address.locality", "address.region", "address.country"],
|
|
5484
|
+
secondary: ["address.country"]
|
|
5485
|
+
},
|
|
5483
5486
|
"id.sifa.profile.language": { primary: ["name"], secondary: ["proficiency"] },
|
|
5484
5487
|
"id.sifa.profile.externalAccount": { primary: ["label", "platform"], secondary: ["url"] },
|
|
5485
5488
|
"id.sifa.org.profile": { primary: ["name"] },
|
|
@@ -5552,9 +5555,17 @@ var LABEL_RULES = {
|
|
|
5552
5555
|
function collectionLeaf(collection) {
|
|
5553
5556
|
return collection.slice(collection.lastIndexOf(".") + 1);
|
|
5554
5557
|
}
|
|
5558
|
+
function valueAtPath(record, path) {
|
|
5559
|
+
let current = record;
|
|
5560
|
+
for (const segment of path.split(".")) {
|
|
5561
|
+
if (typeof current !== "object" || current === null) return void 0;
|
|
5562
|
+
current = current[segment];
|
|
5563
|
+
}
|
|
5564
|
+
return current;
|
|
5565
|
+
}
|
|
5555
5566
|
function pickString(record, fields) {
|
|
5556
5567
|
for (const field of fields) {
|
|
5557
|
-
const raw = record
|
|
5568
|
+
const raw = valueAtPath(record, field);
|
|
5558
5569
|
if (typeof raw !== "string") continue;
|
|
5559
5570
|
const trimmed = raw.trim();
|
|
5560
5571
|
if (trimmed.length > 0) return trimmed;
|
|
@@ -5579,7 +5590,7 @@ function describeSifaRecord(collection, value) {
|
|
|
5579
5590
|
}
|
|
5580
5591
|
|
|
5581
5592
|
// src/index.ts
|
|
5582
|
-
var SIFA_SDK_VERSION = "0.12.
|
|
5593
|
+
var SIFA_SDK_VERSION = "0.12.53";
|
|
5583
5594
|
|
|
5584
5595
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
5585
5596
|
exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
|