@openvtc/trust-tasks 0.28.18 → 0.28.20

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