@openvtc/trust-tasks 0.28.20 → 0.28.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/CHANGELOG.md +49 -0
- package/dist/_shared/components.d.ts +48 -4
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/auth/step-up/requests/show/0.1/payload.d.ts +458 -0
- package/dist/auth/step-up/requests/show/0.1/payload.d.ts.map +1 -0
- package/dist/auth/step-up/requests/show/0.1/payload.js +261 -0
- package/dist/auth/step-up/requests/show/0.1/payload.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/dist/vtc/badges/_shared/0.1/badge.d.ts +1 -1
- package/dist/vtc/badges/_shared/0.1/badge.d.ts.map +1 -1
- package/dist/vtc/badges/claims/create/0.1/payload.d.ts +595 -0
- package/dist/vtc/badges/claims/create/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/claims/create/0.1/payload.js +345 -0
- package/dist/vtc/badges/claims/create/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/claims/list/0.1/payload.d.ts +586 -0
- package/dist/vtc/badges/claims/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/claims/list/0.1/payload.js +335 -0
- package/dist/vtc/badges/claims/list/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/claims/redeem/0.1/payload.d.ts +720 -0
- package/dist/vtc/badges/claims/redeem/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/claims/redeem/0.1/payload.js +417 -0
- package/dist/vtc/badges/claims/redeem/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/claims/withdraw/0.1/payload.d.ts +512 -0
- package/dist/vtc/badges/claims/withdraw/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/claims/withdraw/0.1/payload.js +305 -0
- package/dist/vtc/badges/claims/withdraw/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/create/0.1/payload.d.ts +40 -16
- package/dist/vtc/badges/create/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/badges/create/0.1/payload.js +28 -8
- package/dist/vtc/badges/create/0.1/payload.js.map +1 -1
- package/dist/vtc/badges/promote/0.1/payload.d.ts +40 -16
- package/dist/vtc/badges/promote/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/badges/promote/0.1/payload.js +28 -8
- package/dist/vtc/badges/promote/0.1/payload.js.map +1 -1
- package/dist/vtc/badges/show/0.1/payload.d.ts +472 -26
- package/dist/vtc/badges/show/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/badges/show/0.1/payload.js +264 -12
- package/dist/vtc/badges/show/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/create/0.1/payload.d.ts +40 -16
- package/dist/vtc/groups/create/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/create/0.1/payload.js +28 -8
- package/dist/vtc/groups/create/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/list/0.1/payload.d.ts +40 -16
- package/dist/vtc/groups/list/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/list/0.1/payload.js +28 -8
- package/dist/vtc/groups/list/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/list/0.2/payload.d.ts +40 -16
- package/dist/vtc/groups/list/0.2/payload.d.ts.map +1 -1
- package/dist/vtc/groups/list/0.2/payload.js +28 -8
- package/dist/vtc/groups/list/0.2/payload.js.map +1 -1
- package/dist/vtc/groups/show/0.1/payload.d.ts +40 -16
- package/dist/vtc/groups/show/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/show/0.1/payload.js +28 -8
- package/dist/vtc/groups/show/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/update/0.1/payload.d.ts +40 -16
- package/dist/vtc/groups/update/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/update/0.1/payload.js +28 -8
- package/dist/vtc/groups/update/0.1/payload.js.map +1 -1
- package/package.json +1 -1
- package/src/_shared/components.ts +48 -4
- package/src/auth/step-up/requests/show/0.1/payload.ts +317 -0
- package/src/index.ts +15 -0
- package/src/vtc/badges/_shared/0.1/badge.ts +1 -1
- package/src/vtc/badges/claims/create/0.1/payload.ts +395 -0
- package/src/vtc/badges/claims/list/0.1/payload.ts +386 -0
- package/src/vtc/badges/claims/redeem/0.1/payload.ts +454 -0
- package/src/vtc/badges/claims/withdraw/0.1/payload.ts +342 -0
- package/src/vtc/badges/create/0.1/payload.ts +28 -8
- package/src/vtc/badges/promote/0.1/payload.ts +28 -8
- package/src/vtc/badges/show/0.1/payload.ts +272 -14
- package/src/vtc/groups/create/0.1/payload.ts +28 -8
- package/src/vtc/groups/list/0.1/payload.ts +28 -8
- package/src/vtc/groups/list/0.2/payload.ts +28 -8
- package/src/vtc/groups/show/0.1/payload.ts +28 -8
- package/src/vtc/groups/update/0.1/payload.ts +28 -8
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Source: specs/vtc/badges/show/0.1/payload.schema.json
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { Badge, BadgeCriteria, BadgeDescription, BadgeId, BadgeKind, BadgeName, BadgeState, CardBlobRef, EntryId, Ext, GroupId } from "../../../../_shared/components.js";
|
|
6
|
+
import type { Award, AwardId, AwardNote, AwardShare, AwardState, Badge, BadgeCriteria, BadgeDescription, BadgeId, BadgeKind, BadgeName, BadgeState, CardBlobRef, EntryId, Ext, GroupCredentialId, GroupId } from "../../../../_shared/components.js";
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -35,6 +35,12 @@ export interface VTCBadgesShowResponsePayload {
|
|
|
35
35
|
*/
|
|
36
36
|
myCount: number;
|
|
37
37
|
myState: MyState;
|
|
38
|
+
/**
|
|
39
|
+
* The caller's own accepted awards of this badge, newest first, each with `shared` where they show it outside the community — what `vtc/badges/awards/share` and `unshare` name. Absent where the caller holds none. Never another member's award.
|
|
40
|
+
*
|
|
41
|
+
* @maxItems 1000
|
|
42
|
+
*/
|
|
43
|
+
myAwards?: Award[];
|
|
38
44
|
/**
|
|
39
45
|
* Community badges only: the badge group's managers, whom a request for the badge goes to. Shown to every caller who may see the badge.
|
|
40
46
|
*
|
|
@@ -50,7 +56,7 @@ export interface VTCBadgesShowResponsePayload {
|
|
|
50
56
|
}
|
|
51
57
|
|
|
52
58
|
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
53
|
-
export type { Badge, BadgeCriteria, BadgeDescription, BadgeId, BadgeKind, BadgeName, BadgeState, CardBlobRef, EntryId, Ext, GroupId };
|
|
59
|
+
export type { Award, AwardId, AwardNote, AwardShare, AwardState, Badge, BadgeCriteria, BadgeDescription, BadgeId, BadgeKind, BadgeName, BadgeState, CardBlobRef, EntryId, Ext, GroupCredentialId, GroupId };
|
|
54
60
|
|
|
55
61
|
/** Trust Task type URI. */
|
|
56
62
|
export const TYPE_URI = "https://trusttasks.org/spec/vtc/badges/show/0.1" as const;
|
|
@@ -154,6 +160,14 @@ export const PAYLOAD_SCHEMA = {
|
|
|
154
160
|
"myState": {
|
|
155
161
|
"$ref": "#/$defs/MyState"
|
|
156
162
|
},
|
|
163
|
+
"myAwards": {
|
|
164
|
+
"type": "array",
|
|
165
|
+
"maxItems": 1000,
|
|
166
|
+
"items": {
|
|
167
|
+
"$ref": "#/$defs/Award"
|
|
168
|
+
},
|
|
169
|
+
"description": "The caller's own accepted awards of this badge, newest first, each with `shared` where they show it outside the community — what `vtc/badges/awards/share` and `unshare` name. Absent where the caller holds none. Never another member's award."
|
|
170
|
+
},
|
|
157
171
|
"owners": {
|
|
158
172
|
"type": "array",
|
|
159
173
|
"maxItems": 64,
|
|
@@ -191,6 +205,130 @@ export const PAYLOAD_SCHEMA = {
|
|
|
191
205
|
"type": "string",
|
|
192
206
|
"pattern": "^dir_[A-Za-z0-9_-]{16,64}$"
|
|
193
207
|
},
|
|
208
|
+
"Award": {
|
|
209
|
+
"title": "Award",
|
|
210
|
+
"description": "One giving of a badge to one member. `givenBy` is the giver's directory entry, absent for an award a dynamic badge group's rule made. `note` is shown to the recipient, the giver, the badge's owners and administrators, never to other members. `credentialId` is present on an accepted award of a community badge: the badge credential that evidences it, renewed or re-issued as the badge's regime requires. `shared` is present on an accepted award of a badge its holders may show outside while its holder shares it (vtc/badges/awards/share).",
|
|
211
|
+
"type": "object",
|
|
212
|
+
"additionalProperties": false,
|
|
213
|
+
"required": [
|
|
214
|
+
"awardId",
|
|
215
|
+
"badgeId",
|
|
216
|
+
"entryId",
|
|
217
|
+
"state",
|
|
218
|
+
"offeredAt"
|
|
219
|
+
],
|
|
220
|
+
"properties": {
|
|
221
|
+
"awardId": {
|
|
222
|
+
"$ref": "#/$defs/AwardId"
|
|
223
|
+
},
|
|
224
|
+
"badgeId": {
|
|
225
|
+
"$ref": "#/$defs/BadgeId"
|
|
226
|
+
},
|
|
227
|
+
"entryId": {
|
|
228
|
+
"$ref": "#/$defs/EntryId",
|
|
229
|
+
"description": "The recipient."
|
|
230
|
+
},
|
|
231
|
+
"givenBy": {
|
|
232
|
+
"$ref": "#/$defs/EntryId"
|
|
233
|
+
},
|
|
234
|
+
"note": {
|
|
235
|
+
"$ref": "#/$defs/AwardNote"
|
|
236
|
+
},
|
|
237
|
+
"state": {
|
|
238
|
+
"$ref": "#/$defs/AwardState"
|
|
239
|
+
},
|
|
240
|
+
"offeredAt": {
|
|
241
|
+
"type": "string",
|
|
242
|
+
"format": "date-time"
|
|
243
|
+
},
|
|
244
|
+
"decidedAt": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"format": "date-time",
|
|
247
|
+
"description": "When the recipient accepted or declined, the giver withdrew, the offer expired, or the award was revoked."
|
|
248
|
+
},
|
|
249
|
+
"expiresAt": {
|
|
250
|
+
"type": "string",
|
|
251
|
+
"format": "date-time",
|
|
252
|
+
"description": "When an unanswered offer lapses, where the community expires offers."
|
|
253
|
+
},
|
|
254
|
+
"credentialId": {
|
|
255
|
+
"$ref": "#/$defs/GroupCredentialId"
|
|
256
|
+
},
|
|
257
|
+
"shared": {
|
|
258
|
+
"$ref": "#/$defs/AwardShare"
|
|
259
|
+
},
|
|
260
|
+
"ext": {
|
|
261
|
+
"$ref": "#/$defs/Ext"
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"AwardShare": {
|
|
266
|
+
"title": "AwardShare",
|
|
267
|
+
"description": "Where an accepted award is shown outside the community, by its holder's choice (VTI-BDG-070): the public location that answers a verification of exactly what the credential says, the baked image where the community serves one, and since when. Present only while the holder shares the award; absent once they stop, the award is taken back, the badge is retired or the holder departs. The locations are unguessable and name no other holder (VTI-BDG-071).",
|
|
268
|
+
"type": "object",
|
|
269
|
+
"additionalProperties": false,
|
|
270
|
+
"required": [
|
|
271
|
+
"verificationUrl",
|
|
272
|
+
"since"
|
|
273
|
+
],
|
|
274
|
+
"properties": {
|
|
275
|
+
"verificationUrl": {
|
|
276
|
+
"type": "string",
|
|
277
|
+
"format": "uri",
|
|
278
|
+
"maxLength": 2048,
|
|
279
|
+
"description": "The public location that answers the credential and a verification of it."
|
|
280
|
+
},
|
|
281
|
+
"bakedImageUrl": {
|
|
282
|
+
"type": "string",
|
|
283
|
+
"format": "uri",
|
|
284
|
+
"maxLength": 2048,
|
|
285
|
+
"description": "The badge's picture with the credential baked into it, for a website or an email signature. Absent where the community serves no baked image."
|
|
286
|
+
},
|
|
287
|
+
"since": {
|
|
288
|
+
"type": "string",
|
|
289
|
+
"format": "date-time"
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"AwardState": {
|
|
294
|
+
"title": "AwardState",
|
|
295
|
+
"description": "`offered`: waiting for the recipient. `accepted`: the recipient took it; for a community badge the credential was issued and the membership recorded. `declined`: the recipient declined; nothing was recorded in the group and nothing issued. `withdrawn`: the giver withdrew the offer before a decision. `expired`: the offer lapsed unanswered. `revoked`: taken back after acceptance (VTI-BDG-023).",
|
|
296
|
+
"type": "string",
|
|
297
|
+
"enum": [
|
|
298
|
+
"offered",
|
|
299
|
+
"accepted",
|
|
300
|
+
"declined",
|
|
301
|
+
"withdrawn",
|
|
302
|
+
"expired",
|
|
303
|
+
"revoked"
|
|
304
|
+
]
|
|
305
|
+
},
|
|
306
|
+
"AwardNote": {
|
|
307
|
+
"title": "AwardNote",
|
|
308
|
+
"type": "string",
|
|
309
|
+
"minLength": 1,
|
|
310
|
+
"maxLength": 500,
|
|
311
|
+
"description": "What the award is for, from the giver, shown to the recipient and written as the award's evidence narrative where the badge carries a credential. Plain text; erased with its author (VTI-BDG-090)."
|
|
312
|
+
},
|
|
313
|
+
"BadgeId": {
|
|
314
|
+
"title": "BadgeId",
|
|
315
|
+
"description": "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).",
|
|
316
|
+
"type": "string",
|
|
317
|
+
"pattern": "^bdg_[A-Za-z0-9_-]{16,64}$"
|
|
318
|
+
},
|
|
319
|
+
"AwardId": {
|
|
320
|
+
"title": "AwardId",
|
|
321
|
+
"description": "Opaque identifier of one giving of a badge to one member: `awd_` followed by 16 to 64 base64url characters. Random and unique within the community.",
|
|
322
|
+
"type": "string",
|
|
323
|
+
"pattern": "^awd_[A-Za-z0-9_-]{16,64}$"
|
|
324
|
+
},
|
|
325
|
+
"GroupCredentialId": {
|
|
326
|
+
"title": "GroupCredentialId",
|
|
327
|
+
"description": "Identifier (`id`) of a group membership credential issued to a member. Each renewal issues a new credential with a new identifier. Validity is the community's setting; a community SHOULD default to 30 days, renewed when 10 days remain.",
|
|
328
|
+
"type": "string",
|
|
329
|
+
"minLength": 1,
|
|
330
|
+
"maxLength": 512
|
|
331
|
+
},
|
|
194
332
|
"Badge": {
|
|
195
333
|
"title": "Badge",
|
|
196
334
|
"description": "A badge as a caller who may see it sees it. `groupId` is present exactly when `kind` is `community`. `holderCount` only to callers who may see the badge's holders, counted over holders who have not hidden it (VTI-BDG-030, VTI-BDG-033). `createdBy` is the directory entry of the administrator or member who made it, where they have one.",
|
|
@@ -315,12 +453,6 @@ export const PAYLOAD_SCHEMA = {
|
|
|
315
453
|
"kudos"
|
|
316
454
|
]
|
|
317
455
|
},
|
|
318
|
-
"BadgeId": {
|
|
319
|
-
"title": "BadgeId",
|
|
320
|
-
"description": "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).",
|
|
321
|
-
"type": "string",
|
|
322
|
-
"pattern": "^bdg_[A-Za-z0-9_-]{16,64}$"
|
|
323
|
-
},
|
|
324
456
|
"GroupId": {
|
|
325
457
|
"title": "GroupId",
|
|
326
458
|
"description": "Opaque identifier of a community group: `grp_` followed by 16 to 64 base64url characters. Random and community-scoped; not the group's DID.",
|
|
@@ -425,6 +557,14 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
425
557
|
"myState": {
|
|
426
558
|
"$ref": "#/$defs/MyState"
|
|
427
559
|
},
|
|
560
|
+
"myAwards": {
|
|
561
|
+
"type": "array",
|
|
562
|
+
"maxItems": 1000,
|
|
563
|
+
"items": {
|
|
564
|
+
"$ref": "#/$defs/Award"
|
|
565
|
+
},
|
|
566
|
+
"description": "The caller's own accepted awards of this badge, newest first, each with `shared` where they show it outside the community — what `vtc/badges/awards/share` and `unshare` name. Absent where the caller holds none. Never another member's award."
|
|
567
|
+
},
|
|
428
568
|
"owners": {
|
|
429
569
|
"type": "array",
|
|
430
570
|
"maxItems": 64,
|
|
@@ -462,6 +602,130 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
462
602
|
"type": "string",
|
|
463
603
|
"pattern": "^dir_[A-Za-z0-9_-]{16,64}$"
|
|
464
604
|
},
|
|
605
|
+
"Award": {
|
|
606
|
+
"title": "Award",
|
|
607
|
+
"description": "One giving of a badge to one member. `givenBy` is the giver's directory entry, absent for an award a dynamic badge group's rule made. `note` is shown to the recipient, the giver, the badge's owners and administrators, never to other members. `credentialId` is present on an accepted award of a community badge: the badge credential that evidences it, renewed or re-issued as the badge's regime requires. `shared` is present on an accepted award of a badge its holders may show outside while its holder shares it (vtc/badges/awards/share).",
|
|
608
|
+
"type": "object",
|
|
609
|
+
"additionalProperties": false,
|
|
610
|
+
"required": [
|
|
611
|
+
"awardId",
|
|
612
|
+
"badgeId",
|
|
613
|
+
"entryId",
|
|
614
|
+
"state",
|
|
615
|
+
"offeredAt"
|
|
616
|
+
],
|
|
617
|
+
"properties": {
|
|
618
|
+
"awardId": {
|
|
619
|
+
"$ref": "#/$defs/AwardId"
|
|
620
|
+
},
|
|
621
|
+
"badgeId": {
|
|
622
|
+
"$ref": "#/$defs/BadgeId"
|
|
623
|
+
},
|
|
624
|
+
"entryId": {
|
|
625
|
+
"$ref": "#/$defs/EntryId",
|
|
626
|
+
"description": "The recipient."
|
|
627
|
+
},
|
|
628
|
+
"givenBy": {
|
|
629
|
+
"$ref": "#/$defs/EntryId"
|
|
630
|
+
},
|
|
631
|
+
"note": {
|
|
632
|
+
"$ref": "#/$defs/AwardNote"
|
|
633
|
+
},
|
|
634
|
+
"state": {
|
|
635
|
+
"$ref": "#/$defs/AwardState"
|
|
636
|
+
},
|
|
637
|
+
"offeredAt": {
|
|
638
|
+
"type": "string",
|
|
639
|
+
"format": "date-time"
|
|
640
|
+
},
|
|
641
|
+
"decidedAt": {
|
|
642
|
+
"type": "string",
|
|
643
|
+
"format": "date-time",
|
|
644
|
+
"description": "When the recipient accepted or declined, the giver withdrew, the offer expired, or the award was revoked."
|
|
645
|
+
},
|
|
646
|
+
"expiresAt": {
|
|
647
|
+
"type": "string",
|
|
648
|
+
"format": "date-time",
|
|
649
|
+
"description": "When an unanswered offer lapses, where the community expires offers."
|
|
650
|
+
},
|
|
651
|
+
"credentialId": {
|
|
652
|
+
"$ref": "#/$defs/GroupCredentialId"
|
|
653
|
+
},
|
|
654
|
+
"shared": {
|
|
655
|
+
"$ref": "#/$defs/AwardShare"
|
|
656
|
+
},
|
|
657
|
+
"ext": {
|
|
658
|
+
"$ref": "#/$defs/Ext"
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
},
|
|
662
|
+
"AwardShare": {
|
|
663
|
+
"title": "AwardShare",
|
|
664
|
+
"description": "Where an accepted award is shown outside the community, by its holder's choice (VTI-BDG-070): the public location that answers a verification of exactly what the credential says, the baked image where the community serves one, and since when. Present only while the holder shares the award; absent once they stop, the award is taken back, the badge is retired or the holder departs. The locations are unguessable and name no other holder (VTI-BDG-071).",
|
|
665
|
+
"type": "object",
|
|
666
|
+
"additionalProperties": false,
|
|
667
|
+
"required": [
|
|
668
|
+
"verificationUrl",
|
|
669
|
+
"since"
|
|
670
|
+
],
|
|
671
|
+
"properties": {
|
|
672
|
+
"verificationUrl": {
|
|
673
|
+
"type": "string",
|
|
674
|
+
"format": "uri",
|
|
675
|
+
"maxLength": 2048,
|
|
676
|
+
"description": "The public location that answers the credential and a verification of it."
|
|
677
|
+
},
|
|
678
|
+
"bakedImageUrl": {
|
|
679
|
+
"type": "string",
|
|
680
|
+
"format": "uri",
|
|
681
|
+
"maxLength": 2048,
|
|
682
|
+
"description": "The badge's picture with the credential baked into it, for a website or an email signature. Absent where the community serves no baked image."
|
|
683
|
+
},
|
|
684
|
+
"since": {
|
|
685
|
+
"type": "string",
|
|
686
|
+
"format": "date-time"
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
},
|
|
690
|
+
"AwardState": {
|
|
691
|
+
"title": "AwardState",
|
|
692
|
+
"description": "`offered`: waiting for the recipient. `accepted`: the recipient took it; for a community badge the credential was issued and the membership recorded. `declined`: the recipient declined; nothing was recorded in the group and nothing issued. `withdrawn`: the giver withdrew the offer before a decision. `expired`: the offer lapsed unanswered. `revoked`: taken back after acceptance (VTI-BDG-023).",
|
|
693
|
+
"type": "string",
|
|
694
|
+
"enum": [
|
|
695
|
+
"offered",
|
|
696
|
+
"accepted",
|
|
697
|
+
"declined",
|
|
698
|
+
"withdrawn",
|
|
699
|
+
"expired",
|
|
700
|
+
"revoked"
|
|
701
|
+
]
|
|
702
|
+
},
|
|
703
|
+
"AwardNote": {
|
|
704
|
+
"title": "AwardNote",
|
|
705
|
+
"type": "string",
|
|
706
|
+
"minLength": 1,
|
|
707
|
+
"maxLength": 500,
|
|
708
|
+
"description": "What the award is for, from the giver, shown to the recipient and written as the award's evidence narrative where the badge carries a credential. Plain text; erased with its author (VTI-BDG-090)."
|
|
709
|
+
},
|
|
710
|
+
"BadgeId": {
|
|
711
|
+
"title": "BadgeId",
|
|
712
|
+
"description": "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).",
|
|
713
|
+
"type": "string",
|
|
714
|
+
"pattern": "^bdg_[A-Za-z0-9_-]{16,64}$"
|
|
715
|
+
},
|
|
716
|
+
"AwardId": {
|
|
717
|
+
"title": "AwardId",
|
|
718
|
+
"description": "Opaque identifier of one giving of a badge to one member: `awd_` followed by 16 to 64 base64url characters. Random and unique within the community.",
|
|
719
|
+
"type": "string",
|
|
720
|
+
"pattern": "^awd_[A-Za-z0-9_-]{16,64}$"
|
|
721
|
+
},
|
|
722
|
+
"GroupCredentialId": {
|
|
723
|
+
"title": "GroupCredentialId",
|
|
724
|
+
"description": "Identifier (`id`) of a group membership credential issued to a member. Each renewal issues a new credential with a new identifier. Validity is the community's setting; a community SHOULD default to 30 days, renewed when 10 days remain.",
|
|
725
|
+
"type": "string",
|
|
726
|
+
"minLength": 1,
|
|
727
|
+
"maxLength": 512
|
|
728
|
+
},
|
|
465
729
|
"Badge": {
|
|
466
730
|
"title": "Badge",
|
|
467
731
|
"description": "A badge as a caller who may see it sees it. `groupId` is present exactly when `kind` is `community`. `holderCount` only to callers who may see the badge's holders, counted over holders who have not hidden it (VTI-BDG-030, VTI-BDG-033). `createdBy` is the directory entry of the administrator or member who made it, where they have one.",
|
|
@@ -586,12 +850,6 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
586
850
|
"kudos"
|
|
587
851
|
]
|
|
588
852
|
},
|
|
589
|
-
"BadgeId": {
|
|
590
|
-
"title": "BadgeId",
|
|
591
|
-
"description": "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).",
|
|
592
|
-
"type": "string",
|
|
593
|
-
"pattern": "^bdg_[A-Za-z0-9_-]{16,64}$"
|
|
594
|
-
},
|
|
595
853
|
"GroupId": {
|
|
596
854
|
"title": "GroupId",
|
|
597
855
|
"description": "Opaque identifier of a community group: `grp_` followed by 16 to 64 base64url characters. Random and community-scoped; not the group's DID.",
|
|
@@ -303,7 +303,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
303
303
|
},
|
|
304
304
|
"RuleCondition": {
|
|
305
305
|
"title": "RuleCondition",
|
|
306
|
-
"description": "One test over a verified fact about a member. `fact: role` tests the member's community role; `fact: field` tests an `admin`- or `credential`-sourced directory field named by `field`; `fact: personhood` tests whether a personhood assertion is on file; `fact: joinedAt` tests when they joined. A rule never reads a self-asserted (`member`-sourced) field: a member must not be able to join a group by editing their card.",
|
|
306
|
+
"description": "One test over a verified fact about a member. `fact: role` tests the member's community role; `fact: field` tests an `admin`- or `credential`-sourced directory field named by `field`; `fact: personhood` tests whether a personhood assertion is on file; `fact: joinedAt` tests when they joined. A rule never reads a self-asserted (`member`-sourced) field: a member must not be able to join a group by editing their card. `kudosReceived`, `ideasSelected` and `electionTickets` are counts the community keeps of its own records (kudos the member accepted, ideas of theirs a board selected, elections it issued them a ticket in), compared with `atLeast`; only a badge's group reads them (VTI-BDG-015), and any other group refuses them with `ruleInvalid`.",
|
|
307
307
|
"type": "object",
|
|
308
308
|
"additionalProperties": false,
|
|
309
309
|
"required": [
|
|
@@ -317,7 +317,10 @@ export const PAYLOAD_SCHEMA = {
|
|
|
317
317
|
"role",
|
|
318
318
|
"field",
|
|
319
319
|
"personhood",
|
|
320
|
-
"joinedAt"
|
|
320
|
+
"joinedAt",
|
|
321
|
+
"kudosReceived",
|
|
322
|
+
"ideasSelected",
|
|
323
|
+
"electionTickets"
|
|
321
324
|
]
|
|
322
325
|
},
|
|
323
326
|
"field": {
|
|
@@ -331,9 +334,10 @@ export const PAYLOAD_SCHEMA = {
|
|
|
331
334
|
"oneOf",
|
|
332
335
|
"exists",
|
|
333
336
|
"before",
|
|
334
|
-
"after"
|
|
337
|
+
"after",
|
|
338
|
+
"atLeast"
|
|
335
339
|
],
|
|
336
|
-
"description": "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`."
|
|
340
|
+
"description": "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`; `atLeast` compares a count fact with `count`."
|
|
337
341
|
},
|
|
338
342
|
"value": {
|
|
339
343
|
"anyOf": [
|
|
@@ -354,6 +358,12 @@ export const PAYLOAD_SCHEMA = {
|
|
|
354
358
|
"type": "string",
|
|
355
359
|
"maxLength": 256
|
|
356
360
|
}
|
|
361
|
+
},
|
|
362
|
+
"count": {
|
|
363
|
+
"type": "integer",
|
|
364
|
+
"minimum": 1,
|
|
365
|
+
"maximum": 100000,
|
|
366
|
+
"description": "With `atLeast`: the least a count fact (`kudosReceived`, `ideasSelected`, `electionTickets`) must be. Present exactly when `op` is `atLeast`."
|
|
357
367
|
}
|
|
358
368
|
}
|
|
359
369
|
},
|
|
@@ -583,7 +593,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
583
593
|
},
|
|
584
594
|
"RuleCondition": {
|
|
585
595
|
"title": "RuleCondition",
|
|
586
|
-
"description": "One test over a verified fact about a member. `fact: role` tests the member's community role; `fact: field` tests an `admin`- or `credential`-sourced directory field named by `field`; `fact: personhood` tests whether a personhood assertion is on file; `fact: joinedAt` tests when they joined. A rule never reads a self-asserted (`member`-sourced) field: a member must not be able to join a group by editing their card.",
|
|
596
|
+
"description": "One test over a verified fact about a member. `fact: role` tests the member's community role; `fact: field` tests an `admin`- or `credential`-sourced directory field named by `field`; `fact: personhood` tests whether a personhood assertion is on file; `fact: joinedAt` tests when they joined. A rule never reads a self-asserted (`member`-sourced) field: a member must not be able to join a group by editing their card. `kudosReceived`, `ideasSelected` and `electionTickets` are counts the community keeps of its own records (kudos the member accepted, ideas of theirs a board selected, elections it issued them a ticket in), compared with `atLeast`; only a badge's group reads them (VTI-BDG-015), and any other group refuses them with `ruleInvalid`.",
|
|
587
597
|
"type": "object",
|
|
588
598
|
"additionalProperties": false,
|
|
589
599
|
"required": [
|
|
@@ -597,7 +607,10 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
597
607
|
"role",
|
|
598
608
|
"field",
|
|
599
609
|
"personhood",
|
|
600
|
-
"joinedAt"
|
|
610
|
+
"joinedAt",
|
|
611
|
+
"kudosReceived",
|
|
612
|
+
"ideasSelected",
|
|
613
|
+
"electionTickets"
|
|
601
614
|
]
|
|
602
615
|
},
|
|
603
616
|
"field": {
|
|
@@ -611,9 +624,10 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
611
624
|
"oneOf",
|
|
612
625
|
"exists",
|
|
613
626
|
"before",
|
|
614
|
-
"after"
|
|
627
|
+
"after",
|
|
628
|
+
"atLeast"
|
|
615
629
|
],
|
|
616
|
-
"description": "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`."
|
|
630
|
+
"description": "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`; `atLeast` compares a count fact with `count`."
|
|
617
631
|
},
|
|
618
632
|
"value": {
|
|
619
633
|
"anyOf": [
|
|
@@ -634,6 +648,12 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
634
648
|
"type": "string",
|
|
635
649
|
"maxLength": 256
|
|
636
650
|
}
|
|
651
|
+
},
|
|
652
|
+
"count": {
|
|
653
|
+
"type": "integer",
|
|
654
|
+
"minimum": 1,
|
|
655
|
+
"maximum": 100000,
|
|
656
|
+
"description": "With `atLeast`: the least a count fact (`kudosReceived`, `ideasSelected`, `electionTickets`) must be. Present exactly when `op` is `atLeast`."
|
|
637
657
|
}
|
|
638
658
|
}
|
|
639
659
|
},
|
|
@@ -328,7 +328,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
328
328
|
},
|
|
329
329
|
"RuleCondition": {
|
|
330
330
|
"title": "RuleCondition",
|
|
331
|
-
"description": "One test over a verified fact about a member. `fact: role` tests the member's community role; `fact: field` tests an `admin`- or `credential`-sourced directory field named by `field`; `fact: personhood` tests whether a personhood assertion is on file; `fact: joinedAt` tests when they joined. A rule never reads a self-asserted (`member`-sourced) field: a member must not be able to join a group by editing their card.",
|
|
331
|
+
"description": "One test over a verified fact about a member. `fact: role` tests the member's community role; `fact: field` tests an `admin`- or `credential`-sourced directory field named by `field`; `fact: personhood` tests whether a personhood assertion is on file; `fact: joinedAt` tests when they joined. A rule never reads a self-asserted (`member`-sourced) field: a member must not be able to join a group by editing their card. `kudosReceived`, `ideasSelected` and `electionTickets` are counts the community keeps of its own records (kudos the member accepted, ideas of theirs a board selected, elections it issued them a ticket in), compared with `atLeast`; only a badge's group reads them (VTI-BDG-015), and any other group refuses them with `ruleInvalid`.",
|
|
332
332
|
"type": "object",
|
|
333
333
|
"additionalProperties": false,
|
|
334
334
|
"required": [
|
|
@@ -342,7 +342,10 @@ export const PAYLOAD_SCHEMA = {
|
|
|
342
342
|
"role",
|
|
343
343
|
"field",
|
|
344
344
|
"personhood",
|
|
345
|
-
"joinedAt"
|
|
345
|
+
"joinedAt",
|
|
346
|
+
"kudosReceived",
|
|
347
|
+
"ideasSelected",
|
|
348
|
+
"electionTickets"
|
|
346
349
|
]
|
|
347
350
|
},
|
|
348
351
|
"field": {
|
|
@@ -356,9 +359,10 @@ export const PAYLOAD_SCHEMA = {
|
|
|
356
359
|
"oneOf",
|
|
357
360
|
"exists",
|
|
358
361
|
"before",
|
|
359
|
-
"after"
|
|
362
|
+
"after",
|
|
363
|
+
"atLeast"
|
|
360
364
|
],
|
|
361
|
-
"description": "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`."
|
|
365
|
+
"description": "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`; `atLeast` compares a count fact with `count`."
|
|
362
366
|
},
|
|
363
367
|
"value": {
|
|
364
368
|
"anyOf": [
|
|
@@ -379,6 +383,12 @@ export const PAYLOAD_SCHEMA = {
|
|
|
379
383
|
"type": "string",
|
|
380
384
|
"maxLength": 256
|
|
381
385
|
}
|
|
386
|
+
},
|
|
387
|
+
"count": {
|
|
388
|
+
"type": "integer",
|
|
389
|
+
"minimum": 1,
|
|
390
|
+
"maximum": 100000,
|
|
391
|
+
"description": "With `atLeast`: the least a count fact (`kudosReceived`, `ideasSelected`, `electionTickets`) must be. Present exactly when `op` is `atLeast`."
|
|
382
392
|
}
|
|
383
393
|
}
|
|
384
394
|
},
|
|
@@ -640,7 +650,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
640
650
|
},
|
|
641
651
|
"RuleCondition": {
|
|
642
652
|
"title": "RuleCondition",
|
|
643
|
-
"description": "One test over a verified fact about a member. `fact: role` tests the member's community role; `fact: field` tests an `admin`- or `credential`-sourced directory field named by `field`; `fact: personhood` tests whether a personhood assertion is on file; `fact: joinedAt` tests when they joined. A rule never reads a self-asserted (`member`-sourced) field: a member must not be able to join a group by editing their card.",
|
|
653
|
+
"description": "One test over a verified fact about a member. `fact: role` tests the member's community role; `fact: field` tests an `admin`- or `credential`-sourced directory field named by `field`; `fact: personhood` tests whether a personhood assertion is on file; `fact: joinedAt` tests when they joined. A rule never reads a self-asserted (`member`-sourced) field: a member must not be able to join a group by editing their card. `kudosReceived`, `ideasSelected` and `electionTickets` are counts the community keeps of its own records (kudos the member accepted, ideas of theirs a board selected, elections it issued them a ticket in), compared with `atLeast`; only a badge's group reads them (VTI-BDG-015), and any other group refuses them with `ruleInvalid`.",
|
|
644
654
|
"type": "object",
|
|
645
655
|
"additionalProperties": false,
|
|
646
656
|
"required": [
|
|
@@ -654,7 +664,10 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
654
664
|
"role",
|
|
655
665
|
"field",
|
|
656
666
|
"personhood",
|
|
657
|
-
"joinedAt"
|
|
667
|
+
"joinedAt",
|
|
668
|
+
"kudosReceived",
|
|
669
|
+
"ideasSelected",
|
|
670
|
+
"electionTickets"
|
|
658
671
|
]
|
|
659
672
|
},
|
|
660
673
|
"field": {
|
|
@@ -668,9 +681,10 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
668
681
|
"oneOf",
|
|
669
682
|
"exists",
|
|
670
683
|
"before",
|
|
671
|
-
"after"
|
|
684
|
+
"after",
|
|
685
|
+
"atLeast"
|
|
672
686
|
],
|
|
673
|
-
"description": "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`."
|
|
687
|
+
"description": "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`; `atLeast` compares a count fact with `count`."
|
|
674
688
|
},
|
|
675
689
|
"value": {
|
|
676
690
|
"anyOf": [
|
|
@@ -691,6 +705,12 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
691
705
|
"type": "string",
|
|
692
706
|
"maxLength": 256
|
|
693
707
|
}
|
|
708
|
+
},
|
|
709
|
+
"count": {
|
|
710
|
+
"type": "integer",
|
|
711
|
+
"minimum": 1,
|
|
712
|
+
"maximum": 100000,
|
|
713
|
+
"description": "With `atLeast`: the least a count fact (`kudosReceived`, `ideasSelected`, `electionTickets`) must be. Present exactly when `op` is `atLeast`."
|
|
694
714
|
}
|
|
695
715
|
}
|
|
696
716
|
},
|
|
@@ -321,7 +321,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
321
321
|
},
|
|
322
322
|
"RuleCondition": {
|
|
323
323
|
"title": "RuleCondition",
|
|
324
|
-
"description": "One test over a verified fact about a member. `fact: role` tests the member's community role; `fact: field` tests an `admin`- or `credential`-sourced directory field named by `field`; `fact: personhood` tests whether a personhood assertion is on file; `fact: joinedAt` tests when they joined. A rule never reads a self-asserted (`member`-sourced) field: a member must not be able to join a group by editing their card.",
|
|
324
|
+
"description": "One test over a verified fact about a member. `fact: role` tests the member's community role; `fact: field` tests an `admin`- or `credential`-sourced directory field named by `field`; `fact: personhood` tests whether a personhood assertion is on file; `fact: joinedAt` tests when they joined. A rule never reads a self-asserted (`member`-sourced) field: a member must not be able to join a group by editing their card. `kudosReceived`, `ideasSelected` and `electionTickets` are counts the community keeps of its own records (kudos the member accepted, ideas of theirs a board selected, elections it issued them a ticket in), compared with `atLeast`; only a badge's group reads them (VTI-BDG-015), and any other group refuses them with `ruleInvalid`.",
|
|
325
325
|
"type": "object",
|
|
326
326
|
"additionalProperties": false,
|
|
327
327
|
"required": [
|
|
@@ -335,7 +335,10 @@ export const PAYLOAD_SCHEMA = {
|
|
|
335
335
|
"role",
|
|
336
336
|
"field",
|
|
337
337
|
"personhood",
|
|
338
|
-
"joinedAt"
|
|
338
|
+
"joinedAt",
|
|
339
|
+
"kudosReceived",
|
|
340
|
+
"ideasSelected",
|
|
341
|
+
"electionTickets"
|
|
339
342
|
]
|
|
340
343
|
},
|
|
341
344
|
"field": {
|
|
@@ -349,9 +352,10 @@ export const PAYLOAD_SCHEMA = {
|
|
|
349
352
|
"oneOf",
|
|
350
353
|
"exists",
|
|
351
354
|
"before",
|
|
352
|
-
"after"
|
|
355
|
+
"after",
|
|
356
|
+
"atLeast"
|
|
353
357
|
],
|
|
354
|
-
"description": "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`."
|
|
358
|
+
"description": "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`; `atLeast` compares a count fact with `count`."
|
|
355
359
|
},
|
|
356
360
|
"value": {
|
|
357
361
|
"anyOf": [
|
|
@@ -372,6 +376,12 @@ export const PAYLOAD_SCHEMA = {
|
|
|
372
376
|
"type": "string",
|
|
373
377
|
"maxLength": 256
|
|
374
378
|
}
|
|
379
|
+
},
|
|
380
|
+
"count": {
|
|
381
|
+
"type": "integer",
|
|
382
|
+
"minimum": 1,
|
|
383
|
+
"maximum": 100000,
|
|
384
|
+
"description": "With `atLeast`: the least a count fact (`kudosReceived`, `ideasSelected`, `electionTickets`) must be. Present exactly when `op` is `atLeast`."
|
|
375
385
|
}
|
|
376
386
|
}
|
|
377
387
|
},
|
|
@@ -631,7 +641,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
631
641
|
},
|
|
632
642
|
"RuleCondition": {
|
|
633
643
|
"title": "RuleCondition",
|
|
634
|
-
"description": "One test over a verified fact about a member. `fact: role` tests the member's community role; `fact: field` tests an `admin`- or `credential`-sourced directory field named by `field`; `fact: personhood` tests whether a personhood assertion is on file; `fact: joinedAt` tests when they joined. A rule never reads a self-asserted (`member`-sourced) field: a member must not be able to join a group by editing their card.",
|
|
644
|
+
"description": "One test over a verified fact about a member. `fact: role` tests the member's community role; `fact: field` tests an `admin`- or `credential`-sourced directory field named by `field`; `fact: personhood` tests whether a personhood assertion is on file; `fact: joinedAt` tests when they joined. A rule never reads a self-asserted (`member`-sourced) field: a member must not be able to join a group by editing their card. `kudosReceived`, `ideasSelected` and `electionTickets` are counts the community keeps of its own records (kudos the member accepted, ideas of theirs a board selected, elections it issued them a ticket in), compared with `atLeast`; only a badge's group reads them (VTI-BDG-015), and any other group refuses them with `ruleInvalid`.",
|
|
635
645
|
"type": "object",
|
|
636
646
|
"additionalProperties": false,
|
|
637
647
|
"required": [
|
|
@@ -645,7 +655,10 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
645
655
|
"role",
|
|
646
656
|
"field",
|
|
647
657
|
"personhood",
|
|
648
|
-
"joinedAt"
|
|
658
|
+
"joinedAt",
|
|
659
|
+
"kudosReceived",
|
|
660
|
+
"ideasSelected",
|
|
661
|
+
"electionTickets"
|
|
649
662
|
]
|
|
650
663
|
},
|
|
651
664
|
"field": {
|
|
@@ -659,9 +672,10 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
659
672
|
"oneOf",
|
|
660
673
|
"exists",
|
|
661
674
|
"before",
|
|
662
|
-
"after"
|
|
675
|
+
"after",
|
|
676
|
+
"atLeast"
|
|
663
677
|
],
|
|
664
|
-
"description": "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`."
|
|
678
|
+
"description": "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`; `atLeast` compares a count fact with `count`."
|
|
665
679
|
},
|
|
666
680
|
"value": {
|
|
667
681
|
"anyOf": [
|
|
@@ -682,6 +696,12 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
682
696
|
"type": "string",
|
|
683
697
|
"maxLength": 256
|
|
684
698
|
}
|
|
699
|
+
},
|
|
700
|
+
"count": {
|
|
701
|
+
"type": "integer",
|
|
702
|
+
"minimum": 1,
|
|
703
|
+
"maximum": 100000,
|
|
704
|
+
"description": "With `atLeast`: the least a count fact (`kudosReceived`, `ideasSelected`, `electionTickets`) must be. Present exactly when `op` is `atLeast`."
|
|
685
705
|
}
|
|
686
706
|
}
|
|
687
707
|
},
|