@singi-labs/sifa-sdk 0.10.10 → 0.10.12
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 +75 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -1
- package/dist/index.d.ts +20 -1
- package/dist/index.js +74 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -726,6 +726,20 @@ function getOpenToLabelKey(value) {
|
|
|
726
726
|
if (!value) return void 0;
|
|
727
727
|
return OPEN_TO_LABEL_KEY_MAP[value];
|
|
728
728
|
}
|
|
729
|
+
var OPEN_TO_LEGACY_VALUE_ALIASES = {
|
|
730
|
+
"id.sifa.defs#mentoring": "id.sifa.defs#mentoringOthers"
|
|
731
|
+
};
|
|
732
|
+
function normalizeOpenTo(values) {
|
|
733
|
+
const seen = /* @__PURE__ */ new Set();
|
|
734
|
+
const out = [];
|
|
735
|
+
for (const value of values) {
|
|
736
|
+
const canonical = OPEN_TO_LEGACY_VALUE_ALIASES[value] ?? value;
|
|
737
|
+
if (seen.has(canonical)) continue;
|
|
738
|
+
seen.add(canonical);
|
|
739
|
+
out.push(canonical);
|
|
740
|
+
}
|
|
741
|
+
return out;
|
|
742
|
+
}
|
|
729
743
|
|
|
730
744
|
// src/taxonomy/workplace-type.ts
|
|
731
745
|
var WORKPLACE_TYPE_OPTIONS = [
|
|
@@ -743,6 +757,20 @@ function getWorkplaceTypeLabel(value) {
|
|
|
743
757
|
if (!value) return void 0;
|
|
744
758
|
return WORKPLACE_TYPE_LABELS[value] ?? value;
|
|
745
759
|
}
|
|
760
|
+
var WORKPLACE_TYPE_LEGACY_ALIASES = {
|
|
761
|
+
"id.sifa.defs#remote": "id.sifa.defs#remoteGlobal"
|
|
762
|
+
};
|
|
763
|
+
function normalizeWorkplaceTypes(values) {
|
|
764
|
+
const seen = /* @__PURE__ */ new Set();
|
|
765
|
+
const out = [];
|
|
766
|
+
for (const value of values) {
|
|
767
|
+
const canonical = WORKPLACE_TYPE_LEGACY_ALIASES[value] ?? value;
|
|
768
|
+
if (seen.has(canonical)) continue;
|
|
769
|
+
seen.add(canonical);
|
|
770
|
+
out.push(canonical);
|
|
771
|
+
}
|
|
772
|
+
return out;
|
|
773
|
+
}
|
|
746
774
|
|
|
747
775
|
// src/taxonomy/platforms.ts
|
|
748
776
|
var PLATFORM_LABELS = {
|
|
@@ -915,6 +943,12 @@ var APP_CATEGORY_MAP = {
|
|
|
915
943
|
anisota: "Posts",
|
|
916
944
|
atfund: "Endorsements",
|
|
917
945
|
crate: "Articles",
|
|
946
|
+
atmorsvp: "Events",
|
|
947
|
+
opensocial: "Social",
|
|
948
|
+
// Kevara speaker-directory listing — a professional speaking-availability
|
|
949
|
+
// declaration (talk topics, formats like keynote/panel/conference-talk).
|
|
950
|
+
// Grouped under Events as the closest fit (speaking engagements).
|
|
951
|
+
kevara: "Events",
|
|
918
952
|
// Web-only (rendered in pills/cards via sifa-web atproto-apps.ts;
|
|
919
953
|
// no backend scan collection yet)
|
|
920
954
|
linkat: "Links",
|
|
@@ -1637,6 +1671,23 @@ var APP_URL_PATTERNS = Object.freeze({
|
|
|
1637
1671
|
// render on the maker's own site. `content` cards link out via
|
|
1638
1672
|
// record.canonicalUrl (handled in resolveCardUrl); `note` records have no
|
|
1639
1673
|
// public URL and render non-clickable. So no app-level pattern applies.
|
|
1674
|
+
},
|
|
1675
|
+
atmorsvp: {
|
|
1676
|
+
// atmo.rsvp events live at /p/{did}/e/{rkey}. The per-item pattern is used
|
|
1677
|
+
// for the event record itself; checkin records build their URL from the
|
|
1678
|
+
// referenced event uri in resolveCardUrl (mirrors smokesignal rsvp).
|
|
1679
|
+
urlPattern: "https://atmo.rsvp/p/{did}/e/{rkey}",
|
|
1680
|
+
profileUrlPattern: "https://atmo.rsvp/p/{did}"
|
|
1681
|
+
},
|
|
1682
|
+
opensocial: {
|
|
1683
|
+
// Open Social (opensocial.community) is community-management infrastructure
|
|
1684
|
+
// with no public per-membership permalink. Profile fallback only.
|
|
1685
|
+
profileUrlPattern: "https://opensocial.community"
|
|
1686
|
+
},
|
|
1687
|
+
kevara: {
|
|
1688
|
+
// Kevara (professional network) has no live public web surface yet — its
|
|
1689
|
+
// domain doesn't resolve and there's no per-record viewer. Recognized so
|
|
1690
|
+
// the speaker-directory card renders with the right pill, but non-clickable.
|
|
1640
1691
|
}
|
|
1641
1692
|
});
|
|
1642
1693
|
var COLLECTION_TO_APP = [
|
|
@@ -1679,7 +1730,10 @@ var COLLECTION_TO_APP = [
|
|
|
1679
1730
|
["fyi.atstore.", "atstore"],
|
|
1680
1731
|
["fm.plyr.", "plyr"],
|
|
1681
1732
|
["fund.at.", "atfund"],
|
|
1682
|
-
["social.crate.", "crate"]
|
|
1733
|
+
["social.crate.", "crate"],
|
|
1734
|
+
["quest.atmo.", "atmorsvp"],
|
|
1735
|
+
["community.opensocial.", "opensocial"],
|
|
1736
|
+
["is.kevara.", "kevara"]
|
|
1683
1737
|
];
|
|
1684
1738
|
|
|
1685
1739
|
// src/cards/resolve-card-url.ts
|
|
@@ -1779,6 +1833,23 @@ function resolveCardUrl(item) {
|
|
|
1779
1833
|
}
|
|
1780
1834
|
return null;
|
|
1781
1835
|
}
|
|
1836
|
+
if (collection === "quest.atmo.event") {
|
|
1837
|
+
const parsed2 = parseAtUri(uri);
|
|
1838
|
+
if (parsed2) {
|
|
1839
|
+
return `https://atmo.rsvp/p/${parsed2.did}/e/${parsed2.rkey}`;
|
|
1840
|
+
}
|
|
1841
|
+
return null;
|
|
1842
|
+
}
|
|
1843
|
+
if (collection === "quest.atmo.checkin") {
|
|
1844
|
+
const eventUri = stringOrNull(record.event);
|
|
1845
|
+
if (eventUri) {
|
|
1846
|
+
const parsed2 = parseAtUri(eventUri);
|
|
1847
|
+
if (parsed2) {
|
|
1848
|
+
return `https://atmo.rsvp/p/${parsed2.did}/e/${parsed2.rkey}`;
|
|
1849
|
+
}
|
|
1850
|
+
}
|
|
1851
|
+
return null;
|
|
1852
|
+
}
|
|
1782
1853
|
if (collection === "fyi.atstore.listing.review") {
|
|
1783
1854
|
const listingMeta = record.listingMeta;
|
|
1784
1855
|
if (listingMeta != null && typeof listingMeta === "object") {
|
|
@@ -2250,7 +2321,7 @@ var ProfileVolunteeringRecordSchema = zod.z.object({
|
|
|
2250
2321
|
});
|
|
2251
2322
|
|
|
2252
2323
|
// src/index.ts
|
|
2253
|
-
var SIFA_SDK_VERSION = "0.10.
|
|
2324
|
+
var SIFA_SDK_VERSION = "0.10.12";
|
|
2254
2325
|
|
|
2255
2326
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
2256
2327
|
exports.ACTIVITY_VISIBILITY_RULES = ACTIVITY_VISIBILITY_RULES;
|
|
@@ -2361,6 +2432,8 @@ exports.limitCombiningMarks = limitCombiningMarks;
|
|
|
2361
2432
|
exports.makeGraphFollowRecordSchema = makeGraphFollowRecordSchema;
|
|
2362
2433
|
exports.maxGraphemes = maxGraphemes;
|
|
2363
2434
|
exports.meetsContrastAA = meetsContrastAA;
|
|
2435
|
+
exports.normalizeOpenTo = normalizeOpenTo;
|
|
2436
|
+
exports.normalizeWorkplaceTypes = normalizeWorkplaceTypes;
|
|
2364
2437
|
exports.openToTokenToValue = openToTokenToValue;
|
|
2365
2438
|
exports.openToValueToToken = openToValueToToken;
|
|
2366
2439
|
exports.parseLocationString = parseLocationString;
|