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