@openvtc/trust-tasks 0.28.17 → 0.28.19
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 +68 -0
- package/dist/_shared/components.d.ts +254 -1
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +87 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +87 -0
- package/dist/index.js.map +1 -1
- package/dist/vta/collection/_shared/0.1/collection.d.ts +2 -2
- package/dist/vta/collection/_shared/0.1/collection.d.ts.map +1 -1
- package/dist/vta/collection/list/0.1/payload.d.ts +4 -4
- package/dist/vta/collection/list/0.1/payload.js +2 -2
- package/dist/vta/collection/list/0.1/payload.js.map +1 -1
- package/dist/vta/collection/settings/set/0.1/payload.d.ts +469 -0
- package/dist/vta/collection/settings/set/0.1/payload.d.ts.map +1 -0
- package/dist/vta/collection/settings/set/0.1/payload.js +275 -0
- package/dist/vta/collection/settings/set/0.1/payload.js.map +1 -0
- package/dist/vta/collection/settings/show/0.1/payload.d.ts +437 -0
- package/dist/vta/collection/settings/show/0.1/payload.d.ts.map +1 -0
- package/dist/vta/collection/settings/show/0.1/payload.js +260 -0
- package/dist/vta/collection/settings/show/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/_shared/0.1/badge.d.ts +22 -0
- package/dist/vtc/badges/_shared/0.1/badge.d.ts.map +1 -0
- package/dist/vtc/badges/_shared/0.1/badge.js +6 -0
- package/dist/vtc/badges/_shared/0.1/badge.js.map +1 -0
- package/dist/vtc/badges/awards/list/0.1/payload.d.ts +1228 -0
- package/dist/vtc/badges/awards/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/awards/list/0.1/payload.js +699 -0
- package/dist/vtc/badges/awards/list/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/awards/offer/0.1/payload.d.ts +793 -0
- package/dist/vtc/badges/awards/offer/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/awards/offer/0.1/payload.js +461 -0
- package/dist/vtc/badges/awards/offer/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/awards/revoke/0.1/payload.d.ts +605 -0
- package/dist/vtc/badges/awards/revoke/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/awards/revoke/0.1/payload.js +351 -0
- package/dist/vtc/badges/awards/revoke/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/awards/withdraw/0.1/payload.d.ts +605 -0
- package/dist/vtc/badges/awards/withdraw/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/awards/withdraw/0.1/payload.js +351 -0
- package/dist/vtc/badges/awards/withdraw/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/create/0.1/payload.d.ts +1829 -0
- package/dist/vtc/badges/create/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/create/0.1/payload.js +1051 -0
- package/dist/vtc/badges/create/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/holders/list/0.1/payload.d.ts +984 -0
- package/dist/vtc/badges/holders/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/holders/list/0.1/payload.js +555 -0
- package/dist/vtc/badges/holders/list/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/images/get/0.1/payload.d.ts +454 -0
- package/dist/vtc/badges/images/get/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/images/get/0.1/payload.js +266 -0
- package/dist/vtc/badges/images/get/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/images/upload/0.1/payload.d.ts +455 -0
- package/dist/vtc/badges/images/upload/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/images/upload/0.1/payload.js +276 -0
- package/dist/vtc/badges/images/upload/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/kudos/give/0.1/payload.d.ts +613 -0
- package/dist/vtc/badges/kudos/give/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/kudos/give/0.1/payload.js +353 -0
- package/dist/vtc/badges/kudos/give/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/kudos/list/0.1/payload.d.ts +1766 -0
- package/dist/vtc/badges/kudos/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/kudos/list/0.1/payload.js +995 -0
- package/dist/vtc/badges/kudos/list/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/list/0.1/payload.d.ts +1096 -0
- package/dist/vtc/badges/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/list/0.1/payload.js +617 -0
- package/dist/vtc/badges/list/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/mine/accept/0.1/payload.d.ts +1376 -0
- package/dist/vtc/badges/mine/accept/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/mine/accept/0.1/payload.js +799 -0
- package/dist/vtc/badges/mine/accept/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/mine/arrange/0.1/payload.d.ts +1217 -0
- package/dist/vtc/badges/mine/arrange/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/mine/arrange/0.1/payload.js +698 -0
- package/dist/vtc/badges/mine/arrange/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/mine/decline/0.1/payload.d.ts +589 -0
- package/dist/vtc/badges/mine/decline/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/mine/decline/0.1/payload.js +344 -0
- package/dist/vtc/badges/mine/decline/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/mine/hide/0.1/payload.d.ts +1093 -0
- package/dist/vtc/badges/mine/hide/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/mine/hide/0.1/payload.js +630 -0
- package/dist/vtc/badges/mine/hide/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/mine/list/0.1/payload.d.ts +1897 -0
- package/dist/vtc/badges/mine/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/mine/list/0.1/payload.js +1087 -0
- package/dist/vtc/badges/mine/list/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/mine/show/0.1/payload.d.ts +1093 -0
- package/dist/vtc/badges/mine/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/mine/show/0.1/payload.js +630 -0
- package/dist/vtc/badges/mine/show/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/promote/0.1/payload.d.ts +1757 -0
- package/dist/vtc/badges/promote/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/promote/0.1/payload.js +1018 -0
- package/dist/vtc/badges/promote/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/retire/0.1/payload.d.ts +904 -0
- package/dist/vtc/badges/retire/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/retire/0.1/payload.js +524 -0
- package/dist/vtc/badges/retire/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/settings/show/0.1/payload.d.ts +731 -0
- package/dist/vtc/badges/settings/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/settings/show/0.1/payload.js +421 -0
- package/dist/vtc/badges/settings/show/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/settings/update/0.1/payload.d.ts +775 -0
- package/dist/vtc/badges/settings/update/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/settings/update/0.1/payload.js +444 -0
- package/dist/vtc/badges/settings/update/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/show/0.1/payload.d.ts +1056 -0
- package/dist/vtc/badges/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/show/0.1/payload.js +613 -0
- package/dist/vtc/badges/show/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/update/0.1/payload.d.ts +1033 -0
- package/dist/vtc/badges/update/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/update/0.1/payload.js +588 -0
- package/dist/vtc/badges/update/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/wall/show/0.1/payload.d.ts +1099 -0
- package/dist/vtc/badges/wall/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/wall/show/0.1/payload.js +634 -0
- package/dist/vtc/badges/wall/show/0.1/payload.js.map +1 -0
- package/dist/vtc/groups/create/0.1/payload.d.ts +42 -2
- package/dist/vtc/groups/create/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/create/0.1/payload.js +20 -0
- package/dist/vtc/groups/create/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/list/0.1/payload.d.ts +42 -2
- package/dist/vtc/groups/list/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/list/0.1/payload.js +20 -0
- package/dist/vtc/groups/list/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/list/0.2/payload.d.ts +42 -2
- package/dist/vtc/groups/list/0.2/payload.d.ts.map +1 -1
- package/dist/vtc/groups/list/0.2/payload.js +20 -0
- package/dist/vtc/groups/list/0.2/payload.js.map +1 -1
- package/dist/vtc/groups/show/0.1/payload.d.ts +42 -2
- package/dist/vtc/groups/show/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/show/0.1/payload.js +20 -0
- package/dist/vtc/groups/show/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/update/0.1/payload.d.ts +42 -2
- package/dist/vtc/groups/update/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/update/0.1/payload.js +20 -0
- package/dist/vtc/groups/update/0.1/payload.js.map +1 -1
- package/dist/vtn/registry/check/0.1/payload.d.ts +528 -0
- package/dist/vtn/registry/check/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/registry/check/0.1/payload.js +282 -0
- package/dist/vtn/registry/check/0.1/payload.js.map +1 -0
- package/dist/vtn/registry/status/0.1/payload.d.ts +736 -0
- package/dist/vtn/registry/status/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/registry/status/0.1/payload.js +421 -0
- package/dist/vtn/registry/status/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +254 -1
- package/src/index.ts +87 -0
- package/src/vta/collection/_shared/0.1/collection.ts +2 -2
- package/src/vta/collection/list/0.1/payload.ts +2 -2
- package/src/vta/collection/settings/set/0.1/payload.ts +319 -0
- package/src/vta/collection/settings/show/0.1/payload.ts +296 -0
- package/src/vtc/badges/_shared/0.1/badge.ts +23 -0
- package/src/vtc/badges/awards/list/0.1/payload.ts +768 -0
- package/src/vtc/badges/awards/offer/0.1/payload.ts +530 -0
- package/src/vtc/badges/awards/revoke/0.1/payload.ts +395 -0
- package/src/vtc/badges/awards/withdraw/0.1/payload.ts +395 -0
- package/src/vtc/badges/create/0.1/payload.ts +1137 -0
- package/src/vtc/badges/holders/list/0.1/payload.ts +628 -0
- package/src/vtc/badges/images/get/0.1/payload.ts +311 -0
- package/src/vtc/badges/images/upload/0.1/payload.ts +324 -0
- package/src/vtc/badges/kudos/give/0.1/payload.ts +401 -0
- package/src/vtc/badges/kudos/list/0.1/payload.ts +1080 -0
- package/src/vtc/badges/list/0.1/payload.ts +695 -0
- package/src/vtc/badges/mine/accept/0.1/payload.ts +840 -0
- package/src/vtc/badges/mine/arrange/0.1/payload.ts +768 -0
- package/src/vtc/badges/mine/decline/0.1/payload.ts +384 -0
- package/src/vtc/badges/mine/hide/0.1/payload.ts +670 -0
- package/src/vtc/badges/mine/list/0.1/payload.ts +1153 -0
- package/src/vtc/badges/mine/show/0.1/payload.ts +670 -0
- package/src/vtc/badges/promote/0.1/payload.ts +1088 -0
- package/src/vtc/badges/retire/0.1/payload.ts +565 -0
- package/src/vtc/badges/settings/show/0.1/payload.ts +457 -0
- package/src/vtc/badges/settings/update/0.1/payload.ts +490 -0
- package/src/vtc/badges/show/0.1/payload.ts +675 -0
- package/src/vtc/badges/update/0.1/payload.ts +656 -0
- package/src/vtc/badges/wall/show/0.1/payload.ts +684 -0
- package/src/vtc/groups/create/0.1/payload.ts +22 -2
- package/src/vtc/groups/list/0.1/payload.ts +22 -2
- package/src/vtc/groups/list/0.2/payload.ts +22 -2
- package/src/vtc/groups/show/0.1/payload.ts +22 -2
- package/src/vtc/groups/update/0.1/payload.ts +22 -2
- package/src/vtn/registry/check/0.1/payload.ts +365 -0
- package/src/vtn/registry/status/0.1/payload.ts +502 -0
|
@@ -0,0 +1,684 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/badges/wall/show/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Badge, BadgeCriteria, BadgeDescription, BadgeId, BadgeKind, BadgeName, BadgeState, CardBlobRef, EntryId, Ext, GroupId, WallEntry, WallVisibility } from "../../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A member's badge wall as a viewer sees it, answered only where the directory shows the viewer that member's card and the member shows their badges. The outer document members are owned by the framework — SPEC §6.3.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTCBadgesWallShowPayload {
|
|
13
|
+
/**
|
|
14
|
+
* The member whose wall to read. The caller's own entry reads their own wall.
|
|
15
|
+
*/
|
|
16
|
+
entryId: EntryId;
|
|
17
|
+
ext?: Ext;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The success response to a vtc/badges/wall/show/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/wall/show/0.1#response.
|
|
21
|
+
*/
|
|
22
|
+
export interface VTCBadgesWallShowResponsePayload {
|
|
23
|
+
/**
|
|
24
|
+
* The badges the member holds and shows: pinned first, then in the member's own order (VTI-BDG-032). Hidden badges are never here (VTI-BDG-030).
|
|
25
|
+
*
|
|
26
|
+
* @maxItems 500
|
|
27
|
+
*/
|
|
28
|
+
entries: WallEntry[];
|
|
29
|
+
/**
|
|
30
|
+
* The member's own setting (VTI-BDG-031). A viewer who is not the member only ever sees `members`.
|
|
31
|
+
*/
|
|
32
|
+
visibility: WallVisibility;
|
|
33
|
+
/**
|
|
34
|
+
* The member's kudos total: accepted, not hidden kudos awards (VTI-BDG-043). Present exactly when the community's badge settings have `showKudosTotals` true; absent otherwise, never zero in its place.
|
|
35
|
+
*/
|
|
36
|
+
kudosTotal?: number;
|
|
37
|
+
ext?: Ext;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
41
|
+
export type { Badge, BadgeCriteria, BadgeDescription, BadgeId, BadgeKind, BadgeName, BadgeState, CardBlobRef, EntryId, Ext, GroupId, WallEntry, WallVisibility };
|
|
42
|
+
|
|
43
|
+
/** Trust Task type URI. */
|
|
44
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/badges/wall/show/0.1" as const;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The earlier version of this specification that this one declares it
|
|
48
|
+
* extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
|
|
49
|
+
* `null`. Only the direct declaration — follow the chain with
|
|
50
|
+
* `extendsChain` / `readForSpec`.
|
|
51
|
+
*/
|
|
52
|
+
export const EXTENDS: string | null = null;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Why this version is deprecated, or `null` while it is current. A
|
|
56
|
+
* superseded or retired version is still supported, and is withdrawn from
|
|
57
|
+
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
58
|
+
* Versions").
|
|
59
|
+
*/
|
|
60
|
+
export const DEPRECATION: string | null = null;
|
|
61
|
+
|
|
62
|
+
/** Stable alias for this specification's request payload shape. */
|
|
63
|
+
export type Payload = VTCBadgesWallShowPayload;
|
|
64
|
+
|
|
65
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
66
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/badges/wall/show/0.1#response" as const;
|
|
67
|
+
|
|
68
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
69
|
+
export type Response = VTCBadgesWallShowResponsePayload;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* This specification's payload schema, as a value.
|
|
73
|
+
*
|
|
74
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
75
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
76
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
77
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
78
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
79
|
+
*/
|
|
80
|
+
export const PAYLOAD_SCHEMA = {
|
|
81
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
82
|
+
"$id": "https://trusttasks.org/spec/vtc/badges/wall/show/0.1",
|
|
83
|
+
"title": "VTC Badges — Wall — Show — payload",
|
|
84
|
+
"description": "A member's badge wall as a viewer sees it, answered only where the directory shows the viewer that member's card and the member shows their badges. The outer document members are owned by the framework — SPEC §6.3.",
|
|
85
|
+
"type": "object",
|
|
86
|
+
"additionalProperties": false,
|
|
87
|
+
"required": [
|
|
88
|
+
"entryId"
|
|
89
|
+
],
|
|
90
|
+
"properties": {
|
|
91
|
+
"entryId": {
|
|
92
|
+
"$ref": "#/$defs/EntryId",
|
|
93
|
+
"description": "The member whose wall to read. The caller's own entry reads their own wall."
|
|
94
|
+
},
|
|
95
|
+
"ext": {
|
|
96
|
+
"$ref": "#/$defs/Ext"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"$defs": {
|
|
100
|
+
"Response": {
|
|
101
|
+
"$anchor": "response",
|
|
102
|
+
"title": "VTC Badges — Wall — Show — response payload",
|
|
103
|
+
"description": "The success response to a vtc/badges/wall/show/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/wall/show/0.1#response.",
|
|
104
|
+
"type": "object",
|
|
105
|
+
"additionalProperties": false,
|
|
106
|
+
"required": [
|
|
107
|
+
"entries",
|
|
108
|
+
"visibility"
|
|
109
|
+
],
|
|
110
|
+
"properties": {
|
|
111
|
+
"entries": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"maxItems": 500,
|
|
114
|
+
"description": "The badges the member holds and shows: pinned first, then in the member's own order (VTI-BDG-032). Hidden badges are never here (VTI-BDG-030).",
|
|
115
|
+
"items": {
|
|
116
|
+
"$ref": "#/$defs/WallEntry"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"visibility": {
|
|
120
|
+
"$ref": "#/$defs/WallVisibility",
|
|
121
|
+
"description": "The member's own setting (VTI-BDG-031). A viewer who is not the member only ever sees `members`."
|
|
122
|
+
},
|
|
123
|
+
"kudosTotal": {
|
|
124
|
+
"type": "integer",
|
|
125
|
+
"minimum": 0,
|
|
126
|
+
"description": "The member's kudos total: accepted, not hidden kudos awards (VTI-BDG-043). Present exactly when the community's badge settings have `showKudosTotals` true; absent otherwise, never zero in its place."
|
|
127
|
+
},
|
|
128
|
+
"ext": {
|
|
129
|
+
"$ref": "#/$defs/Ext"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"Ext": {
|
|
134
|
+
"title": "Ext",
|
|
135
|
+
"description": "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.",
|
|
136
|
+
"type": "object",
|
|
137
|
+
"minProperties": 1,
|
|
138
|
+
"additionalProperties": true,
|
|
139
|
+
"propertyNames": {
|
|
140
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"WallVisibility": {
|
|
144
|
+
"title": "WallVisibility",
|
|
145
|
+
"description": "Who sees a member's badges, the member's own setting (VTI-BDG-031). `members`: every active member the directory shows their card to. `nobody`: no one but the member. Never wider than the directory shows the card.",
|
|
146
|
+
"type": "string",
|
|
147
|
+
"enum": [
|
|
148
|
+
"members",
|
|
149
|
+
"nobody"
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
"WallEntry": {
|
|
153
|
+
"title": "WallEntry",
|
|
154
|
+
"description": "One badge on a member's wall as a viewer sees it: the badge, how many times the member holds it, since when, and whether the member pinned it. Hidden badges are never wall entries (VTI-BDG-030).",
|
|
155
|
+
"type": "object",
|
|
156
|
+
"additionalProperties": false,
|
|
157
|
+
"required": [
|
|
158
|
+
"badge",
|
|
159
|
+
"count",
|
|
160
|
+
"since",
|
|
161
|
+
"pinned"
|
|
162
|
+
],
|
|
163
|
+
"properties": {
|
|
164
|
+
"badge": {
|
|
165
|
+
"$ref": "#/$defs/Badge"
|
|
166
|
+
},
|
|
167
|
+
"count": {
|
|
168
|
+
"type": "integer",
|
|
169
|
+
"minimum": 1,
|
|
170
|
+
"description": "Accepted awards of this badge the member holds."
|
|
171
|
+
},
|
|
172
|
+
"since": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"format": "date-time",
|
|
175
|
+
"description": "When the member first accepted this badge."
|
|
176
|
+
},
|
|
177
|
+
"latestAt": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"format": "date-time",
|
|
180
|
+
"description": "When the member last accepted an award of this badge."
|
|
181
|
+
},
|
|
182
|
+
"pinned": {
|
|
183
|
+
"type": "boolean"
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"Badge": {
|
|
188
|
+
"title": "Badge",
|
|
189
|
+
"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.",
|
|
190
|
+
"type": "object",
|
|
191
|
+
"additionalProperties": false,
|
|
192
|
+
"required": [
|
|
193
|
+
"badgeId",
|
|
194
|
+
"kind",
|
|
195
|
+
"name",
|
|
196
|
+
"description",
|
|
197
|
+
"image",
|
|
198
|
+
"repeatable",
|
|
199
|
+
"listed",
|
|
200
|
+
"state",
|
|
201
|
+
"createdAt"
|
|
202
|
+
],
|
|
203
|
+
"properties": {
|
|
204
|
+
"badgeId": {
|
|
205
|
+
"$ref": "#/$defs/BadgeId"
|
|
206
|
+
},
|
|
207
|
+
"kind": {
|
|
208
|
+
"$ref": "#/$defs/BadgeKind"
|
|
209
|
+
},
|
|
210
|
+
"name": {
|
|
211
|
+
"$ref": "#/$defs/BadgeName"
|
|
212
|
+
},
|
|
213
|
+
"description": {
|
|
214
|
+
"$ref": "#/$defs/BadgeDescription"
|
|
215
|
+
},
|
|
216
|
+
"criteria": {
|
|
217
|
+
"$ref": "#/$defs/BadgeCriteria"
|
|
218
|
+
},
|
|
219
|
+
"image": {
|
|
220
|
+
"$ref": "#/$defs/CardBlobRef",
|
|
221
|
+
"description": "The badge's picture, re-encoded and stored by the community (vtc/badges/images/upload), read with vtc/badges/images/get. `url` and `urlExpiresAt` MAY appear in a projection as for a card picture; for a badge whose holders may show it outside, `url` MAY be the picture's stable public location."
|
|
222
|
+
},
|
|
223
|
+
"repeatable": {
|
|
224
|
+
"type": "boolean",
|
|
225
|
+
"description": "Whether one member may hold the badge more than once, each giving an award of its own (VTI-BDG-022). Always true for a kudos badge."
|
|
226
|
+
},
|
|
227
|
+
"requestable": {
|
|
228
|
+
"type": "boolean",
|
|
229
|
+
"description": "Community badges only. Whether a member may ask for it: a request to join its badge group, decided by its owners (VTI-BDG-014). Absent reads as false."
|
|
230
|
+
},
|
|
231
|
+
"listed": {
|
|
232
|
+
"type": "boolean",
|
|
233
|
+
"description": "Whether members who do not hold the badge see it in the community's badge list. An unlisted badge is seen by its holders, its owners and administrators."
|
|
234
|
+
},
|
|
235
|
+
"shareableOutside": {
|
|
236
|
+
"type": "boolean",
|
|
237
|
+
"description": "Community badges only. Whether its holders may show it outside the community, which decides the credential's regime: short-lived and renewed with no status when false, long-lived with a status in the community's own status set when true (VTI-BDG-061, VTI-BDG-062). Absent reads as false."
|
|
238
|
+
},
|
|
239
|
+
"groupId": {
|
|
240
|
+
"$ref": "#/$defs/GroupId",
|
|
241
|
+
"description": "The badge group that backs a community badge: its managers are the badge's owners, its members the holders, its DID the credential's issuer."
|
|
242
|
+
},
|
|
243
|
+
"state": {
|
|
244
|
+
"$ref": "#/$defs/BadgeState"
|
|
245
|
+
},
|
|
246
|
+
"holderCount": {
|
|
247
|
+
"type": "integer",
|
|
248
|
+
"minimum": 0,
|
|
249
|
+
"description": "Holders who show the badge. Only to callers who may see the holders."
|
|
250
|
+
},
|
|
251
|
+
"createdAt": {
|
|
252
|
+
"type": "string",
|
|
253
|
+
"format": "date-time"
|
|
254
|
+
},
|
|
255
|
+
"createdBy": {
|
|
256
|
+
"$ref": "#/$defs/EntryId"
|
|
257
|
+
},
|
|
258
|
+
"updatedAt": {
|
|
259
|
+
"type": "string",
|
|
260
|
+
"format": "date-time"
|
|
261
|
+
},
|
|
262
|
+
"retiredAt": {
|
|
263
|
+
"type": "string",
|
|
264
|
+
"format": "date-time"
|
|
265
|
+
},
|
|
266
|
+
"ext": {
|
|
267
|
+
"$ref": "#/$defs/Ext",
|
|
268
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1. An extension member MUST NOT carry authority."
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
"BadgeState": {
|
|
273
|
+
"title": "BadgeState",
|
|
274
|
+
"description": "`active`: may be given and shown. `retired`: kept for its holders' own history, never given, never shown to members who do not hold it (VTI-BDG-005).",
|
|
275
|
+
"type": "string",
|
|
276
|
+
"enum": [
|
|
277
|
+
"active",
|
|
278
|
+
"retired"
|
|
279
|
+
]
|
|
280
|
+
},
|
|
281
|
+
"BadgeCriteria": {
|
|
282
|
+
"title": "BadgeCriteria",
|
|
283
|
+
"type": "string",
|
|
284
|
+
"minLength": 1,
|
|
285
|
+
"maxLength": 1000,
|
|
286
|
+
"description": "How the badge is earned, shown to members and written into the credential's Achievement as its criteria narrative. Plain text."
|
|
287
|
+
},
|
|
288
|
+
"BadgeDescription": {
|
|
289
|
+
"title": "BadgeDescription",
|
|
290
|
+
"type": "string",
|
|
291
|
+
"minLength": 1,
|
|
292
|
+
"maxLength": 1000,
|
|
293
|
+
"description": "What the badge is for. Plain text; a reader MUST NOT treat it as instructions."
|
|
294
|
+
},
|
|
295
|
+
"BadgeName": {
|
|
296
|
+
"title": "BadgeName",
|
|
297
|
+
"type": "string",
|
|
298
|
+
"minLength": 1,
|
|
299
|
+
"maxLength": 64,
|
|
300
|
+
"description": "The badge's name, shown on the wall and written into the credential's Achievement. Plain text; a reader MUST NOT treat it as instructions."
|
|
301
|
+
},
|
|
302
|
+
"BadgeKind": {
|
|
303
|
+
"title": "BadgeKind",
|
|
304
|
+
"description": "`community`: defined by holders of `vtc.badges.admin`, given by its owners (its badge group's managers), may carry a credential. `kudos`: made by a member the community's badge settings admit, given by any active member to any other, never a credential. Fixed for the badge's life; a kudos badge becomes a community badge only by promotion (vtc/badges/promote).",
|
|
305
|
+
"type": "string",
|
|
306
|
+
"enum": [
|
|
307
|
+
"community",
|
|
308
|
+
"kudos"
|
|
309
|
+
]
|
|
310
|
+
},
|
|
311
|
+
"BadgeId": {
|
|
312
|
+
"title": "BadgeId",
|
|
313
|
+
"description": "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).",
|
|
314
|
+
"type": "string",
|
|
315
|
+
"pattern": "^bdg_[A-Za-z0-9_-]{16,64}$"
|
|
316
|
+
},
|
|
317
|
+
"EntryId": {
|
|
318
|
+
"title": "EntryId",
|
|
319
|
+
"description": "Opaque identifier of one directory entry: `dir_` followed by 16 to 64 base64url characters. Random, scoped to one community, and stable for the life of the membership — it survives a rotation of the member's DID, which is why groups, notes and cards are keyed by it. It MUST NOT be derived from, and MUST NOT reveal, any DID of the member, and the same person's entries in two communities MUST NOT share one. Compared by exact string equality.",
|
|
320
|
+
"type": "string",
|
|
321
|
+
"pattern": "^dir_[A-Za-z0-9_-]{16,64}$"
|
|
322
|
+
},
|
|
323
|
+
"GroupId": {
|
|
324
|
+
"title": "GroupId",
|
|
325
|
+
"description": "Opaque identifier of a community group: `grp_` followed by 16 to 64 base64url characters. Random and community-scoped; not the group's DID.",
|
|
326
|
+
"type": "string",
|
|
327
|
+
"pattern": "^grp_[A-Za-z0-9_-]{16,64}$"
|
|
328
|
+
},
|
|
329
|
+
"CardBlobRef": {
|
|
330
|
+
"title": "CardBlobRef",
|
|
331
|
+
"description": "A content-addressed image held in the community's blob store — an avatar or an `image` field. At most 256 KiB, images only, re-encoded by the community on upload (vtc/directory/images/upload: metadata stripped, dimensions capped) so its digest does not link the member across communities. A viewer reads the bytes with vtc/directory/images/get, which answers only where the same projection shows the value. `url` and `urlExpiresAt` MAY appear in a projection: a short-lived URL the community checks against the same projection, so a member-only image is never a public URL. A community that does not offer one leaves both out.",
|
|
332
|
+
"type": "object",
|
|
333
|
+
"additionalProperties": false,
|
|
334
|
+
"required": [
|
|
335
|
+
"sha256",
|
|
336
|
+
"mediaType"
|
|
337
|
+
],
|
|
338
|
+
"properties": {
|
|
339
|
+
"sha256": {
|
|
340
|
+
"type": "string",
|
|
341
|
+
"pattern": "^[0-9a-f]{64}$",
|
|
342
|
+
"description": "Lowercase hex SHA-256 of the stored, re-encoded bytes."
|
|
343
|
+
},
|
|
344
|
+
"mediaType": {
|
|
345
|
+
"type": "string",
|
|
346
|
+
"enum": [
|
|
347
|
+
"image/png",
|
|
348
|
+
"image/jpeg",
|
|
349
|
+
"image/webp",
|
|
350
|
+
"image/avif"
|
|
351
|
+
],
|
|
352
|
+
"description": "Media type of the stored bytes."
|
|
353
|
+
},
|
|
354
|
+
"size": {
|
|
355
|
+
"type": "integer",
|
|
356
|
+
"minimum": 1,
|
|
357
|
+
"maximum": 262144,
|
|
358
|
+
"description": "Size in bytes of the stored bytes."
|
|
359
|
+
},
|
|
360
|
+
"url": {
|
|
361
|
+
"type": "string",
|
|
362
|
+
"format": "uri",
|
|
363
|
+
"maxLength": 2048,
|
|
364
|
+
"description": "Projection only: a URL the viewer can fetch the image from until `urlExpiresAt`."
|
|
365
|
+
},
|
|
366
|
+
"urlExpiresAt": {
|
|
367
|
+
"type": "string",
|
|
368
|
+
"format": "date-time",
|
|
369
|
+
"description": "Projection only: when `url` stops working."
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
} as const;
|
|
375
|
+
|
|
376
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
377
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
378
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
379
|
+
"$ref": "#/$defs/Response",
|
|
380
|
+
"$defs": {
|
|
381
|
+
"Response": {
|
|
382
|
+
"$anchor": "response",
|
|
383
|
+
"title": "VTC Badges — Wall — Show — response payload",
|
|
384
|
+
"description": "The success response to a vtc/badges/wall/show/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/wall/show/0.1#response.",
|
|
385
|
+
"type": "object",
|
|
386
|
+
"additionalProperties": false,
|
|
387
|
+
"required": [
|
|
388
|
+
"entries",
|
|
389
|
+
"visibility"
|
|
390
|
+
],
|
|
391
|
+
"properties": {
|
|
392
|
+
"entries": {
|
|
393
|
+
"type": "array",
|
|
394
|
+
"maxItems": 500,
|
|
395
|
+
"description": "The badges the member holds and shows: pinned first, then in the member's own order (VTI-BDG-032). Hidden badges are never here (VTI-BDG-030).",
|
|
396
|
+
"items": {
|
|
397
|
+
"$ref": "#/$defs/WallEntry"
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
"visibility": {
|
|
401
|
+
"$ref": "#/$defs/WallVisibility",
|
|
402
|
+
"description": "The member's own setting (VTI-BDG-031). A viewer who is not the member only ever sees `members`."
|
|
403
|
+
},
|
|
404
|
+
"kudosTotal": {
|
|
405
|
+
"type": "integer",
|
|
406
|
+
"minimum": 0,
|
|
407
|
+
"description": "The member's kudos total: accepted, not hidden kudos awards (VTI-BDG-043). Present exactly when the community's badge settings have `showKudosTotals` true; absent otherwise, never zero in its place."
|
|
408
|
+
},
|
|
409
|
+
"ext": {
|
|
410
|
+
"$ref": "#/$defs/Ext"
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
"Ext": {
|
|
415
|
+
"title": "Ext",
|
|
416
|
+
"description": "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.",
|
|
417
|
+
"type": "object",
|
|
418
|
+
"minProperties": 1,
|
|
419
|
+
"additionalProperties": true,
|
|
420
|
+
"propertyNames": {
|
|
421
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
"WallVisibility": {
|
|
425
|
+
"title": "WallVisibility",
|
|
426
|
+
"description": "Who sees a member's badges, the member's own setting (VTI-BDG-031). `members`: every active member the directory shows their card to. `nobody`: no one but the member. Never wider than the directory shows the card.",
|
|
427
|
+
"type": "string",
|
|
428
|
+
"enum": [
|
|
429
|
+
"members",
|
|
430
|
+
"nobody"
|
|
431
|
+
]
|
|
432
|
+
},
|
|
433
|
+
"WallEntry": {
|
|
434
|
+
"title": "WallEntry",
|
|
435
|
+
"description": "One badge on a member's wall as a viewer sees it: the badge, how many times the member holds it, since when, and whether the member pinned it. Hidden badges are never wall entries (VTI-BDG-030).",
|
|
436
|
+
"type": "object",
|
|
437
|
+
"additionalProperties": false,
|
|
438
|
+
"required": [
|
|
439
|
+
"badge",
|
|
440
|
+
"count",
|
|
441
|
+
"since",
|
|
442
|
+
"pinned"
|
|
443
|
+
],
|
|
444
|
+
"properties": {
|
|
445
|
+
"badge": {
|
|
446
|
+
"$ref": "#/$defs/Badge"
|
|
447
|
+
},
|
|
448
|
+
"count": {
|
|
449
|
+
"type": "integer",
|
|
450
|
+
"minimum": 1,
|
|
451
|
+
"description": "Accepted awards of this badge the member holds."
|
|
452
|
+
},
|
|
453
|
+
"since": {
|
|
454
|
+
"type": "string",
|
|
455
|
+
"format": "date-time",
|
|
456
|
+
"description": "When the member first accepted this badge."
|
|
457
|
+
},
|
|
458
|
+
"latestAt": {
|
|
459
|
+
"type": "string",
|
|
460
|
+
"format": "date-time",
|
|
461
|
+
"description": "When the member last accepted an award of this badge."
|
|
462
|
+
},
|
|
463
|
+
"pinned": {
|
|
464
|
+
"type": "boolean"
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
"Badge": {
|
|
469
|
+
"title": "Badge",
|
|
470
|
+
"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.",
|
|
471
|
+
"type": "object",
|
|
472
|
+
"additionalProperties": false,
|
|
473
|
+
"required": [
|
|
474
|
+
"badgeId",
|
|
475
|
+
"kind",
|
|
476
|
+
"name",
|
|
477
|
+
"description",
|
|
478
|
+
"image",
|
|
479
|
+
"repeatable",
|
|
480
|
+
"listed",
|
|
481
|
+
"state",
|
|
482
|
+
"createdAt"
|
|
483
|
+
],
|
|
484
|
+
"properties": {
|
|
485
|
+
"badgeId": {
|
|
486
|
+
"$ref": "#/$defs/BadgeId"
|
|
487
|
+
},
|
|
488
|
+
"kind": {
|
|
489
|
+
"$ref": "#/$defs/BadgeKind"
|
|
490
|
+
},
|
|
491
|
+
"name": {
|
|
492
|
+
"$ref": "#/$defs/BadgeName"
|
|
493
|
+
},
|
|
494
|
+
"description": {
|
|
495
|
+
"$ref": "#/$defs/BadgeDescription"
|
|
496
|
+
},
|
|
497
|
+
"criteria": {
|
|
498
|
+
"$ref": "#/$defs/BadgeCriteria"
|
|
499
|
+
},
|
|
500
|
+
"image": {
|
|
501
|
+
"$ref": "#/$defs/CardBlobRef",
|
|
502
|
+
"description": "The badge's picture, re-encoded and stored by the community (vtc/badges/images/upload), read with vtc/badges/images/get. `url` and `urlExpiresAt` MAY appear in a projection as for a card picture; for a badge whose holders may show it outside, `url` MAY be the picture's stable public location."
|
|
503
|
+
},
|
|
504
|
+
"repeatable": {
|
|
505
|
+
"type": "boolean",
|
|
506
|
+
"description": "Whether one member may hold the badge more than once, each giving an award of its own (VTI-BDG-022). Always true for a kudos badge."
|
|
507
|
+
},
|
|
508
|
+
"requestable": {
|
|
509
|
+
"type": "boolean",
|
|
510
|
+
"description": "Community badges only. Whether a member may ask for it: a request to join its badge group, decided by its owners (VTI-BDG-014). Absent reads as false."
|
|
511
|
+
},
|
|
512
|
+
"listed": {
|
|
513
|
+
"type": "boolean",
|
|
514
|
+
"description": "Whether members who do not hold the badge see it in the community's badge list. An unlisted badge is seen by its holders, its owners and administrators."
|
|
515
|
+
},
|
|
516
|
+
"shareableOutside": {
|
|
517
|
+
"type": "boolean",
|
|
518
|
+
"description": "Community badges only. Whether its holders may show it outside the community, which decides the credential's regime: short-lived and renewed with no status when false, long-lived with a status in the community's own status set when true (VTI-BDG-061, VTI-BDG-062). Absent reads as false."
|
|
519
|
+
},
|
|
520
|
+
"groupId": {
|
|
521
|
+
"$ref": "#/$defs/GroupId",
|
|
522
|
+
"description": "The badge group that backs a community badge: its managers are the badge's owners, its members the holders, its DID the credential's issuer."
|
|
523
|
+
},
|
|
524
|
+
"state": {
|
|
525
|
+
"$ref": "#/$defs/BadgeState"
|
|
526
|
+
},
|
|
527
|
+
"holderCount": {
|
|
528
|
+
"type": "integer",
|
|
529
|
+
"minimum": 0,
|
|
530
|
+
"description": "Holders who show the badge. Only to callers who may see the holders."
|
|
531
|
+
},
|
|
532
|
+
"createdAt": {
|
|
533
|
+
"type": "string",
|
|
534
|
+
"format": "date-time"
|
|
535
|
+
},
|
|
536
|
+
"createdBy": {
|
|
537
|
+
"$ref": "#/$defs/EntryId"
|
|
538
|
+
},
|
|
539
|
+
"updatedAt": {
|
|
540
|
+
"type": "string",
|
|
541
|
+
"format": "date-time"
|
|
542
|
+
},
|
|
543
|
+
"retiredAt": {
|
|
544
|
+
"type": "string",
|
|
545
|
+
"format": "date-time"
|
|
546
|
+
},
|
|
547
|
+
"ext": {
|
|
548
|
+
"$ref": "#/$defs/Ext",
|
|
549
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1. An extension member MUST NOT carry authority."
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
"BadgeState": {
|
|
554
|
+
"title": "BadgeState",
|
|
555
|
+
"description": "`active`: may be given and shown. `retired`: kept for its holders' own history, never given, never shown to members who do not hold it (VTI-BDG-005).",
|
|
556
|
+
"type": "string",
|
|
557
|
+
"enum": [
|
|
558
|
+
"active",
|
|
559
|
+
"retired"
|
|
560
|
+
]
|
|
561
|
+
},
|
|
562
|
+
"BadgeCriteria": {
|
|
563
|
+
"title": "BadgeCriteria",
|
|
564
|
+
"type": "string",
|
|
565
|
+
"minLength": 1,
|
|
566
|
+
"maxLength": 1000,
|
|
567
|
+
"description": "How the badge is earned, shown to members and written into the credential's Achievement as its criteria narrative. Plain text."
|
|
568
|
+
},
|
|
569
|
+
"BadgeDescription": {
|
|
570
|
+
"title": "BadgeDescription",
|
|
571
|
+
"type": "string",
|
|
572
|
+
"minLength": 1,
|
|
573
|
+
"maxLength": 1000,
|
|
574
|
+
"description": "What the badge is for. Plain text; a reader MUST NOT treat it as instructions."
|
|
575
|
+
},
|
|
576
|
+
"BadgeName": {
|
|
577
|
+
"title": "BadgeName",
|
|
578
|
+
"type": "string",
|
|
579
|
+
"minLength": 1,
|
|
580
|
+
"maxLength": 64,
|
|
581
|
+
"description": "The badge's name, shown on the wall and written into the credential's Achievement. Plain text; a reader MUST NOT treat it as instructions."
|
|
582
|
+
},
|
|
583
|
+
"BadgeKind": {
|
|
584
|
+
"title": "BadgeKind",
|
|
585
|
+
"description": "`community`: defined by holders of `vtc.badges.admin`, given by its owners (its badge group's managers), may carry a credential. `kudos`: made by a member the community's badge settings admit, given by any active member to any other, never a credential. Fixed for the badge's life; a kudos badge becomes a community badge only by promotion (vtc/badges/promote).",
|
|
586
|
+
"type": "string",
|
|
587
|
+
"enum": [
|
|
588
|
+
"community",
|
|
589
|
+
"kudos"
|
|
590
|
+
]
|
|
591
|
+
},
|
|
592
|
+
"BadgeId": {
|
|
593
|
+
"title": "BadgeId",
|
|
594
|
+
"description": "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).",
|
|
595
|
+
"type": "string",
|
|
596
|
+
"pattern": "^bdg_[A-Za-z0-9_-]{16,64}$"
|
|
597
|
+
},
|
|
598
|
+
"EntryId": {
|
|
599
|
+
"title": "EntryId",
|
|
600
|
+
"description": "Opaque identifier of one directory entry: `dir_` followed by 16 to 64 base64url characters. Random, scoped to one community, and stable for the life of the membership — it survives a rotation of the member's DID, which is why groups, notes and cards are keyed by it. It MUST NOT be derived from, and MUST NOT reveal, any DID of the member, and the same person's entries in two communities MUST NOT share one. Compared by exact string equality.",
|
|
601
|
+
"type": "string",
|
|
602
|
+
"pattern": "^dir_[A-Za-z0-9_-]{16,64}$"
|
|
603
|
+
},
|
|
604
|
+
"GroupId": {
|
|
605
|
+
"title": "GroupId",
|
|
606
|
+
"description": "Opaque identifier of a community group: `grp_` followed by 16 to 64 base64url characters. Random and community-scoped; not the group's DID.",
|
|
607
|
+
"type": "string",
|
|
608
|
+
"pattern": "^grp_[A-Za-z0-9_-]{16,64}$"
|
|
609
|
+
},
|
|
610
|
+
"CardBlobRef": {
|
|
611
|
+
"title": "CardBlobRef",
|
|
612
|
+
"description": "A content-addressed image held in the community's blob store — an avatar or an `image` field. At most 256 KiB, images only, re-encoded by the community on upload (vtc/directory/images/upload: metadata stripped, dimensions capped) so its digest does not link the member across communities. A viewer reads the bytes with vtc/directory/images/get, which answers only where the same projection shows the value. `url` and `urlExpiresAt` MAY appear in a projection: a short-lived URL the community checks against the same projection, so a member-only image is never a public URL. A community that does not offer one leaves both out.",
|
|
613
|
+
"type": "object",
|
|
614
|
+
"additionalProperties": false,
|
|
615
|
+
"required": [
|
|
616
|
+
"sha256",
|
|
617
|
+
"mediaType"
|
|
618
|
+
],
|
|
619
|
+
"properties": {
|
|
620
|
+
"sha256": {
|
|
621
|
+
"type": "string",
|
|
622
|
+
"pattern": "^[0-9a-f]{64}$",
|
|
623
|
+
"description": "Lowercase hex SHA-256 of the stored, re-encoded bytes."
|
|
624
|
+
},
|
|
625
|
+
"mediaType": {
|
|
626
|
+
"type": "string",
|
|
627
|
+
"enum": [
|
|
628
|
+
"image/png",
|
|
629
|
+
"image/jpeg",
|
|
630
|
+
"image/webp",
|
|
631
|
+
"image/avif"
|
|
632
|
+
],
|
|
633
|
+
"description": "Media type of the stored bytes."
|
|
634
|
+
},
|
|
635
|
+
"size": {
|
|
636
|
+
"type": "integer",
|
|
637
|
+
"minimum": 1,
|
|
638
|
+
"maximum": 262144,
|
|
639
|
+
"description": "Size in bytes of the stored bytes."
|
|
640
|
+
},
|
|
641
|
+
"url": {
|
|
642
|
+
"type": "string",
|
|
643
|
+
"format": "uri",
|
|
644
|
+
"maxLength": 2048,
|
|
645
|
+
"description": "Projection only: a URL the viewer can fetch the image from until `urlExpiresAt`."
|
|
646
|
+
},
|
|
647
|
+
"urlExpiresAt": {
|
|
648
|
+
"type": "string",
|
|
649
|
+
"format": "date-time",
|
|
650
|
+
"description": "Projection only: when `url` stops working."
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
} as const;
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
659
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
660
|
+
* per-specification and cannot be derived from the document alone, and
|
|
661
|
+
* item 2 needs the schema this carries.
|
|
662
|
+
*/
|
|
663
|
+
export const SPEC = {
|
|
664
|
+
typeUri: TYPE_URI,
|
|
665
|
+
isBearer: false,
|
|
666
|
+
isProofRequired: true,
|
|
667
|
+
isRecipientRequired: true,
|
|
668
|
+
isIssuedAtRequired: false,
|
|
669
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
670
|
+
} as const;
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
674
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
675
|
+
* parties (§7.3 item 5).
|
|
676
|
+
*/
|
|
677
|
+
export const RESPONSE_SPEC = {
|
|
678
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
679
|
+
isBearer: false,
|
|
680
|
+
isProofRequired: true,
|
|
681
|
+
isRecipientRequired: true,
|
|
682
|
+
isIssuedAtRequired: false,
|
|
683
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
684
|
+
} as const;
|