@singi-labs/sifa-sdk 0.16.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 +47 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +87 -0
- package/dist/index.d.ts +87 -0
- package/dist/index.js +47 -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;
|
|
@@ -4070,6 +4079,36 @@ var streamCardSubjectSchema = zod.z.discriminatedUnion("kind", [
|
|
|
4070
4079
|
title: zod.z.string().optional()
|
|
4071
4080
|
})
|
|
4072
4081
|
]);
|
|
4082
|
+
var hypercertDetailsSchema = zod.z.object({
|
|
4083
|
+
contributors: zod.z.array(
|
|
4084
|
+
zod.z.object({
|
|
4085
|
+
displayName: zod.z.string(),
|
|
4086
|
+
imageUrl: zod.z.string().optional(),
|
|
4087
|
+
identifier: zod.z.string().optional(),
|
|
4088
|
+
weight: zod.z.number().optional()
|
|
4089
|
+
})
|
|
4090
|
+
),
|
|
4091
|
+
contributorCount: zod.z.number(),
|
|
4092
|
+
attachments: zod.z.array(zod.z.object({ title: zod.z.string().optional(), url: zod.z.string() }))
|
|
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
|
+
});
|
|
4073
4112
|
var streamCardVMSchema = zod.z.lazy(
|
|
4074
4113
|
() => zod.z.object({
|
|
4075
4114
|
uri: zod.z.string(),
|
|
@@ -4085,7 +4124,9 @@ var streamCardVMSchema = zod.z.lazy(
|
|
|
4085
4124
|
media: zod.z.array(streamMediaSchema).optional(),
|
|
4086
4125
|
externalLink: streamExternalLinkSchema.optional(),
|
|
4087
4126
|
theme: streamThemeSchema.optional(),
|
|
4088
|
-
subject: zod.z.lazy(() => streamCardSubjectSchema).optional()
|
|
4127
|
+
subject: zod.z.lazy(() => streamCardSubjectSchema).optional(),
|
|
4128
|
+
hypercertDetails: hypercertDetailsSchema.optional(),
|
|
4129
|
+
certifiedDetails: certifiedDetailsSchema.optional()
|
|
4089
4130
|
})
|
|
4090
4131
|
);
|
|
4091
4132
|
function maxGraphemes(max) {
|
|
@@ -4808,6 +4849,8 @@ function toStreamCardVM(item, options = {}) {
|
|
|
4808
4849
|
const sourceUrl = resolveSourceUrl(item, record);
|
|
4809
4850
|
if (sourceUrl) vm.sourceUrl = sourceUrl;
|
|
4810
4851
|
}
|
|
4852
|
+
if (item.hypercertDetails) vm.hypercertDetails = item.hypercertDetails;
|
|
4853
|
+
if (item.certifiedDetails) vm.certifiedDetails = item.certifiedDetails;
|
|
4811
4854
|
if (item.subject) {
|
|
4812
4855
|
vm.subject = { kind: "post", post: toStreamCardVM(item.subject, options) };
|
|
4813
4856
|
}
|
|
@@ -6024,7 +6067,7 @@ function describeSifaRecord(collection, value) {
|
|
|
6024
6067
|
}
|
|
6025
6068
|
|
|
6026
6069
|
// src/index.ts
|
|
6027
|
-
var SIFA_SDK_VERSION = "0.
|
|
6070
|
+
var SIFA_SDK_VERSION = "0.18.0";
|
|
6028
6071
|
|
|
6029
6072
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
6030
6073
|
exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
|