@singi-labs/sifa-sdk 0.19.21 → 0.19.22
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 +22 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +22 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4014,11 +4014,12 @@ function getPublisherFromSiteUrl(siteUrl) {
|
|
|
4014
4014
|
// src/stream/verbs.json
|
|
4015
4015
|
var verbs_default = {
|
|
4016
4016
|
$schema: "https://sifa.id/schemas/activity-verbs/v1.json",
|
|
4017
|
-
version: "1.
|
|
4018
|
-
updated: "2026-09-
|
|
4017
|
+
version: "1.5.0",
|
|
4018
|
+
updated: "2026-09-20",
|
|
4019
4019
|
defaultVerb: "created",
|
|
4020
4020
|
verbs: {
|
|
4021
4021
|
"agency.portable.membership": "joined",
|
|
4022
|
+
"app.beaconbits.beacon": "wasAt",
|
|
4022
4023
|
"app.atmobb.discussion.reply": "replied",
|
|
4023
4024
|
"app.bsky.feed.post": "posted",
|
|
4024
4025
|
"app.bsky.feed.repost": "reposted",
|
|
@@ -4029,7 +4030,8 @@ var verbs_default = {
|
|
|
4029
4030
|
"at.margin.bookmark": "bookmarked",
|
|
4030
4031
|
"at.margin.note": "annotated",
|
|
4031
4032
|
"at.marque.domain": "registered",
|
|
4032
|
-
"at.youandme.connection": "
|
|
4033
|
+
"at.youandme.connection": "metWith",
|
|
4034
|
+
"blog.pckt.mini.post": "wrote",
|
|
4033
4035
|
"blue.flashes.feed.post": "posted",
|
|
4034
4036
|
"buzz.bookhive.book": "reviewed",
|
|
4035
4037
|
"com.whtwnd.blog.entry": "published",
|
|
@@ -4041,6 +4043,7 @@ var verbs_default = {
|
|
|
4041
4043
|
"eu.atcommons.member": "joined",
|
|
4042
4044
|
"fm.plyr.comment": "commented",
|
|
4043
4045
|
"forum.barazo.post": "posted",
|
|
4046
|
+
"fyi.atstore.listing.review": "reviewed",
|
|
4044
4047
|
"fyi.unravel.frontpage.post": "posted",
|
|
4045
4048
|
"id.sifa.endorsement": "endorsed",
|
|
4046
4049
|
"id.sifa.graph.connection": "joined",
|
|
@@ -4054,6 +4057,8 @@ var verbs_default = {
|
|
|
4054
4057
|
"sh.tangled.repo.pull": "shipped",
|
|
4055
4058
|
"site.standard.document": "published",
|
|
4056
4059
|
"social.colibri.membership": "joined",
|
|
4060
|
+
"social.grain.gallery": "posted",
|
|
4061
|
+
"place.stream.livestream": "streamed",
|
|
4057
4062
|
"social.kut.community.membership": "joined",
|
|
4058
4063
|
"social.popfeed.feed.note": "posted",
|
|
4059
4064
|
"social.popfeed.feed.post": "posted",
|
|
@@ -4083,7 +4088,11 @@ var STREAM_VERBS = [
|
|
|
4083
4088
|
"followed",
|
|
4084
4089
|
"bookmarked",
|
|
4085
4090
|
"registered",
|
|
4086
|
-
"annotated"
|
|
4091
|
+
"annotated",
|
|
4092
|
+
"streamed",
|
|
4093
|
+
"wrote",
|
|
4094
|
+
"wasAt",
|
|
4095
|
+
"metWith"
|
|
4087
4096
|
];
|
|
4088
4097
|
var streamVerbSchema = zod.z.enum(STREAM_VERBS);
|
|
4089
4098
|
var verbMapSchema = zod.z.object({
|
|
@@ -4541,7 +4550,11 @@ var TITLE_BY_VERB = {
|
|
|
4541
4550
|
followed: () => "Followed",
|
|
4542
4551
|
bookmarked: () => "Bookmarked",
|
|
4543
4552
|
registered: () => "Registered",
|
|
4544
|
-
annotated: () => "Annotated"
|
|
4553
|
+
annotated: () => "Annotated",
|
|
4554
|
+
streamed: () => "Streamed",
|
|
4555
|
+
wrote: () => "Wrote",
|
|
4556
|
+
wasAt: (_label, hasSubject) => hasSubject ? "Was at" : "Was at",
|
|
4557
|
+
metWith: (_label, hasSubject) => hasSubject ? "Met with" : "Met with"
|
|
4545
4558
|
};
|
|
4546
4559
|
function buildTitle(verb, label, hasSubject) {
|
|
4547
4560
|
return TITLE_BY_VERB[verb](label, hasSubject);
|
|
@@ -4889,9 +4902,9 @@ function applyStandardSite(vm, record) {
|
|
|
4889
4902
|
vm.body = body;
|
|
4890
4903
|
return vm;
|
|
4891
4904
|
}
|
|
4892
|
-
function applyYouAndMe(vm, record) {
|
|
4905
|
+
function applyYouAndMe(vm, record, item) {
|
|
4893
4906
|
const did = asNonEmptyString(record.subject);
|
|
4894
|
-
if (did) vm.subject = { kind: "person", did };
|
|
4907
|
+
if (did) vm.subject = withResolvedSubjectMeta({ kind: "person", did }, item);
|
|
4895
4908
|
vm.body = { kind: "generic" };
|
|
4896
4909
|
return vm;
|
|
4897
4910
|
}
|
|
@@ -5159,7 +5172,7 @@ function toStreamCardVM(item, options = {}) {
|
|
|
5159
5172
|
case "site.standard.document":
|
|
5160
5173
|
return record ? applyStandardSite(vm, record) : withGeneric(vm);
|
|
5161
5174
|
case "at.youandme.connection":
|
|
5162
|
-
return record ? applyYouAndMe(vm, record) : withGeneric(vm);
|
|
5175
|
+
return record ? applyYouAndMe(vm, record, item) : withGeneric(vm);
|
|
5163
5176
|
case "fyi.asq.answer":
|
|
5164
5177
|
return record ? applyAsqAnswer(vm, record) : withGeneric(vm);
|
|
5165
5178
|
case "fediverse.post":
|
|
@@ -6609,7 +6622,7 @@ function describeSifaRecord(collection, value) {
|
|
|
6609
6622
|
}
|
|
6610
6623
|
|
|
6611
6624
|
// src/index.ts
|
|
6612
|
-
var SIFA_SDK_VERSION = "0.19.
|
|
6625
|
+
var SIFA_SDK_VERSION = "0.19.22";
|
|
6613
6626
|
|
|
6614
6627
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
6615
6628
|
exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
|