@openvtc/trust-tasks 0.28.18 → 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 +32 -0
- package/dist/_shared/components.d.ts +228 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +75 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +75 -0
- package/dist/index.js.map +1 -1
- 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/package.json +1 -1
- package/src/_shared/components.ts +228 -0
- package/src/index.ts +75 -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
|
@@ -0,0 +1,1033 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/badges/update/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { Badge, BadgeCriteria, BadgeDescription, BadgeId, BadgeKind, BadgeName, BadgeState, CardBlobRef, EntryId, Ext, GroupAudience, GroupId } from "../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* Change a badge's name, description, criteria, picture, listing and, for a community badge, whether members may ask for it and who sees its holders. Its kind and credential regime are fixed at creation. The outer document members are owned by the framework — SPEC §6.3.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTCBadgesUpdatePayload {
|
|
10
|
+
badgeId: BadgeId;
|
|
11
|
+
name?: BadgeName;
|
|
12
|
+
description?: BadgeDescription;
|
|
13
|
+
/**
|
|
14
|
+
* `null` clears it.
|
|
15
|
+
*/
|
|
16
|
+
criteria?: BadgeCriteria | null;
|
|
17
|
+
/**
|
|
18
|
+
* A new picture, as the signer uploaded it with vtc/badges/images/upload. Re-issues no credential: the credential names its Achievement by a stable identifier.
|
|
19
|
+
*/
|
|
20
|
+
image?: {
|
|
21
|
+
/**
|
|
22
|
+
* The digest vtc/badges/images/upload answered to this signer.
|
|
23
|
+
*/
|
|
24
|
+
sha256: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Whether members who do not hold it see it in the badge list.
|
|
28
|
+
*/
|
|
29
|
+
listed?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Community badges only. Whether members may ask for it: true sets the badge group's `joinPolicy` to `request`, false to `closed`. Refused while the community's `membersMayRequest` is off, and on an automatic badge.
|
|
32
|
+
*/
|
|
33
|
+
requestable?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Community badges only. Who may see the badge's holders: sets the badge group's `showMembers`.
|
|
36
|
+
*/
|
|
37
|
+
holdersVisibleTo?: GroupAudience;
|
|
38
|
+
/**
|
|
39
|
+
* Why, recorded with the change.
|
|
40
|
+
*/
|
|
41
|
+
reason: string;
|
|
42
|
+
ext?: Ext;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The success response to a vtc/badges/update/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/update/0.1#response.
|
|
46
|
+
*/
|
|
47
|
+
export interface VTCBadgesUpdateResponsePayload {
|
|
48
|
+
/**
|
|
49
|
+
* The badge as it now is, as the signer sees it.
|
|
50
|
+
*/
|
|
51
|
+
badge: Badge;
|
|
52
|
+
ext?: Ext;
|
|
53
|
+
}
|
|
54
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
55
|
+
export type { Badge, BadgeCriteria, BadgeDescription, BadgeId, BadgeKind, BadgeName, BadgeState, CardBlobRef, EntryId, Ext, GroupAudience, GroupId };
|
|
56
|
+
/** Trust Task type URI. */
|
|
57
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/badges/update/0.1";
|
|
58
|
+
/**
|
|
59
|
+
* The earlier version of this specification that this one declares it
|
|
60
|
+
* extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
|
|
61
|
+
* `null`. Only the direct declaration — follow the chain with
|
|
62
|
+
* `extendsChain` / `readForSpec`.
|
|
63
|
+
*/
|
|
64
|
+
export declare const EXTENDS: string | null;
|
|
65
|
+
/**
|
|
66
|
+
* Why this version is deprecated, or `null` while it is current. A
|
|
67
|
+
* superseded or retired version is still supported, and is withdrawn from
|
|
68
|
+
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
69
|
+
* Versions").
|
|
70
|
+
*/
|
|
71
|
+
export declare const DEPRECATION: string | null;
|
|
72
|
+
/** Stable alias for this specification's request payload shape. */
|
|
73
|
+
export type Payload = VTCBadgesUpdatePayload;
|
|
74
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
75
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vtc/badges/update/0.1#response";
|
|
76
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
77
|
+
export type Response = VTCBadgesUpdateResponsePayload;
|
|
78
|
+
/**
|
|
79
|
+
* This specification's payload schema, as a value.
|
|
80
|
+
*
|
|
81
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
82
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
83
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
84
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
85
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
86
|
+
*/
|
|
87
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
88
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
89
|
+
readonly $id: "https://trusttasks.org/spec/vtc/badges/update/0.1";
|
|
90
|
+
readonly title: "VTC Badges — Update — payload";
|
|
91
|
+
readonly description: "Change a badge's name, description, criteria, picture, listing and, for a community badge, whether members may ask for it and who sees its holders. Its kind and credential regime are fixed at creation. The outer document members are owned by the framework — SPEC §6.3.";
|
|
92
|
+
readonly type: "object";
|
|
93
|
+
readonly additionalProperties: false;
|
|
94
|
+
readonly required: readonly ["badgeId", "reason"];
|
|
95
|
+
readonly properties: {
|
|
96
|
+
readonly badgeId: {
|
|
97
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
98
|
+
};
|
|
99
|
+
readonly name: {
|
|
100
|
+
readonly $ref: "#/$defs/BadgeName";
|
|
101
|
+
};
|
|
102
|
+
readonly description: {
|
|
103
|
+
readonly $ref: "#/$defs/BadgeDescription";
|
|
104
|
+
};
|
|
105
|
+
readonly criteria: {
|
|
106
|
+
readonly anyOf: readonly [{
|
|
107
|
+
readonly $ref: "#/$defs/BadgeCriteria";
|
|
108
|
+
}, {
|
|
109
|
+
readonly type: "null";
|
|
110
|
+
}];
|
|
111
|
+
readonly description: "`null` clears it.";
|
|
112
|
+
};
|
|
113
|
+
readonly image: {
|
|
114
|
+
readonly type: "object";
|
|
115
|
+
readonly additionalProperties: false;
|
|
116
|
+
readonly required: readonly ["sha256"];
|
|
117
|
+
readonly properties: {
|
|
118
|
+
readonly sha256: {
|
|
119
|
+
readonly type: "string";
|
|
120
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
121
|
+
readonly description: "The digest vtc/badges/images/upload answered to this signer.";
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
readonly description: "A new picture, as the signer uploaded it with vtc/badges/images/upload. Re-issues no credential: the credential names its Achievement by a stable identifier.";
|
|
125
|
+
};
|
|
126
|
+
readonly listed: {
|
|
127
|
+
readonly type: "boolean";
|
|
128
|
+
readonly description: "Whether members who do not hold it see it in the badge list.";
|
|
129
|
+
};
|
|
130
|
+
readonly requestable: {
|
|
131
|
+
readonly type: "boolean";
|
|
132
|
+
readonly description: "Community badges only. Whether members may ask for it: true sets the badge group's `joinPolicy` to `request`, false to `closed`. Refused while the community's `membersMayRequest` is off, and on an automatic badge.";
|
|
133
|
+
};
|
|
134
|
+
readonly holdersVisibleTo: {
|
|
135
|
+
readonly $ref: "#/$defs/GroupAudience";
|
|
136
|
+
readonly description: "Community badges only. Who may see the badge's holders: sets the badge group's `showMembers`.";
|
|
137
|
+
};
|
|
138
|
+
readonly reason: {
|
|
139
|
+
readonly type: "string";
|
|
140
|
+
readonly minLength: 1;
|
|
141
|
+
readonly maxLength: 1024;
|
|
142
|
+
readonly description: "Why, recorded with the change.";
|
|
143
|
+
};
|
|
144
|
+
readonly ext: {
|
|
145
|
+
readonly $ref: "#/$defs/Ext";
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
readonly $defs: {
|
|
149
|
+
readonly Response: {
|
|
150
|
+
readonly $anchor: "response";
|
|
151
|
+
readonly title: "VTC Badges — Update — response payload";
|
|
152
|
+
readonly description: "The success response to a vtc/badges/update/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/update/0.1#response.";
|
|
153
|
+
readonly type: "object";
|
|
154
|
+
readonly additionalProperties: false;
|
|
155
|
+
readonly required: readonly ["badge"];
|
|
156
|
+
readonly properties: {
|
|
157
|
+
readonly badge: {
|
|
158
|
+
readonly $ref: "#/$defs/Badge";
|
|
159
|
+
readonly description: "The badge as it now is, as the signer sees it.";
|
|
160
|
+
};
|
|
161
|
+
readonly ext: {
|
|
162
|
+
readonly $ref: "#/$defs/Ext";
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
readonly Ext: {
|
|
167
|
+
readonly title: "Ext";
|
|
168
|
+
readonly 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.";
|
|
169
|
+
readonly type: "object";
|
|
170
|
+
readonly minProperties: 1;
|
|
171
|
+
readonly additionalProperties: true;
|
|
172
|
+
readonly propertyNames: {
|
|
173
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
readonly Badge: {
|
|
177
|
+
readonly title: "Badge";
|
|
178
|
+
readonly 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.";
|
|
179
|
+
readonly type: "object";
|
|
180
|
+
readonly additionalProperties: false;
|
|
181
|
+
readonly required: readonly ["badgeId", "kind", "name", "description", "image", "repeatable", "listed", "state", "createdAt"];
|
|
182
|
+
readonly properties: {
|
|
183
|
+
readonly badgeId: {
|
|
184
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
185
|
+
};
|
|
186
|
+
readonly kind: {
|
|
187
|
+
readonly $ref: "#/$defs/BadgeKind";
|
|
188
|
+
};
|
|
189
|
+
readonly name: {
|
|
190
|
+
readonly $ref: "#/$defs/BadgeName";
|
|
191
|
+
};
|
|
192
|
+
readonly description: {
|
|
193
|
+
readonly $ref: "#/$defs/BadgeDescription";
|
|
194
|
+
};
|
|
195
|
+
readonly criteria: {
|
|
196
|
+
readonly $ref: "#/$defs/BadgeCriteria";
|
|
197
|
+
};
|
|
198
|
+
readonly image: {
|
|
199
|
+
readonly $ref: "#/$defs/CardBlobRef";
|
|
200
|
+
readonly 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.";
|
|
201
|
+
};
|
|
202
|
+
readonly repeatable: {
|
|
203
|
+
readonly type: "boolean";
|
|
204
|
+
readonly 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.";
|
|
205
|
+
};
|
|
206
|
+
readonly requestable: {
|
|
207
|
+
readonly type: "boolean";
|
|
208
|
+
readonly 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.";
|
|
209
|
+
};
|
|
210
|
+
readonly listed: {
|
|
211
|
+
readonly type: "boolean";
|
|
212
|
+
readonly 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.";
|
|
213
|
+
};
|
|
214
|
+
readonly shareableOutside: {
|
|
215
|
+
readonly type: "boolean";
|
|
216
|
+
readonly 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.";
|
|
217
|
+
};
|
|
218
|
+
readonly groupId: {
|
|
219
|
+
readonly $ref: "#/$defs/GroupId";
|
|
220
|
+
readonly 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.";
|
|
221
|
+
};
|
|
222
|
+
readonly state: {
|
|
223
|
+
readonly $ref: "#/$defs/BadgeState";
|
|
224
|
+
};
|
|
225
|
+
readonly holderCount: {
|
|
226
|
+
readonly type: "integer";
|
|
227
|
+
readonly minimum: 0;
|
|
228
|
+
readonly description: "Holders who show the badge. Only to callers who may see the holders.";
|
|
229
|
+
};
|
|
230
|
+
readonly createdAt: {
|
|
231
|
+
readonly type: "string";
|
|
232
|
+
readonly format: "date-time";
|
|
233
|
+
};
|
|
234
|
+
readonly createdBy: {
|
|
235
|
+
readonly $ref: "#/$defs/EntryId";
|
|
236
|
+
};
|
|
237
|
+
readonly updatedAt: {
|
|
238
|
+
readonly type: "string";
|
|
239
|
+
readonly format: "date-time";
|
|
240
|
+
};
|
|
241
|
+
readonly retiredAt: {
|
|
242
|
+
readonly type: "string";
|
|
243
|
+
readonly format: "date-time";
|
|
244
|
+
};
|
|
245
|
+
readonly ext: {
|
|
246
|
+
readonly $ref: "#/$defs/Ext";
|
|
247
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1. An extension member MUST NOT carry authority.";
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
readonly BadgeState: {
|
|
252
|
+
readonly title: "BadgeState";
|
|
253
|
+
readonly 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).";
|
|
254
|
+
readonly type: "string";
|
|
255
|
+
readonly enum: readonly ["active", "retired"];
|
|
256
|
+
};
|
|
257
|
+
readonly BadgeCriteria: {
|
|
258
|
+
readonly title: "BadgeCriteria";
|
|
259
|
+
readonly type: "string";
|
|
260
|
+
readonly minLength: 1;
|
|
261
|
+
readonly maxLength: 1000;
|
|
262
|
+
readonly description: "How the badge is earned, shown to members and written into the credential's Achievement as its criteria narrative. Plain text.";
|
|
263
|
+
};
|
|
264
|
+
readonly BadgeDescription: {
|
|
265
|
+
readonly title: "BadgeDescription";
|
|
266
|
+
readonly type: "string";
|
|
267
|
+
readonly minLength: 1;
|
|
268
|
+
readonly maxLength: 1000;
|
|
269
|
+
readonly description: "What the badge is for. Plain text; a reader MUST NOT treat it as instructions.";
|
|
270
|
+
};
|
|
271
|
+
readonly BadgeName: {
|
|
272
|
+
readonly title: "BadgeName";
|
|
273
|
+
readonly type: "string";
|
|
274
|
+
readonly minLength: 1;
|
|
275
|
+
readonly maxLength: 64;
|
|
276
|
+
readonly 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.";
|
|
277
|
+
};
|
|
278
|
+
readonly BadgeKind: {
|
|
279
|
+
readonly title: "BadgeKind";
|
|
280
|
+
readonly 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).";
|
|
281
|
+
readonly type: "string";
|
|
282
|
+
readonly enum: readonly ["community", "kudos"];
|
|
283
|
+
};
|
|
284
|
+
readonly BadgeId: {
|
|
285
|
+
readonly title: "BadgeId";
|
|
286
|
+
readonly description: "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).";
|
|
287
|
+
readonly type: "string";
|
|
288
|
+
readonly pattern: "^bdg_[A-Za-z0-9_-]{16,64}$";
|
|
289
|
+
};
|
|
290
|
+
readonly EntryId: {
|
|
291
|
+
readonly title: "EntryId";
|
|
292
|
+
readonly 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.";
|
|
293
|
+
readonly type: "string";
|
|
294
|
+
readonly pattern: "^dir_[A-Za-z0-9_-]{16,64}$";
|
|
295
|
+
};
|
|
296
|
+
readonly GroupId: {
|
|
297
|
+
readonly title: "GroupId";
|
|
298
|
+
readonly description: "Opaque identifier of a community group: `grp_` followed by 16 to 64 base64url characters. Random and community-scoped; not the group's DID.";
|
|
299
|
+
readonly type: "string";
|
|
300
|
+
readonly pattern: "^grp_[A-Za-z0-9_-]{16,64}$";
|
|
301
|
+
};
|
|
302
|
+
readonly CardBlobRef: {
|
|
303
|
+
readonly title: "CardBlobRef";
|
|
304
|
+
readonly 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.";
|
|
305
|
+
readonly type: "object";
|
|
306
|
+
readonly additionalProperties: false;
|
|
307
|
+
readonly required: readonly ["sha256", "mediaType"];
|
|
308
|
+
readonly properties: {
|
|
309
|
+
readonly sha256: {
|
|
310
|
+
readonly type: "string";
|
|
311
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
312
|
+
readonly description: "Lowercase hex SHA-256 of the stored, re-encoded bytes.";
|
|
313
|
+
};
|
|
314
|
+
readonly mediaType: {
|
|
315
|
+
readonly type: "string";
|
|
316
|
+
readonly enum: readonly ["image/png", "image/jpeg", "image/webp", "image/avif"];
|
|
317
|
+
readonly description: "Media type of the stored bytes.";
|
|
318
|
+
};
|
|
319
|
+
readonly size: {
|
|
320
|
+
readonly type: "integer";
|
|
321
|
+
readonly minimum: 1;
|
|
322
|
+
readonly maximum: 262144;
|
|
323
|
+
readonly description: "Size in bytes of the stored bytes.";
|
|
324
|
+
};
|
|
325
|
+
readonly url: {
|
|
326
|
+
readonly type: "string";
|
|
327
|
+
readonly format: "uri";
|
|
328
|
+
readonly maxLength: 2048;
|
|
329
|
+
readonly description: "Projection only: a URL the viewer can fetch the image from until `urlExpiresAt`.";
|
|
330
|
+
};
|
|
331
|
+
readonly urlExpiresAt: {
|
|
332
|
+
readonly type: "string";
|
|
333
|
+
readonly format: "date-time";
|
|
334
|
+
readonly description: "Projection only: when `url` stops working.";
|
|
335
|
+
};
|
|
336
|
+
};
|
|
337
|
+
};
|
|
338
|
+
readonly GroupAudience: {
|
|
339
|
+
readonly title: "GroupAudience";
|
|
340
|
+
readonly description: "Who may see something about a group, narrowest first. `admins`: holders of `vtc.groups.manage` for the group (unqualified, or qualified `group:<groupId>`). `groupMembers`: the group's own members, and its managers. `members`: every active member of the community.";
|
|
341
|
+
readonly type: "string";
|
|
342
|
+
readonly enum: readonly ["admins", "groupMembers", "members"];
|
|
343
|
+
};
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
347
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
348
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
349
|
+
readonly $ref: "#/$defs/Response";
|
|
350
|
+
readonly $defs: {
|
|
351
|
+
readonly Response: {
|
|
352
|
+
readonly $anchor: "response";
|
|
353
|
+
readonly title: "VTC Badges — Update — response payload";
|
|
354
|
+
readonly description: "The success response to a vtc/badges/update/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/update/0.1#response.";
|
|
355
|
+
readonly type: "object";
|
|
356
|
+
readonly additionalProperties: false;
|
|
357
|
+
readonly required: readonly ["badge"];
|
|
358
|
+
readonly properties: {
|
|
359
|
+
readonly badge: {
|
|
360
|
+
readonly $ref: "#/$defs/Badge";
|
|
361
|
+
readonly description: "The badge as it now is, as the signer sees it.";
|
|
362
|
+
};
|
|
363
|
+
readonly ext: {
|
|
364
|
+
readonly $ref: "#/$defs/Ext";
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
readonly Ext: {
|
|
369
|
+
readonly title: "Ext";
|
|
370
|
+
readonly 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.";
|
|
371
|
+
readonly type: "object";
|
|
372
|
+
readonly minProperties: 1;
|
|
373
|
+
readonly additionalProperties: true;
|
|
374
|
+
readonly propertyNames: {
|
|
375
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
376
|
+
};
|
|
377
|
+
};
|
|
378
|
+
readonly Badge: {
|
|
379
|
+
readonly title: "Badge";
|
|
380
|
+
readonly 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.";
|
|
381
|
+
readonly type: "object";
|
|
382
|
+
readonly additionalProperties: false;
|
|
383
|
+
readonly required: readonly ["badgeId", "kind", "name", "description", "image", "repeatable", "listed", "state", "createdAt"];
|
|
384
|
+
readonly properties: {
|
|
385
|
+
readonly badgeId: {
|
|
386
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
387
|
+
};
|
|
388
|
+
readonly kind: {
|
|
389
|
+
readonly $ref: "#/$defs/BadgeKind";
|
|
390
|
+
};
|
|
391
|
+
readonly name: {
|
|
392
|
+
readonly $ref: "#/$defs/BadgeName";
|
|
393
|
+
};
|
|
394
|
+
readonly description: {
|
|
395
|
+
readonly $ref: "#/$defs/BadgeDescription";
|
|
396
|
+
};
|
|
397
|
+
readonly criteria: {
|
|
398
|
+
readonly $ref: "#/$defs/BadgeCriteria";
|
|
399
|
+
};
|
|
400
|
+
readonly image: {
|
|
401
|
+
readonly $ref: "#/$defs/CardBlobRef";
|
|
402
|
+
readonly 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.";
|
|
403
|
+
};
|
|
404
|
+
readonly repeatable: {
|
|
405
|
+
readonly type: "boolean";
|
|
406
|
+
readonly 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.";
|
|
407
|
+
};
|
|
408
|
+
readonly requestable: {
|
|
409
|
+
readonly type: "boolean";
|
|
410
|
+
readonly 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.";
|
|
411
|
+
};
|
|
412
|
+
readonly listed: {
|
|
413
|
+
readonly type: "boolean";
|
|
414
|
+
readonly 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.";
|
|
415
|
+
};
|
|
416
|
+
readonly shareableOutside: {
|
|
417
|
+
readonly type: "boolean";
|
|
418
|
+
readonly 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.";
|
|
419
|
+
};
|
|
420
|
+
readonly groupId: {
|
|
421
|
+
readonly $ref: "#/$defs/GroupId";
|
|
422
|
+
readonly 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.";
|
|
423
|
+
};
|
|
424
|
+
readonly state: {
|
|
425
|
+
readonly $ref: "#/$defs/BadgeState";
|
|
426
|
+
};
|
|
427
|
+
readonly holderCount: {
|
|
428
|
+
readonly type: "integer";
|
|
429
|
+
readonly minimum: 0;
|
|
430
|
+
readonly description: "Holders who show the badge. Only to callers who may see the holders.";
|
|
431
|
+
};
|
|
432
|
+
readonly createdAt: {
|
|
433
|
+
readonly type: "string";
|
|
434
|
+
readonly format: "date-time";
|
|
435
|
+
};
|
|
436
|
+
readonly createdBy: {
|
|
437
|
+
readonly $ref: "#/$defs/EntryId";
|
|
438
|
+
};
|
|
439
|
+
readonly updatedAt: {
|
|
440
|
+
readonly type: "string";
|
|
441
|
+
readonly format: "date-time";
|
|
442
|
+
};
|
|
443
|
+
readonly retiredAt: {
|
|
444
|
+
readonly type: "string";
|
|
445
|
+
readonly format: "date-time";
|
|
446
|
+
};
|
|
447
|
+
readonly ext: {
|
|
448
|
+
readonly $ref: "#/$defs/Ext";
|
|
449
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1. An extension member MUST NOT carry authority.";
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
};
|
|
453
|
+
readonly BadgeState: {
|
|
454
|
+
readonly title: "BadgeState";
|
|
455
|
+
readonly 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).";
|
|
456
|
+
readonly type: "string";
|
|
457
|
+
readonly enum: readonly ["active", "retired"];
|
|
458
|
+
};
|
|
459
|
+
readonly BadgeCriteria: {
|
|
460
|
+
readonly title: "BadgeCriteria";
|
|
461
|
+
readonly type: "string";
|
|
462
|
+
readonly minLength: 1;
|
|
463
|
+
readonly maxLength: 1000;
|
|
464
|
+
readonly description: "How the badge is earned, shown to members and written into the credential's Achievement as its criteria narrative. Plain text.";
|
|
465
|
+
};
|
|
466
|
+
readonly BadgeDescription: {
|
|
467
|
+
readonly title: "BadgeDescription";
|
|
468
|
+
readonly type: "string";
|
|
469
|
+
readonly minLength: 1;
|
|
470
|
+
readonly maxLength: 1000;
|
|
471
|
+
readonly description: "What the badge is for. Plain text; a reader MUST NOT treat it as instructions.";
|
|
472
|
+
};
|
|
473
|
+
readonly BadgeName: {
|
|
474
|
+
readonly title: "BadgeName";
|
|
475
|
+
readonly type: "string";
|
|
476
|
+
readonly minLength: 1;
|
|
477
|
+
readonly maxLength: 64;
|
|
478
|
+
readonly 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.";
|
|
479
|
+
};
|
|
480
|
+
readonly BadgeKind: {
|
|
481
|
+
readonly title: "BadgeKind";
|
|
482
|
+
readonly 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).";
|
|
483
|
+
readonly type: "string";
|
|
484
|
+
readonly enum: readonly ["community", "kudos"];
|
|
485
|
+
};
|
|
486
|
+
readonly BadgeId: {
|
|
487
|
+
readonly title: "BadgeId";
|
|
488
|
+
readonly description: "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).";
|
|
489
|
+
readonly type: "string";
|
|
490
|
+
readonly pattern: "^bdg_[A-Za-z0-9_-]{16,64}$";
|
|
491
|
+
};
|
|
492
|
+
readonly EntryId: {
|
|
493
|
+
readonly title: "EntryId";
|
|
494
|
+
readonly 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.";
|
|
495
|
+
readonly type: "string";
|
|
496
|
+
readonly pattern: "^dir_[A-Za-z0-9_-]{16,64}$";
|
|
497
|
+
};
|
|
498
|
+
readonly GroupId: {
|
|
499
|
+
readonly title: "GroupId";
|
|
500
|
+
readonly description: "Opaque identifier of a community group: `grp_` followed by 16 to 64 base64url characters. Random and community-scoped; not the group's DID.";
|
|
501
|
+
readonly type: "string";
|
|
502
|
+
readonly pattern: "^grp_[A-Za-z0-9_-]{16,64}$";
|
|
503
|
+
};
|
|
504
|
+
readonly CardBlobRef: {
|
|
505
|
+
readonly title: "CardBlobRef";
|
|
506
|
+
readonly 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.";
|
|
507
|
+
readonly type: "object";
|
|
508
|
+
readonly additionalProperties: false;
|
|
509
|
+
readonly required: readonly ["sha256", "mediaType"];
|
|
510
|
+
readonly properties: {
|
|
511
|
+
readonly sha256: {
|
|
512
|
+
readonly type: "string";
|
|
513
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
514
|
+
readonly description: "Lowercase hex SHA-256 of the stored, re-encoded bytes.";
|
|
515
|
+
};
|
|
516
|
+
readonly mediaType: {
|
|
517
|
+
readonly type: "string";
|
|
518
|
+
readonly enum: readonly ["image/png", "image/jpeg", "image/webp", "image/avif"];
|
|
519
|
+
readonly description: "Media type of the stored bytes.";
|
|
520
|
+
};
|
|
521
|
+
readonly size: {
|
|
522
|
+
readonly type: "integer";
|
|
523
|
+
readonly minimum: 1;
|
|
524
|
+
readonly maximum: 262144;
|
|
525
|
+
readonly description: "Size in bytes of the stored bytes.";
|
|
526
|
+
};
|
|
527
|
+
readonly url: {
|
|
528
|
+
readonly type: "string";
|
|
529
|
+
readonly format: "uri";
|
|
530
|
+
readonly maxLength: 2048;
|
|
531
|
+
readonly description: "Projection only: a URL the viewer can fetch the image from until `urlExpiresAt`.";
|
|
532
|
+
};
|
|
533
|
+
readonly urlExpiresAt: {
|
|
534
|
+
readonly type: "string";
|
|
535
|
+
readonly format: "date-time";
|
|
536
|
+
readonly description: "Projection only: when `url` stops working.";
|
|
537
|
+
};
|
|
538
|
+
};
|
|
539
|
+
};
|
|
540
|
+
readonly GroupAudience: {
|
|
541
|
+
readonly title: "GroupAudience";
|
|
542
|
+
readonly description: "Who may see something about a group, narrowest first. `admins`: holders of `vtc.groups.manage` for the group (unqualified, or qualified `group:<groupId>`). `groupMembers`: the group's own members, and its managers. `members`: every active member of the community.";
|
|
543
|
+
readonly type: "string";
|
|
544
|
+
readonly enum: readonly ["admins", "groupMembers", "members"];
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
};
|
|
548
|
+
/**
|
|
549
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
550
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
551
|
+
* per-specification and cannot be derived from the document alone, and
|
|
552
|
+
* item 2 needs the schema this carries.
|
|
553
|
+
*/
|
|
554
|
+
export declare const SPEC: {
|
|
555
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/badges/update/0.1";
|
|
556
|
+
readonly isBearer: false;
|
|
557
|
+
readonly isProofRequired: true;
|
|
558
|
+
readonly isRecipientRequired: true;
|
|
559
|
+
readonly isIssuedAtRequired: true;
|
|
560
|
+
readonly payloadSchema: {
|
|
561
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
562
|
+
readonly $id: "https://trusttasks.org/spec/vtc/badges/update/0.1";
|
|
563
|
+
readonly title: "VTC Badges — Update — payload";
|
|
564
|
+
readonly description: "Change a badge's name, description, criteria, picture, listing and, for a community badge, whether members may ask for it and who sees its holders. Its kind and credential regime are fixed at creation. The outer document members are owned by the framework — SPEC §6.3.";
|
|
565
|
+
readonly type: "object";
|
|
566
|
+
readonly additionalProperties: false;
|
|
567
|
+
readonly required: readonly ["badgeId", "reason"];
|
|
568
|
+
readonly properties: {
|
|
569
|
+
readonly badgeId: {
|
|
570
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
571
|
+
};
|
|
572
|
+
readonly name: {
|
|
573
|
+
readonly $ref: "#/$defs/BadgeName";
|
|
574
|
+
};
|
|
575
|
+
readonly description: {
|
|
576
|
+
readonly $ref: "#/$defs/BadgeDescription";
|
|
577
|
+
};
|
|
578
|
+
readonly criteria: {
|
|
579
|
+
readonly anyOf: readonly [{
|
|
580
|
+
readonly $ref: "#/$defs/BadgeCriteria";
|
|
581
|
+
}, {
|
|
582
|
+
readonly type: "null";
|
|
583
|
+
}];
|
|
584
|
+
readonly description: "`null` clears it.";
|
|
585
|
+
};
|
|
586
|
+
readonly image: {
|
|
587
|
+
readonly type: "object";
|
|
588
|
+
readonly additionalProperties: false;
|
|
589
|
+
readonly required: readonly ["sha256"];
|
|
590
|
+
readonly properties: {
|
|
591
|
+
readonly sha256: {
|
|
592
|
+
readonly type: "string";
|
|
593
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
594
|
+
readonly description: "The digest vtc/badges/images/upload answered to this signer.";
|
|
595
|
+
};
|
|
596
|
+
};
|
|
597
|
+
readonly description: "A new picture, as the signer uploaded it with vtc/badges/images/upload. Re-issues no credential: the credential names its Achievement by a stable identifier.";
|
|
598
|
+
};
|
|
599
|
+
readonly listed: {
|
|
600
|
+
readonly type: "boolean";
|
|
601
|
+
readonly description: "Whether members who do not hold it see it in the badge list.";
|
|
602
|
+
};
|
|
603
|
+
readonly requestable: {
|
|
604
|
+
readonly type: "boolean";
|
|
605
|
+
readonly description: "Community badges only. Whether members may ask for it: true sets the badge group's `joinPolicy` to `request`, false to `closed`. Refused while the community's `membersMayRequest` is off, and on an automatic badge.";
|
|
606
|
+
};
|
|
607
|
+
readonly holdersVisibleTo: {
|
|
608
|
+
readonly $ref: "#/$defs/GroupAudience";
|
|
609
|
+
readonly description: "Community badges only. Who may see the badge's holders: sets the badge group's `showMembers`.";
|
|
610
|
+
};
|
|
611
|
+
readonly reason: {
|
|
612
|
+
readonly type: "string";
|
|
613
|
+
readonly minLength: 1;
|
|
614
|
+
readonly maxLength: 1024;
|
|
615
|
+
readonly description: "Why, recorded with the change.";
|
|
616
|
+
};
|
|
617
|
+
readonly ext: {
|
|
618
|
+
readonly $ref: "#/$defs/Ext";
|
|
619
|
+
};
|
|
620
|
+
};
|
|
621
|
+
readonly $defs: {
|
|
622
|
+
readonly Response: {
|
|
623
|
+
readonly $anchor: "response";
|
|
624
|
+
readonly title: "VTC Badges — Update — response payload";
|
|
625
|
+
readonly description: "The success response to a vtc/badges/update/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/update/0.1#response.";
|
|
626
|
+
readonly type: "object";
|
|
627
|
+
readonly additionalProperties: false;
|
|
628
|
+
readonly required: readonly ["badge"];
|
|
629
|
+
readonly properties: {
|
|
630
|
+
readonly badge: {
|
|
631
|
+
readonly $ref: "#/$defs/Badge";
|
|
632
|
+
readonly description: "The badge as it now is, as the signer sees it.";
|
|
633
|
+
};
|
|
634
|
+
readonly ext: {
|
|
635
|
+
readonly $ref: "#/$defs/Ext";
|
|
636
|
+
};
|
|
637
|
+
};
|
|
638
|
+
};
|
|
639
|
+
readonly Ext: {
|
|
640
|
+
readonly title: "Ext";
|
|
641
|
+
readonly 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.";
|
|
642
|
+
readonly type: "object";
|
|
643
|
+
readonly minProperties: 1;
|
|
644
|
+
readonly additionalProperties: true;
|
|
645
|
+
readonly propertyNames: {
|
|
646
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
647
|
+
};
|
|
648
|
+
};
|
|
649
|
+
readonly Badge: {
|
|
650
|
+
readonly title: "Badge";
|
|
651
|
+
readonly 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.";
|
|
652
|
+
readonly type: "object";
|
|
653
|
+
readonly additionalProperties: false;
|
|
654
|
+
readonly required: readonly ["badgeId", "kind", "name", "description", "image", "repeatable", "listed", "state", "createdAt"];
|
|
655
|
+
readonly properties: {
|
|
656
|
+
readonly badgeId: {
|
|
657
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
658
|
+
};
|
|
659
|
+
readonly kind: {
|
|
660
|
+
readonly $ref: "#/$defs/BadgeKind";
|
|
661
|
+
};
|
|
662
|
+
readonly name: {
|
|
663
|
+
readonly $ref: "#/$defs/BadgeName";
|
|
664
|
+
};
|
|
665
|
+
readonly description: {
|
|
666
|
+
readonly $ref: "#/$defs/BadgeDescription";
|
|
667
|
+
};
|
|
668
|
+
readonly criteria: {
|
|
669
|
+
readonly $ref: "#/$defs/BadgeCriteria";
|
|
670
|
+
};
|
|
671
|
+
readonly image: {
|
|
672
|
+
readonly $ref: "#/$defs/CardBlobRef";
|
|
673
|
+
readonly 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.";
|
|
674
|
+
};
|
|
675
|
+
readonly repeatable: {
|
|
676
|
+
readonly type: "boolean";
|
|
677
|
+
readonly 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.";
|
|
678
|
+
};
|
|
679
|
+
readonly requestable: {
|
|
680
|
+
readonly type: "boolean";
|
|
681
|
+
readonly 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.";
|
|
682
|
+
};
|
|
683
|
+
readonly listed: {
|
|
684
|
+
readonly type: "boolean";
|
|
685
|
+
readonly 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.";
|
|
686
|
+
};
|
|
687
|
+
readonly shareableOutside: {
|
|
688
|
+
readonly type: "boolean";
|
|
689
|
+
readonly 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.";
|
|
690
|
+
};
|
|
691
|
+
readonly groupId: {
|
|
692
|
+
readonly $ref: "#/$defs/GroupId";
|
|
693
|
+
readonly 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.";
|
|
694
|
+
};
|
|
695
|
+
readonly state: {
|
|
696
|
+
readonly $ref: "#/$defs/BadgeState";
|
|
697
|
+
};
|
|
698
|
+
readonly holderCount: {
|
|
699
|
+
readonly type: "integer";
|
|
700
|
+
readonly minimum: 0;
|
|
701
|
+
readonly description: "Holders who show the badge. Only to callers who may see the holders.";
|
|
702
|
+
};
|
|
703
|
+
readonly createdAt: {
|
|
704
|
+
readonly type: "string";
|
|
705
|
+
readonly format: "date-time";
|
|
706
|
+
};
|
|
707
|
+
readonly createdBy: {
|
|
708
|
+
readonly $ref: "#/$defs/EntryId";
|
|
709
|
+
};
|
|
710
|
+
readonly updatedAt: {
|
|
711
|
+
readonly type: "string";
|
|
712
|
+
readonly format: "date-time";
|
|
713
|
+
};
|
|
714
|
+
readonly retiredAt: {
|
|
715
|
+
readonly type: "string";
|
|
716
|
+
readonly format: "date-time";
|
|
717
|
+
};
|
|
718
|
+
readonly ext: {
|
|
719
|
+
readonly $ref: "#/$defs/Ext";
|
|
720
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1. An extension member MUST NOT carry authority.";
|
|
721
|
+
};
|
|
722
|
+
};
|
|
723
|
+
};
|
|
724
|
+
readonly BadgeState: {
|
|
725
|
+
readonly title: "BadgeState";
|
|
726
|
+
readonly 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).";
|
|
727
|
+
readonly type: "string";
|
|
728
|
+
readonly enum: readonly ["active", "retired"];
|
|
729
|
+
};
|
|
730
|
+
readonly BadgeCriteria: {
|
|
731
|
+
readonly title: "BadgeCriteria";
|
|
732
|
+
readonly type: "string";
|
|
733
|
+
readonly minLength: 1;
|
|
734
|
+
readonly maxLength: 1000;
|
|
735
|
+
readonly description: "How the badge is earned, shown to members and written into the credential's Achievement as its criteria narrative. Plain text.";
|
|
736
|
+
};
|
|
737
|
+
readonly BadgeDescription: {
|
|
738
|
+
readonly title: "BadgeDescription";
|
|
739
|
+
readonly type: "string";
|
|
740
|
+
readonly minLength: 1;
|
|
741
|
+
readonly maxLength: 1000;
|
|
742
|
+
readonly description: "What the badge is for. Plain text; a reader MUST NOT treat it as instructions.";
|
|
743
|
+
};
|
|
744
|
+
readonly BadgeName: {
|
|
745
|
+
readonly title: "BadgeName";
|
|
746
|
+
readonly type: "string";
|
|
747
|
+
readonly minLength: 1;
|
|
748
|
+
readonly maxLength: 64;
|
|
749
|
+
readonly 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.";
|
|
750
|
+
};
|
|
751
|
+
readonly BadgeKind: {
|
|
752
|
+
readonly title: "BadgeKind";
|
|
753
|
+
readonly 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).";
|
|
754
|
+
readonly type: "string";
|
|
755
|
+
readonly enum: readonly ["community", "kudos"];
|
|
756
|
+
};
|
|
757
|
+
readonly BadgeId: {
|
|
758
|
+
readonly title: "BadgeId";
|
|
759
|
+
readonly description: "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).";
|
|
760
|
+
readonly type: "string";
|
|
761
|
+
readonly pattern: "^bdg_[A-Za-z0-9_-]{16,64}$";
|
|
762
|
+
};
|
|
763
|
+
readonly EntryId: {
|
|
764
|
+
readonly title: "EntryId";
|
|
765
|
+
readonly 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.";
|
|
766
|
+
readonly type: "string";
|
|
767
|
+
readonly pattern: "^dir_[A-Za-z0-9_-]{16,64}$";
|
|
768
|
+
};
|
|
769
|
+
readonly GroupId: {
|
|
770
|
+
readonly title: "GroupId";
|
|
771
|
+
readonly description: "Opaque identifier of a community group: `grp_` followed by 16 to 64 base64url characters. Random and community-scoped; not the group's DID.";
|
|
772
|
+
readonly type: "string";
|
|
773
|
+
readonly pattern: "^grp_[A-Za-z0-9_-]{16,64}$";
|
|
774
|
+
};
|
|
775
|
+
readonly CardBlobRef: {
|
|
776
|
+
readonly title: "CardBlobRef";
|
|
777
|
+
readonly 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.";
|
|
778
|
+
readonly type: "object";
|
|
779
|
+
readonly additionalProperties: false;
|
|
780
|
+
readonly required: readonly ["sha256", "mediaType"];
|
|
781
|
+
readonly properties: {
|
|
782
|
+
readonly sha256: {
|
|
783
|
+
readonly type: "string";
|
|
784
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
785
|
+
readonly description: "Lowercase hex SHA-256 of the stored, re-encoded bytes.";
|
|
786
|
+
};
|
|
787
|
+
readonly mediaType: {
|
|
788
|
+
readonly type: "string";
|
|
789
|
+
readonly enum: readonly ["image/png", "image/jpeg", "image/webp", "image/avif"];
|
|
790
|
+
readonly description: "Media type of the stored bytes.";
|
|
791
|
+
};
|
|
792
|
+
readonly size: {
|
|
793
|
+
readonly type: "integer";
|
|
794
|
+
readonly minimum: 1;
|
|
795
|
+
readonly maximum: 262144;
|
|
796
|
+
readonly description: "Size in bytes of the stored bytes.";
|
|
797
|
+
};
|
|
798
|
+
readonly url: {
|
|
799
|
+
readonly type: "string";
|
|
800
|
+
readonly format: "uri";
|
|
801
|
+
readonly maxLength: 2048;
|
|
802
|
+
readonly description: "Projection only: a URL the viewer can fetch the image from until `urlExpiresAt`.";
|
|
803
|
+
};
|
|
804
|
+
readonly urlExpiresAt: {
|
|
805
|
+
readonly type: "string";
|
|
806
|
+
readonly format: "date-time";
|
|
807
|
+
readonly description: "Projection only: when `url` stops working.";
|
|
808
|
+
};
|
|
809
|
+
};
|
|
810
|
+
};
|
|
811
|
+
readonly GroupAudience: {
|
|
812
|
+
readonly title: "GroupAudience";
|
|
813
|
+
readonly description: "Who may see something about a group, narrowest first. `admins`: holders of `vtc.groups.manage` for the group (unqualified, or qualified `group:<groupId>`). `groupMembers`: the group's own members, and its managers. `members`: every active member of the community.";
|
|
814
|
+
readonly type: "string";
|
|
815
|
+
readonly enum: readonly ["admins", "groupMembers", "members"];
|
|
816
|
+
};
|
|
817
|
+
};
|
|
818
|
+
};
|
|
819
|
+
};
|
|
820
|
+
/**
|
|
821
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
822
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
823
|
+
* parties (§7.3 item 5).
|
|
824
|
+
*/
|
|
825
|
+
export declare const RESPONSE_SPEC: {
|
|
826
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/badges/update/0.1#response";
|
|
827
|
+
readonly isBearer: false;
|
|
828
|
+
readonly isProofRequired: true;
|
|
829
|
+
readonly isRecipientRequired: true;
|
|
830
|
+
readonly isIssuedAtRequired: true;
|
|
831
|
+
readonly payloadSchema: {
|
|
832
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
833
|
+
readonly $ref: "#/$defs/Response";
|
|
834
|
+
readonly $defs: {
|
|
835
|
+
readonly Response: {
|
|
836
|
+
readonly $anchor: "response";
|
|
837
|
+
readonly title: "VTC Badges — Update — response payload";
|
|
838
|
+
readonly description: "The success response to a vtc/badges/update/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/update/0.1#response.";
|
|
839
|
+
readonly type: "object";
|
|
840
|
+
readonly additionalProperties: false;
|
|
841
|
+
readonly required: readonly ["badge"];
|
|
842
|
+
readonly properties: {
|
|
843
|
+
readonly badge: {
|
|
844
|
+
readonly $ref: "#/$defs/Badge";
|
|
845
|
+
readonly description: "The badge as it now is, as the signer sees it.";
|
|
846
|
+
};
|
|
847
|
+
readonly ext: {
|
|
848
|
+
readonly $ref: "#/$defs/Ext";
|
|
849
|
+
};
|
|
850
|
+
};
|
|
851
|
+
};
|
|
852
|
+
readonly Ext: {
|
|
853
|
+
readonly title: "Ext";
|
|
854
|
+
readonly 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.";
|
|
855
|
+
readonly type: "object";
|
|
856
|
+
readonly minProperties: 1;
|
|
857
|
+
readonly additionalProperties: true;
|
|
858
|
+
readonly propertyNames: {
|
|
859
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
860
|
+
};
|
|
861
|
+
};
|
|
862
|
+
readonly Badge: {
|
|
863
|
+
readonly title: "Badge";
|
|
864
|
+
readonly 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.";
|
|
865
|
+
readonly type: "object";
|
|
866
|
+
readonly additionalProperties: false;
|
|
867
|
+
readonly required: readonly ["badgeId", "kind", "name", "description", "image", "repeatable", "listed", "state", "createdAt"];
|
|
868
|
+
readonly properties: {
|
|
869
|
+
readonly badgeId: {
|
|
870
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
871
|
+
};
|
|
872
|
+
readonly kind: {
|
|
873
|
+
readonly $ref: "#/$defs/BadgeKind";
|
|
874
|
+
};
|
|
875
|
+
readonly name: {
|
|
876
|
+
readonly $ref: "#/$defs/BadgeName";
|
|
877
|
+
};
|
|
878
|
+
readonly description: {
|
|
879
|
+
readonly $ref: "#/$defs/BadgeDescription";
|
|
880
|
+
};
|
|
881
|
+
readonly criteria: {
|
|
882
|
+
readonly $ref: "#/$defs/BadgeCriteria";
|
|
883
|
+
};
|
|
884
|
+
readonly image: {
|
|
885
|
+
readonly $ref: "#/$defs/CardBlobRef";
|
|
886
|
+
readonly 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.";
|
|
887
|
+
};
|
|
888
|
+
readonly repeatable: {
|
|
889
|
+
readonly type: "boolean";
|
|
890
|
+
readonly 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.";
|
|
891
|
+
};
|
|
892
|
+
readonly requestable: {
|
|
893
|
+
readonly type: "boolean";
|
|
894
|
+
readonly 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.";
|
|
895
|
+
};
|
|
896
|
+
readonly listed: {
|
|
897
|
+
readonly type: "boolean";
|
|
898
|
+
readonly 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.";
|
|
899
|
+
};
|
|
900
|
+
readonly shareableOutside: {
|
|
901
|
+
readonly type: "boolean";
|
|
902
|
+
readonly 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.";
|
|
903
|
+
};
|
|
904
|
+
readonly groupId: {
|
|
905
|
+
readonly $ref: "#/$defs/GroupId";
|
|
906
|
+
readonly 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.";
|
|
907
|
+
};
|
|
908
|
+
readonly state: {
|
|
909
|
+
readonly $ref: "#/$defs/BadgeState";
|
|
910
|
+
};
|
|
911
|
+
readonly holderCount: {
|
|
912
|
+
readonly type: "integer";
|
|
913
|
+
readonly minimum: 0;
|
|
914
|
+
readonly description: "Holders who show the badge. Only to callers who may see the holders.";
|
|
915
|
+
};
|
|
916
|
+
readonly createdAt: {
|
|
917
|
+
readonly type: "string";
|
|
918
|
+
readonly format: "date-time";
|
|
919
|
+
};
|
|
920
|
+
readonly createdBy: {
|
|
921
|
+
readonly $ref: "#/$defs/EntryId";
|
|
922
|
+
};
|
|
923
|
+
readonly updatedAt: {
|
|
924
|
+
readonly type: "string";
|
|
925
|
+
readonly format: "date-time";
|
|
926
|
+
};
|
|
927
|
+
readonly retiredAt: {
|
|
928
|
+
readonly type: "string";
|
|
929
|
+
readonly format: "date-time";
|
|
930
|
+
};
|
|
931
|
+
readonly ext: {
|
|
932
|
+
readonly $ref: "#/$defs/Ext";
|
|
933
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1. An extension member MUST NOT carry authority.";
|
|
934
|
+
};
|
|
935
|
+
};
|
|
936
|
+
};
|
|
937
|
+
readonly BadgeState: {
|
|
938
|
+
readonly title: "BadgeState";
|
|
939
|
+
readonly 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).";
|
|
940
|
+
readonly type: "string";
|
|
941
|
+
readonly enum: readonly ["active", "retired"];
|
|
942
|
+
};
|
|
943
|
+
readonly BadgeCriteria: {
|
|
944
|
+
readonly title: "BadgeCriteria";
|
|
945
|
+
readonly type: "string";
|
|
946
|
+
readonly minLength: 1;
|
|
947
|
+
readonly maxLength: 1000;
|
|
948
|
+
readonly description: "How the badge is earned, shown to members and written into the credential's Achievement as its criteria narrative. Plain text.";
|
|
949
|
+
};
|
|
950
|
+
readonly BadgeDescription: {
|
|
951
|
+
readonly title: "BadgeDescription";
|
|
952
|
+
readonly type: "string";
|
|
953
|
+
readonly minLength: 1;
|
|
954
|
+
readonly maxLength: 1000;
|
|
955
|
+
readonly description: "What the badge is for. Plain text; a reader MUST NOT treat it as instructions.";
|
|
956
|
+
};
|
|
957
|
+
readonly BadgeName: {
|
|
958
|
+
readonly title: "BadgeName";
|
|
959
|
+
readonly type: "string";
|
|
960
|
+
readonly minLength: 1;
|
|
961
|
+
readonly maxLength: 64;
|
|
962
|
+
readonly 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.";
|
|
963
|
+
};
|
|
964
|
+
readonly BadgeKind: {
|
|
965
|
+
readonly title: "BadgeKind";
|
|
966
|
+
readonly 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).";
|
|
967
|
+
readonly type: "string";
|
|
968
|
+
readonly enum: readonly ["community", "kudos"];
|
|
969
|
+
};
|
|
970
|
+
readonly BadgeId: {
|
|
971
|
+
readonly title: "BadgeId";
|
|
972
|
+
readonly description: "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).";
|
|
973
|
+
readonly type: "string";
|
|
974
|
+
readonly pattern: "^bdg_[A-Za-z0-9_-]{16,64}$";
|
|
975
|
+
};
|
|
976
|
+
readonly EntryId: {
|
|
977
|
+
readonly title: "EntryId";
|
|
978
|
+
readonly 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.";
|
|
979
|
+
readonly type: "string";
|
|
980
|
+
readonly pattern: "^dir_[A-Za-z0-9_-]{16,64}$";
|
|
981
|
+
};
|
|
982
|
+
readonly GroupId: {
|
|
983
|
+
readonly title: "GroupId";
|
|
984
|
+
readonly description: "Opaque identifier of a community group: `grp_` followed by 16 to 64 base64url characters. Random and community-scoped; not the group's DID.";
|
|
985
|
+
readonly type: "string";
|
|
986
|
+
readonly pattern: "^grp_[A-Za-z0-9_-]{16,64}$";
|
|
987
|
+
};
|
|
988
|
+
readonly CardBlobRef: {
|
|
989
|
+
readonly title: "CardBlobRef";
|
|
990
|
+
readonly 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.";
|
|
991
|
+
readonly type: "object";
|
|
992
|
+
readonly additionalProperties: false;
|
|
993
|
+
readonly required: readonly ["sha256", "mediaType"];
|
|
994
|
+
readonly properties: {
|
|
995
|
+
readonly sha256: {
|
|
996
|
+
readonly type: "string";
|
|
997
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
998
|
+
readonly description: "Lowercase hex SHA-256 of the stored, re-encoded bytes.";
|
|
999
|
+
};
|
|
1000
|
+
readonly mediaType: {
|
|
1001
|
+
readonly type: "string";
|
|
1002
|
+
readonly enum: readonly ["image/png", "image/jpeg", "image/webp", "image/avif"];
|
|
1003
|
+
readonly description: "Media type of the stored bytes.";
|
|
1004
|
+
};
|
|
1005
|
+
readonly size: {
|
|
1006
|
+
readonly type: "integer";
|
|
1007
|
+
readonly minimum: 1;
|
|
1008
|
+
readonly maximum: 262144;
|
|
1009
|
+
readonly description: "Size in bytes of the stored bytes.";
|
|
1010
|
+
};
|
|
1011
|
+
readonly url: {
|
|
1012
|
+
readonly type: "string";
|
|
1013
|
+
readonly format: "uri";
|
|
1014
|
+
readonly maxLength: 2048;
|
|
1015
|
+
readonly description: "Projection only: a URL the viewer can fetch the image from until `urlExpiresAt`.";
|
|
1016
|
+
};
|
|
1017
|
+
readonly urlExpiresAt: {
|
|
1018
|
+
readonly type: "string";
|
|
1019
|
+
readonly format: "date-time";
|
|
1020
|
+
readonly description: "Projection only: when `url` stops working.";
|
|
1021
|
+
};
|
|
1022
|
+
};
|
|
1023
|
+
};
|
|
1024
|
+
readonly GroupAudience: {
|
|
1025
|
+
readonly title: "GroupAudience";
|
|
1026
|
+
readonly description: "Who may see something about a group, narrowest first. `admins`: holders of `vtc.groups.manage` for the group (unqualified, or qualified `group:<groupId>`). `groupMembers`: the group's own members, and its managers. `members`: every active member of the community.";
|
|
1027
|
+
readonly type: "string";
|
|
1028
|
+
readonly enum: readonly ["admins", "groupMembers", "members"];
|
|
1029
|
+
};
|
|
1030
|
+
};
|
|
1031
|
+
};
|
|
1032
|
+
};
|
|
1033
|
+
//# sourceMappingURL=payload.d.ts.map
|