@singi-labs/sifa-sdk 0.17.0 → 0.18.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 +33 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +48 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.js +33 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1154,7 +1154,7 @@ function categoryForApp(appId) {
|
|
|
1154
1154
|
// src/taxonomy/activity-tiers.json
|
|
1155
1155
|
var activity_tiers_default = {
|
|
1156
1156
|
$schema: "https://sifa.id/schemas/activity-tiers/v1.json",
|
|
1157
|
-
version: "1.
|
|
1157
|
+
version: "1.3.0",
|
|
1158
1158
|
updated: "2026-08-25",
|
|
1159
1159
|
tiers: {
|
|
1160
1160
|
creation: {
|
|
@@ -1258,6 +1258,11 @@ var activity_tiers_default = {
|
|
|
1258
1258
|
app: "certified",
|
|
1259
1259
|
notes: "An endorsement issued to another DID. A trust signal the actor contributes, like a Bluesky verification."
|
|
1260
1260
|
},
|
|
1261
|
+
"app.certified.badge.response": {
|
|
1262
|
+
tier: "creation",
|
|
1263
|
+
app: "certified",
|
|
1264
|
+
notes: "The recipient's acceptance of a badge someone else awarded them. An accepted badge is a credential the person holds; rejected ones are hidden by an ACTIVITY_VISIBILITY_RULES predicate."
|
|
1265
|
+
},
|
|
1261
1266
|
"app.collectivesocial.feed.list": {
|
|
1262
1267
|
tier: "creation",
|
|
1263
1268
|
app: "collectivesocial",
|
|
@@ -3705,11 +3710,15 @@ function marginAnnotationHasBody(record) {
|
|
|
3705
3710
|
}
|
|
3706
3711
|
return false;
|
|
3707
3712
|
}
|
|
3713
|
+
function certifiedBadgeAccepted(record) {
|
|
3714
|
+
return record.response === "accepted";
|
|
3715
|
+
}
|
|
3708
3716
|
var ACTIVITY_VISIBILITY_RULES = Object.freeze({
|
|
3709
3717
|
"buzz.bookhive.book": bookhiveHasOpinion,
|
|
3710
3718
|
"app.beaconbits.beacon": beaconbitsHasContent,
|
|
3711
3719
|
"at.margin.bookmark": marginBookmarkHasSource,
|
|
3712
|
-
"at.margin.annotation": marginAnnotationHasBody
|
|
3720
|
+
"at.margin.annotation": marginAnnotationHasBody,
|
|
3721
|
+
"app.certified.badge.response": certifiedBadgeAccepted
|
|
3713
3722
|
});
|
|
3714
3723
|
function isVisibleActivityItem(collection, record) {
|
|
3715
3724
|
if (record === null || typeof record !== "object") return false;
|
|
@@ -4082,6 +4091,24 @@ var hypercertDetailsSchema = zod.z.object({
|
|
|
4082
4091
|
contributorCount: zod.z.number(),
|
|
4083
4092
|
attachments: zod.z.array(zod.z.object({ title: zod.z.string().optional(), url: zod.z.string() }))
|
|
4084
4093
|
});
|
|
4094
|
+
var certifiedActorSchema = zod.z.object({
|
|
4095
|
+
did: zod.z.string(),
|
|
4096
|
+
handle: zod.z.string(),
|
|
4097
|
+
displayName: zod.z.string().optional(),
|
|
4098
|
+
avatar: zod.z.string().optional()
|
|
4099
|
+
});
|
|
4100
|
+
var certifiedDetailsSchema = zod.z.object({
|
|
4101
|
+
badge: zod.z.object({
|
|
4102
|
+
title: zod.z.string(),
|
|
4103
|
+
description: zod.z.string().optional(),
|
|
4104
|
+
icon: zod.z.string().optional(),
|
|
4105
|
+
badgeType: zod.z.string().optional()
|
|
4106
|
+
}).optional(),
|
|
4107
|
+
recipient: certifiedActorSchema.optional(),
|
|
4108
|
+
issuer: certifiedActorSchema.optional(),
|
|
4109
|
+
group: certifiedActorSchema.optional(),
|
|
4110
|
+
role: zod.z.string().optional()
|
|
4111
|
+
});
|
|
4085
4112
|
var streamCardVMSchema = zod.z.lazy(
|
|
4086
4113
|
() => zod.z.object({
|
|
4087
4114
|
uri: zod.z.string(),
|
|
@@ -4098,7 +4125,8 @@ var streamCardVMSchema = zod.z.lazy(
|
|
|
4098
4125
|
externalLink: streamExternalLinkSchema.optional(),
|
|
4099
4126
|
theme: streamThemeSchema.optional(),
|
|
4100
4127
|
subject: zod.z.lazy(() => streamCardSubjectSchema).optional(),
|
|
4101
|
-
hypercertDetails: hypercertDetailsSchema.optional()
|
|
4128
|
+
hypercertDetails: hypercertDetailsSchema.optional(),
|
|
4129
|
+
certifiedDetails: certifiedDetailsSchema.optional()
|
|
4102
4130
|
})
|
|
4103
4131
|
);
|
|
4104
4132
|
function maxGraphemes(max) {
|
|
@@ -4822,6 +4850,7 @@ function toStreamCardVM(item, options = {}) {
|
|
|
4822
4850
|
if (sourceUrl) vm.sourceUrl = sourceUrl;
|
|
4823
4851
|
}
|
|
4824
4852
|
if (item.hypercertDetails) vm.hypercertDetails = item.hypercertDetails;
|
|
4853
|
+
if (item.certifiedDetails) vm.certifiedDetails = item.certifiedDetails;
|
|
4825
4854
|
if (item.subject) {
|
|
4826
4855
|
vm.subject = { kind: "post", post: toStreamCardVM(item.subject, options) };
|
|
4827
4856
|
}
|
|
@@ -6038,7 +6067,7 @@ function describeSifaRecord(collection, value) {
|
|
|
6038
6067
|
}
|
|
6039
6068
|
|
|
6040
6069
|
// src/index.ts
|
|
6041
|
-
var SIFA_SDK_VERSION = "0.
|
|
6070
|
+
var SIFA_SDK_VERSION = "0.18.0";
|
|
6042
6071
|
|
|
6043
6072
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
6044
6073
|
exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
|