@openvtc/trust-tasks 0.28.18 → 0.28.20
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 +63 -0
- package/dist/_shared/components.d.ts +243 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +81 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +81 -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 +1340 -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 +761 -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 +905 -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 +523 -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 +717 -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 +413 -0
- package/dist/vtc/badges/awards/revoke/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/awards/share/0.1/payload.d.ts +701 -0
- package/dist/vtc/badges/awards/share/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/awards/share/0.1/payload.js +406 -0
- package/dist/vtc/badges/awards/share/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/awards/unshare/0.1/payload.d.ts +701 -0
- package/dist/vtc/badges/awards/unshare/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/awards/unshare/0.1/payload.js +406 -0
- package/dist/vtc/badges/awards/unshare/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/awards/withdraw/0.1/payload.d.ts +717 -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 +413 -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 +725 -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 +415 -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 +1878 -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 +1057 -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 +1488 -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 +861 -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 +701 -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 +406 -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 +2009 -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 +1149 -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 +243 -0
- package/src/index.ts +81 -0
- package/src/vtc/badges/_shared/0.1/badge.ts +23 -0
- package/src/vtc/badges/awards/list/0.1/payload.ts +830 -0
- package/src/vtc/badges/awards/offer/0.1/payload.ts +592 -0
- package/src/vtc/badges/awards/revoke/0.1/payload.ts +457 -0
- package/src/vtc/badges/awards/share/0.1/payload.ts +446 -0
- package/src/vtc/badges/awards/unshare/0.1/payload.ts +446 -0
- package/src/vtc/badges/awards/withdraw/0.1/payload.ts +457 -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 +463 -0
- package/src/vtc/badges/kudos/list/0.1/payload.ts +1142 -0
- package/src/vtc/badges/list/0.1/payload.ts +695 -0
- package/src/vtc/badges/mine/accept/0.1/payload.ts +902 -0
- package/src/vtc/badges/mine/arrange/0.1/payload.ts +768 -0
- package/src/vtc/badges/mine/decline/0.1/payload.ts +446 -0
- package/src/vtc/badges/mine/hide/0.1/payload.ts +670 -0
- package/src/vtc/badges/mine/list/0.1/payload.ts +1215 -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,1757 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/badges/promote/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { Badge, BadgeCriteria, BadgeDescription, BadgeId, BadgeKind, BadgeName, BadgeState, CardBlobRef, DynamicRule, EntryId, Ext, FieldKey, Group, GroupAudience, GroupDescription, GroupId, GroupKind, GroupName, JoinPolicy, RuleCondition } from "../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* Turn a kudos badge into a community badge: its badge group is created and its owners named, and every current holder is offered the badge so that each accepts before anything is issued or recorded. The outer document members are owned by the framework — SPEC §6.3.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTCBadgesPromotePayload {
|
|
10
|
+
/**
|
|
11
|
+
* A kudos badge.
|
|
12
|
+
*/
|
|
13
|
+
badgeId: BadgeId;
|
|
14
|
+
/**
|
|
15
|
+
* Whether members may ask for it (a request to join the badge group). Absent: false.
|
|
16
|
+
*/
|
|
17
|
+
requestable?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Whether holders may show it outside the community, which fixes the credential's regime for the badge's life. Absent: false.
|
|
20
|
+
*/
|
|
21
|
+
shareableOutside?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Who may see the badge's holders: the badge group's `showMembers`. Absent: `members`.
|
|
24
|
+
*/
|
|
25
|
+
holdersVisibleTo?: GroupAudience;
|
|
26
|
+
/**
|
|
27
|
+
* Members to appoint as the badge's owners — the badge group's managers — as vtc/groups/managers/add appoints them, bounded by the signer's own holding. The badge's maker is an owner only if named here.
|
|
28
|
+
*
|
|
29
|
+
* @maxItems 32
|
|
30
|
+
*/
|
|
31
|
+
owners?: EntryId[];
|
|
32
|
+
/**
|
|
33
|
+
* Why, recorded with the change.
|
|
34
|
+
*/
|
|
35
|
+
reason: string;
|
|
36
|
+
ext?: Ext;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The success response to a vtc/badges/promote/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/promote/0.1#response.
|
|
40
|
+
*/
|
|
41
|
+
export interface VTCBadgesPromoteResponsePayload {
|
|
42
|
+
/**
|
|
43
|
+
* The badge, now `kind` `community` with its `groupId`. `holderCount` is 0 until a holder accepts.
|
|
44
|
+
*/
|
|
45
|
+
badge: Badge;
|
|
46
|
+
/**
|
|
47
|
+
* The badge group, as vtc/groups/create answers it.
|
|
48
|
+
*/
|
|
49
|
+
group: Group;
|
|
50
|
+
/**
|
|
51
|
+
* How many current holders were offered the badge — one offer each, who they are never said here.
|
|
52
|
+
*/
|
|
53
|
+
holdersOffered?: number;
|
|
54
|
+
ext?: Ext;
|
|
55
|
+
}
|
|
56
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
57
|
+
export type { Badge, BadgeCriteria, BadgeDescription, BadgeId, BadgeKind, BadgeName, BadgeState, CardBlobRef, DynamicRule, EntryId, Ext, FieldKey, Group, GroupAudience, GroupDescription, GroupId, GroupKind, GroupName, JoinPolicy, RuleCondition };
|
|
58
|
+
/** Trust Task type URI. */
|
|
59
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/badges/promote/0.1";
|
|
60
|
+
/**
|
|
61
|
+
* The earlier version of this specification that this one declares it
|
|
62
|
+
* extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
|
|
63
|
+
* `null`. Only the direct declaration — follow the chain with
|
|
64
|
+
* `extendsChain` / `readForSpec`.
|
|
65
|
+
*/
|
|
66
|
+
export declare const EXTENDS: string | null;
|
|
67
|
+
/**
|
|
68
|
+
* Why this version is deprecated, or `null` while it is current. A
|
|
69
|
+
* superseded or retired version is still supported, and is withdrawn from
|
|
70
|
+
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
71
|
+
* Versions").
|
|
72
|
+
*/
|
|
73
|
+
export declare const DEPRECATION: string | null;
|
|
74
|
+
/** Stable alias for this specification's request payload shape. */
|
|
75
|
+
export type Payload = VTCBadgesPromotePayload;
|
|
76
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
77
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vtc/badges/promote/0.1#response";
|
|
78
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
79
|
+
export type Response = VTCBadgesPromoteResponsePayload;
|
|
80
|
+
/**
|
|
81
|
+
* This specification's payload schema, as a value.
|
|
82
|
+
*
|
|
83
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
84
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
85
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
86
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
87
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
88
|
+
*/
|
|
89
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
90
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
91
|
+
readonly $id: "https://trusttasks.org/spec/vtc/badges/promote/0.1";
|
|
92
|
+
readonly title: "VTC Badges — Promote — payload";
|
|
93
|
+
readonly description: "Turn a kudos badge into a community badge: its badge group is created and its owners named, and every current holder is offered the badge so that each accepts before anything is issued or recorded. The outer document members are owned by the framework — SPEC §6.3.";
|
|
94
|
+
readonly type: "object";
|
|
95
|
+
readonly additionalProperties: false;
|
|
96
|
+
readonly required: readonly ["badgeId", "reason"];
|
|
97
|
+
readonly properties: {
|
|
98
|
+
readonly badgeId: {
|
|
99
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
100
|
+
readonly description: "A kudos badge.";
|
|
101
|
+
};
|
|
102
|
+
readonly requestable: {
|
|
103
|
+
readonly type: "boolean";
|
|
104
|
+
readonly description: "Whether members may ask for it (a request to join the badge group). Absent: false.";
|
|
105
|
+
};
|
|
106
|
+
readonly shareableOutside: {
|
|
107
|
+
readonly type: "boolean";
|
|
108
|
+
readonly description: "Whether holders may show it outside the community, which fixes the credential's regime for the badge's life. Absent: false.";
|
|
109
|
+
};
|
|
110
|
+
readonly holdersVisibleTo: {
|
|
111
|
+
readonly $ref: "#/$defs/GroupAudience";
|
|
112
|
+
readonly description: "Who may see the badge's holders: the badge group's `showMembers`. Absent: `members`.";
|
|
113
|
+
};
|
|
114
|
+
readonly owners: {
|
|
115
|
+
readonly type: "array";
|
|
116
|
+
readonly maxItems: 32;
|
|
117
|
+
readonly uniqueItems: true;
|
|
118
|
+
readonly items: {
|
|
119
|
+
readonly $ref: "#/$defs/EntryId";
|
|
120
|
+
};
|
|
121
|
+
readonly description: "Members to appoint as the badge's owners — the badge group's managers — as vtc/groups/managers/add appoints them, bounded by the signer's own holding. The badge's maker is an owner only if named here.";
|
|
122
|
+
};
|
|
123
|
+
readonly reason: {
|
|
124
|
+
readonly type: "string";
|
|
125
|
+
readonly minLength: 1;
|
|
126
|
+
readonly maxLength: 1024;
|
|
127
|
+
readonly description: "Why, recorded with the change.";
|
|
128
|
+
};
|
|
129
|
+
readonly ext: {
|
|
130
|
+
readonly $ref: "#/$defs/Ext";
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
readonly $defs: {
|
|
134
|
+
readonly Response: {
|
|
135
|
+
readonly $anchor: "response";
|
|
136
|
+
readonly title: "VTC Badges — Promote — response payload";
|
|
137
|
+
readonly description: "The success response to a vtc/badges/promote/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/promote/0.1#response.";
|
|
138
|
+
readonly type: "object";
|
|
139
|
+
readonly additionalProperties: false;
|
|
140
|
+
readonly required: readonly ["badge", "group"];
|
|
141
|
+
readonly properties: {
|
|
142
|
+
readonly badge: {
|
|
143
|
+
readonly $ref: "#/$defs/Badge";
|
|
144
|
+
readonly description: "The badge, now `kind` `community` with its `groupId`. `holderCount` is 0 until a holder accepts.";
|
|
145
|
+
};
|
|
146
|
+
readonly group: {
|
|
147
|
+
readonly $ref: "#/$defs/Group";
|
|
148
|
+
readonly description: "The badge group, as vtc/groups/create answers it.";
|
|
149
|
+
};
|
|
150
|
+
readonly holdersOffered: {
|
|
151
|
+
readonly type: "integer";
|
|
152
|
+
readonly minimum: 0;
|
|
153
|
+
readonly description: "How many current holders were offered the badge — one offer each, who they are never said here.";
|
|
154
|
+
};
|
|
155
|
+
readonly ext: {
|
|
156
|
+
readonly $ref: "#/$defs/Ext";
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
readonly Ext: {
|
|
161
|
+
readonly title: "Ext";
|
|
162
|
+
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.";
|
|
163
|
+
readonly type: "object";
|
|
164
|
+
readonly minProperties: 1;
|
|
165
|
+
readonly additionalProperties: true;
|
|
166
|
+
readonly propertyNames: {
|
|
167
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
readonly Group: {
|
|
171
|
+
readonly title: "Group";
|
|
172
|
+
readonly description: "A community group, as a caller who may see it sees it. Members a caller may not see are absent: `memberCount` only to those who may see the group's members, `managers` and `credentialAuthorityValidUntil` only to its managers.";
|
|
173
|
+
readonly type: "object";
|
|
174
|
+
readonly additionalProperties: false;
|
|
175
|
+
readonly required: readonly ["groupId", "groupDid", "name", "kind", "visibility", "showMembers", "issuesCredentials", "carriesAuthority", "createdAt"];
|
|
176
|
+
readonly properties: {
|
|
177
|
+
readonly groupId: {
|
|
178
|
+
readonly $ref: "#/$defs/GroupId";
|
|
179
|
+
};
|
|
180
|
+
readonly groupDid: {
|
|
181
|
+
readonly type: "string";
|
|
182
|
+
readonly pattern: "^did:";
|
|
183
|
+
readonly maxLength: 2048;
|
|
184
|
+
readonly description: "The group's own DID, minted by the community's VTA for this group alone. It issues the group's membership credentials. Its DID document carries no name or description.";
|
|
185
|
+
};
|
|
186
|
+
readonly name: {
|
|
187
|
+
readonly $ref: "#/$defs/GroupName";
|
|
188
|
+
};
|
|
189
|
+
readonly description: {
|
|
190
|
+
readonly $ref: "#/$defs/GroupDescription";
|
|
191
|
+
};
|
|
192
|
+
readonly kind: {
|
|
193
|
+
readonly $ref: "#/$defs/GroupKind";
|
|
194
|
+
};
|
|
195
|
+
readonly rule: {
|
|
196
|
+
readonly $ref: "#/$defs/DynamicRule";
|
|
197
|
+
readonly description: "Present exactly when `kind` is `dynamic`.";
|
|
198
|
+
};
|
|
199
|
+
readonly joinPolicy: {
|
|
200
|
+
readonly $ref: "#/$defs/JoinPolicy";
|
|
201
|
+
readonly description: "Present exactly when `kind` is `static`.";
|
|
202
|
+
};
|
|
203
|
+
readonly visibility: {
|
|
204
|
+
readonly $ref: "#/$defs/GroupAudience";
|
|
205
|
+
readonly description: "Who may see that the group exists, and its name and description.";
|
|
206
|
+
};
|
|
207
|
+
readonly showMembers: {
|
|
208
|
+
readonly $ref: "#/$defs/GroupAudience";
|
|
209
|
+
readonly description: "Who may see the group's member list. Separate from `visibility`: a group everyone sees may show its members only to administrators. Never wider than `visibility`.";
|
|
210
|
+
};
|
|
211
|
+
readonly issuesCredentials: {
|
|
212
|
+
readonly type: "boolean";
|
|
213
|
+
readonly description: "Whether the group's DID issues its members a membership credential. Default true.";
|
|
214
|
+
};
|
|
215
|
+
readonly carriesAuthority: {
|
|
216
|
+
readonly type: "boolean";
|
|
217
|
+
readonly description: "`true` while the group has a `grants` or `role` binding. Such a group is `static` and `closed` for as long as it does.";
|
|
218
|
+
};
|
|
219
|
+
readonly badgeId: {
|
|
220
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
221
|
+
readonly description: "Present exactly when the group backs a community badge (vtc/badges/*): its managers are the badge's owners, its members the badge's holders, and its DID issues the badge credential in place of a membership credential. A badge group never carries authority, is not counted among the groups two members share, and is listed among the community's groups only to a caller who asks for badge groups (VTI-BDG-010 – VTI-BDG-012).";
|
|
222
|
+
};
|
|
223
|
+
readonly memberCount: {
|
|
224
|
+
readonly type: "integer";
|
|
225
|
+
readonly minimum: 0;
|
|
226
|
+
readonly description: "Active members. Only to callers who may see the member list.";
|
|
227
|
+
};
|
|
228
|
+
readonly managers: {
|
|
229
|
+
readonly type: "array";
|
|
230
|
+
readonly maxItems: 256;
|
|
231
|
+
readonly uniqueItems: true;
|
|
232
|
+
readonly items: {
|
|
233
|
+
readonly $ref: "#/$defs/EntryId";
|
|
234
|
+
};
|
|
235
|
+
readonly description: "Entries holding `vtc.groups.manage` qualified to this group, read from the access-control list. Informational: managers are appointed by an access-control grant (vtc/groups/managers/add), never by this record.";
|
|
236
|
+
};
|
|
237
|
+
readonly credentialAuthorityValidUntil: {
|
|
238
|
+
readonly type: "string";
|
|
239
|
+
readonly format: "date-time";
|
|
240
|
+
readonly description: "When the community's authorization credential to the group expires. The community renews it well before.";
|
|
241
|
+
};
|
|
242
|
+
readonly createdAt: {
|
|
243
|
+
readonly type: "string";
|
|
244
|
+
readonly format: "date-time";
|
|
245
|
+
};
|
|
246
|
+
readonly createdBy: {
|
|
247
|
+
readonly $ref: "#/$defs/EntryId";
|
|
248
|
+
readonly description: "The creating administrator's directory entry, where they have one.";
|
|
249
|
+
};
|
|
250
|
+
readonly updatedAt: {
|
|
251
|
+
readonly type: "string";
|
|
252
|
+
readonly format: "date-time";
|
|
253
|
+
};
|
|
254
|
+
readonly ext: {
|
|
255
|
+
readonly $ref: "#/$defs/Ext";
|
|
256
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1. An extension member MUST NOT carry authority.";
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
readonly GroupAudience: {
|
|
261
|
+
readonly title: "GroupAudience";
|
|
262
|
+
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.";
|
|
263
|
+
readonly type: "string";
|
|
264
|
+
readonly enum: readonly ["admins", "groupMembers", "members"];
|
|
265
|
+
};
|
|
266
|
+
readonly JoinPolicy: {
|
|
267
|
+
readonly title: "JoinPolicy";
|
|
268
|
+
readonly description: "How a member enters a static group by themselves. `closed`: only a manager adds them. `request`: a member asks and a manager decides. `open`: a member joins at once, subject to the community's `groups` policy. A group carrying authority is always `closed`.";
|
|
269
|
+
readonly type: "string";
|
|
270
|
+
readonly enum: readonly ["closed", "request", "open"];
|
|
271
|
+
};
|
|
272
|
+
readonly DynamicRule: {
|
|
273
|
+
readonly title: "DynamicRule";
|
|
274
|
+
readonly description: "A dynamic group's membership rule: a member belongs when every condition holds and they have not opted out. The community evaluates it under its `groups` policy and recomputes membership whenever a fact it reads changes, always excluding opted-out entries.";
|
|
275
|
+
readonly type: "object";
|
|
276
|
+
readonly additionalProperties: false;
|
|
277
|
+
readonly required: readonly ["all"];
|
|
278
|
+
readonly properties: {
|
|
279
|
+
readonly all: {
|
|
280
|
+
readonly type: "array";
|
|
281
|
+
readonly minItems: 1;
|
|
282
|
+
readonly maxItems: 16;
|
|
283
|
+
readonly items: {
|
|
284
|
+
readonly $ref: "#/$defs/RuleCondition";
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
readonly RuleCondition: {
|
|
290
|
+
readonly title: "RuleCondition";
|
|
291
|
+
readonly description: "One test over a verified fact about a member. `fact: role` tests the member's community role; `fact: field` tests an `admin`- or `credential`-sourced directory field named by `field`; `fact: personhood` tests whether a personhood assertion is on file; `fact: joinedAt` tests when they joined. A rule never reads a self-asserted (`member`-sourced) field: a member must not be able to join a group by editing their card.";
|
|
292
|
+
readonly type: "object";
|
|
293
|
+
readonly additionalProperties: false;
|
|
294
|
+
readonly required: readonly ["fact", "op"];
|
|
295
|
+
readonly properties: {
|
|
296
|
+
readonly fact: {
|
|
297
|
+
readonly type: "string";
|
|
298
|
+
readonly enum: readonly ["role", "field", "personhood", "joinedAt"];
|
|
299
|
+
};
|
|
300
|
+
readonly field: {
|
|
301
|
+
readonly $ref: "#/$defs/FieldKey";
|
|
302
|
+
readonly description: "Present exactly when `fact` is `field`.";
|
|
303
|
+
};
|
|
304
|
+
readonly op: {
|
|
305
|
+
readonly type: "string";
|
|
306
|
+
readonly enum: readonly ["equals", "oneOf", "exists", "before", "after"];
|
|
307
|
+
readonly description: "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`.";
|
|
308
|
+
};
|
|
309
|
+
readonly value: {
|
|
310
|
+
readonly anyOf: readonly [{
|
|
311
|
+
readonly type: "string";
|
|
312
|
+
readonly maxLength: 256;
|
|
313
|
+
}, {
|
|
314
|
+
readonly type: "boolean";
|
|
315
|
+
}];
|
|
316
|
+
};
|
|
317
|
+
readonly values: {
|
|
318
|
+
readonly type: "array";
|
|
319
|
+
readonly minItems: 1;
|
|
320
|
+
readonly maxItems: 64;
|
|
321
|
+
readonly items: {
|
|
322
|
+
readonly type: "string";
|
|
323
|
+
readonly maxLength: 256;
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
readonly FieldKey: {
|
|
329
|
+
readonly title: "FieldKey";
|
|
330
|
+
readonly description: "Identifier of a directory field. A key with no `.` is a BASE field, the same in every community: `displayName`, `nickname`, `avatar`, `pronouns`, `bio`, `links` (written by the member) and `role`, `joinedAt`, `did`, `personhood` (derived from the community's own records, never stored on a card). A community-defined field MUST use a reverse-DNS key (`org.example.employer`), so a base key never collides with one, and a key is never reused with a different meaning once defined.";
|
|
331
|
+
readonly type: "string";
|
|
332
|
+
readonly minLength: 1;
|
|
333
|
+
readonly maxLength: 128;
|
|
334
|
+
readonly pattern: "^([a-z][a-z0-9-]*\\.)*[a-z][a-zA-Z0-9]{0,63}$";
|
|
335
|
+
};
|
|
336
|
+
readonly GroupKind: {
|
|
337
|
+
readonly title: "GroupKind";
|
|
338
|
+
readonly description: "`static`: membership is explicit — added, joined, or granted on request. `dynamic`: membership is computed from `rule` over verified facts only; nobody is added by hand, but a member may opt out (vtc/groups/leave), an exclusion the rule cannot override, and undo it (vtc/groups/join). A dynamic group never confers authority. Fixed for the group's life.";
|
|
339
|
+
readonly type: "string";
|
|
340
|
+
readonly enum: readonly ["static", "dynamic"];
|
|
341
|
+
};
|
|
342
|
+
readonly GroupDescription: {
|
|
343
|
+
readonly title: "GroupDescription";
|
|
344
|
+
readonly type: "string";
|
|
345
|
+
readonly minLength: 1;
|
|
346
|
+
readonly maxLength: 1000;
|
|
347
|
+
readonly description: "What the group is for. Plain text; a reader MUST NOT treat it as instructions. Same placement rules as `GroupName`.";
|
|
348
|
+
};
|
|
349
|
+
readonly GroupName: {
|
|
350
|
+
readonly title: "GroupName";
|
|
351
|
+
readonly type: "string";
|
|
352
|
+
readonly minLength: 1;
|
|
353
|
+
readonly maxLength: 128;
|
|
354
|
+
readonly description: "The group's name, shown to those who may see the group. The community's own record: never in the group's DID document or its credentials' subject beyond the group's DID. Plain text.";
|
|
355
|
+
};
|
|
356
|
+
readonly GroupId: {
|
|
357
|
+
readonly title: "GroupId";
|
|
358
|
+
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.";
|
|
359
|
+
readonly type: "string";
|
|
360
|
+
readonly pattern: "^grp_[A-Za-z0-9_-]{16,64}$";
|
|
361
|
+
};
|
|
362
|
+
readonly EntryId: {
|
|
363
|
+
readonly title: "EntryId";
|
|
364
|
+
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.";
|
|
365
|
+
readonly type: "string";
|
|
366
|
+
readonly pattern: "^dir_[A-Za-z0-9_-]{16,64}$";
|
|
367
|
+
};
|
|
368
|
+
readonly BadgeId: {
|
|
369
|
+
readonly title: "BadgeId";
|
|
370
|
+
readonly description: "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).";
|
|
371
|
+
readonly type: "string";
|
|
372
|
+
readonly pattern: "^bdg_[A-Za-z0-9_-]{16,64}$";
|
|
373
|
+
};
|
|
374
|
+
readonly Badge: {
|
|
375
|
+
readonly title: "Badge";
|
|
376
|
+
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.";
|
|
377
|
+
readonly type: "object";
|
|
378
|
+
readonly additionalProperties: false;
|
|
379
|
+
readonly required: readonly ["badgeId", "kind", "name", "description", "image", "repeatable", "listed", "state", "createdAt"];
|
|
380
|
+
readonly properties: {
|
|
381
|
+
readonly badgeId: {
|
|
382
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
383
|
+
};
|
|
384
|
+
readonly kind: {
|
|
385
|
+
readonly $ref: "#/$defs/BadgeKind";
|
|
386
|
+
};
|
|
387
|
+
readonly name: {
|
|
388
|
+
readonly $ref: "#/$defs/BadgeName";
|
|
389
|
+
};
|
|
390
|
+
readonly description: {
|
|
391
|
+
readonly $ref: "#/$defs/BadgeDescription";
|
|
392
|
+
};
|
|
393
|
+
readonly criteria: {
|
|
394
|
+
readonly $ref: "#/$defs/BadgeCriteria";
|
|
395
|
+
};
|
|
396
|
+
readonly image: {
|
|
397
|
+
readonly $ref: "#/$defs/CardBlobRef";
|
|
398
|
+
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.";
|
|
399
|
+
};
|
|
400
|
+
readonly repeatable: {
|
|
401
|
+
readonly type: "boolean";
|
|
402
|
+
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.";
|
|
403
|
+
};
|
|
404
|
+
readonly requestable: {
|
|
405
|
+
readonly type: "boolean";
|
|
406
|
+
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.";
|
|
407
|
+
};
|
|
408
|
+
readonly listed: {
|
|
409
|
+
readonly type: "boolean";
|
|
410
|
+
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.";
|
|
411
|
+
};
|
|
412
|
+
readonly shareableOutside: {
|
|
413
|
+
readonly type: "boolean";
|
|
414
|
+
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.";
|
|
415
|
+
};
|
|
416
|
+
readonly groupId: {
|
|
417
|
+
readonly $ref: "#/$defs/GroupId";
|
|
418
|
+
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.";
|
|
419
|
+
};
|
|
420
|
+
readonly state: {
|
|
421
|
+
readonly $ref: "#/$defs/BadgeState";
|
|
422
|
+
};
|
|
423
|
+
readonly holderCount: {
|
|
424
|
+
readonly type: "integer";
|
|
425
|
+
readonly minimum: 0;
|
|
426
|
+
readonly description: "Holders who show the badge. Only to callers who may see the holders.";
|
|
427
|
+
};
|
|
428
|
+
readonly createdAt: {
|
|
429
|
+
readonly type: "string";
|
|
430
|
+
readonly format: "date-time";
|
|
431
|
+
};
|
|
432
|
+
readonly createdBy: {
|
|
433
|
+
readonly $ref: "#/$defs/EntryId";
|
|
434
|
+
};
|
|
435
|
+
readonly updatedAt: {
|
|
436
|
+
readonly type: "string";
|
|
437
|
+
readonly format: "date-time";
|
|
438
|
+
};
|
|
439
|
+
readonly retiredAt: {
|
|
440
|
+
readonly type: "string";
|
|
441
|
+
readonly format: "date-time";
|
|
442
|
+
};
|
|
443
|
+
readonly ext: {
|
|
444
|
+
readonly $ref: "#/$defs/Ext";
|
|
445
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1. An extension member MUST NOT carry authority.";
|
|
446
|
+
};
|
|
447
|
+
};
|
|
448
|
+
};
|
|
449
|
+
readonly BadgeState: {
|
|
450
|
+
readonly title: "BadgeState";
|
|
451
|
+
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).";
|
|
452
|
+
readonly type: "string";
|
|
453
|
+
readonly enum: readonly ["active", "retired"];
|
|
454
|
+
};
|
|
455
|
+
readonly BadgeCriteria: {
|
|
456
|
+
readonly title: "BadgeCriteria";
|
|
457
|
+
readonly type: "string";
|
|
458
|
+
readonly minLength: 1;
|
|
459
|
+
readonly maxLength: 1000;
|
|
460
|
+
readonly description: "How the badge is earned, shown to members and written into the credential's Achievement as its criteria narrative. Plain text.";
|
|
461
|
+
};
|
|
462
|
+
readonly BadgeDescription: {
|
|
463
|
+
readonly title: "BadgeDescription";
|
|
464
|
+
readonly type: "string";
|
|
465
|
+
readonly minLength: 1;
|
|
466
|
+
readonly maxLength: 1000;
|
|
467
|
+
readonly description: "What the badge is for. Plain text; a reader MUST NOT treat it as instructions.";
|
|
468
|
+
};
|
|
469
|
+
readonly BadgeName: {
|
|
470
|
+
readonly title: "BadgeName";
|
|
471
|
+
readonly type: "string";
|
|
472
|
+
readonly minLength: 1;
|
|
473
|
+
readonly maxLength: 64;
|
|
474
|
+
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.";
|
|
475
|
+
};
|
|
476
|
+
readonly BadgeKind: {
|
|
477
|
+
readonly title: "BadgeKind";
|
|
478
|
+
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).";
|
|
479
|
+
readonly type: "string";
|
|
480
|
+
readonly enum: readonly ["community", "kudos"];
|
|
481
|
+
};
|
|
482
|
+
readonly CardBlobRef: {
|
|
483
|
+
readonly title: "CardBlobRef";
|
|
484
|
+
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.";
|
|
485
|
+
readonly type: "object";
|
|
486
|
+
readonly additionalProperties: false;
|
|
487
|
+
readonly required: readonly ["sha256", "mediaType"];
|
|
488
|
+
readonly properties: {
|
|
489
|
+
readonly sha256: {
|
|
490
|
+
readonly type: "string";
|
|
491
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
492
|
+
readonly description: "Lowercase hex SHA-256 of the stored, re-encoded bytes.";
|
|
493
|
+
};
|
|
494
|
+
readonly mediaType: {
|
|
495
|
+
readonly type: "string";
|
|
496
|
+
readonly enum: readonly ["image/png", "image/jpeg", "image/webp", "image/avif"];
|
|
497
|
+
readonly description: "Media type of the stored bytes.";
|
|
498
|
+
};
|
|
499
|
+
readonly size: {
|
|
500
|
+
readonly type: "integer";
|
|
501
|
+
readonly minimum: 1;
|
|
502
|
+
readonly maximum: 262144;
|
|
503
|
+
readonly description: "Size in bytes of the stored bytes.";
|
|
504
|
+
};
|
|
505
|
+
readonly url: {
|
|
506
|
+
readonly type: "string";
|
|
507
|
+
readonly format: "uri";
|
|
508
|
+
readonly maxLength: 2048;
|
|
509
|
+
readonly description: "Projection only: a URL the viewer can fetch the image from until `urlExpiresAt`.";
|
|
510
|
+
};
|
|
511
|
+
readonly urlExpiresAt: {
|
|
512
|
+
readonly type: "string";
|
|
513
|
+
readonly format: "date-time";
|
|
514
|
+
readonly description: "Projection only: when `url` stops working.";
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
};
|
|
518
|
+
};
|
|
519
|
+
};
|
|
520
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
521
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
522
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
523
|
+
readonly $ref: "#/$defs/Response";
|
|
524
|
+
readonly $defs: {
|
|
525
|
+
readonly Response: {
|
|
526
|
+
readonly $anchor: "response";
|
|
527
|
+
readonly title: "VTC Badges — Promote — response payload";
|
|
528
|
+
readonly description: "The success response to a vtc/badges/promote/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/promote/0.1#response.";
|
|
529
|
+
readonly type: "object";
|
|
530
|
+
readonly additionalProperties: false;
|
|
531
|
+
readonly required: readonly ["badge", "group"];
|
|
532
|
+
readonly properties: {
|
|
533
|
+
readonly badge: {
|
|
534
|
+
readonly $ref: "#/$defs/Badge";
|
|
535
|
+
readonly description: "The badge, now `kind` `community` with its `groupId`. `holderCount` is 0 until a holder accepts.";
|
|
536
|
+
};
|
|
537
|
+
readonly group: {
|
|
538
|
+
readonly $ref: "#/$defs/Group";
|
|
539
|
+
readonly description: "The badge group, as vtc/groups/create answers it.";
|
|
540
|
+
};
|
|
541
|
+
readonly holdersOffered: {
|
|
542
|
+
readonly type: "integer";
|
|
543
|
+
readonly minimum: 0;
|
|
544
|
+
readonly description: "How many current holders were offered the badge — one offer each, who they are never said here.";
|
|
545
|
+
};
|
|
546
|
+
readonly ext: {
|
|
547
|
+
readonly $ref: "#/$defs/Ext";
|
|
548
|
+
};
|
|
549
|
+
};
|
|
550
|
+
};
|
|
551
|
+
readonly Ext: {
|
|
552
|
+
readonly title: "Ext";
|
|
553
|
+
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.";
|
|
554
|
+
readonly type: "object";
|
|
555
|
+
readonly minProperties: 1;
|
|
556
|
+
readonly additionalProperties: true;
|
|
557
|
+
readonly propertyNames: {
|
|
558
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
559
|
+
};
|
|
560
|
+
};
|
|
561
|
+
readonly Group: {
|
|
562
|
+
readonly title: "Group";
|
|
563
|
+
readonly description: "A community group, as a caller who may see it sees it. Members a caller may not see are absent: `memberCount` only to those who may see the group's members, `managers` and `credentialAuthorityValidUntil` only to its managers.";
|
|
564
|
+
readonly type: "object";
|
|
565
|
+
readonly additionalProperties: false;
|
|
566
|
+
readonly required: readonly ["groupId", "groupDid", "name", "kind", "visibility", "showMembers", "issuesCredentials", "carriesAuthority", "createdAt"];
|
|
567
|
+
readonly properties: {
|
|
568
|
+
readonly groupId: {
|
|
569
|
+
readonly $ref: "#/$defs/GroupId";
|
|
570
|
+
};
|
|
571
|
+
readonly groupDid: {
|
|
572
|
+
readonly type: "string";
|
|
573
|
+
readonly pattern: "^did:";
|
|
574
|
+
readonly maxLength: 2048;
|
|
575
|
+
readonly description: "The group's own DID, minted by the community's VTA for this group alone. It issues the group's membership credentials. Its DID document carries no name or description.";
|
|
576
|
+
};
|
|
577
|
+
readonly name: {
|
|
578
|
+
readonly $ref: "#/$defs/GroupName";
|
|
579
|
+
};
|
|
580
|
+
readonly description: {
|
|
581
|
+
readonly $ref: "#/$defs/GroupDescription";
|
|
582
|
+
};
|
|
583
|
+
readonly kind: {
|
|
584
|
+
readonly $ref: "#/$defs/GroupKind";
|
|
585
|
+
};
|
|
586
|
+
readonly rule: {
|
|
587
|
+
readonly $ref: "#/$defs/DynamicRule";
|
|
588
|
+
readonly description: "Present exactly when `kind` is `dynamic`.";
|
|
589
|
+
};
|
|
590
|
+
readonly joinPolicy: {
|
|
591
|
+
readonly $ref: "#/$defs/JoinPolicy";
|
|
592
|
+
readonly description: "Present exactly when `kind` is `static`.";
|
|
593
|
+
};
|
|
594
|
+
readonly visibility: {
|
|
595
|
+
readonly $ref: "#/$defs/GroupAudience";
|
|
596
|
+
readonly description: "Who may see that the group exists, and its name and description.";
|
|
597
|
+
};
|
|
598
|
+
readonly showMembers: {
|
|
599
|
+
readonly $ref: "#/$defs/GroupAudience";
|
|
600
|
+
readonly description: "Who may see the group's member list. Separate from `visibility`: a group everyone sees may show its members only to administrators. Never wider than `visibility`.";
|
|
601
|
+
};
|
|
602
|
+
readonly issuesCredentials: {
|
|
603
|
+
readonly type: "boolean";
|
|
604
|
+
readonly description: "Whether the group's DID issues its members a membership credential. Default true.";
|
|
605
|
+
};
|
|
606
|
+
readonly carriesAuthority: {
|
|
607
|
+
readonly type: "boolean";
|
|
608
|
+
readonly description: "`true` while the group has a `grants` or `role` binding. Such a group is `static` and `closed` for as long as it does.";
|
|
609
|
+
};
|
|
610
|
+
readonly badgeId: {
|
|
611
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
612
|
+
readonly description: "Present exactly when the group backs a community badge (vtc/badges/*): its managers are the badge's owners, its members the badge's holders, and its DID issues the badge credential in place of a membership credential. A badge group never carries authority, is not counted among the groups two members share, and is listed among the community's groups only to a caller who asks for badge groups (VTI-BDG-010 – VTI-BDG-012).";
|
|
613
|
+
};
|
|
614
|
+
readonly memberCount: {
|
|
615
|
+
readonly type: "integer";
|
|
616
|
+
readonly minimum: 0;
|
|
617
|
+
readonly description: "Active members. Only to callers who may see the member list.";
|
|
618
|
+
};
|
|
619
|
+
readonly managers: {
|
|
620
|
+
readonly type: "array";
|
|
621
|
+
readonly maxItems: 256;
|
|
622
|
+
readonly uniqueItems: true;
|
|
623
|
+
readonly items: {
|
|
624
|
+
readonly $ref: "#/$defs/EntryId";
|
|
625
|
+
};
|
|
626
|
+
readonly description: "Entries holding `vtc.groups.manage` qualified to this group, read from the access-control list. Informational: managers are appointed by an access-control grant (vtc/groups/managers/add), never by this record.";
|
|
627
|
+
};
|
|
628
|
+
readonly credentialAuthorityValidUntil: {
|
|
629
|
+
readonly type: "string";
|
|
630
|
+
readonly format: "date-time";
|
|
631
|
+
readonly description: "When the community's authorization credential to the group expires. The community renews it well before.";
|
|
632
|
+
};
|
|
633
|
+
readonly createdAt: {
|
|
634
|
+
readonly type: "string";
|
|
635
|
+
readonly format: "date-time";
|
|
636
|
+
};
|
|
637
|
+
readonly createdBy: {
|
|
638
|
+
readonly $ref: "#/$defs/EntryId";
|
|
639
|
+
readonly description: "The creating administrator's directory entry, where they have one.";
|
|
640
|
+
};
|
|
641
|
+
readonly updatedAt: {
|
|
642
|
+
readonly type: "string";
|
|
643
|
+
readonly format: "date-time";
|
|
644
|
+
};
|
|
645
|
+
readonly ext: {
|
|
646
|
+
readonly $ref: "#/$defs/Ext";
|
|
647
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1. An extension member MUST NOT carry authority.";
|
|
648
|
+
};
|
|
649
|
+
};
|
|
650
|
+
};
|
|
651
|
+
readonly GroupAudience: {
|
|
652
|
+
readonly title: "GroupAudience";
|
|
653
|
+
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.";
|
|
654
|
+
readonly type: "string";
|
|
655
|
+
readonly enum: readonly ["admins", "groupMembers", "members"];
|
|
656
|
+
};
|
|
657
|
+
readonly JoinPolicy: {
|
|
658
|
+
readonly title: "JoinPolicy";
|
|
659
|
+
readonly description: "How a member enters a static group by themselves. `closed`: only a manager adds them. `request`: a member asks and a manager decides. `open`: a member joins at once, subject to the community's `groups` policy. A group carrying authority is always `closed`.";
|
|
660
|
+
readonly type: "string";
|
|
661
|
+
readonly enum: readonly ["closed", "request", "open"];
|
|
662
|
+
};
|
|
663
|
+
readonly DynamicRule: {
|
|
664
|
+
readonly title: "DynamicRule";
|
|
665
|
+
readonly description: "A dynamic group's membership rule: a member belongs when every condition holds and they have not opted out. The community evaluates it under its `groups` policy and recomputes membership whenever a fact it reads changes, always excluding opted-out entries.";
|
|
666
|
+
readonly type: "object";
|
|
667
|
+
readonly additionalProperties: false;
|
|
668
|
+
readonly required: readonly ["all"];
|
|
669
|
+
readonly properties: {
|
|
670
|
+
readonly all: {
|
|
671
|
+
readonly type: "array";
|
|
672
|
+
readonly minItems: 1;
|
|
673
|
+
readonly maxItems: 16;
|
|
674
|
+
readonly items: {
|
|
675
|
+
readonly $ref: "#/$defs/RuleCondition";
|
|
676
|
+
};
|
|
677
|
+
};
|
|
678
|
+
};
|
|
679
|
+
};
|
|
680
|
+
readonly RuleCondition: {
|
|
681
|
+
readonly title: "RuleCondition";
|
|
682
|
+
readonly description: "One test over a verified fact about a member. `fact: role` tests the member's community role; `fact: field` tests an `admin`- or `credential`-sourced directory field named by `field`; `fact: personhood` tests whether a personhood assertion is on file; `fact: joinedAt` tests when they joined. A rule never reads a self-asserted (`member`-sourced) field: a member must not be able to join a group by editing their card.";
|
|
683
|
+
readonly type: "object";
|
|
684
|
+
readonly additionalProperties: false;
|
|
685
|
+
readonly required: readonly ["fact", "op"];
|
|
686
|
+
readonly properties: {
|
|
687
|
+
readonly fact: {
|
|
688
|
+
readonly type: "string";
|
|
689
|
+
readonly enum: readonly ["role", "field", "personhood", "joinedAt"];
|
|
690
|
+
};
|
|
691
|
+
readonly field: {
|
|
692
|
+
readonly $ref: "#/$defs/FieldKey";
|
|
693
|
+
readonly description: "Present exactly when `fact` is `field`.";
|
|
694
|
+
};
|
|
695
|
+
readonly op: {
|
|
696
|
+
readonly type: "string";
|
|
697
|
+
readonly enum: readonly ["equals", "oneOf", "exists", "before", "after"];
|
|
698
|
+
readonly description: "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`.";
|
|
699
|
+
};
|
|
700
|
+
readonly value: {
|
|
701
|
+
readonly anyOf: readonly [{
|
|
702
|
+
readonly type: "string";
|
|
703
|
+
readonly maxLength: 256;
|
|
704
|
+
}, {
|
|
705
|
+
readonly type: "boolean";
|
|
706
|
+
}];
|
|
707
|
+
};
|
|
708
|
+
readonly values: {
|
|
709
|
+
readonly type: "array";
|
|
710
|
+
readonly minItems: 1;
|
|
711
|
+
readonly maxItems: 64;
|
|
712
|
+
readonly items: {
|
|
713
|
+
readonly type: "string";
|
|
714
|
+
readonly maxLength: 256;
|
|
715
|
+
};
|
|
716
|
+
};
|
|
717
|
+
};
|
|
718
|
+
};
|
|
719
|
+
readonly FieldKey: {
|
|
720
|
+
readonly title: "FieldKey";
|
|
721
|
+
readonly description: "Identifier of a directory field. A key with no `.` is a BASE field, the same in every community: `displayName`, `nickname`, `avatar`, `pronouns`, `bio`, `links` (written by the member) and `role`, `joinedAt`, `did`, `personhood` (derived from the community's own records, never stored on a card). A community-defined field MUST use a reverse-DNS key (`org.example.employer`), so a base key never collides with one, and a key is never reused with a different meaning once defined.";
|
|
722
|
+
readonly type: "string";
|
|
723
|
+
readonly minLength: 1;
|
|
724
|
+
readonly maxLength: 128;
|
|
725
|
+
readonly pattern: "^([a-z][a-z0-9-]*\\.)*[a-z][a-zA-Z0-9]{0,63}$";
|
|
726
|
+
};
|
|
727
|
+
readonly GroupKind: {
|
|
728
|
+
readonly title: "GroupKind";
|
|
729
|
+
readonly description: "`static`: membership is explicit — added, joined, or granted on request. `dynamic`: membership is computed from `rule` over verified facts only; nobody is added by hand, but a member may opt out (vtc/groups/leave), an exclusion the rule cannot override, and undo it (vtc/groups/join). A dynamic group never confers authority. Fixed for the group's life.";
|
|
730
|
+
readonly type: "string";
|
|
731
|
+
readonly enum: readonly ["static", "dynamic"];
|
|
732
|
+
};
|
|
733
|
+
readonly GroupDescription: {
|
|
734
|
+
readonly title: "GroupDescription";
|
|
735
|
+
readonly type: "string";
|
|
736
|
+
readonly minLength: 1;
|
|
737
|
+
readonly maxLength: 1000;
|
|
738
|
+
readonly description: "What the group is for. Plain text; a reader MUST NOT treat it as instructions. Same placement rules as `GroupName`.";
|
|
739
|
+
};
|
|
740
|
+
readonly GroupName: {
|
|
741
|
+
readonly title: "GroupName";
|
|
742
|
+
readonly type: "string";
|
|
743
|
+
readonly minLength: 1;
|
|
744
|
+
readonly maxLength: 128;
|
|
745
|
+
readonly description: "The group's name, shown to those who may see the group. The community's own record: never in the group's DID document or its credentials' subject beyond the group's DID. Plain text.";
|
|
746
|
+
};
|
|
747
|
+
readonly GroupId: {
|
|
748
|
+
readonly title: "GroupId";
|
|
749
|
+
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.";
|
|
750
|
+
readonly type: "string";
|
|
751
|
+
readonly pattern: "^grp_[A-Za-z0-9_-]{16,64}$";
|
|
752
|
+
};
|
|
753
|
+
readonly EntryId: {
|
|
754
|
+
readonly title: "EntryId";
|
|
755
|
+
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.";
|
|
756
|
+
readonly type: "string";
|
|
757
|
+
readonly pattern: "^dir_[A-Za-z0-9_-]{16,64}$";
|
|
758
|
+
};
|
|
759
|
+
readonly BadgeId: {
|
|
760
|
+
readonly title: "BadgeId";
|
|
761
|
+
readonly description: "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).";
|
|
762
|
+
readonly type: "string";
|
|
763
|
+
readonly pattern: "^bdg_[A-Za-z0-9_-]{16,64}$";
|
|
764
|
+
};
|
|
765
|
+
readonly Badge: {
|
|
766
|
+
readonly title: "Badge";
|
|
767
|
+
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.";
|
|
768
|
+
readonly type: "object";
|
|
769
|
+
readonly additionalProperties: false;
|
|
770
|
+
readonly required: readonly ["badgeId", "kind", "name", "description", "image", "repeatable", "listed", "state", "createdAt"];
|
|
771
|
+
readonly properties: {
|
|
772
|
+
readonly badgeId: {
|
|
773
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
774
|
+
};
|
|
775
|
+
readonly kind: {
|
|
776
|
+
readonly $ref: "#/$defs/BadgeKind";
|
|
777
|
+
};
|
|
778
|
+
readonly name: {
|
|
779
|
+
readonly $ref: "#/$defs/BadgeName";
|
|
780
|
+
};
|
|
781
|
+
readonly description: {
|
|
782
|
+
readonly $ref: "#/$defs/BadgeDescription";
|
|
783
|
+
};
|
|
784
|
+
readonly criteria: {
|
|
785
|
+
readonly $ref: "#/$defs/BadgeCriteria";
|
|
786
|
+
};
|
|
787
|
+
readonly image: {
|
|
788
|
+
readonly $ref: "#/$defs/CardBlobRef";
|
|
789
|
+
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.";
|
|
790
|
+
};
|
|
791
|
+
readonly repeatable: {
|
|
792
|
+
readonly type: "boolean";
|
|
793
|
+
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.";
|
|
794
|
+
};
|
|
795
|
+
readonly requestable: {
|
|
796
|
+
readonly type: "boolean";
|
|
797
|
+
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.";
|
|
798
|
+
};
|
|
799
|
+
readonly listed: {
|
|
800
|
+
readonly type: "boolean";
|
|
801
|
+
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.";
|
|
802
|
+
};
|
|
803
|
+
readonly shareableOutside: {
|
|
804
|
+
readonly type: "boolean";
|
|
805
|
+
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.";
|
|
806
|
+
};
|
|
807
|
+
readonly groupId: {
|
|
808
|
+
readonly $ref: "#/$defs/GroupId";
|
|
809
|
+
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.";
|
|
810
|
+
};
|
|
811
|
+
readonly state: {
|
|
812
|
+
readonly $ref: "#/$defs/BadgeState";
|
|
813
|
+
};
|
|
814
|
+
readonly holderCount: {
|
|
815
|
+
readonly type: "integer";
|
|
816
|
+
readonly minimum: 0;
|
|
817
|
+
readonly description: "Holders who show the badge. Only to callers who may see the holders.";
|
|
818
|
+
};
|
|
819
|
+
readonly createdAt: {
|
|
820
|
+
readonly type: "string";
|
|
821
|
+
readonly format: "date-time";
|
|
822
|
+
};
|
|
823
|
+
readonly createdBy: {
|
|
824
|
+
readonly $ref: "#/$defs/EntryId";
|
|
825
|
+
};
|
|
826
|
+
readonly updatedAt: {
|
|
827
|
+
readonly type: "string";
|
|
828
|
+
readonly format: "date-time";
|
|
829
|
+
};
|
|
830
|
+
readonly retiredAt: {
|
|
831
|
+
readonly type: "string";
|
|
832
|
+
readonly format: "date-time";
|
|
833
|
+
};
|
|
834
|
+
readonly ext: {
|
|
835
|
+
readonly $ref: "#/$defs/Ext";
|
|
836
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1. An extension member MUST NOT carry authority.";
|
|
837
|
+
};
|
|
838
|
+
};
|
|
839
|
+
};
|
|
840
|
+
readonly BadgeState: {
|
|
841
|
+
readonly title: "BadgeState";
|
|
842
|
+
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).";
|
|
843
|
+
readonly type: "string";
|
|
844
|
+
readonly enum: readonly ["active", "retired"];
|
|
845
|
+
};
|
|
846
|
+
readonly BadgeCriteria: {
|
|
847
|
+
readonly title: "BadgeCriteria";
|
|
848
|
+
readonly type: "string";
|
|
849
|
+
readonly minLength: 1;
|
|
850
|
+
readonly maxLength: 1000;
|
|
851
|
+
readonly description: "How the badge is earned, shown to members and written into the credential's Achievement as its criteria narrative. Plain text.";
|
|
852
|
+
};
|
|
853
|
+
readonly BadgeDescription: {
|
|
854
|
+
readonly title: "BadgeDescription";
|
|
855
|
+
readonly type: "string";
|
|
856
|
+
readonly minLength: 1;
|
|
857
|
+
readonly maxLength: 1000;
|
|
858
|
+
readonly description: "What the badge is for. Plain text; a reader MUST NOT treat it as instructions.";
|
|
859
|
+
};
|
|
860
|
+
readonly BadgeName: {
|
|
861
|
+
readonly title: "BadgeName";
|
|
862
|
+
readonly type: "string";
|
|
863
|
+
readonly minLength: 1;
|
|
864
|
+
readonly maxLength: 64;
|
|
865
|
+
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.";
|
|
866
|
+
};
|
|
867
|
+
readonly BadgeKind: {
|
|
868
|
+
readonly title: "BadgeKind";
|
|
869
|
+
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).";
|
|
870
|
+
readonly type: "string";
|
|
871
|
+
readonly enum: readonly ["community", "kudos"];
|
|
872
|
+
};
|
|
873
|
+
readonly CardBlobRef: {
|
|
874
|
+
readonly title: "CardBlobRef";
|
|
875
|
+
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.";
|
|
876
|
+
readonly type: "object";
|
|
877
|
+
readonly additionalProperties: false;
|
|
878
|
+
readonly required: readonly ["sha256", "mediaType"];
|
|
879
|
+
readonly properties: {
|
|
880
|
+
readonly sha256: {
|
|
881
|
+
readonly type: "string";
|
|
882
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
883
|
+
readonly description: "Lowercase hex SHA-256 of the stored, re-encoded bytes.";
|
|
884
|
+
};
|
|
885
|
+
readonly mediaType: {
|
|
886
|
+
readonly type: "string";
|
|
887
|
+
readonly enum: readonly ["image/png", "image/jpeg", "image/webp", "image/avif"];
|
|
888
|
+
readonly description: "Media type of the stored bytes.";
|
|
889
|
+
};
|
|
890
|
+
readonly size: {
|
|
891
|
+
readonly type: "integer";
|
|
892
|
+
readonly minimum: 1;
|
|
893
|
+
readonly maximum: 262144;
|
|
894
|
+
readonly description: "Size in bytes of the stored bytes.";
|
|
895
|
+
};
|
|
896
|
+
readonly url: {
|
|
897
|
+
readonly type: "string";
|
|
898
|
+
readonly format: "uri";
|
|
899
|
+
readonly maxLength: 2048;
|
|
900
|
+
readonly description: "Projection only: a URL the viewer can fetch the image from until `urlExpiresAt`.";
|
|
901
|
+
};
|
|
902
|
+
readonly urlExpiresAt: {
|
|
903
|
+
readonly type: "string";
|
|
904
|
+
readonly format: "date-time";
|
|
905
|
+
readonly description: "Projection only: when `url` stops working.";
|
|
906
|
+
};
|
|
907
|
+
};
|
|
908
|
+
};
|
|
909
|
+
};
|
|
910
|
+
};
|
|
911
|
+
/**
|
|
912
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
913
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
914
|
+
* per-specification and cannot be derived from the document alone, and
|
|
915
|
+
* item 2 needs the schema this carries.
|
|
916
|
+
*/
|
|
917
|
+
export declare const SPEC: {
|
|
918
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/badges/promote/0.1";
|
|
919
|
+
readonly isBearer: false;
|
|
920
|
+
readonly isProofRequired: true;
|
|
921
|
+
readonly isRecipientRequired: true;
|
|
922
|
+
readonly isIssuedAtRequired: true;
|
|
923
|
+
readonly payloadSchema: {
|
|
924
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
925
|
+
readonly $id: "https://trusttasks.org/spec/vtc/badges/promote/0.1";
|
|
926
|
+
readonly title: "VTC Badges — Promote — payload";
|
|
927
|
+
readonly description: "Turn a kudos badge into a community badge: its badge group is created and its owners named, and every current holder is offered the badge so that each accepts before anything is issued or recorded. The outer document members are owned by the framework — SPEC §6.3.";
|
|
928
|
+
readonly type: "object";
|
|
929
|
+
readonly additionalProperties: false;
|
|
930
|
+
readonly required: readonly ["badgeId", "reason"];
|
|
931
|
+
readonly properties: {
|
|
932
|
+
readonly badgeId: {
|
|
933
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
934
|
+
readonly description: "A kudos badge.";
|
|
935
|
+
};
|
|
936
|
+
readonly requestable: {
|
|
937
|
+
readonly type: "boolean";
|
|
938
|
+
readonly description: "Whether members may ask for it (a request to join the badge group). Absent: false.";
|
|
939
|
+
};
|
|
940
|
+
readonly shareableOutside: {
|
|
941
|
+
readonly type: "boolean";
|
|
942
|
+
readonly description: "Whether holders may show it outside the community, which fixes the credential's regime for the badge's life. Absent: false.";
|
|
943
|
+
};
|
|
944
|
+
readonly holdersVisibleTo: {
|
|
945
|
+
readonly $ref: "#/$defs/GroupAudience";
|
|
946
|
+
readonly description: "Who may see the badge's holders: the badge group's `showMembers`. Absent: `members`.";
|
|
947
|
+
};
|
|
948
|
+
readonly owners: {
|
|
949
|
+
readonly type: "array";
|
|
950
|
+
readonly maxItems: 32;
|
|
951
|
+
readonly uniqueItems: true;
|
|
952
|
+
readonly items: {
|
|
953
|
+
readonly $ref: "#/$defs/EntryId";
|
|
954
|
+
};
|
|
955
|
+
readonly description: "Members to appoint as the badge's owners — the badge group's managers — as vtc/groups/managers/add appoints them, bounded by the signer's own holding. The badge's maker is an owner only if named here.";
|
|
956
|
+
};
|
|
957
|
+
readonly reason: {
|
|
958
|
+
readonly type: "string";
|
|
959
|
+
readonly minLength: 1;
|
|
960
|
+
readonly maxLength: 1024;
|
|
961
|
+
readonly description: "Why, recorded with the change.";
|
|
962
|
+
};
|
|
963
|
+
readonly ext: {
|
|
964
|
+
readonly $ref: "#/$defs/Ext";
|
|
965
|
+
};
|
|
966
|
+
};
|
|
967
|
+
readonly $defs: {
|
|
968
|
+
readonly Response: {
|
|
969
|
+
readonly $anchor: "response";
|
|
970
|
+
readonly title: "VTC Badges — Promote — response payload";
|
|
971
|
+
readonly description: "The success response to a vtc/badges/promote/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/promote/0.1#response.";
|
|
972
|
+
readonly type: "object";
|
|
973
|
+
readonly additionalProperties: false;
|
|
974
|
+
readonly required: readonly ["badge", "group"];
|
|
975
|
+
readonly properties: {
|
|
976
|
+
readonly badge: {
|
|
977
|
+
readonly $ref: "#/$defs/Badge";
|
|
978
|
+
readonly description: "The badge, now `kind` `community` with its `groupId`. `holderCount` is 0 until a holder accepts.";
|
|
979
|
+
};
|
|
980
|
+
readonly group: {
|
|
981
|
+
readonly $ref: "#/$defs/Group";
|
|
982
|
+
readonly description: "The badge group, as vtc/groups/create answers it.";
|
|
983
|
+
};
|
|
984
|
+
readonly holdersOffered: {
|
|
985
|
+
readonly type: "integer";
|
|
986
|
+
readonly minimum: 0;
|
|
987
|
+
readonly description: "How many current holders were offered the badge — one offer each, who they are never said here.";
|
|
988
|
+
};
|
|
989
|
+
readonly ext: {
|
|
990
|
+
readonly $ref: "#/$defs/Ext";
|
|
991
|
+
};
|
|
992
|
+
};
|
|
993
|
+
};
|
|
994
|
+
readonly Ext: {
|
|
995
|
+
readonly title: "Ext";
|
|
996
|
+
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.";
|
|
997
|
+
readonly type: "object";
|
|
998
|
+
readonly minProperties: 1;
|
|
999
|
+
readonly additionalProperties: true;
|
|
1000
|
+
readonly propertyNames: {
|
|
1001
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
1002
|
+
};
|
|
1003
|
+
};
|
|
1004
|
+
readonly Group: {
|
|
1005
|
+
readonly title: "Group";
|
|
1006
|
+
readonly description: "A community group, as a caller who may see it sees it. Members a caller may not see are absent: `memberCount` only to those who may see the group's members, `managers` and `credentialAuthorityValidUntil` only to its managers.";
|
|
1007
|
+
readonly type: "object";
|
|
1008
|
+
readonly additionalProperties: false;
|
|
1009
|
+
readonly required: readonly ["groupId", "groupDid", "name", "kind", "visibility", "showMembers", "issuesCredentials", "carriesAuthority", "createdAt"];
|
|
1010
|
+
readonly properties: {
|
|
1011
|
+
readonly groupId: {
|
|
1012
|
+
readonly $ref: "#/$defs/GroupId";
|
|
1013
|
+
};
|
|
1014
|
+
readonly groupDid: {
|
|
1015
|
+
readonly type: "string";
|
|
1016
|
+
readonly pattern: "^did:";
|
|
1017
|
+
readonly maxLength: 2048;
|
|
1018
|
+
readonly description: "The group's own DID, minted by the community's VTA for this group alone. It issues the group's membership credentials. Its DID document carries no name or description.";
|
|
1019
|
+
};
|
|
1020
|
+
readonly name: {
|
|
1021
|
+
readonly $ref: "#/$defs/GroupName";
|
|
1022
|
+
};
|
|
1023
|
+
readonly description: {
|
|
1024
|
+
readonly $ref: "#/$defs/GroupDescription";
|
|
1025
|
+
};
|
|
1026
|
+
readonly kind: {
|
|
1027
|
+
readonly $ref: "#/$defs/GroupKind";
|
|
1028
|
+
};
|
|
1029
|
+
readonly rule: {
|
|
1030
|
+
readonly $ref: "#/$defs/DynamicRule";
|
|
1031
|
+
readonly description: "Present exactly when `kind` is `dynamic`.";
|
|
1032
|
+
};
|
|
1033
|
+
readonly joinPolicy: {
|
|
1034
|
+
readonly $ref: "#/$defs/JoinPolicy";
|
|
1035
|
+
readonly description: "Present exactly when `kind` is `static`.";
|
|
1036
|
+
};
|
|
1037
|
+
readonly visibility: {
|
|
1038
|
+
readonly $ref: "#/$defs/GroupAudience";
|
|
1039
|
+
readonly description: "Who may see that the group exists, and its name and description.";
|
|
1040
|
+
};
|
|
1041
|
+
readonly showMembers: {
|
|
1042
|
+
readonly $ref: "#/$defs/GroupAudience";
|
|
1043
|
+
readonly description: "Who may see the group's member list. Separate from `visibility`: a group everyone sees may show its members only to administrators. Never wider than `visibility`.";
|
|
1044
|
+
};
|
|
1045
|
+
readonly issuesCredentials: {
|
|
1046
|
+
readonly type: "boolean";
|
|
1047
|
+
readonly description: "Whether the group's DID issues its members a membership credential. Default true.";
|
|
1048
|
+
};
|
|
1049
|
+
readonly carriesAuthority: {
|
|
1050
|
+
readonly type: "boolean";
|
|
1051
|
+
readonly description: "`true` while the group has a `grants` or `role` binding. Such a group is `static` and `closed` for as long as it does.";
|
|
1052
|
+
};
|
|
1053
|
+
readonly badgeId: {
|
|
1054
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
1055
|
+
readonly description: "Present exactly when the group backs a community badge (vtc/badges/*): its managers are the badge's owners, its members the badge's holders, and its DID issues the badge credential in place of a membership credential. A badge group never carries authority, is not counted among the groups two members share, and is listed among the community's groups only to a caller who asks for badge groups (VTI-BDG-010 – VTI-BDG-012).";
|
|
1056
|
+
};
|
|
1057
|
+
readonly memberCount: {
|
|
1058
|
+
readonly type: "integer";
|
|
1059
|
+
readonly minimum: 0;
|
|
1060
|
+
readonly description: "Active members. Only to callers who may see the member list.";
|
|
1061
|
+
};
|
|
1062
|
+
readonly managers: {
|
|
1063
|
+
readonly type: "array";
|
|
1064
|
+
readonly maxItems: 256;
|
|
1065
|
+
readonly uniqueItems: true;
|
|
1066
|
+
readonly items: {
|
|
1067
|
+
readonly $ref: "#/$defs/EntryId";
|
|
1068
|
+
};
|
|
1069
|
+
readonly description: "Entries holding `vtc.groups.manage` qualified to this group, read from the access-control list. Informational: managers are appointed by an access-control grant (vtc/groups/managers/add), never by this record.";
|
|
1070
|
+
};
|
|
1071
|
+
readonly credentialAuthorityValidUntil: {
|
|
1072
|
+
readonly type: "string";
|
|
1073
|
+
readonly format: "date-time";
|
|
1074
|
+
readonly description: "When the community's authorization credential to the group expires. The community renews it well before.";
|
|
1075
|
+
};
|
|
1076
|
+
readonly createdAt: {
|
|
1077
|
+
readonly type: "string";
|
|
1078
|
+
readonly format: "date-time";
|
|
1079
|
+
};
|
|
1080
|
+
readonly createdBy: {
|
|
1081
|
+
readonly $ref: "#/$defs/EntryId";
|
|
1082
|
+
readonly description: "The creating administrator's directory entry, where they have one.";
|
|
1083
|
+
};
|
|
1084
|
+
readonly updatedAt: {
|
|
1085
|
+
readonly type: "string";
|
|
1086
|
+
readonly format: "date-time";
|
|
1087
|
+
};
|
|
1088
|
+
readonly ext: {
|
|
1089
|
+
readonly $ref: "#/$defs/Ext";
|
|
1090
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1. An extension member MUST NOT carry authority.";
|
|
1091
|
+
};
|
|
1092
|
+
};
|
|
1093
|
+
};
|
|
1094
|
+
readonly GroupAudience: {
|
|
1095
|
+
readonly title: "GroupAudience";
|
|
1096
|
+
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.";
|
|
1097
|
+
readonly type: "string";
|
|
1098
|
+
readonly enum: readonly ["admins", "groupMembers", "members"];
|
|
1099
|
+
};
|
|
1100
|
+
readonly JoinPolicy: {
|
|
1101
|
+
readonly title: "JoinPolicy";
|
|
1102
|
+
readonly description: "How a member enters a static group by themselves. `closed`: only a manager adds them. `request`: a member asks and a manager decides. `open`: a member joins at once, subject to the community's `groups` policy. A group carrying authority is always `closed`.";
|
|
1103
|
+
readonly type: "string";
|
|
1104
|
+
readonly enum: readonly ["closed", "request", "open"];
|
|
1105
|
+
};
|
|
1106
|
+
readonly DynamicRule: {
|
|
1107
|
+
readonly title: "DynamicRule";
|
|
1108
|
+
readonly description: "A dynamic group's membership rule: a member belongs when every condition holds and they have not opted out. The community evaluates it under its `groups` policy and recomputes membership whenever a fact it reads changes, always excluding opted-out entries.";
|
|
1109
|
+
readonly type: "object";
|
|
1110
|
+
readonly additionalProperties: false;
|
|
1111
|
+
readonly required: readonly ["all"];
|
|
1112
|
+
readonly properties: {
|
|
1113
|
+
readonly all: {
|
|
1114
|
+
readonly type: "array";
|
|
1115
|
+
readonly minItems: 1;
|
|
1116
|
+
readonly maxItems: 16;
|
|
1117
|
+
readonly items: {
|
|
1118
|
+
readonly $ref: "#/$defs/RuleCondition";
|
|
1119
|
+
};
|
|
1120
|
+
};
|
|
1121
|
+
};
|
|
1122
|
+
};
|
|
1123
|
+
readonly RuleCondition: {
|
|
1124
|
+
readonly title: "RuleCondition";
|
|
1125
|
+
readonly description: "One test over a verified fact about a member. `fact: role` tests the member's community role; `fact: field` tests an `admin`- or `credential`-sourced directory field named by `field`; `fact: personhood` tests whether a personhood assertion is on file; `fact: joinedAt` tests when they joined. A rule never reads a self-asserted (`member`-sourced) field: a member must not be able to join a group by editing their card.";
|
|
1126
|
+
readonly type: "object";
|
|
1127
|
+
readonly additionalProperties: false;
|
|
1128
|
+
readonly required: readonly ["fact", "op"];
|
|
1129
|
+
readonly properties: {
|
|
1130
|
+
readonly fact: {
|
|
1131
|
+
readonly type: "string";
|
|
1132
|
+
readonly enum: readonly ["role", "field", "personhood", "joinedAt"];
|
|
1133
|
+
};
|
|
1134
|
+
readonly field: {
|
|
1135
|
+
readonly $ref: "#/$defs/FieldKey";
|
|
1136
|
+
readonly description: "Present exactly when `fact` is `field`.";
|
|
1137
|
+
};
|
|
1138
|
+
readonly op: {
|
|
1139
|
+
readonly type: "string";
|
|
1140
|
+
readonly enum: readonly ["equals", "oneOf", "exists", "before", "after"];
|
|
1141
|
+
readonly description: "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`.";
|
|
1142
|
+
};
|
|
1143
|
+
readonly value: {
|
|
1144
|
+
readonly anyOf: readonly [{
|
|
1145
|
+
readonly type: "string";
|
|
1146
|
+
readonly maxLength: 256;
|
|
1147
|
+
}, {
|
|
1148
|
+
readonly type: "boolean";
|
|
1149
|
+
}];
|
|
1150
|
+
};
|
|
1151
|
+
readonly values: {
|
|
1152
|
+
readonly type: "array";
|
|
1153
|
+
readonly minItems: 1;
|
|
1154
|
+
readonly maxItems: 64;
|
|
1155
|
+
readonly items: {
|
|
1156
|
+
readonly type: "string";
|
|
1157
|
+
readonly maxLength: 256;
|
|
1158
|
+
};
|
|
1159
|
+
};
|
|
1160
|
+
};
|
|
1161
|
+
};
|
|
1162
|
+
readonly FieldKey: {
|
|
1163
|
+
readonly title: "FieldKey";
|
|
1164
|
+
readonly description: "Identifier of a directory field. A key with no `.` is a BASE field, the same in every community: `displayName`, `nickname`, `avatar`, `pronouns`, `bio`, `links` (written by the member) and `role`, `joinedAt`, `did`, `personhood` (derived from the community's own records, never stored on a card). A community-defined field MUST use a reverse-DNS key (`org.example.employer`), so a base key never collides with one, and a key is never reused with a different meaning once defined.";
|
|
1165
|
+
readonly type: "string";
|
|
1166
|
+
readonly minLength: 1;
|
|
1167
|
+
readonly maxLength: 128;
|
|
1168
|
+
readonly pattern: "^([a-z][a-z0-9-]*\\.)*[a-z][a-zA-Z0-9]{0,63}$";
|
|
1169
|
+
};
|
|
1170
|
+
readonly GroupKind: {
|
|
1171
|
+
readonly title: "GroupKind";
|
|
1172
|
+
readonly description: "`static`: membership is explicit — added, joined, or granted on request. `dynamic`: membership is computed from `rule` over verified facts only; nobody is added by hand, but a member may opt out (vtc/groups/leave), an exclusion the rule cannot override, and undo it (vtc/groups/join). A dynamic group never confers authority. Fixed for the group's life.";
|
|
1173
|
+
readonly type: "string";
|
|
1174
|
+
readonly enum: readonly ["static", "dynamic"];
|
|
1175
|
+
};
|
|
1176
|
+
readonly GroupDescription: {
|
|
1177
|
+
readonly title: "GroupDescription";
|
|
1178
|
+
readonly type: "string";
|
|
1179
|
+
readonly minLength: 1;
|
|
1180
|
+
readonly maxLength: 1000;
|
|
1181
|
+
readonly description: "What the group is for. Plain text; a reader MUST NOT treat it as instructions. Same placement rules as `GroupName`.";
|
|
1182
|
+
};
|
|
1183
|
+
readonly GroupName: {
|
|
1184
|
+
readonly title: "GroupName";
|
|
1185
|
+
readonly type: "string";
|
|
1186
|
+
readonly minLength: 1;
|
|
1187
|
+
readonly maxLength: 128;
|
|
1188
|
+
readonly description: "The group's name, shown to those who may see the group. The community's own record: never in the group's DID document or its credentials' subject beyond the group's DID. Plain text.";
|
|
1189
|
+
};
|
|
1190
|
+
readonly GroupId: {
|
|
1191
|
+
readonly title: "GroupId";
|
|
1192
|
+
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.";
|
|
1193
|
+
readonly type: "string";
|
|
1194
|
+
readonly pattern: "^grp_[A-Za-z0-9_-]{16,64}$";
|
|
1195
|
+
};
|
|
1196
|
+
readonly EntryId: {
|
|
1197
|
+
readonly title: "EntryId";
|
|
1198
|
+
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.";
|
|
1199
|
+
readonly type: "string";
|
|
1200
|
+
readonly pattern: "^dir_[A-Za-z0-9_-]{16,64}$";
|
|
1201
|
+
};
|
|
1202
|
+
readonly BadgeId: {
|
|
1203
|
+
readonly title: "BadgeId";
|
|
1204
|
+
readonly description: "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).";
|
|
1205
|
+
readonly type: "string";
|
|
1206
|
+
readonly pattern: "^bdg_[A-Za-z0-9_-]{16,64}$";
|
|
1207
|
+
};
|
|
1208
|
+
readonly Badge: {
|
|
1209
|
+
readonly title: "Badge";
|
|
1210
|
+
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.";
|
|
1211
|
+
readonly type: "object";
|
|
1212
|
+
readonly additionalProperties: false;
|
|
1213
|
+
readonly required: readonly ["badgeId", "kind", "name", "description", "image", "repeatable", "listed", "state", "createdAt"];
|
|
1214
|
+
readonly properties: {
|
|
1215
|
+
readonly badgeId: {
|
|
1216
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
1217
|
+
};
|
|
1218
|
+
readonly kind: {
|
|
1219
|
+
readonly $ref: "#/$defs/BadgeKind";
|
|
1220
|
+
};
|
|
1221
|
+
readonly name: {
|
|
1222
|
+
readonly $ref: "#/$defs/BadgeName";
|
|
1223
|
+
};
|
|
1224
|
+
readonly description: {
|
|
1225
|
+
readonly $ref: "#/$defs/BadgeDescription";
|
|
1226
|
+
};
|
|
1227
|
+
readonly criteria: {
|
|
1228
|
+
readonly $ref: "#/$defs/BadgeCriteria";
|
|
1229
|
+
};
|
|
1230
|
+
readonly image: {
|
|
1231
|
+
readonly $ref: "#/$defs/CardBlobRef";
|
|
1232
|
+
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.";
|
|
1233
|
+
};
|
|
1234
|
+
readonly repeatable: {
|
|
1235
|
+
readonly type: "boolean";
|
|
1236
|
+
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.";
|
|
1237
|
+
};
|
|
1238
|
+
readonly requestable: {
|
|
1239
|
+
readonly type: "boolean";
|
|
1240
|
+
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.";
|
|
1241
|
+
};
|
|
1242
|
+
readonly listed: {
|
|
1243
|
+
readonly type: "boolean";
|
|
1244
|
+
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.";
|
|
1245
|
+
};
|
|
1246
|
+
readonly shareableOutside: {
|
|
1247
|
+
readonly type: "boolean";
|
|
1248
|
+
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.";
|
|
1249
|
+
};
|
|
1250
|
+
readonly groupId: {
|
|
1251
|
+
readonly $ref: "#/$defs/GroupId";
|
|
1252
|
+
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.";
|
|
1253
|
+
};
|
|
1254
|
+
readonly state: {
|
|
1255
|
+
readonly $ref: "#/$defs/BadgeState";
|
|
1256
|
+
};
|
|
1257
|
+
readonly holderCount: {
|
|
1258
|
+
readonly type: "integer";
|
|
1259
|
+
readonly minimum: 0;
|
|
1260
|
+
readonly description: "Holders who show the badge. Only to callers who may see the holders.";
|
|
1261
|
+
};
|
|
1262
|
+
readonly createdAt: {
|
|
1263
|
+
readonly type: "string";
|
|
1264
|
+
readonly format: "date-time";
|
|
1265
|
+
};
|
|
1266
|
+
readonly createdBy: {
|
|
1267
|
+
readonly $ref: "#/$defs/EntryId";
|
|
1268
|
+
};
|
|
1269
|
+
readonly updatedAt: {
|
|
1270
|
+
readonly type: "string";
|
|
1271
|
+
readonly format: "date-time";
|
|
1272
|
+
};
|
|
1273
|
+
readonly retiredAt: {
|
|
1274
|
+
readonly type: "string";
|
|
1275
|
+
readonly format: "date-time";
|
|
1276
|
+
};
|
|
1277
|
+
readonly ext: {
|
|
1278
|
+
readonly $ref: "#/$defs/Ext";
|
|
1279
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1. An extension member MUST NOT carry authority.";
|
|
1280
|
+
};
|
|
1281
|
+
};
|
|
1282
|
+
};
|
|
1283
|
+
readonly BadgeState: {
|
|
1284
|
+
readonly title: "BadgeState";
|
|
1285
|
+
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).";
|
|
1286
|
+
readonly type: "string";
|
|
1287
|
+
readonly enum: readonly ["active", "retired"];
|
|
1288
|
+
};
|
|
1289
|
+
readonly BadgeCriteria: {
|
|
1290
|
+
readonly title: "BadgeCriteria";
|
|
1291
|
+
readonly type: "string";
|
|
1292
|
+
readonly minLength: 1;
|
|
1293
|
+
readonly maxLength: 1000;
|
|
1294
|
+
readonly description: "How the badge is earned, shown to members and written into the credential's Achievement as its criteria narrative. Plain text.";
|
|
1295
|
+
};
|
|
1296
|
+
readonly BadgeDescription: {
|
|
1297
|
+
readonly title: "BadgeDescription";
|
|
1298
|
+
readonly type: "string";
|
|
1299
|
+
readonly minLength: 1;
|
|
1300
|
+
readonly maxLength: 1000;
|
|
1301
|
+
readonly description: "What the badge is for. Plain text; a reader MUST NOT treat it as instructions.";
|
|
1302
|
+
};
|
|
1303
|
+
readonly BadgeName: {
|
|
1304
|
+
readonly title: "BadgeName";
|
|
1305
|
+
readonly type: "string";
|
|
1306
|
+
readonly minLength: 1;
|
|
1307
|
+
readonly maxLength: 64;
|
|
1308
|
+
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.";
|
|
1309
|
+
};
|
|
1310
|
+
readonly BadgeKind: {
|
|
1311
|
+
readonly title: "BadgeKind";
|
|
1312
|
+
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).";
|
|
1313
|
+
readonly type: "string";
|
|
1314
|
+
readonly enum: readonly ["community", "kudos"];
|
|
1315
|
+
};
|
|
1316
|
+
readonly CardBlobRef: {
|
|
1317
|
+
readonly title: "CardBlobRef";
|
|
1318
|
+
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.";
|
|
1319
|
+
readonly type: "object";
|
|
1320
|
+
readonly additionalProperties: false;
|
|
1321
|
+
readonly required: readonly ["sha256", "mediaType"];
|
|
1322
|
+
readonly properties: {
|
|
1323
|
+
readonly sha256: {
|
|
1324
|
+
readonly type: "string";
|
|
1325
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
1326
|
+
readonly description: "Lowercase hex SHA-256 of the stored, re-encoded bytes.";
|
|
1327
|
+
};
|
|
1328
|
+
readonly mediaType: {
|
|
1329
|
+
readonly type: "string";
|
|
1330
|
+
readonly enum: readonly ["image/png", "image/jpeg", "image/webp", "image/avif"];
|
|
1331
|
+
readonly description: "Media type of the stored bytes.";
|
|
1332
|
+
};
|
|
1333
|
+
readonly size: {
|
|
1334
|
+
readonly type: "integer";
|
|
1335
|
+
readonly minimum: 1;
|
|
1336
|
+
readonly maximum: 262144;
|
|
1337
|
+
readonly description: "Size in bytes of the stored bytes.";
|
|
1338
|
+
};
|
|
1339
|
+
readonly url: {
|
|
1340
|
+
readonly type: "string";
|
|
1341
|
+
readonly format: "uri";
|
|
1342
|
+
readonly maxLength: 2048;
|
|
1343
|
+
readonly description: "Projection only: a URL the viewer can fetch the image from until `urlExpiresAt`.";
|
|
1344
|
+
};
|
|
1345
|
+
readonly urlExpiresAt: {
|
|
1346
|
+
readonly type: "string";
|
|
1347
|
+
readonly format: "date-time";
|
|
1348
|
+
readonly description: "Projection only: when `url` stops working.";
|
|
1349
|
+
};
|
|
1350
|
+
};
|
|
1351
|
+
};
|
|
1352
|
+
};
|
|
1353
|
+
};
|
|
1354
|
+
};
|
|
1355
|
+
/**
|
|
1356
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
1357
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
1358
|
+
* parties (§7.3 item 5).
|
|
1359
|
+
*/
|
|
1360
|
+
export declare const RESPONSE_SPEC: {
|
|
1361
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/badges/promote/0.1#response";
|
|
1362
|
+
readonly isBearer: false;
|
|
1363
|
+
readonly isProofRequired: true;
|
|
1364
|
+
readonly isRecipientRequired: true;
|
|
1365
|
+
readonly isIssuedAtRequired: true;
|
|
1366
|
+
readonly payloadSchema: {
|
|
1367
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
1368
|
+
readonly $ref: "#/$defs/Response";
|
|
1369
|
+
readonly $defs: {
|
|
1370
|
+
readonly Response: {
|
|
1371
|
+
readonly $anchor: "response";
|
|
1372
|
+
readonly title: "VTC Badges — Promote — response payload";
|
|
1373
|
+
readonly description: "The success response to a vtc/badges/promote/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/promote/0.1#response.";
|
|
1374
|
+
readonly type: "object";
|
|
1375
|
+
readonly additionalProperties: false;
|
|
1376
|
+
readonly required: readonly ["badge", "group"];
|
|
1377
|
+
readonly properties: {
|
|
1378
|
+
readonly badge: {
|
|
1379
|
+
readonly $ref: "#/$defs/Badge";
|
|
1380
|
+
readonly description: "The badge, now `kind` `community` with its `groupId`. `holderCount` is 0 until a holder accepts.";
|
|
1381
|
+
};
|
|
1382
|
+
readonly group: {
|
|
1383
|
+
readonly $ref: "#/$defs/Group";
|
|
1384
|
+
readonly description: "The badge group, as vtc/groups/create answers it.";
|
|
1385
|
+
};
|
|
1386
|
+
readonly holdersOffered: {
|
|
1387
|
+
readonly type: "integer";
|
|
1388
|
+
readonly minimum: 0;
|
|
1389
|
+
readonly description: "How many current holders were offered the badge — one offer each, who they are never said here.";
|
|
1390
|
+
};
|
|
1391
|
+
readonly ext: {
|
|
1392
|
+
readonly $ref: "#/$defs/Ext";
|
|
1393
|
+
};
|
|
1394
|
+
};
|
|
1395
|
+
};
|
|
1396
|
+
readonly Ext: {
|
|
1397
|
+
readonly title: "Ext";
|
|
1398
|
+
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.";
|
|
1399
|
+
readonly type: "object";
|
|
1400
|
+
readonly minProperties: 1;
|
|
1401
|
+
readonly additionalProperties: true;
|
|
1402
|
+
readonly propertyNames: {
|
|
1403
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
1404
|
+
};
|
|
1405
|
+
};
|
|
1406
|
+
readonly Group: {
|
|
1407
|
+
readonly title: "Group";
|
|
1408
|
+
readonly description: "A community group, as a caller who may see it sees it. Members a caller may not see are absent: `memberCount` only to those who may see the group's members, `managers` and `credentialAuthorityValidUntil` only to its managers.";
|
|
1409
|
+
readonly type: "object";
|
|
1410
|
+
readonly additionalProperties: false;
|
|
1411
|
+
readonly required: readonly ["groupId", "groupDid", "name", "kind", "visibility", "showMembers", "issuesCredentials", "carriesAuthority", "createdAt"];
|
|
1412
|
+
readonly properties: {
|
|
1413
|
+
readonly groupId: {
|
|
1414
|
+
readonly $ref: "#/$defs/GroupId";
|
|
1415
|
+
};
|
|
1416
|
+
readonly groupDid: {
|
|
1417
|
+
readonly type: "string";
|
|
1418
|
+
readonly pattern: "^did:";
|
|
1419
|
+
readonly maxLength: 2048;
|
|
1420
|
+
readonly description: "The group's own DID, minted by the community's VTA for this group alone. It issues the group's membership credentials. Its DID document carries no name or description.";
|
|
1421
|
+
};
|
|
1422
|
+
readonly name: {
|
|
1423
|
+
readonly $ref: "#/$defs/GroupName";
|
|
1424
|
+
};
|
|
1425
|
+
readonly description: {
|
|
1426
|
+
readonly $ref: "#/$defs/GroupDescription";
|
|
1427
|
+
};
|
|
1428
|
+
readonly kind: {
|
|
1429
|
+
readonly $ref: "#/$defs/GroupKind";
|
|
1430
|
+
};
|
|
1431
|
+
readonly rule: {
|
|
1432
|
+
readonly $ref: "#/$defs/DynamicRule";
|
|
1433
|
+
readonly description: "Present exactly when `kind` is `dynamic`.";
|
|
1434
|
+
};
|
|
1435
|
+
readonly joinPolicy: {
|
|
1436
|
+
readonly $ref: "#/$defs/JoinPolicy";
|
|
1437
|
+
readonly description: "Present exactly when `kind` is `static`.";
|
|
1438
|
+
};
|
|
1439
|
+
readonly visibility: {
|
|
1440
|
+
readonly $ref: "#/$defs/GroupAudience";
|
|
1441
|
+
readonly description: "Who may see that the group exists, and its name and description.";
|
|
1442
|
+
};
|
|
1443
|
+
readonly showMembers: {
|
|
1444
|
+
readonly $ref: "#/$defs/GroupAudience";
|
|
1445
|
+
readonly description: "Who may see the group's member list. Separate from `visibility`: a group everyone sees may show its members only to administrators. Never wider than `visibility`.";
|
|
1446
|
+
};
|
|
1447
|
+
readonly issuesCredentials: {
|
|
1448
|
+
readonly type: "boolean";
|
|
1449
|
+
readonly description: "Whether the group's DID issues its members a membership credential. Default true.";
|
|
1450
|
+
};
|
|
1451
|
+
readonly carriesAuthority: {
|
|
1452
|
+
readonly type: "boolean";
|
|
1453
|
+
readonly description: "`true` while the group has a `grants` or `role` binding. Such a group is `static` and `closed` for as long as it does.";
|
|
1454
|
+
};
|
|
1455
|
+
readonly badgeId: {
|
|
1456
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
1457
|
+
readonly description: "Present exactly when the group backs a community badge (vtc/badges/*): its managers are the badge's owners, its members the badge's holders, and its DID issues the badge credential in place of a membership credential. A badge group never carries authority, is not counted among the groups two members share, and is listed among the community's groups only to a caller who asks for badge groups (VTI-BDG-010 – VTI-BDG-012).";
|
|
1458
|
+
};
|
|
1459
|
+
readonly memberCount: {
|
|
1460
|
+
readonly type: "integer";
|
|
1461
|
+
readonly minimum: 0;
|
|
1462
|
+
readonly description: "Active members. Only to callers who may see the member list.";
|
|
1463
|
+
};
|
|
1464
|
+
readonly managers: {
|
|
1465
|
+
readonly type: "array";
|
|
1466
|
+
readonly maxItems: 256;
|
|
1467
|
+
readonly uniqueItems: true;
|
|
1468
|
+
readonly items: {
|
|
1469
|
+
readonly $ref: "#/$defs/EntryId";
|
|
1470
|
+
};
|
|
1471
|
+
readonly description: "Entries holding `vtc.groups.manage` qualified to this group, read from the access-control list. Informational: managers are appointed by an access-control grant (vtc/groups/managers/add), never by this record.";
|
|
1472
|
+
};
|
|
1473
|
+
readonly credentialAuthorityValidUntil: {
|
|
1474
|
+
readonly type: "string";
|
|
1475
|
+
readonly format: "date-time";
|
|
1476
|
+
readonly description: "When the community's authorization credential to the group expires. The community renews it well before.";
|
|
1477
|
+
};
|
|
1478
|
+
readonly createdAt: {
|
|
1479
|
+
readonly type: "string";
|
|
1480
|
+
readonly format: "date-time";
|
|
1481
|
+
};
|
|
1482
|
+
readonly createdBy: {
|
|
1483
|
+
readonly $ref: "#/$defs/EntryId";
|
|
1484
|
+
readonly description: "The creating administrator's directory entry, where they have one.";
|
|
1485
|
+
};
|
|
1486
|
+
readonly updatedAt: {
|
|
1487
|
+
readonly type: "string";
|
|
1488
|
+
readonly format: "date-time";
|
|
1489
|
+
};
|
|
1490
|
+
readonly ext: {
|
|
1491
|
+
readonly $ref: "#/$defs/Ext";
|
|
1492
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1. An extension member MUST NOT carry authority.";
|
|
1493
|
+
};
|
|
1494
|
+
};
|
|
1495
|
+
};
|
|
1496
|
+
readonly GroupAudience: {
|
|
1497
|
+
readonly title: "GroupAudience";
|
|
1498
|
+
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.";
|
|
1499
|
+
readonly type: "string";
|
|
1500
|
+
readonly enum: readonly ["admins", "groupMembers", "members"];
|
|
1501
|
+
};
|
|
1502
|
+
readonly JoinPolicy: {
|
|
1503
|
+
readonly title: "JoinPolicy";
|
|
1504
|
+
readonly description: "How a member enters a static group by themselves. `closed`: only a manager adds them. `request`: a member asks and a manager decides. `open`: a member joins at once, subject to the community's `groups` policy. A group carrying authority is always `closed`.";
|
|
1505
|
+
readonly type: "string";
|
|
1506
|
+
readonly enum: readonly ["closed", "request", "open"];
|
|
1507
|
+
};
|
|
1508
|
+
readonly DynamicRule: {
|
|
1509
|
+
readonly title: "DynamicRule";
|
|
1510
|
+
readonly description: "A dynamic group's membership rule: a member belongs when every condition holds and they have not opted out. The community evaluates it under its `groups` policy and recomputes membership whenever a fact it reads changes, always excluding opted-out entries.";
|
|
1511
|
+
readonly type: "object";
|
|
1512
|
+
readonly additionalProperties: false;
|
|
1513
|
+
readonly required: readonly ["all"];
|
|
1514
|
+
readonly properties: {
|
|
1515
|
+
readonly all: {
|
|
1516
|
+
readonly type: "array";
|
|
1517
|
+
readonly minItems: 1;
|
|
1518
|
+
readonly maxItems: 16;
|
|
1519
|
+
readonly items: {
|
|
1520
|
+
readonly $ref: "#/$defs/RuleCondition";
|
|
1521
|
+
};
|
|
1522
|
+
};
|
|
1523
|
+
};
|
|
1524
|
+
};
|
|
1525
|
+
readonly RuleCondition: {
|
|
1526
|
+
readonly title: "RuleCondition";
|
|
1527
|
+
readonly description: "One test over a verified fact about a member. `fact: role` tests the member's community role; `fact: field` tests an `admin`- or `credential`-sourced directory field named by `field`; `fact: personhood` tests whether a personhood assertion is on file; `fact: joinedAt` tests when they joined. A rule never reads a self-asserted (`member`-sourced) field: a member must not be able to join a group by editing their card.";
|
|
1528
|
+
readonly type: "object";
|
|
1529
|
+
readonly additionalProperties: false;
|
|
1530
|
+
readonly required: readonly ["fact", "op"];
|
|
1531
|
+
readonly properties: {
|
|
1532
|
+
readonly fact: {
|
|
1533
|
+
readonly type: "string";
|
|
1534
|
+
readonly enum: readonly ["role", "field", "personhood", "joinedAt"];
|
|
1535
|
+
};
|
|
1536
|
+
readonly field: {
|
|
1537
|
+
readonly $ref: "#/$defs/FieldKey";
|
|
1538
|
+
readonly description: "Present exactly when `fact` is `field`.";
|
|
1539
|
+
};
|
|
1540
|
+
readonly op: {
|
|
1541
|
+
readonly type: "string";
|
|
1542
|
+
readonly enum: readonly ["equals", "oneOf", "exists", "before", "after"];
|
|
1543
|
+
readonly description: "`equals` compares with `value`; `oneOf` with any of `values`; `exists` needs neither; `before` and `after` compare a date fact with `value`.";
|
|
1544
|
+
};
|
|
1545
|
+
readonly value: {
|
|
1546
|
+
readonly anyOf: readonly [{
|
|
1547
|
+
readonly type: "string";
|
|
1548
|
+
readonly maxLength: 256;
|
|
1549
|
+
}, {
|
|
1550
|
+
readonly type: "boolean";
|
|
1551
|
+
}];
|
|
1552
|
+
};
|
|
1553
|
+
readonly values: {
|
|
1554
|
+
readonly type: "array";
|
|
1555
|
+
readonly minItems: 1;
|
|
1556
|
+
readonly maxItems: 64;
|
|
1557
|
+
readonly items: {
|
|
1558
|
+
readonly type: "string";
|
|
1559
|
+
readonly maxLength: 256;
|
|
1560
|
+
};
|
|
1561
|
+
};
|
|
1562
|
+
};
|
|
1563
|
+
};
|
|
1564
|
+
readonly FieldKey: {
|
|
1565
|
+
readonly title: "FieldKey";
|
|
1566
|
+
readonly description: "Identifier of a directory field. A key with no `.` is a BASE field, the same in every community: `displayName`, `nickname`, `avatar`, `pronouns`, `bio`, `links` (written by the member) and `role`, `joinedAt`, `did`, `personhood` (derived from the community's own records, never stored on a card). A community-defined field MUST use a reverse-DNS key (`org.example.employer`), so a base key never collides with one, and a key is never reused with a different meaning once defined.";
|
|
1567
|
+
readonly type: "string";
|
|
1568
|
+
readonly minLength: 1;
|
|
1569
|
+
readonly maxLength: 128;
|
|
1570
|
+
readonly pattern: "^([a-z][a-z0-9-]*\\.)*[a-z][a-zA-Z0-9]{0,63}$";
|
|
1571
|
+
};
|
|
1572
|
+
readonly GroupKind: {
|
|
1573
|
+
readonly title: "GroupKind";
|
|
1574
|
+
readonly description: "`static`: membership is explicit — added, joined, or granted on request. `dynamic`: membership is computed from `rule` over verified facts only; nobody is added by hand, but a member may opt out (vtc/groups/leave), an exclusion the rule cannot override, and undo it (vtc/groups/join). A dynamic group never confers authority. Fixed for the group's life.";
|
|
1575
|
+
readonly type: "string";
|
|
1576
|
+
readonly enum: readonly ["static", "dynamic"];
|
|
1577
|
+
};
|
|
1578
|
+
readonly GroupDescription: {
|
|
1579
|
+
readonly title: "GroupDescription";
|
|
1580
|
+
readonly type: "string";
|
|
1581
|
+
readonly minLength: 1;
|
|
1582
|
+
readonly maxLength: 1000;
|
|
1583
|
+
readonly description: "What the group is for. Plain text; a reader MUST NOT treat it as instructions. Same placement rules as `GroupName`.";
|
|
1584
|
+
};
|
|
1585
|
+
readonly GroupName: {
|
|
1586
|
+
readonly title: "GroupName";
|
|
1587
|
+
readonly type: "string";
|
|
1588
|
+
readonly minLength: 1;
|
|
1589
|
+
readonly maxLength: 128;
|
|
1590
|
+
readonly description: "The group's name, shown to those who may see the group. The community's own record: never in the group's DID document or its credentials' subject beyond the group's DID. Plain text.";
|
|
1591
|
+
};
|
|
1592
|
+
readonly GroupId: {
|
|
1593
|
+
readonly title: "GroupId";
|
|
1594
|
+
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.";
|
|
1595
|
+
readonly type: "string";
|
|
1596
|
+
readonly pattern: "^grp_[A-Za-z0-9_-]{16,64}$";
|
|
1597
|
+
};
|
|
1598
|
+
readonly EntryId: {
|
|
1599
|
+
readonly title: "EntryId";
|
|
1600
|
+
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.";
|
|
1601
|
+
readonly type: "string";
|
|
1602
|
+
readonly pattern: "^dir_[A-Za-z0-9_-]{16,64}$";
|
|
1603
|
+
};
|
|
1604
|
+
readonly BadgeId: {
|
|
1605
|
+
readonly title: "BadgeId";
|
|
1606
|
+
readonly description: "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).";
|
|
1607
|
+
readonly type: "string";
|
|
1608
|
+
readonly pattern: "^bdg_[A-Za-z0-9_-]{16,64}$";
|
|
1609
|
+
};
|
|
1610
|
+
readonly Badge: {
|
|
1611
|
+
readonly title: "Badge";
|
|
1612
|
+
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.";
|
|
1613
|
+
readonly type: "object";
|
|
1614
|
+
readonly additionalProperties: false;
|
|
1615
|
+
readonly required: readonly ["badgeId", "kind", "name", "description", "image", "repeatable", "listed", "state", "createdAt"];
|
|
1616
|
+
readonly properties: {
|
|
1617
|
+
readonly badgeId: {
|
|
1618
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
1619
|
+
};
|
|
1620
|
+
readonly kind: {
|
|
1621
|
+
readonly $ref: "#/$defs/BadgeKind";
|
|
1622
|
+
};
|
|
1623
|
+
readonly name: {
|
|
1624
|
+
readonly $ref: "#/$defs/BadgeName";
|
|
1625
|
+
};
|
|
1626
|
+
readonly description: {
|
|
1627
|
+
readonly $ref: "#/$defs/BadgeDescription";
|
|
1628
|
+
};
|
|
1629
|
+
readonly criteria: {
|
|
1630
|
+
readonly $ref: "#/$defs/BadgeCriteria";
|
|
1631
|
+
};
|
|
1632
|
+
readonly image: {
|
|
1633
|
+
readonly $ref: "#/$defs/CardBlobRef";
|
|
1634
|
+
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.";
|
|
1635
|
+
};
|
|
1636
|
+
readonly repeatable: {
|
|
1637
|
+
readonly type: "boolean";
|
|
1638
|
+
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.";
|
|
1639
|
+
};
|
|
1640
|
+
readonly requestable: {
|
|
1641
|
+
readonly type: "boolean";
|
|
1642
|
+
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.";
|
|
1643
|
+
};
|
|
1644
|
+
readonly listed: {
|
|
1645
|
+
readonly type: "boolean";
|
|
1646
|
+
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.";
|
|
1647
|
+
};
|
|
1648
|
+
readonly shareableOutside: {
|
|
1649
|
+
readonly type: "boolean";
|
|
1650
|
+
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.";
|
|
1651
|
+
};
|
|
1652
|
+
readonly groupId: {
|
|
1653
|
+
readonly $ref: "#/$defs/GroupId";
|
|
1654
|
+
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.";
|
|
1655
|
+
};
|
|
1656
|
+
readonly state: {
|
|
1657
|
+
readonly $ref: "#/$defs/BadgeState";
|
|
1658
|
+
};
|
|
1659
|
+
readonly holderCount: {
|
|
1660
|
+
readonly type: "integer";
|
|
1661
|
+
readonly minimum: 0;
|
|
1662
|
+
readonly description: "Holders who show the badge. Only to callers who may see the holders.";
|
|
1663
|
+
};
|
|
1664
|
+
readonly createdAt: {
|
|
1665
|
+
readonly type: "string";
|
|
1666
|
+
readonly format: "date-time";
|
|
1667
|
+
};
|
|
1668
|
+
readonly createdBy: {
|
|
1669
|
+
readonly $ref: "#/$defs/EntryId";
|
|
1670
|
+
};
|
|
1671
|
+
readonly updatedAt: {
|
|
1672
|
+
readonly type: "string";
|
|
1673
|
+
readonly format: "date-time";
|
|
1674
|
+
};
|
|
1675
|
+
readonly retiredAt: {
|
|
1676
|
+
readonly type: "string";
|
|
1677
|
+
readonly format: "date-time";
|
|
1678
|
+
};
|
|
1679
|
+
readonly ext: {
|
|
1680
|
+
readonly $ref: "#/$defs/Ext";
|
|
1681
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1. An extension member MUST NOT carry authority.";
|
|
1682
|
+
};
|
|
1683
|
+
};
|
|
1684
|
+
};
|
|
1685
|
+
readonly BadgeState: {
|
|
1686
|
+
readonly title: "BadgeState";
|
|
1687
|
+
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).";
|
|
1688
|
+
readonly type: "string";
|
|
1689
|
+
readonly enum: readonly ["active", "retired"];
|
|
1690
|
+
};
|
|
1691
|
+
readonly BadgeCriteria: {
|
|
1692
|
+
readonly title: "BadgeCriteria";
|
|
1693
|
+
readonly type: "string";
|
|
1694
|
+
readonly minLength: 1;
|
|
1695
|
+
readonly maxLength: 1000;
|
|
1696
|
+
readonly description: "How the badge is earned, shown to members and written into the credential's Achievement as its criteria narrative. Plain text.";
|
|
1697
|
+
};
|
|
1698
|
+
readonly BadgeDescription: {
|
|
1699
|
+
readonly title: "BadgeDescription";
|
|
1700
|
+
readonly type: "string";
|
|
1701
|
+
readonly minLength: 1;
|
|
1702
|
+
readonly maxLength: 1000;
|
|
1703
|
+
readonly description: "What the badge is for. Plain text; a reader MUST NOT treat it as instructions.";
|
|
1704
|
+
};
|
|
1705
|
+
readonly BadgeName: {
|
|
1706
|
+
readonly title: "BadgeName";
|
|
1707
|
+
readonly type: "string";
|
|
1708
|
+
readonly minLength: 1;
|
|
1709
|
+
readonly maxLength: 64;
|
|
1710
|
+
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.";
|
|
1711
|
+
};
|
|
1712
|
+
readonly BadgeKind: {
|
|
1713
|
+
readonly title: "BadgeKind";
|
|
1714
|
+
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).";
|
|
1715
|
+
readonly type: "string";
|
|
1716
|
+
readonly enum: readonly ["community", "kudos"];
|
|
1717
|
+
};
|
|
1718
|
+
readonly CardBlobRef: {
|
|
1719
|
+
readonly title: "CardBlobRef";
|
|
1720
|
+
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.";
|
|
1721
|
+
readonly type: "object";
|
|
1722
|
+
readonly additionalProperties: false;
|
|
1723
|
+
readonly required: readonly ["sha256", "mediaType"];
|
|
1724
|
+
readonly properties: {
|
|
1725
|
+
readonly sha256: {
|
|
1726
|
+
readonly type: "string";
|
|
1727
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
1728
|
+
readonly description: "Lowercase hex SHA-256 of the stored, re-encoded bytes.";
|
|
1729
|
+
};
|
|
1730
|
+
readonly mediaType: {
|
|
1731
|
+
readonly type: "string";
|
|
1732
|
+
readonly enum: readonly ["image/png", "image/jpeg", "image/webp", "image/avif"];
|
|
1733
|
+
readonly description: "Media type of the stored bytes.";
|
|
1734
|
+
};
|
|
1735
|
+
readonly size: {
|
|
1736
|
+
readonly type: "integer";
|
|
1737
|
+
readonly minimum: 1;
|
|
1738
|
+
readonly maximum: 262144;
|
|
1739
|
+
readonly description: "Size in bytes of the stored bytes.";
|
|
1740
|
+
};
|
|
1741
|
+
readonly url: {
|
|
1742
|
+
readonly type: "string";
|
|
1743
|
+
readonly format: "uri";
|
|
1744
|
+
readonly maxLength: 2048;
|
|
1745
|
+
readonly description: "Projection only: a URL the viewer can fetch the image from until `urlExpiresAt`.";
|
|
1746
|
+
};
|
|
1747
|
+
readonly urlExpiresAt: {
|
|
1748
|
+
readonly type: "string";
|
|
1749
|
+
readonly format: "date-time";
|
|
1750
|
+
readonly description: "Projection only: when `url` stops working.";
|
|
1751
|
+
};
|
|
1752
|
+
};
|
|
1753
|
+
};
|
|
1754
|
+
};
|
|
1755
|
+
};
|
|
1756
|
+
};
|
|
1757
|
+
//# sourceMappingURL=payload.d.ts.map
|