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