@openvtc/trust-tasks 0.28.17 → 0.28.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +68 -0
- package/dist/_shared/components.d.ts +254 -1
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +87 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +87 -0
- package/dist/index.js.map +1 -1
- package/dist/vta/collection/_shared/0.1/collection.d.ts +2 -2
- package/dist/vta/collection/_shared/0.1/collection.d.ts.map +1 -1
- package/dist/vta/collection/list/0.1/payload.d.ts +4 -4
- package/dist/vta/collection/list/0.1/payload.js +2 -2
- package/dist/vta/collection/list/0.1/payload.js.map +1 -1
- package/dist/vta/collection/settings/set/0.1/payload.d.ts +469 -0
- package/dist/vta/collection/settings/set/0.1/payload.d.ts.map +1 -0
- package/dist/vta/collection/settings/set/0.1/payload.js +275 -0
- package/dist/vta/collection/settings/set/0.1/payload.js.map +1 -0
- package/dist/vta/collection/settings/show/0.1/payload.d.ts +437 -0
- package/dist/vta/collection/settings/show/0.1/payload.d.ts.map +1 -0
- package/dist/vta/collection/settings/show/0.1/payload.js +260 -0
- package/dist/vta/collection/settings/show/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/_shared/0.1/badge.d.ts +22 -0
- package/dist/vtc/badges/_shared/0.1/badge.d.ts.map +1 -0
- package/dist/vtc/badges/_shared/0.1/badge.js +6 -0
- package/dist/vtc/badges/_shared/0.1/badge.js.map +1 -0
- package/dist/vtc/badges/awards/list/0.1/payload.d.ts +1228 -0
- package/dist/vtc/badges/awards/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/awards/list/0.1/payload.js +699 -0
- package/dist/vtc/badges/awards/list/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/awards/offer/0.1/payload.d.ts +793 -0
- package/dist/vtc/badges/awards/offer/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/awards/offer/0.1/payload.js +461 -0
- package/dist/vtc/badges/awards/offer/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/awards/revoke/0.1/payload.d.ts +605 -0
- package/dist/vtc/badges/awards/revoke/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/awards/revoke/0.1/payload.js +351 -0
- package/dist/vtc/badges/awards/revoke/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/awards/withdraw/0.1/payload.d.ts +605 -0
- package/dist/vtc/badges/awards/withdraw/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/awards/withdraw/0.1/payload.js +351 -0
- package/dist/vtc/badges/awards/withdraw/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/create/0.1/payload.d.ts +1829 -0
- package/dist/vtc/badges/create/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/create/0.1/payload.js +1051 -0
- package/dist/vtc/badges/create/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/holders/list/0.1/payload.d.ts +984 -0
- package/dist/vtc/badges/holders/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/holders/list/0.1/payload.js +555 -0
- package/dist/vtc/badges/holders/list/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/images/get/0.1/payload.d.ts +454 -0
- package/dist/vtc/badges/images/get/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/images/get/0.1/payload.js +266 -0
- package/dist/vtc/badges/images/get/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/images/upload/0.1/payload.d.ts +455 -0
- package/dist/vtc/badges/images/upload/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/images/upload/0.1/payload.js +276 -0
- package/dist/vtc/badges/images/upload/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/kudos/give/0.1/payload.d.ts +613 -0
- package/dist/vtc/badges/kudos/give/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/kudos/give/0.1/payload.js +353 -0
- package/dist/vtc/badges/kudos/give/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/kudos/list/0.1/payload.d.ts +1766 -0
- package/dist/vtc/badges/kudos/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/kudos/list/0.1/payload.js +995 -0
- package/dist/vtc/badges/kudos/list/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/list/0.1/payload.d.ts +1096 -0
- package/dist/vtc/badges/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/list/0.1/payload.js +617 -0
- package/dist/vtc/badges/list/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/mine/accept/0.1/payload.d.ts +1376 -0
- package/dist/vtc/badges/mine/accept/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/mine/accept/0.1/payload.js +799 -0
- package/dist/vtc/badges/mine/accept/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/mine/arrange/0.1/payload.d.ts +1217 -0
- package/dist/vtc/badges/mine/arrange/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/mine/arrange/0.1/payload.js +698 -0
- package/dist/vtc/badges/mine/arrange/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/mine/decline/0.1/payload.d.ts +589 -0
- package/dist/vtc/badges/mine/decline/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/mine/decline/0.1/payload.js +344 -0
- package/dist/vtc/badges/mine/decline/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/mine/hide/0.1/payload.d.ts +1093 -0
- package/dist/vtc/badges/mine/hide/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/mine/hide/0.1/payload.js +630 -0
- package/dist/vtc/badges/mine/hide/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/mine/list/0.1/payload.d.ts +1897 -0
- package/dist/vtc/badges/mine/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/mine/list/0.1/payload.js +1087 -0
- package/dist/vtc/badges/mine/list/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/mine/show/0.1/payload.d.ts +1093 -0
- package/dist/vtc/badges/mine/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/mine/show/0.1/payload.js +630 -0
- package/dist/vtc/badges/mine/show/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/promote/0.1/payload.d.ts +1757 -0
- package/dist/vtc/badges/promote/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/promote/0.1/payload.js +1018 -0
- package/dist/vtc/badges/promote/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/retire/0.1/payload.d.ts +904 -0
- package/dist/vtc/badges/retire/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/retire/0.1/payload.js +524 -0
- package/dist/vtc/badges/retire/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/settings/show/0.1/payload.d.ts +731 -0
- package/dist/vtc/badges/settings/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/settings/show/0.1/payload.js +421 -0
- package/dist/vtc/badges/settings/show/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/settings/update/0.1/payload.d.ts +775 -0
- package/dist/vtc/badges/settings/update/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/settings/update/0.1/payload.js +444 -0
- package/dist/vtc/badges/settings/update/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/show/0.1/payload.d.ts +1056 -0
- package/dist/vtc/badges/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/show/0.1/payload.js +613 -0
- package/dist/vtc/badges/show/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/update/0.1/payload.d.ts +1033 -0
- package/dist/vtc/badges/update/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/update/0.1/payload.js +588 -0
- package/dist/vtc/badges/update/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/wall/show/0.1/payload.d.ts +1099 -0
- package/dist/vtc/badges/wall/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/wall/show/0.1/payload.js +634 -0
- package/dist/vtc/badges/wall/show/0.1/payload.js.map +1 -0
- package/dist/vtc/groups/create/0.1/payload.d.ts +42 -2
- package/dist/vtc/groups/create/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/create/0.1/payload.js +20 -0
- package/dist/vtc/groups/create/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/list/0.1/payload.d.ts +42 -2
- package/dist/vtc/groups/list/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/list/0.1/payload.js +20 -0
- package/dist/vtc/groups/list/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/list/0.2/payload.d.ts +42 -2
- package/dist/vtc/groups/list/0.2/payload.d.ts.map +1 -1
- package/dist/vtc/groups/list/0.2/payload.js +20 -0
- package/dist/vtc/groups/list/0.2/payload.js.map +1 -1
- package/dist/vtc/groups/show/0.1/payload.d.ts +42 -2
- package/dist/vtc/groups/show/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/show/0.1/payload.js +20 -0
- package/dist/vtc/groups/show/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/update/0.1/payload.d.ts +42 -2
- package/dist/vtc/groups/update/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/update/0.1/payload.js +20 -0
- package/dist/vtc/groups/update/0.1/payload.js.map +1 -1
- package/dist/vtn/registry/check/0.1/payload.d.ts +528 -0
- package/dist/vtn/registry/check/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/registry/check/0.1/payload.js +282 -0
- package/dist/vtn/registry/check/0.1/payload.js.map +1 -0
- package/dist/vtn/registry/status/0.1/payload.d.ts +736 -0
- package/dist/vtn/registry/status/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/registry/status/0.1/payload.js +421 -0
- package/dist/vtn/registry/status/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +254 -1
- package/src/index.ts +87 -0
- package/src/vta/collection/_shared/0.1/collection.ts +2 -2
- package/src/vta/collection/list/0.1/payload.ts +2 -2
- package/src/vta/collection/settings/set/0.1/payload.ts +319 -0
- package/src/vta/collection/settings/show/0.1/payload.ts +296 -0
- package/src/vtc/badges/_shared/0.1/badge.ts +23 -0
- package/src/vtc/badges/awards/list/0.1/payload.ts +768 -0
- package/src/vtc/badges/awards/offer/0.1/payload.ts +530 -0
- package/src/vtc/badges/awards/revoke/0.1/payload.ts +395 -0
- package/src/vtc/badges/awards/withdraw/0.1/payload.ts +395 -0
- package/src/vtc/badges/create/0.1/payload.ts +1137 -0
- package/src/vtc/badges/holders/list/0.1/payload.ts +628 -0
- package/src/vtc/badges/images/get/0.1/payload.ts +311 -0
- package/src/vtc/badges/images/upload/0.1/payload.ts +324 -0
- package/src/vtc/badges/kudos/give/0.1/payload.ts +401 -0
- package/src/vtc/badges/kudos/list/0.1/payload.ts +1080 -0
- package/src/vtc/badges/list/0.1/payload.ts +695 -0
- package/src/vtc/badges/mine/accept/0.1/payload.ts +840 -0
- package/src/vtc/badges/mine/arrange/0.1/payload.ts +768 -0
- package/src/vtc/badges/mine/decline/0.1/payload.ts +384 -0
- package/src/vtc/badges/mine/hide/0.1/payload.ts +670 -0
- package/src/vtc/badges/mine/list/0.1/payload.ts +1153 -0
- package/src/vtc/badges/mine/show/0.1/payload.ts +670 -0
- package/src/vtc/badges/promote/0.1/payload.ts +1088 -0
- package/src/vtc/badges/retire/0.1/payload.ts +565 -0
- package/src/vtc/badges/settings/show/0.1/payload.ts +457 -0
- package/src/vtc/badges/settings/update/0.1/payload.ts +490 -0
- package/src/vtc/badges/show/0.1/payload.ts +675 -0
- package/src/vtc/badges/update/0.1/payload.ts +656 -0
- package/src/vtc/badges/wall/show/0.1/payload.ts +684 -0
- package/src/vtc/groups/create/0.1/payload.ts +22 -2
- package/src/vtc/groups/list/0.1/payload.ts +22 -2
- package/src/vtc/groups/list/0.2/payload.ts +22 -2
- package/src/vtc/groups/show/0.1/payload.ts +22 -2
- package/src/vtc/groups/update/0.1/payload.ts +22 -2
- package/src/vtn/registry/check/0.1/payload.ts +365 -0
- package/src/vtn/registry/status/0.1/payload.ts +502 -0
|
@@ -0,0 +1,1376 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/badges/mine/accept/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { Award, AwardId, AwardNote, AwardState, Badge, BadgeCriteria, BadgeDescription, BadgeId, BadgeKind, BadgeName, BadgeState, CardBlobRef, EntryId, Ext, GroupCredentialId, GroupId, MyBadge } from "../../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* A member accepts a badge offered to them. For a community badge the badge group's DID issues their badge credential first and the membership is recorded after; for a kudos badge the giving is counted. The outer document members are owned by the framework — SPEC §6.3.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTCBadgesMineAcceptPayload {
|
|
10
|
+
awardId: AwardId;
|
|
11
|
+
ext?: Ext;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The success response to a vtc/badges/mine/accept/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/mine/accept/0.1#response.
|
|
15
|
+
*/
|
|
16
|
+
export interface VTCBadgesMineAcceptResponsePayload {
|
|
17
|
+
/**
|
|
18
|
+
* The award, now `accepted`, with `credentialId` for a community badge.
|
|
19
|
+
*/
|
|
20
|
+
award: Award;
|
|
21
|
+
/**
|
|
22
|
+
* The badge as the holder now sees it, with their count.
|
|
23
|
+
*/
|
|
24
|
+
badge: MyBadge;
|
|
25
|
+
ext?: Ext;
|
|
26
|
+
}
|
|
27
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
28
|
+
export type { Award, AwardId, AwardNote, AwardState, Badge, BadgeCriteria, BadgeDescription, BadgeId, BadgeKind, BadgeName, BadgeState, CardBlobRef, EntryId, Ext, GroupCredentialId, GroupId, MyBadge };
|
|
29
|
+
/** Trust Task type URI. */
|
|
30
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/badges/mine/accept/0.1";
|
|
31
|
+
/**
|
|
32
|
+
* The earlier version of this specification that this one declares it
|
|
33
|
+
* extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
|
|
34
|
+
* `null`. Only the direct declaration — follow the chain with
|
|
35
|
+
* `extendsChain` / `readForSpec`.
|
|
36
|
+
*/
|
|
37
|
+
export declare const EXTENDS: string | null;
|
|
38
|
+
/**
|
|
39
|
+
* Why this version is deprecated, or `null` while it is current. A
|
|
40
|
+
* superseded or retired version is still supported, and is withdrawn from
|
|
41
|
+
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
42
|
+
* Versions").
|
|
43
|
+
*/
|
|
44
|
+
export declare const DEPRECATION: string | null;
|
|
45
|
+
/** Stable alias for this specification's request payload shape. */
|
|
46
|
+
export type Payload = VTCBadgesMineAcceptPayload;
|
|
47
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
48
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vtc/badges/mine/accept/0.1#response";
|
|
49
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
50
|
+
export type Response = VTCBadgesMineAcceptResponsePayload;
|
|
51
|
+
/**
|
|
52
|
+
* This specification's payload schema, as a value.
|
|
53
|
+
*
|
|
54
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
55
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
56
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
57
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
58
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
59
|
+
*/
|
|
60
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
61
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
62
|
+
readonly $id: "https://trusttasks.org/spec/vtc/badges/mine/accept/0.1";
|
|
63
|
+
readonly title: "VTC Badges — Mine — Accept — payload";
|
|
64
|
+
readonly description: "A member accepts a badge offered to them. For a community badge the badge group's DID issues their badge credential first and the membership is recorded after; for a kudos badge the giving is counted. The outer document members are owned by the framework — SPEC §6.3.";
|
|
65
|
+
readonly type: "object";
|
|
66
|
+
readonly additionalProperties: false;
|
|
67
|
+
readonly required: readonly ["awardId"];
|
|
68
|
+
readonly properties: {
|
|
69
|
+
readonly awardId: {
|
|
70
|
+
readonly $ref: "#/$defs/AwardId";
|
|
71
|
+
};
|
|
72
|
+
readonly ext: {
|
|
73
|
+
readonly $ref: "#/$defs/Ext";
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
readonly $defs: {
|
|
77
|
+
readonly Response: {
|
|
78
|
+
readonly $anchor: "response";
|
|
79
|
+
readonly title: "VTC Badges — Mine — Accept — response payload";
|
|
80
|
+
readonly description: "The success response to a vtc/badges/mine/accept/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/mine/accept/0.1#response.";
|
|
81
|
+
readonly type: "object";
|
|
82
|
+
readonly additionalProperties: false;
|
|
83
|
+
readonly required: readonly ["award", "badge"];
|
|
84
|
+
readonly properties: {
|
|
85
|
+
readonly award: {
|
|
86
|
+
readonly $ref: "#/$defs/Award";
|
|
87
|
+
readonly description: "The award, now `accepted`, with `credentialId` for a community badge.";
|
|
88
|
+
};
|
|
89
|
+
readonly badge: {
|
|
90
|
+
readonly $ref: "#/$defs/MyBadge";
|
|
91
|
+
readonly description: "The badge as the holder now sees it, with their count.";
|
|
92
|
+
};
|
|
93
|
+
readonly ext: {
|
|
94
|
+
readonly $ref: "#/$defs/Ext";
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
readonly Ext: {
|
|
99
|
+
readonly title: "Ext";
|
|
100
|
+
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.";
|
|
101
|
+
readonly type: "object";
|
|
102
|
+
readonly minProperties: 1;
|
|
103
|
+
readonly additionalProperties: true;
|
|
104
|
+
readonly propertyNames: {
|
|
105
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
readonly MyBadge: {
|
|
109
|
+
readonly title: "MyBadge";
|
|
110
|
+
readonly description: "A badge as its holder sees it in their own list: the wall entry plus what only the holder knows — whether they hid it, their position for it, and the credential that evidences it.";
|
|
111
|
+
readonly type: "object";
|
|
112
|
+
readonly additionalProperties: false;
|
|
113
|
+
readonly required: readonly ["badge", "count", "since", "pinned", "hidden"];
|
|
114
|
+
readonly properties: {
|
|
115
|
+
readonly badge: {
|
|
116
|
+
readonly $ref: "#/$defs/Badge";
|
|
117
|
+
};
|
|
118
|
+
readonly count: {
|
|
119
|
+
readonly type: "integer";
|
|
120
|
+
readonly minimum: 1;
|
|
121
|
+
};
|
|
122
|
+
readonly since: {
|
|
123
|
+
readonly type: "string";
|
|
124
|
+
readonly format: "date-time";
|
|
125
|
+
};
|
|
126
|
+
readonly latestAt: {
|
|
127
|
+
readonly type: "string";
|
|
128
|
+
readonly format: "date-time";
|
|
129
|
+
};
|
|
130
|
+
readonly pinned: {
|
|
131
|
+
readonly type: "boolean";
|
|
132
|
+
};
|
|
133
|
+
readonly hidden: {
|
|
134
|
+
readonly type: "boolean";
|
|
135
|
+
readonly description: "The holder hid it: off their wall, out of the badge's holder list for members, out of its count; the awards, the membership and the credential stand (VTI-BDG-030).";
|
|
136
|
+
};
|
|
137
|
+
readonly position: {
|
|
138
|
+
readonly type: "integer";
|
|
139
|
+
readonly minimum: 0;
|
|
140
|
+
readonly description: "The holder's order on their wall, lowest first.";
|
|
141
|
+
};
|
|
142
|
+
readonly credentialId: {
|
|
143
|
+
readonly $ref: "#/$defs/GroupCredentialId";
|
|
144
|
+
};
|
|
145
|
+
readonly credentialValidUntil: {
|
|
146
|
+
readonly type: "string";
|
|
147
|
+
readonly format: "date-time";
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
readonly Badge: {
|
|
152
|
+
readonly title: "Badge";
|
|
153
|
+
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.";
|
|
154
|
+
readonly type: "object";
|
|
155
|
+
readonly additionalProperties: false;
|
|
156
|
+
readonly required: readonly ["badgeId", "kind", "name", "description", "image", "repeatable", "listed", "state", "createdAt"];
|
|
157
|
+
readonly properties: {
|
|
158
|
+
readonly badgeId: {
|
|
159
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
160
|
+
};
|
|
161
|
+
readonly kind: {
|
|
162
|
+
readonly $ref: "#/$defs/BadgeKind";
|
|
163
|
+
};
|
|
164
|
+
readonly name: {
|
|
165
|
+
readonly $ref: "#/$defs/BadgeName";
|
|
166
|
+
};
|
|
167
|
+
readonly description: {
|
|
168
|
+
readonly $ref: "#/$defs/BadgeDescription";
|
|
169
|
+
};
|
|
170
|
+
readonly criteria: {
|
|
171
|
+
readonly $ref: "#/$defs/BadgeCriteria";
|
|
172
|
+
};
|
|
173
|
+
readonly image: {
|
|
174
|
+
readonly $ref: "#/$defs/CardBlobRef";
|
|
175
|
+
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.";
|
|
176
|
+
};
|
|
177
|
+
readonly repeatable: {
|
|
178
|
+
readonly type: "boolean";
|
|
179
|
+
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.";
|
|
180
|
+
};
|
|
181
|
+
readonly requestable: {
|
|
182
|
+
readonly type: "boolean";
|
|
183
|
+
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.";
|
|
184
|
+
};
|
|
185
|
+
readonly listed: {
|
|
186
|
+
readonly type: "boolean";
|
|
187
|
+
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.";
|
|
188
|
+
};
|
|
189
|
+
readonly shareableOutside: {
|
|
190
|
+
readonly type: "boolean";
|
|
191
|
+
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.";
|
|
192
|
+
};
|
|
193
|
+
readonly groupId: {
|
|
194
|
+
readonly $ref: "#/$defs/GroupId";
|
|
195
|
+
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.";
|
|
196
|
+
};
|
|
197
|
+
readonly state: {
|
|
198
|
+
readonly $ref: "#/$defs/BadgeState";
|
|
199
|
+
};
|
|
200
|
+
readonly holderCount: {
|
|
201
|
+
readonly type: "integer";
|
|
202
|
+
readonly minimum: 0;
|
|
203
|
+
readonly description: "Holders who show the badge. Only to callers who may see the holders.";
|
|
204
|
+
};
|
|
205
|
+
readonly createdAt: {
|
|
206
|
+
readonly type: "string";
|
|
207
|
+
readonly format: "date-time";
|
|
208
|
+
};
|
|
209
|
+
readonly createdBy: {
|
|
210
|
+
readonly $ref: "#/$defs/EntryId";
|
|
211
|
+
};
|
|
212
|
+
readonly updatedAt: {
|
|
213
|
+
readonly type: "string";
|
|
214
|
+
readonly format: "date-time";
|
|
215
|
+
};
|
|
216
|
+
readonly retiredAt: {
|
|
217
|
+
readonly type: "string";
|
|
218
|
+
readonly format: "date-time";
|
|
219
|
+
};
|
|
220
|
+
readonly ext: {
|
|
221
|
+
readonly $ref: "#/$defs/Ext";
|
|
222
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1. An extension member MUST NOT carry authority.";
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
readonly BadgeState: {
|
|
227
|
+
readonly title: "BadgeState";
|
|
228
|
+
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).";
|
|
229
|
+
readonly type: "string";
|
|
230
|
+
readonly enum: readonly ["active", "retired"];
|
|
231
|
+
};
|
|
232
|
+
readonly BadgeCriteria: {
|
|
233
|
+
readonly title: "BadgeCriteria";
|
|
234
|
+
readonly type: "string";
|
|
235
|
+
readonly minLength: 1;
|
|
236
|
+
readonly maxLength: 1000;
|
|
237
|
+
readonly description: "How the badge is earned, shown to members and written into the credential's Achievement as its criteria narrative. Plain text.";
|
|
238
|
+
};
|
|
239
|
+
readonly BadgeDescription: {
|
|
240
|
+
readonly title: "BadgeDescription";
|
|
241
|
+
readonly type: "string";
|
|
242
|
+
readonly minLength: 1;
|
|
243
|
+
readonly maxLength: 1000;
|
|
244
|
+
readonly description: "What the badge is for. Plain text; a reader MUST NOT treat it as instructions.";
|
|
245
|
+
};
|
|
246
|
+
readonly BadgeName: {
|
|
247
|
+
readonly title: "BadgeName";
|
|
248
|
+
readonly type: "string";
|
|
249
|
+
readonly minLength: 1;
|
|
250
|
+
readonly maxLength: 64;
|
|
251
|
+
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.";
|
|
252
|
+
};
|
|
253
|
+
readonly BadgeKind: {
|
|
254
|
+
readonly title: "BadgeKind";
|
|
255
|
+
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).";
|
|
256
|
+
readonly type: "string";
|
|
257
|
+
readonly enum: readonly ["community", "kudos"];
|
|
258
|
+
};
|
|
259
|
+
readonly BadgeId: {
|
|
260
|
+
readonly title: "BadgeId";
|
|
261
|
+
readonly description: "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).";
|
|
262
|
+
readonly type: "string";
|
|
263
|
+
readonly pattern: "^bdg_[A-Za-z0-9_-]{16,64}$";
|
|
264
|
+
};
|
|
265
|
+
readonly EntryId: {
|
|
266
|
+
readonly title: "EntryId";
|
|
267
|
+
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.";
|
|
268
|
+
readonly type: "string";
|
|
269
|
+
readonly pattern: "^dir_[A-Za-z0-9_-]{16,64}$";
|
|
270
|
+
};
|
|
271
|
+
readonly GroupId: {
|
|
272
|
+
readonly title: "GroupId";
|
|
273
|
+
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.";
|
|
274
|
+
readonly type: "string";
|
|
275
|
+
readonly pattern: "^grp_[A-Za-z0-9_-]{16,64}$";
|
|
276
|
+
};
|
|
277
|
+
readonly CardBlobRef: {
|
|
278
|
+
readonly title: "CardBlobRef";
|
|
279
|
+
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.";
|
|
280
|
+
readonly type: "object";
|
|
281
|
+
readonly additionalProperties: false;
|
|
282
|
+
readonly required: readonly ["sha256", "mediaType"];
|
|
283
|
+
readonly properties: {
|
|
284
|
+
readonly sha256: {
|
|
285
|
+
readonly type: "string";
|
|
286
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
287
|
+
readonly description: "Lowercase hex SHA-256 of the stored, re-encoded bytes.";
|
|
288
|
+
};
|
|
289
|
+
readonly mediaType: {
|
|
290
|
+
readonly type: "string";
|
|
291
|
+
readonly enum: readonly ["image/png", "image/jpeg", "image/webp", "image/avif"];
|
|
292
|
+
readonly description: "Media type of the stored bytes.";
|
|
293
|
+
};
|
|
294
|
+
readonly size: {
|
|
295
|
+
readonly type: "integer";
|
|
296
|
+
readonly minimum: 1;
|
|
297
|
+
readonly maximum: 262144;
|
|
298
|
+
readonly description: "Size in bytes of the stored bytes.";
|
|
299
|
+
};
|
|
300
|
+
readonly url: {
|
|
301
|
+
readonly type: "string";
|
|
302
|
+
readonly format: "uri";
|
|
303
|
+
readonly maxLength: 2048;
|
|
304
|
+
readonly description: "Projection only: a URL the viewer can fetch the image from until `urlExpiresAt`.";
|
|
305
|
+
};
|
|
306
|
+
readonly urlExpiresAt: {
|
|
307
|
+
readonly type: "string";
|
|
308
|
+
readonly format: "date-time";
|
|
309
|
+
readonly description: "Projection only: when `url` stops working.";
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
readonly GroupCredentialId: {
|
|
314
|
+
readonly title: "GroupCredentialId";
|
|
315
|
+
readonly description: "Identifier (`id`) of a group membership credential issued to a member. Each renewal issues a new credential with a new identifier. Validity is the community's setting; a community SHOULD default to 30 days, renewed when 10 days remain.";
|
|
316
|
+
readonly type: "string";
|
|
317
|
+
readonly minLength: 1;
|
|
318
|
+
readonly maxLength: 512;
|
|
319
|
+
};
|
|
320
|
+
readonly Award: {
|
|
321
|
+
readonly title: "Award";
|
|
322
|
+
readonly description: "One giving of a badge to one member. `givenBy` is the giver's directory entry, absent for an award a dynamic badge group's rule made. `note` is shown to the recipient, the giver, the badge's owners and administrators, never to other members. `credentialId` is present on an accepted award of a community badge: the badge credential that evidences it, renewed or re-issued as the badge's regime requires.";
|
|
323
|
+
readonly type: "object";
|
|
324
|
+
readonly additionalProperties: false;
|
|
325
|
+
readonly required: readonly ["awardId", "badgeId", "entryId", "state", "offeredAt"];
|
|
326
|
+
readonly properties: {
|
|
327
|
+
readonly awardId: {
|
|
328
|
+
readonly $ref: "#/$defs/AwardId";
|
|
329
|
+
};
|
|
330
|
+
readonly badgeId: {
|
|
331
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
332
|
+
};
|
|
333
|
+
readonly entryId: {
|
|
334
|
+
readonly $ref: "#/$defs/EntryId";
|
|
335
|
+
readonly description: "The recipient.";
|
|
336
|
+
};
|
|
337
|
+
readonly givenBy: {
|
|
338
|
+
readonly $ref: "#/$defs/EntryId";
|
|
339
|
+
};
|
|
340
|
+
readonly note: {
|
|
341
|
+
readonly $ref: "#/$defs/AwardNote";
|
|
342
|
+
};
|
|
343
|
+
readonly state: {
|
|
344
|
+
readonly $ref: "#/$defs/AwardState";
|
|
345
|
+
};
|
|
346
|
+
readonly offeredAt: {
|
|
347
|
+
readonly type: "string";
|
|
348
|
+
readonly format: "date-time";
|
|
349
|
+
};
|
|
350
|
+
readonly decidedAt: {
|
|
351
|
+
readonly type: "string";
|
|
352
|
+
readonly format: "date-time";
|
|
353
|
+
readonly description: "When the recipient accepted or declined, the giver withdrew, the offer expired, or the award was revoked.";
|
|
354
|
+
};
|
|
355
|
+
readonly expiresAt: {
|
|
356
|
+
readonly type: "string";
|
|
357
|
+
readonly format: "date-time";
|
|
358
|
+
readonly description: "When an unanswered offer lapses, where the community expires offers.";
|
|
359
|
+
};
|
|
360
|
+
readonly credentialId: {
|
|
361
|
+
readonly $ref: "#/$defs/GroupCredentialId";
|
|
362
|
+
};
|
|
363
|
+
readonly ext: {
|
|
364
|
+
readonly $ref: "#/$defs/Ext";
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
readonly AwardState: {
|
|
369
|
+
readonly title: "AwardState";
|
|
370
|
+
readonly description: "`offered`: waiting for the recipient. `accepted`: the recipient took it; for a community badge the credential was issued and the membership recorded. `declined`: the recipient declined; nothing was recorded in the group and nothing issued. `withdrawn`: the giver withdrew the offer before a decision. `expired`: the offer lapsed unanswered. `revoked`: taken back after acceptance (VTI-BDG-023).";
|
|
371
|
+
readonly type: "string";
|
|
372
|
+
readonly enum: readonly ["offered", "accepted", "declined", "withdrawn", "expired", "revoked"];
|
|
373
|
+
};
|
|
374
|
+
readonly AwardNote: {
|
|
375
|
+
readonly title: "AwardNote";
|
|
376
|
+
readonly type: "string";
|
|
377
|
+
readonly minLength: 1;
|
|
378
|
+
readonly maxLength: 500;
|
|
379
|
+
readonly description: "What the award is for, from the giver, shown to the recipient and written as the award's evidence narrative where the badge carries a credential. Plain text; erased with its author (VTI-BDG-090).";
|
|
380
|
+
};
|
|
381
|
+
readonly AwardId: {
|
|
382
|
+
readonly title: "AwardId";
|
|
383
|
+
readonly description: "Opaque identifier of one giving of a badge to one member: `awd_` followed by 16 to 64 base64url characters. Random and unique within the community.";
|
|
384
|
+
readonly type: "string";
|
|
385
|
+
readonly pattern: "^awd_[A-Za-z0-9_-]{16,64}$";
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
390
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
391
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
392
|
+
readonly $ref: "#/$defs/Response";
|
|
393
|
+
readonly $defs: {
|
|
394
|
+
readonly Response: {
|
|
395
|
+
readonly $anchor: "response";
|
|
396
|
+
readonly title: "VTC Badges — Mine — Accept — response payload";
|
|
397
|
+
readonly description: "The success response to a vtc/badges/mine/accept/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/mine/accept/0.1#response.";
|
|
398
|
+
readonly type: "object";
|
|
399
|
+
readonly additionalProperties: false;
|
|
400
|
+
readonly required: readonly ["award", "badge"];
|
|
401
|
+
readonly properties: {
|
|
402
|
+
readonly award: {
|
|
403
|
+
readonly $ref: "#/$defs/Award";
|
|
404
|
+
readonly description: "The award, now `accepted`, with `credentialId` for a community badge.";
|
|
405
|
+
};
|
|
406
|
+
readonly badge: {
|
|
407
|
+
readonly $ref: "#/$defs/MyBadge";
|
|
408
|
+
readonly description: "The badge as the holder now sees it, with their count.";
|
|
409
|
+
};
|
|
410
|
+
readonly ext: {
|
|
411
|
+
readonly $ref: "#/$defs/Ext";
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
readonly Ext: {
|
|
416
|
+
readonly title: "Ext";
|
|
417
|
+
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.";
|
|
418
|
+
readonly type: "object";
|
|
419
|
+
readonly minProperties: 1;
|
|
420
|
+
readonly additionalProperties: true;
|
|
421
|
+
readonly propertyNames: {
|
|
422
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
readonly MyBadge: {
|
|
426
|
+
readonly title: "MyBadge";
|
|
427
|
+
readonly description: "A badge as its holder sees it in their own list: the wall entry plus what only the holder knows — whether they hid it, their position for it, and the credential that evidences it.";
|
|
428
|
+
readonly type: "object";
|
|
429
|
+
readonly additionalProperties: false;
|
|
430
|
+
readonly required: readonly ["badge", "count", "since", "pinned", "hidden"];
|
|
431
|
+
readonly properties: {
|
|
432
|
+
readonly badge: {
|
|
433
|
+
readonly $ref: "#/$defs/Badge";
|
|
434
|
+
};
|
|
435
|
+
readonly count: {
|
|
436
|
+
readonly type: "integer";
|
|
437
|
+
readonly minimum: 1;
|
|
438
|
+
};
|
|
439
|
+
readonly since: {
|
|
440
|
+
readonly type: "string";
|
|
441
|
+
readonly format: "date-time";
|
|
442
|
+
};
|
|
443
|
+
readonly latestAt: {
|
|
444
|
+
readonly type: "string";
|
|
445
|
+
readonly format: "date-time";
|
|
446
|
+
};
|
|
447
|
+
readonly pinned: {
|
|
448
|
+
readonly type: "boolean";
|
|
449
|
+
};
|
|
450
|
+
readonly hidden: {
|
|
451
|
+
readonly type: "boolean";
|
|
452
|
+
readonly description: "The holder hid it: off their wall, out of the badge's holder list for members, out of its count; the awards, the membership and the credential stand (VTI-BDG-030).";
|
|
453
|
+
};
|
|
454
|
+
readonly position: {
|
|
455
|
+
readonly type: "integer";
|
|
456
|
+
readonly minimum: 0;
|
|
457
|
+
readonly description: "The holder's order on their wall, lowest first.";
|
|
458
|
+
};
|
|
459
|
+
readonly credentialId: {
|
|
460
|
+
readonly $ref: "#/$defs/GroupCredentialId";
|
|
461
|
+
};
|
|
462
|
+
readonly credentialValidUntil: {
|
|
463
|
+
readonly type: "string";
|
|
464
|
+
readonly format: "date-time";
|
|
465
|
+
};
|
|
466
|
+
};
|
|
467
|
+
};
|
|
468
|
+
readonly Badge: {
|
|
469
|
+
readonly title: "Badge";
|
|
470
|
+
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.";
|
|
471
|
+
readonly type: "object";
|
|
472
|
+
readonly additionalProperties: false;
|
|
473
|
+
readonly required: readonly ["badgeId", "kind", "name", "description", "image", "repeatable", "listed", "state", "createdAt"];
|
|
474
|
+
readonly properties: {
|
|
475
|
+
readonly badgeId: {
|
|
476
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
477
|
+
};
|
|
478
|
+
readonly kind: {
|
|
479
|
+
readonly $ref: "#/$defs/BadgeKind";
|
|
480
|
+
};
|
|
481
|
+
readonly name: {
|
|
482
|
+
readonly $ref: "#/$defs/BadgeName";
|
|
483
|
+
};
|
|
484
|
+
readonly description: {
|
|
485
|
+
readonly $ref: "#/$defs/BadgeDescription";
|
|
486
|
+
};
|
|
487
|
+
readonly criteria: {
|
|
488
|
+
readonly $ref: "#/$defs/BadgeCriteria";
|
|
489
|
+
};
|
|
490
|
+
readonly image: {
|
|
491
|
+
readonly $ref: "#/$defs/CardBlobRef";
|
|
492
|
+
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.";
|
|
493
|
+
};
|
|
494
|
+
readonly repeatable: {
|
|
495
|
+
readonly type: "boolean";
|
|
496
|
+
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.";
|
|
497
|
+
};
|
|
498
|
+
readonly requestable: {
|
|
499
|
+
readonly type: "boolean";
|
|
500
|
+
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.";
|
|
501
|
+
};
|
|
502
|
+
readonly listed: {
|
|
503
|
+
readonly type: "boolean";
|
|
504
|
+
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.";
|
|
505
|
+
};
|
|
506
|
+
readonly shareableOutside: {
|
|
507
|
+
readonly type: "boolean";
|
|
508
|
+
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.";
|
|
509
|
+
};
|
|
510
|
+
readonly groupId: {
|
|
511
|
+
readonly $ref: "#/$defs/GroupId";
|
|
512
|
+
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.";
|
|
513
|
+
};
|
|
514
|
+
readonly state: {
|
|
515
|
+
readonly $ref: "#/$defs/BadgeState";
|
|
516
|
+
};
|
|
517
|
+
readonly holderCount: {
|
|
518
|
+
readonly type: "integer";
|
|
519
|
+
readonly minimum: 0;
|
|
520
|
+
readonly description: "Holders who show the badge. Only to callers who may see the holders.";
|
|
521
|
+
};
|
|
522
|
+
readonly createdAt: {
|
|
523
|
+
readonly type: "string";
|
|
524
|
+
readonly format: "date-time";
|
|
525
|
+
};
|
|
526
|
+
readonly createdBy: {
|
|
527
|
+
readonly $ref: "#/$defs/EntryId";
|
|
528
|
+
};
|
|
529
|
+
readonly updatedAt: {
|
|
530
|
+
readonly type: "string";
|
|
531
|
+
readonly format: "date-time";
|
|
532
|
+
};
|
|
533
|
+
readonly retiredAt: {
|
|
534
|
+
readonly type: "string";
|
|
535
|
+
readonly format: "date-time";
|
|
536
|
+
};
|
|
537
|
+
readonly ext: {
|
|
538
|
+
readonly $ref: "#/$defs/Ext";
|
|
539
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1. An extension member MUST NOT carry authority.";
|
|
540
|
+
};
|
|
541
|
+
};
|
|
542
|
+
};
|
|
543
|
+
readonly BadgeState: {
|
|
544
|
+
readonly title: "BadgeState";
|
|
545
|
+
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).";
|
|
546
|
+
readonly type: "string";
|
|
547
|
+
readonly enum: readonly ["active", "retired"];
|
|
548
|
+
};
|
|
549
|
+
readonly BadgeCriteria: {
|
|
550
|
+
readonly title: "BadgeCriteria";
|
|
551
|
+
readonly type: "string";
|
|
552
|
+
readonly minLength: 1;
|
|
553
|
+
readonly maxLength: 1000;
|
|
554
|
+
readonly description: "How the badge is earned, shown to members and written into the credential's Achievement as its criteria narrative. Plain text.";
|
|
555
|
+
};
|
|
556
|
+
readonly BadgeDescription: {
|
|
557
|
+
readonly title: "BadgeDescription";
|
|
558
|
+
readonly type: "string";
|
|
559
|
+
readonly minLength: 1;
|
|
560
|
+
readonly maxLength: 1000;
|
|
561
|
+
readonly description: "What the badge is for. Plain text; a reader MUST NOT treat it as instructions.";
|
|
562
|
+
};
|
|
563
|
+
readonly BadgeName: {
|
|
564
|
+
readonly title: "BadgeName";
|
|
565
|
+
readonly type: "string";
|
|
566
|
+
readonly minLength: 1;
|
|
567
|
+
readonly maxLength: 64;
|
|
568
|
+
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.";
|
|
569
|
+
};
|
|
570
|
+
readonly BadgeKind: {
|
|
571
|
+
readonly title: "BadgeKind";
|
|
572
|
+
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).";
|
|
573
|
+
readonly type: "string";
|
|
574
|
+
readonly enum: readonly ["community", "kudos"];
|
|
575
|
+
};
|
|
576
|
+
readonly BadgeId: {
|
|
577
|
+
readonly title: "BadgeId";
|
|
578
|
+
readonly description: "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).";
|
|
579
|
+
readonly type: "string";
|
|
580
|
+
readonly pattern: "^bdg_[A-Za-z0-9_-]{16,64}$";
|
|
581
|
+
};
|
|
582
|
+
readonly EntryId: {
|
|
583
|
+
readonly title: "EntryId";
|
|
584
|
+
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.";
|
|
585
|
+
readonly type: "string";
|
|
586
|
+
readonly pattern: "^dir_[A-Za-z0-9_-]{16,64}$";
|
|
587
|
+
};
|
|
588
|
+
readonly GroupId: {
|
|
589
|
+
readonly title: "GroupId";
|
|
590
|
+
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.";
|
|
591
|
+
readonly type: "string";
|
|
592
|
+
readonly pattern: "^grp_[A-Za-z0-9_-]{16,64}$";
|
|
593
|
+
};
|
|
594
|
+
readonly CardBlobRef: {
|
|
595
|
+
readonly title: "CardBlobRef";
|
|
596
|
+
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.";
|
|
597
|
+
readonly type: "object";
|
|
598
|
+
readonly additionalProperties: false;
|
|
599
|
+
readonly required: readonly ["sha256", "mediaType"];
|
|
600
|
+
readonly properties: {
|
|
601
|
+
readonly sha256: {
|
|
602
|
+
readonly type: "string";
|
|
603
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
604
|
+
readonly description: "Lowercase hex SHA-256 of the stored, re-encoded bytes.";
|
|
605
|
+
};
|
|
606
|
+
readonly mediaType: {
|
|
607
|
+
readonly type: "string";
|
|
608
|
+
readonly enum: readonly ["image/png", "image/jpeg", "image/webp", "image/avif"];
|
|
609
|
+
readonly description: "Media type of the stored bytes.";
|
|
610
|
+
};
|
|
611
|
+
readonly size: {
|
|
612
|
+
readonly type: "integer";
|
|
613
|
+
readonly minimum: 1;
|
|
614
|
+
readonly maximum: 262144;
|
|
615
|
+
readonly description: "Size in bytes of the stored bytes.";
|
|
616
|
+
};
|
|
617
|
+
readonly url: {
|
|
618
|
+
readonly type: "string";
|
|
619
|
+
readonly format: "uri";
|
|
620
|
+
readonly maxLength: 2048;
|
|
621
|
+
readonly description: "Projection only: a URL the viewer can fetch the image from until `urlExpiresAt`.";
|
|
622
|
+
};
|
|
623
|
+
readonly urlExpiresAt: {
|
|
624
|
+
readonly type: "string";
|
|
625
|
+
readonly format: "date-time";
|
|
626
|
+
readonly description: "Projection only: when `url` stops working.";
|
|
627
|
+
};
|
|
628
|
+
};
|
|
629
|
+
};
|
|
630
|
+
readonly GroupCredentialId: {
|
|
631
|
+
readonly title: "GroupCredentialId";
|
|
632
|
+
readonly description: "Identifier (`id`) of a group membership credential issued to a member. Each renewal issues a new credential with a new identifier. Validity is the community's setting; a community SHOULD default to 30 days, renewed when 10 days remain.";
|
|
633
|
+
readonly type: "string";
|
|
634
|
+
readonly minLength: 1;
|
|
635
|
+
readonly maxLength: 512;
|
|
636
|
+
};
|
|
637
|
+
readonly Award: {
|
|
638
|
+
readonly title: "Award";
|
|
639
|
+
readonly description: "One giving of a badge to one member. `givenBy` is the giver's directory entry, absent for an award a dynamic badge group's rule made. `note` is shown to the recipient, the giver, the badge's owners and administrators, never to other members. `credentialId` is present on an accepted award of a community badge: the badge credential that evidences it, renewed or re-issued as the badge's regime requires.";
|
|
640
|
+
readonly type: "object";
|
|
641
|
+
readonly additionalProperties: false;
|
|
642
|
+
readonly required: readonly ["awardId", "badgeId", "entryId", "state", "offeredAt"];
|
|
643
|
+
readonly properties: {
|
|
644
|
+
readonly awardId: {
|
|
645
|
+
readonly $ref: "#/$defs/AwardId";
|
|
646
|
+
};
|
|
647
|
+
readonly badgeId: {
|
|
648
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
649
|
+
};
|
|
650
|
+
readonly entryId: {
|
|
651
|
+
readonly $ref: "#/$defs/EntryId";
|
|
652
|
+
readonly description: "The recipient.";
|
|
653
|
+
};
|
|
654
|
+
readonly givenBy: {
|
|
655
|
+
readonly $ref: "#/$defs/EntryId";
|
|
656
|
+
};
|
|
657
|
+
readonly note: {
|
|
658
|
+
readonly $ref: "#/$defs/AwardNote";
|
|
659
|
+
};
|
|
660
|
+
readonly state: {
|
|
661
|
+
readonly $ref: "#/$defs/AwardState";
|
|
662
|
+
};
|
|
663
|
+
readonly offeredAt: {
|
|
664
|
+
readonly type: "string";
|
|
665
|
+
readonly format: "date-time";
|
|
666
|
+
};
|
|
667
|
+
readonly decidedAt: {
|
|
668
|
+
readonly type: "string";
|
|
669
|
+
readonly format: "date-time";
|
|
670
|
+
readonly description: "When the recipient accepted or declined, the giver withdrew, the offer expired, or the award was revoked.";
|
|
671
|
+
};
|
|
672
|
+
readonly expiresAt: {
|
|
673
|
+
readonly type: "string";
|
|
674
|
+
readonly format: "date-time";
|
|
675
|
+
readonly description: "When an unanswered offer lapses, where the community expires offers.";
|
|
676
|
+
};
|
|
677
|
+
readonly credentialId: {
|
|
678
|
+
readonly $ref: "#/$defs/GroupCredentialId";
|
|
679
|
+
};
|
|
680
|
+
readonly ext: {
|
|
681
|
+
readonly $ref: "#/$defs/Ext";
|
|
682
|
+
};
|
|
683
|
+
};
|
|
684
|
+
};
|
|
685
|
+
readonly AwardState: {
|
|
686
|
+
readonly title: "AwardState";
|
|
687
|
+
readonly description: "`offered`: waiting for the recipient. `accepted`: the recipient took it; for a community badge the credential was issued and the membership recorded. `declined`: the recipient declined; nothing was recorded in the group and nothing issued. `withdrawn`: the giver withdrew the offer before a decision. `expired`: the offer lapsed unanswered. `revoked`: taken back after acceptance (VTI-BDG-023).";
|
|
688
|
+
readonly type: "string";
|
|
689
|
+
readonly enum: readonly ["offered", "accepted", "declined", "withdrawn", "expired", "revoked"];
|
|
690
|
+
};
|
|
691
|
+
readonly AwardNote: {
|
|
692
|
+
readonly title: "AwardNote";
|
|
693
|
+
readonly type: "string";
|
|
694
|
+
readonly minLength: 1;
|
|
695
|
+
readonly maxLength: 500;
|
|
696
|
+
readonly description: "What the award is for, from the giver, shown to the recipient and written as the award's evidence narrative where the badge carries a credential. Plain text; erased with its author (VTI-BDG-090).";
|
|
697
|
+
};
|
|
698
|
+
readonly AwardId: {
|
|
699
|
+
readonly title: "AwardId";
|
|
700
|
+
readonly description: "Opaque identifier of one giving of a badge to one member: `awd_` followed by 16 to 64 base64url characters. Random and unique within the community.";
|
|
701
|
+
readonly type: "string";
|
|
702
|
+
readonly pattern: "^awd_[A-Za-z0-9_-]{16,64}$";
|
|
703
|
+
};
|
|
704
|
+
};
|
|
705
|
+
};
|
|
706
|
+
/**
|
|
707
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
708
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
709
|
+
* per-specification and cannot be derived from the document alone, and
|
|
710
|
+
* item 2 needs the schema this carries.
|
|
711
|
+
*/
|
|
712
|
+
export declare const SPEC: {
|
|
713
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/badges/mine/accept/0.1";
|
|
714
|
+
readonly isBearer: false;
|
|
715
|
+
readonly isProofRequired: true;
|
|
716
|
+
readonly isRecipientRequired: true;
|
|
717
|
+
readonly isIssuedAtRequired: true;
|
|
718
|
+
readonly payloadSchema: {
|
|
719
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
720
|
+
readonly $id: "https://trusttasks.org/spec/vtc/badges/mine/accept/0.1";
|
|
721
|
+
readonly title: "VTC Badges — Mine — Accept — payload";
|
|
722
|
+
readonly description: "A member accepts a badge offered to them. For a community badge the badge group's DID issues their badge credential first and the membership is recorded after; for a kudos badge the giving is counted. The outer document members are owned by the framework — SPEC §6.3.";
|
|
723
|
+
readonly type: "object";
|
|
724
|
+
readonly additionalProperties: false;
|
|
725
|
+
readonly required: readonly ["awardId"];
|
|
726
|
+
readonly properties: {
|
|
727
|
+
readonly awardId: {
|
|
728
|
+
readonly $ref: "#/$defs/AwardId";
|
|
729
|
+
};
|
|
730
|
+
readonly ext: {
|
|
731
|
+
readonly $ref: "#/$defs/Ext";
|
|
732
|
+
};
|
|
733
|
+
};
|
|
734
|
+
readonly $defs: {
|
|
735
|
+
readonly Response: {
|
|
736
|
+
readonly $anchor: "response";
|
|
737
|
+
readonly title: "VTC Badges — Mine — Accept — response payload";
|
|
738
|
+
readonly description: "The success response to a vtc/badges/mine/accept/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/mine/accept/0.1#response.";
|
|
739
|
+
readonly type: "object";
|
|
740
|
+
readonly additionalProperties: false;
|
|
741
|
+
readonly required: readonly ["award", "badge"];
|
|
742
|
+
readonly properties: {
|
|
743
|
+
readonly award: {
|
|
744
|
+
readonly $ref: "#/$defs/Award";
|
|
745
|
+
readonly description: "The award, now `accepted`, with `credentialId` for a community badge.";
|
|
746
|
+
};
|
|
747
|
+
readonly badge: {
|
|
748
|
+
readonly $ref: "#/$defs/MyBadge";
|
|
749
|
+
readonly description: "The badge as the holder now sees it, with their count.";
|
|
750
|
+
};
|
|
751
|
+
readonly ext: {
|
|
752
|
+
readonly $ref: "#/$defs/Ext";
|
|
753
|
+
};
|
|
754
|
+
};
|
|
755
|
+
};
|
|
756
|
+
readonly Ext: {
|
|
757
|
+
readonly title: "Ext";
|
|
758
|
+
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.";
|
|
759
|
+
readonly type: "object";
|
|
760
|
+
readonly minProperties: 1;
|
|
761
|
+
readonly additionalProperties: true;
|
|
762
|
+
readonly propertyNames: {
|
|
763
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
764
|
+
};
|
|
765
|
+
};
|
|
766
|
+
readonly MyBadge: {
|
|
767
|
+
readonly title: "MyBadge";
|
|
768
|
+
readonly description: "A badge as its holder sees it in their own list: the wall entry plus what only the holder knows — whether they hid it, their position for it, and the credential that evidences it.";
|
|
769
|
+
readonly type: "object";
|
|
770
|
+
readonly additionalProperties: false;
|
|
771
|
+
readonly required: readonly ["badge", "count", "since", "pinned", "hidden"];
|
|
772
|
+
readonly properties: {
|
|
773
|
+
readonly badge: {
|
|
774
|
+
readonly $ref: "#/$defs/Badge";
|
|
775
|
+
};
|
|
776
|
+
readonly count: {
|
|
777
|
+
readonly type: "integer";
|
|
778
|
+
readonly minimum: 1;
|
|
779
|
+
};
|
|
780
|
+
readonly since: {
|
|
781
|
+
readonly type: "string";
|
|
782
|
+
readonly format: "date-time";
|
|
783
|
+
};
|
|
784
|
+
readonly latestAt: {
|
|
785
|
+
readonly type: "string";
|
|
786
|
+
readonly format: "date-time";
|
|
787
|
+
};
|
|
788
|
+
readonly pinned: {
|
|
789
|
+
readonly type: "boolean";
|
|
790
|
+
};
|
|
791
|
+
readonly hidden: {
|
|
792
|
+
readonly type: "boolean";
|
|
793
|
+
readonly description: "The holder hid it: off their wall, out of the badge's holder list for members, out of its count; the awards, the membership and the credential stand (VTI-BDG-030).";
|
|
794
|
+
};
|
|
795
|
+
readonly position: {
|
|
796
|
+
readonly type: "integer";
|
|
797
|
+
readonly minimum: 0;
|
|
798
|
+
readonly description: "The holder's order on their wall, lowest first.";
|
|
799
|
+
};
|
|
800
|
+
readonly credentialId: {
|
|
801
|
+
readonly $ref: "#/$defs/GroupCredentialId";
|
|
802
|
+
};
|
|
803
|
+
readonly credentialValidUntil: {
|
|
804
|
+
readonly type: "string";
|
|
805
|
+
readonly format: "date-time";
|
|
806
|
+
};
|
|
807
|
+
};
|
|
808
|
+
};
|
|
809
|
+
readonly Badge: {
|
|
810
|
+
readonly title: "Badge";
|
|
811
|
+
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.";
|
|
812
|
+
readonly type: "object";
|
|
813
|
+
readonly additionalProperties: false;
|
|
814
|
+
readonly required: readonly ["badgeId", "kind", "name", "description", "image", "repeatable", "listed", "state", "createdAt"];
|
|
815
|
+
readonly properties: {
|
|
816
|
+
readonly badgeId: {
|
|
817
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
818
|
+
};
|
|
819
|
+
readonly kind: {
|
|
820
|
+
readonly $ref: "#/$defs/BadgeKind";
|
|
821
|
+
};
|
|
822
|
+
readonly name: {
|
|
823
|
+
readonly $ref: "#/$defs/BadgeName";
|
|
824
|
+
};
|
|
825
|
+
readonly description: {
|
|
826
|
+
readonly $ref: "#/$defs/BadgeDescription";
|
|
827
|
+
};
|
|
828
|
+
readonly criteria: {
|
|
829
|
+
readonly $ref: "#/$defs/BadgeCriteria";
|
|
830
|
+
};
|
|
831
|
+
readonly image: {
|
|
832
|
+
readonly $ref: "#/$defs/CardBlobRef";
|
|
833
|
+
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.";
|
|
834
|
+
};
|
|
835
|
+
readonly repeatable: {
|
|
836
|
+
readonly type: "boolean";
|
|
837
|
+
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.";
|
|
838
|
+
};
|
|
839
|
+
readonly requestable: {
|
|
840
|
+
readonly type: "boolean";
|
|
841
|
+
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.";
|
|
842
|
+
};
|
|
843
|
+
readonly listed: {
|
|
844
|
+
readonly type: "boolean";
|
|
845
|
+
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.";
|
|
846
|
+
};
|
|
847
|
+
readonly shareableOutside: {
|
|
848
|
+
readonly type: "boolean";
|
|
849
|
+
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.";
|
|
850
|
+
};
|
|
851
|
+
readonly groupId: {
|
|
852
|
+
readonly $ref: "#/$defs/GroupId";
|
|
853
|
+
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.";
|
|
854
|
+
};
|
|
855
|
+
readonly state: {
|
|
856
|
+
readonly $ref: "#/$defs/BadgeState";
|
|
857
|
+
};
|
|
858
|
+
readonly holderCount: {
|
|
859
|
+
readonly type: "integer";
|
|
860
|
+
readonly minimum: 0;
|
|
861
|
+
readonly description: "Holders who show the badge. Only to callers who may see the holders.";
|
|
862
|
+
};
|
|
863
|
+
readonly createdAt: {
|
|
864
|
+
readonly type: "string";
|
|
865
|
+
readonly format: "date-time";
|
|
866
|
+
};
|
|
867
|
+
readonly createdBy: {
|
|
868
|
+
readonly $ref: "#/$defs/EntryId";
|
|
869
|
+
};
|
|
870
|
+
readonly updatedAt: {
|
|
871
|
+
readonly type: "string";
|
|
872
|
+
readonly format: "date-time";
|
|
873
|
+
};
|
|
874
|
+
readonly retiredAt: {
|
|
875
|
+
readonly type: "string";
|
|
876
|
+
readonly format: "date-time";
|
|
877
|
+
};
|
|
878
|
+
readonly ext: {
|
|
879
|
+
readonly $ref: "#/$defs/Ext";
|
|
880
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1. An extension member MUST NOT carry authority.";
|
|
881
|
+
};
|
|
882
|
+
};
|
|
883
|
+
};
|
|
884
|
+
readonly BadgeState: {
|
|
885
|
+
readonly title: "BadgeState";
|
|
886
|
+
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).";
|
|
887
|
+
readonly type: "string";
|
|
888
|
+
readonly enum: readonly ["active", "retired"];
|
|
889
|
+
};
|
|
890
|
+
readonly BadgeCriteria: {
|
|
891
|
+
readonly title: "BadgeCriteria";
|
|
892
|
+
readonly type: "string";
|
|
893
|
+
readonly minLength: 1;
|
|
894
|
+
readonly maxLength: 1000;
|
|
895
|
+
readonly description: "How the badge is earned, shown to members and written into the credential's Achievement as its criteria narrative. Plain text.";
|
|
896
|
+
};
|
|
897
|
+
readonly BadgeDescription: {
|
|
898
|
+
readonly title: "BadgeDescription";
|
|
899
|
+
readonly type: "string";
|
|
900
|
+
readonly minLength: 1;
|
|
901
|
+
readonly maxLength: 1000;
|
|
902
|
+
readonly description: "What the badge is for. Plain text; a reader MUST NOT treat it as instructions.";
|
|
903
|
+
};
|
|
904
|
+
readonly BadgeName: {
|
|
905
|
+
readonly title: "BadgeName";
|
|
906
|
+
readonly type: "string";
|
|
907
|
+
readonly minLength: 1;
|
|
908
|
+
readonly maxLength: 64;
|
|
909
|
+
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.";
|
|
910
|
+
};
|
|
911
|
+
readonly BadgeKind: {
|
|
912
|
+
readonly title: "BadgeKind";
|
|
913
|
+
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).";
|
|
914
|
+
readonly type: "string";
|
|
915
|
+
readonly enum: readonly ["community", "kudos"];
|
|
916
|
+
};
|
|
917
|
+
readonly BadgeId: {
|
|
918
|
+
readonly title: "BadgeId";
|
|
919
|
+
readonly description: "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).";
|
|
920
|
+
readonly type: "string";
|
|
921
|
+
readonly pattern: "^bdg_[A-Za-z0-9_-]{16,64}$";
|
|
922
|
+
};
|
|
923
|
+
readonly EntryId: {
|
|
924
|
+
readonly title: "EntryId";
|
|
925
|
+
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.";
|
|
926
|
+
readonly type: "string";
|
|
927
|
+
readonly pattern: "^dir_[A-Za-z0-9_-]{16,64}$";
|
|
928
|
+
};
|
|
929
|
+
readonly GroupId: {
|
|
930
|
+
readonly title: "GroupId";
|
|
931
|
+
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.";
|
|
932
|
+
readonly type: "string";
|
|
933
|
+
readonly pattern: "^grp_[A-Za-z0-9_-]{16,64}$";
|
|
934
|
+
};
|
|
935
|
+
readonly CardBlobRef: {
|
|
936
|
+
readonly title: "CardBlobRef";
|
|
937
|
+
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.";
|
|
938
|
+
readonly type: "object";
|
|
939
|
+
readonly additionalProperties: false;
|
|
940
|
+
readonly required: readonly ["sha256", "mediaType"];
|
|
941
|
+
readonly properties: {
|
|
942
|
+
readonly sha256: {
|
|
943
|
+
readonly type: "string";
|
|
944
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
945
|
+
readonly description: "Lowercase hex SHA-256 of the stored, re-encoded bytes.";
|
|
946
|
+
};
|
|
947
|
+
readonly mediaType: {
|
|
948
|
+
readonly type: "string";
|
|
949
|
+
readonly enum: readonly ["image/png", "image/jpeg", "image/webp", "image/avif"];
|
|
950
|
+
readonly description: "Media type of the stored bytes.";
|
|
951
|
+
};
|
|
952
|
+
readonly size: {
|
|
953
|
+
readonly type: "integer";
|
|
954
|
+
readonly minimum: 1;
|
|
955
|
+
readonly maximum: 262144;
|
|
956
|
+
readonly description: "Size in bytes of the stored bytes.";
|
|
957
|
+
};
|
|
958
|
+
readonly url: {
|
|
959
|
+
readonly type: "string";
|
|
960
|
+
readonly format: "uri";
|
|
961
|
+
readonly maxLength: 2048;
|
|
962
|
+
readonly description: "Projection only: a URL the viewer can fetch the image from until `urlExpiresAt`.";
|
|
963
|
+
};
|
|
964
|
+
readonly urlExpiresAt: {
|
|
965
|
+
readonly type: "string";
|
|
966
|
+
readonly format: "date-time";
|
|
967
|
+
readonly description: "Projection only: when `url` stops working.";
|
|
968
|
+
};
|
|
969
|
+
};
|
|
970
|
+
};
|
|
971
|
+
readonly GroupCredentialId: {
|
|
972
|
+
readonly title: "GroupCredentialId";
|
|
973
|
+
readonly description: "Identifier (`id`) of a group membership credential issued to a member. Each renewal issues a new credential with a new identifier. Validity is the community's setting; a community SHOULD default to 30 days, renewed when 10 days remain.";
|
|
974
|
+
readonly type: "string";
|
|
975
|
+
readonly minLength: 1;
|
|
976
|
+
readonly maxLength: 512;
|
|
977
|
+
};
|
|
978
|
+
readonly Award: {
|
|
979
|
+
readonly title: "Award";
|
|
980
|
+
readonly description: "One giving of a badge to one member. `givenBy` is the giver's directory entry, absent for an award a dynamic badge group's rule made. `note` is shown to the recipient, the giver, the badge's owners and administrators, never to other members. `credentialId` is present on an accepted award of a community badge: the badge credential that evidences it, renewed or re-issued as the badge's regime requires.";
|
|
981
|
+
readonly type: "object";
|
|
982
|
+
readonly additionalProperties: false;
|
|
983
|
+
readonly required: readonly ["awardId", "badgeId", "entryId", "state", "offeredAt"];
|
|
984
|
+
readonly properties: {
|
|
985
|
+
readonly awardId: {
|
|
986
|
+
readonly $ref: "#/$defs/AwardId";
|
|
987
|
+
};
|
|
988
|
+
readonly badgeId: {
|
|
989
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
990
|
+
};
|
|
991
|
+
readonly entryId: {
|
|
992
|
+
readonly $ref: "#/$defs/EntryId";
|
|
993
|
+
readonly description: "The recipient.";
|
|
994
|
+
};
|
|
995
|
+
readonly givenBy: {
|
|
996
|
+
readonly $ref: "#/$defs/EntryId";
|
|
997
|
+
};
|
|
998
|
+
readonly note: {
|
|
999
|
+
readonly $ref: "#/$defs/AwardNote";
|
|
1000
|
+
};
|
|
1001
|
+
readonly state: {
|
|
1002
|
+
readonly $ref: "#/$defs/AwardState";
|
|
1003
|
+
};
|
|
1004
|
+
readonly offeredAt: {
|
|
1005
|
+
readonly type: "string";
|
|
1006
|
+
readonly format: "date-time";
|
|
1007
|
+
};
|
|
1008
|
+
readonly decidedAt: {
|
|
1009
|
+
readonly type: "string";
|
|
1010
|
+
readonly format: "date-time";
|
|
1011
|
+
readonly description: "When the recipient accepted or declined, the giver withdrew, the offer expired, or the award was revoked.";
|
|
1012
|
+
};
|
|
1013
|
+
readonly expiresAt: {
|
|
1014
|
+
readonly type: "string";
|
|
1015
|
+
readonly format: "date-time";
|
|
1016
|
+
readonly description: "When an unanswered offer lapses, where the community expires offers.";
|
|
1017
|
+
};
|
|
1018
|
+
readonly credentialId: {
|
|
1019
|
+
readonly $ref: "#/$defs/GroupCredentialId";
|
|
1020
|
+
};
|
|
1021
|
+
readonly ext: {
|
|
1022
|
+
readonly $ref: "#/$defs/Ext";
|
|
1023
|
+
};
|
|
1024
|
+
};
|
|
1025
|
+
};
|
|
1026
|
+
readonly AwardState: {
|
|
1027
|
+
readonly title: "AwardState";
|
|
1028
|
+
readonly description: "`offered`: waiting for the recipient. `accepted`: the recipient took it; for a community badge the credential was issued and the membership recorded. `declined`: the recipient declined; nothing was recorded in the group and nothing issued. `withdrawn`: the giver withdrew the offer before a decision. `expired`: the offer lapsed unanswered. `revoked`: taken back after acceptance (VTI-BDG-023).";
|
|
1029
|
+
readonly type: "string";
|
|
1030
|
+
readonly enum: readonly ["offered", "accepted", "declined", "withdrawn", "expired", "revoked"];
|
|
1031
|
+
};
|
|
1032
|
+
readonly AwardNote: {
|
|
1033
|
+
readonly title: "AwardNote";
|
|
1034
|
+
readonly type: "string";
|
|
1035
|
+
readonly minLength: 1;
|
|
1036
|
+
readonly maxLength: 500;
|
|
1037
|
+
readonly description: "What the award is for, from the giver, shown to the recipient and written as the award's evidence narrative where the badge carries a credential. Plain text; erased with its author (VTI-BDG-090).";
|
|
1038
|
+
};
|
|
1039
|
+
readonly AwardId: {
|
|
1040
|
+
readonly title: "AwardId";
|
|
1041
|
+
readonly description: "Opaque identifier of one giving of a badge to one member: `awd_` followed by 16 to 64 base64url characters. Random and unique within the community.";
|
|
1042
|
+
readonly type: "string";
|
|
1043
|
+
readonly pattern: "^awd_[A-Za-z0-9_-]{16,64}$";
|
|
1044
|
+
};
|
|
1045
|
+
};
|
|
1046
|
+
};
|
|
1047
|
+
};
|
|
1048
|
+
/**
|
|
1049
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
1050
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
1051
|
+
* parties (§7.3 item 5).
|
|
1052
|
+
*/
|
|
1053
|
+
export declare const RESPONSE_SPEC: {
|
|
1054
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/badges/mine/accept/0.1#response";
|
|
1055
|
+
readonly isBearer: false;
|
|
1056
|
+
readonly isProofRequired: true;
|
|
1057
|
+
readonly isRecipientRequired: true;
|
|
1058
|
+
readonly isIssuedAtRequired: true;
|
|
1059
|
+
readonly payloadSchema: {
|
|
1060
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
1061
|
+
readonly $ref: "#/$defs/Response";
|
|
1062
|
+
readonly $defs: {
|
|
1063
|
+
readonly Response: {
|
|
1064
|
+
readonly $anchor: "response";
|
|
1065
|
+
readonly title: "VTC Badges — Mine — Accept — response payload";
|
|
1066
|
+
readonly description: "The success response to a vtc/badges/mine/accept/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/mine/accept/0.1#response.";
|
|
1067
|
+
readonly type: "object";
|
|
1068
|
+
readonly additionalProperties: false;
|
|
1069
|
+
readonly required: readonly ["award", "badge"];
|
|
1070
|
+
readonly properties: {
|
|
1071
|
+
readonly award: {
|
|
1072
|
+
readonly $ref: "#/$defs/Award";
|
|
1073
|
+
readonly description: "The award, now `accepted`, with `credentialId` for a community badge.";
|
|
1074
|
+
};
|
|
1075
|
+
readonly badge: {
|
|
1076
|
+
readonly $ref: "#/$defs/MyBadge";
|
|
1077
|
+
readonly description: "The badge as the holder now sees it, with their count.";
|
|
1078
|
+
};
|
|
1079
|
+
readonly ext: {
|
|
1080
|
+
readonly $ref: "#/$defs/Ext";
|
|
1081
|
+
};
|
|
1082
|
+
};
|
|
1083
|
+
};
|
|
1084
|
+
readonly Ext: {
|
|
1085
|
+
readonly title: "Ext";
|
|
1086
|
+
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.";
|
|
1087
|
+
readonly type: "object";
|
|
1088
|
+
readonly minProperties: 1;
|
|
1089
|
+
readonly additionalProperties: true;
|
|
1090
|
+
readonly propertyNames: {
|
|
1091
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
1092
|
+
};
|
|
1093
|
+
};
|
|
1094
|
+
readonly MyBadge: {
|
|
1095
|
+
readonly title: "MyBadge";
|
|
1096
|
+
readonly description: "A badge as its holder sees it in their own list: the wall entry plus what only the holder knows — whether they hid it, their position for it, and the credential that evidences it.";
|
|
1097
|
+
readonly type: "object";
|
|
1098
|
+
readonly additionalProperties: false;
|
|
1099
|
+
readonly required: readonly ["badge", "count", "since", "pinned", "hidden"];
|
|
1100
|
+
readonly properties: {
|
|
1101
|
+
readonly badge: {
|
|
1102
|
+
readonly $ref: "#/$defs/Badge";
|
|
1103
|
+
};
|
|
1104
|
+
readonly count: {
|
|
1105
|
+
readonly type: "integer";
|
|
1106
|
+
readonly minimum: 1;
|
|
1107
|
+
};
|
|
1108
|
+
readonly since: {
|
|
1109
|
+
readonly type: "string";
|
|
1110
|
+
readonly format: "date-time";
|
|
1111
|
+
};
|
|
1112
|
+
readonly latestAt: {
|
|
1113
|
+
readonly type: "string";
|
|
1114
|
+
readonly format: "date-time";
|
|
1115
|
+
};
|
|
1116
|
+
readonly pinned: {
|
|
1117
|
+
readonly type: "boolean";
|
|
1118
|
+
};
|
|
1119
|
+
readonly hidden: {
|
|
1120
|
+
readonly type: "boolean";
|
|
1121
|
+
readonly description: "The holder hid it: off their wall, out of the badge's holder list for members, out of its count; the awards, the membership and the credential stand (VTI-BDG-030).";
|
|
1122
|
+
};
|
|
1123
|
+
readonly position: {
|
|
1124
|
+
readonly type: "integer";
|
|
1125
|
+
readonly minimum: 0;
|
|
1126
|
+
readonly description: "The holder's order on their wall, lowest first.";
|
|
1127
|
+
};
|
|
1128
|
+
readonly credentialId: {
|
|
1129
|
+
readonly $ref: "#/$defs/GroupCredentialId";
|
|
1130
|
+
};
|
|
1131
|
+
readonly credentialValidUntil: {
|
|
1132
|
+
readonly type: "string";
|
|
1133
|
+
readonly format: "date-time";
|
|
1134
|
+
};
|
|
1135
|
+
};
|
|
1136
|
+
};
|
|
1137
|
+
readonly Badge: {
|
|
1138
|
+
readonly title: "Badge";
|
|
1139
|
+
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.";
|
|
1140
|
+
readonly type: "object";
|
|
1141
|
+
readonly additionalProperties: false;
|
|
1142
|
+
readonly required: readonly ["badgeId", "kind", "name", "description", "image", "repeatable", "listed", "state", "createdAt"];
|
|
1143
|
+
readonly properties: {
|
|
1144
|
+
readonly badgeId: {
|
|
1145
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
1146
|
+
};
|
|
1147
|
+
readonly kind: {
|
|
1148
|
+
readonly $ref: "#/$defs/BadgeKind";
|
|
1149
|
+
};
|
|
1150
|
+
readonly name: {
|
|
1151
|
+
readonly $ref: "#/$defs/BadgeName";
|
|
1152
|
+
};
|
|
1153
|
+
readonly description: {
|
|
1154
|
+
readonly $ref: "#/$defs/BadgeDescription";
|
|
1155
|
+
};
|
|
1156
|
+
readonly criteria: {
|
|
1157
|
+
readonly $ref: "#/$defs/BadgeCriteria";
|
|
1158
|
+
};
|
|
1159
|
+
readonly image: {
|
|
1160
|
+
readonly $ref: "#/$defs/CardBlobRef";
|
|
1161
|
+
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.";
|
|
1162
|
+
};
|
|
1163
|
+
readonly repeatable: {
|
|
1164
|
+
readonly type: "boolean";
|
|
1165
|
+
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.";
|
|
1166
|
+
};
|
|
1167
|
+
readonly requestable: {
|
|
1168
|
+
readonly type: "boolean";
|
|
1169
|
+
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.";
|
|
1170
|
+
};
|
|
1171
|
+
readonly listed: {
|
|
1172
|
+
readonly type: "boolean";
|
|
1173
|
+
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.";
|
|
1174
|
+
};
|
|
1175
|
+
readonly shareableOutside: {
|
|
1176
|
+
readonly type: "boolean";
|
|
1177
|
+
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.";
|
|
1178
|
+
};
|
|
1179
|
+
readonly groupId: {
|
|
1180
|
+
readonly $ref: "#/$defs/GroupId";
|
|
1181
|
+
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.";
|
|
1182
|
+
};
|
|
1183
|
+
readonly state: {
|
|
1184
|
+
readonly $ref: "#/$defs/BadgeState";
|
|
1185
|
+
};
|
|
1186
|
+
readonly holderCount: {
|
|
1187
|
+
readonly type: "integer";
|
|
1188
|
+
readonly minimum: 0;
|
|
1189
|
+
readonly description: "Holders who show the badge. Only to callers who may see the holders.";
|
|
1190
|
+
};
|
|
1191
|
+
readonly createdAt: {
|
|
1192
|
+
readonly type: "string";
|
|
1193
|
+
readonly format: "date-time";
|
|
1194
|
+
};
|
|
1195
|
+
readonly createdBy: {
|
|
1196
|
+
readonly $ref: "#/$defs/EntryId";
|
|
1197
|
+
};
|
|
1198
|
+
readonly updatedAt: {
|
|
1199
|
+
readonly type: "string";
|
|
1200
|
+
readonly format: "date-time";
|
|
1201
|
+
};
|
|
1202
|
+
readonly retiredAt: {
|
|
1203
|
+
readonly type: "string";
|
|
1204
|
+
readonly format: "date-time";
|
|
1205
|
+
};
|
|
1206
|
+
readonly ext: {
|
|
1207
|
+
readonly $ref: "#/$defs/Ext";
|
|
1208
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1. An extension member MUST NOT carry authority.";
|
|
1209
|
+
};
|
|
1210
|
+
};
|
|
1211
|
+
};
|
|
1212
|
+
readonly BadgeState: {
|
|
1213
|
+
readonly title: "BadgeState";
|
|
1214
|
+
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).";
|
|
1215
|
+
readonly type: "string";
|
|
1216
|
+
readonly enum: readonly ["active", "retired"];
|
|
1217
|
+
};
|
|
1218
|
+
readonly BadgeCriteria: {
|
|
1219
|
+
readonly title: "BadgeCriteria";
|
|
1220
|
+
readonly type: "string";
|
|
1221
|
+
readonly minLength: 1;
|
|
1222
|
+
readonly maxLength: 1000;
|
|
1223
|
+
readonly description: "How the badge is earned, shown to members and written into the credential's Achievement as its criteria narrative. Plain text.";
|
|
1224
|
+
};
|
|
1225
|
+
readonly BadgeDescription: {
|
|
1226
|
+
readonly title: "BadgeDescription";
|
|
1227
|
+
readonly type: "string";
|
|
1228
|
+
readonly minLength: 1;
|
|
1229
|
+
readonly maxLength: 1000;
|
|
1230
|
+
readonly description: "What the badge is for. Plain text; a reader MUST NOT treat it as instructions.";
|
|
1231
|
+
};
|
|
1232
|
+
readonly BadgeName: {
|
|
1233
|
+
readonly title: "BadgeName";
|
|
1234
|
+
readonly type: "string";
|
|
1235
|
+
readonly minLength: 1;
|
|
1236
|
+
readonly maxLength: 64;
|
|
1237
|
+
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.";
|
|
1238
|
+
};
|
|
1239
|
+
readonly BadgeKind: {
|
|
1240
|
+
readonly title: "BadgeKind";
|
|
1241
|
+
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).";
|
|
1242
|
+
readonly type: "string";
|
|
1243
|
+
readonly enum: readonly ["community", "kudos"];
|
|
1244
|
+
};
|
|
1245
|
+
readonly BadgeId: {
|
|
1246
|
+
readonly title: "BadgeId";
|
|
1247
|
+
readonly description: "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).";
|
|
1248
|
+
readonly type: "string";
|
|
1249
|
+
readonly pattern: "^bdg_[A-Za-z0-9_-]{16,64}$";
|
|
1250
|
+
};
|
|
1251
|
+
readonly EntryId: {
|
|
1252
|
+
readonly title: "EntryId";
|
|
1253
|
+
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.";
|
|
1254
|
+
readonly type: "string";
|
|
1255
|
+
readonly pattern: "^dir_[A-Za-z0-9_-]{16,64}$";
|
|
1256
|
+
};
|
|
1257
|
+
readonly GroupId: {
|
|
1258
|
+
readonly title: "GroupId";
|
|
1259
|
+
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.";
|
|
1260
|
+
readonly type: "string";
|
|
1261
|
+
readonly pattern: "^grp_[A-Za-z0-9_-]{16,64}$";
|
|
1262
|
+
};
|
|
1263
|
+
readonly CardBlobRef: {
|
|
1264
|
+
readonly title: "CardBlobRef";
|
|
1265
|
+
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.";
|
|
1266
|
+
readonly type: "object";
|
|
1267
|
+
readonly additionalProperties: false;
|
|
1268
|
+
readonly required: readonly ["sha256", "mediaType"];
|
|
1269
|
+
readonly properties: {
|
|
1270
|
+
readonly sha256: {
|
|
1271
|
+
readonly type: "string";
|
|
1272
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
1273
|
+
readonly description: "Lowercase hex SHA-256 of the stored, re-encoded bytes.";
|
|
1274
|
+
};
|
|
1275
|
+
readonly mediaType: {
|
|
1276
|
+
readonly type: "string";
|
|
1277
|
+
readonly enum: readonly ["image/png", "image/jpeg", "image/webp", "image/avif"];
|
|
1278
|
+
readonly description: "Media type of the stored bytes.";
|
|
1279
|
+
};
|
|
1280
|
+
readonly size: {
|
|
1281
|
+
readonly type: "integer";
|
|
1282
|
+
readonly minimum: 1;
|
|
1283
|
+
readonly maximum: 262144;
|
|
1284
|
+
readonly description: "Size in bytes of the stored bytes.";
|
|
1285
|
+
};
|
|
1286
|
+
readonly url: {
|
|
1287
|
+
readonly type: "string";
|
|
1288
|
+
readonly format: "uri";
|
|
1289
|
+
readonly maxLength: 2048;
|
|
1290
|
+
readonly description: "Projection only: a URL the viewer can fetch the image from until `urlExpiresAt`.";
|
|
1291
|
+
};
|
|
1292
|
+
readonly urlExpiresAt: {
|
|
1293
|
+
readonly type: "string";
|
|
1294
|
+
readonly format: "date-time";
|
|
1295
|
+
readonly description: "Projection only: when `url` stops working.";
|
|
1296
|
+
};
|
|
1297
|
+
};
|
|
1298
|
+
};
|
|
1299
|
+
readonly GroupCredentialId: {
|
|
1300
|
+
readonly title: "GroupCredentialId";
|
|
1301
|
+
readonly description: "Identifier (`id`) of a group membership credential issued to a member. Each renewal issues a new credential with a new identifier. Validity is the community's setting; a community SHOULD default to 30 days, renewed when 10 days remain.";
|
|
1302
|
+
readonly type: "string";
|
|
1303
|
+
readonly minLength: 1;
|
|
1304
|
+
readonly maxLength: 512;
|
|
1305
|
+
};
|
|
1306
|
+
readonly Award: {
|
|
1307
|
+
readonly title: "Award";
|
|
1308
|
+
readonly description: "One giving of a badge to one member. `givenBy` is the giver's directory entry, absent for an award a dynamic badge group's rule made. `note` is shown to the recipient, the giver, the badge's owners and administrators, never to other members. `credentialId` is present on an accepted award of a community badge: the badge credential that evidences it, renewed or re-issued as the badge's regime requires.";
|
|
1309
|
+
readonly type: "object";
|
|
1310
|
+
readonly additionalProperties: false;
|
|
1311
|
+
readonly required: readonly ["awardId", "badgeId", "entryId", "state", "offeredAt"];
|
|
1312
|
+
readonly properties: {
|
|
1313
|
+
readonly awardId: {
|
|
1314
|
+
readonly $ref: "#/$defs/AwardId";
|
|
1315
|
+
};
|
|
1316
|
+
readonly badgeId: {
|
|
1317
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
1318
|
+
};
|
|
1319
|
+
readonly entryId: {
|
|
1320
|
+
readonly $ref: "#/$defs/EntryId";
|
|
1321
|
+
readonly description: "The recipient.";
|
|
1322
|
+
};
|
|
1323
|
+
readonly givenBy: {
|
|
1324
|
+
readonly $ref: "#/$defs/EntryId";
|
|
1325
|
+
};
|
|
1326
|
+
readonly note: {
|
|
1327
|
+
readonly $ref: "#/$defs/AwardNote";
|
|
1328
|
+
};
|
|
1329
|
+
readonly state: {
|
|
1330
|
+
readonly $ref: "#/$defs/AwardState";
|
|
1331
|
+
};
|
|
1332
|
+
readonly offeredAt: {
|
|
1333
|
+
readonly type: "string";
|
|
1334
|
+
readonly format: "date-time";
|
|
1335
|
+
};
|
|
1336
|
+
readonly decidedAt: {
|
|
1337
|
+
readonly type: "string";
|
|
1338
|
+
readonly format: "date-time";
|
|
1339
|
+
readonly description: "When the recipient accepted or declined, the giver withdrew, the offer expired, or the award was revoked.";
|
|
1340
|
+
};
|
|
1341
|
+
readonly expiresAt: {
|
|
1342
|
+
readonly type: "string";
|
|
1343
|
+
readonly format: "date-time";
|
|
1344
|
+
readonly description: "When an unanswered offer lapses, where the community expires offers.";
|
|
1345
|
+
};
|
|
1346
|
+
readonly credentialId: {
|
|
1347
|
+
readonly $ref: "#/$defs/GroupCredentialId";
|
|
1348
|
+
};
|
|
1349
|
+
readonly ext: {
|
|
1350
|
+
readonly $ref: "#/$defs/Ext";
|
|
1351
|
+
};
|
|
1352
|
+
};
|
|
1353
|
+
};
|
|
1354
|
+
readonly AwardState: {
|
|
1355
|
+
readonly title: "AwardState";
|
|
1356
|
+
readonly description: "`offered`: waiting for the recipient. `accepted`: the recipient took it; for a community badge the credential was issued and the membership recorded. `declined`: the recipient declined; nothing was recorded in the group and nothing issued. `withdrawn`: the giver withdrew the offer before a decision. `expired`: the offer lapsed unanswered. `revoked`: taken back after acceptance (VTI-BDG-023).";
|
|
1357
|
+
readonly type: "string";
|
|
1358
|
+
readonly enum: readonly ["offered", "accepted", "declined", "withdrawn", "expired", "revoked"];
|
|
1359
|
+
};
|
|
1360
|
+
readonly AwardNote: {
|
|
1361
|
+
readonly title: "AwardNote";
|
|
1362
|
+
readonly type: "string";
|
|
1363
|
+
readonly minLength: 1;
|
|
1364
|
+
readonly maxLength: 500;
|
|
1365
|
+
readonly description: "What the award is for, from the giver, shown to the recipient and written as the award's evidence narrative where the badge carries a credential. Plain text; erased with its author (VTI-BDG-090).";
|
|
1366
|
+
};
|
|
1367
|
+
readonly AwardId: {
|
|
1368
|
+
readonly title: "AwardId";
|
|
1369
|
+
readonly description: "Opaque identifier of one giving of a badge to one member: `awd_` followed by 16 to 64 base64url characters. Random and unique within the community.";
|
|
1370
|
+
readonly type: "string";
|
|
1371
|
+
readonly pattern: "^awd_[A-Za-z0-9_-]{16,64}$";
|
|
1372
|
+
};
|
|
1373
|
+
};
|
|
1374
|
+
};
|
|
1375
|
+
};
|
|
1376
|
+
//# sourceMappingURL=payload.d.ts.map
|