@openvtc/trust-tasks 0.26.13 → 0.26.15

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 (202) hide show
  1. package/CHANGELOG.md +131 -0
  2. package/dist/_shared/components.d.ts +392 -1
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +18 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +18 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/rooms/_shared/0.1/personal-label.d.ts +16 -0
  9. package/dist/rooms/_shared/0.1/personal-label.d.ts.map +1 -0
  10. package/dist/rooms/_shared/0.1/personal-label.js +6 -0
  11. package/dist/rooms/_shared/0.1/personal-label.js.map +1 -0
  12. package/dist/rooms/_shared/0.1/room.d.ts +1 -1
  13. package/dist/rooms/_shared/0.1/room.d.ts.map +1 -1
  14. package/dist/rooms/blobs/get/0.1/payload.d.ts +4 -4
  15. package/dist/rooms/blobs/get/0.1/payload.js +2 -2
  16. package/dist/rooms/blobs/get/0.1/payload.js.map +1 -1
  17. package/dist/rooms/blobs/get/0.2/payload.d.ts +4 -4
  18. package/dist/rooms/blobs/get/0.2/payload.js +2 -2
  19. package/dist/rooms/blobs/get/0.2/payload.js.map +1 -1
  20. package/dist/rooms/blobs/upload/begin/0.1/payload.d.ts +4 -4
  21. package/dist/rooms/blobs/upload/begin/0.1/payload.js +2 -2
  22. package/dist/rooms/blobs/upload/begin/0.1/payload.js.map +1 -1
  23. package/dist/rooms/blobs/upload/begin/0.2/payload.d.ts +4 -4
  24. package/dist/rooms/blobs/upload/begin/0.2/payload.js +2 -2
  25. package/dist/rooms/blobs/upload/begin/0.2/payload.js.map +1 -1
  26. package/dist/rooms/epoch/chain/0.1/payload.d.ts +4 -4
  27. package/dist/rooms/epoch/chain/0.1/payload.js +2 -2
  28. package/dist/rooms/epoch/chain/0.1/payload.js.map +1 -1
  29. package/dist/rooms/epoch/commits/0.1/payload.d.ts +4 -4
  30. package/dist/rooms/epoch/commits/0.1/payload.js +2 -2
  31. package/dist/rooms/epoch/commits/0.1/payload.js.map +1 -1
  32. package/dist/rooms/epoch/mint/0.1/payload.d.ts +4 -4
  33. package/dist/rooms/epoch/mint/0.1/payload.js +2 -2
  34. package/dist/rooms/epoch/mint/0.1/payload.js.map +1 -1
  35. package/dist/rooms/epoch/prune/0.1/payload.d.ts +4 -4
  36. package/dist/rooms/epoch/prune/0.1/payload.js +2 -2
  37. package/dist/rooms/epoch/prune/0.1/payload.js.map +1 -1
  38. package/dist/rooms/info/0.1/payload.d.ts +4 -4
  39. package/dist/rooms/info/0.1/payload.js +2 -2
  40. package/dist/rooms/info/0.1/payload.js.map +1 -1
  41. package/dist/rooms/keys/label/0.1/payload.d.ts +757 -0
  42. package/dist/rooms/keys/label/0.1/payload.d.ts.map +1 -0
  43. package/dist/rooms/keys/label/0.1/payload.js +388 -0
  44. package/dist/rooms/keys/label/0.1/payload.js.map +1 -0
  45. package/dist/rooms/keys/list/0.2/payload.d.ts +667 -0
  46. package/dist/rooms/keys/list/0.2/payload.d.ts.map +1 -0
  47. package/dist/rooms/keys/list/0.2/payload.js +350 -0
  48. package/dist/rooms/keys/list/0.2/payload.js.map +1 -0
  49. package/dist/rooms/keys/present/0.2/payload.d.ts +4 -4
  50. package/dist/rooms/keys/present/0.2/payload.js +2 -2
  51. package/dist/rooms/keys/present/0.2/payload.js.map +1 -1
  52. package/dist/rooms/keys/profile/read/0.1/payload.d.ts +1652 -0
  53. package/dist/rooms/keys/profile/read/0.1/payload.d.ts.map +1 -0
  54. package/dist/rooms/keys/profile/read/0.1/payload.js +649 -0
  55. package/dist/rooms/keys/profile/read/0.1/payload.js.map +1 -0
  56. package/dist/rooms/keys/profile/write/0.1/payload.d.ts +583 -0
  57. package/dist/rooms/keys/profile/write/0.1/payload.d.ts.map +1 -0
  58. package/dist/rooms/keys/profile/write/0.1/payload.js +319 -0
  59. package/dist/rooms/keys/profile/write/0.1/payload.js.map +1 -0
  60. package/dist/rooms/owner/claim/0.1/payload.d.ts +4 -4
  61. package/dist/rooms/owner/claim/0.1/payload.js +2 -2
  62. package/dist/rooms/owner/claim/0.1/payload.js.map +1 -1
  63. package/dist/rooms/owner/group/remove/0.2/payload.d.ts +600 -0
  64. package/dist/rooms/owner/group/remove/0.2/payload.d.ts.map +1 -0
  65. package/dist/rooms/owner/group/remove/0.2/payload.js +310 -0
  66. package/dist/rooms/owner/group/remove/0.2/payload.js.map +1 -0
  67. package/dist/rooms/owner/revoke/0.1/payload.d.ts +1481 -0
  68. package/dist/rooms/owner/revoke/0.1/payload.d.ts.map +1 -0
  69. package/dist/rooms/owner/revoke/0.1/payload.js +811 -0
  70. package/dist/rooms/owner/revoke/0.1/payload.js.map +1 -0
  71. package/dist/rooms/owner/transfer/0.1/payload.d.ts +4 -4
  72. package/dist/rooms/owner/transfer/0.1/payload.js +2 -2
  73. package/dist/rooms/owner/transfer/0.1/payload.js.map +1 -1
  74. package/dist/rooms/records/curate/0.1/payload.d.ts +4 -4
  75. package/dist/rooms/records/curate/0.1/payload.js +2 -2
  76. package/dist/rooms/records/curate/0.1/payload.js.map +1 -1
  77. package/dist/rooms/records/get/0.1/payload.d.ts +4 -4
  78. package/dist/rooms/records/get/0.1/payload.js +2 -2
  79. package/dist/rooms/records/get/0.1/payload.js.map +1 -1
  80. package/dist/rooms/records/get/0.2/payload.d.ts +4 -4
  81. package/dist/rooms/records/get/0.2/payload.js +2 -2
  82. package/dist/rooms/records/get/0.2/payload.js.map +1 -1
  83. package/dist/rooms/records/list/0.1/payload.d.ts +4 -4
  84. package/dist/rooms/records/list/0.1/payload.js +2 -2
  85. package/dist/rooms/records/list/0.1/payload.js.map +1 -1
  86. package/dist/rooms/records/list/0.2/payload.d.ts +4 -4
  87. package/dist/rooms/records/list/0.2/payload.js +2 -2
  88. package/dist/rooms/records/list/0.2/payload.js.map +1 -1
  89. package/dist/rooms/records/put/0.1/payload.d.ts +4 -4
  90. package/dist/rooms/records/put/0.1/payload.js +2 -2
  91. package/dist/rooms/records/put/0.1/payload.js.map +1 -1
  92. package/dist/rooms/records/put/0.2/payload.d.ts +4 -4
  93. package/dist/rooms/records/put/0.2/payload.js +2 -2
  94. package/dist/rooms/records/put/0.2/payload.js.map +1 -1
  95. package/dist/rooms/revocations/get/0.1/payload.d.ts +905 -0
  96. package/dist/rooms/revocations/get/0.1/payload.d.ts.map +1 -0
  97. package/dist/rooms/revocations/get/0.1/payload.js +512 -0
  98. package/dist/rooms/revocations/get/0.1/payload.js.map +1 -0
  99. package/dist/rooms/revocations/put/0.1/payload.d.ts +1021 -0
  100. package/dist/rooms/revocations/put/0.1/payload.d.ts.map +1 -0
  101. package/dist/rooms/revocations/put/0.1/payload.js +583 -0
  102. package/dist/rooms/revocations/put/0.1/payload.js.map +1 -0
  103. package/dist/rooms/usage/0.1/payload.d.ts +4 -4
  104. package/dist/rooms/usage/0.1/payload.js +2 -2
  105. package/dist/rooms/usage/0.1/payload.js.map +1 -1
  106. package/dist/vtc/_shared/0.1/community-room.d.ts +1 -1
  107. package/dist/vtc/_shared/0.1/community-room.d.ts.map +1 -1
  108. package/dist/vtc/registry/sync-jobs/retry/0.2/payload.d.ts +546 -0
  109. package/dist/vtc/registry/sync-jobs/retry/0.2/payload.d.ts.map +1 -0
  110. package/dist/vtc/registry/sync-jobs/retry/0.2/payload.js +331 -0
  111. package/dist/vtc/registry/sync-jobs/retry/0.2/payload.js.map +1 -0
  112. package/dist/vtc/rooms/community/create/0.1/payload.d.ts +4 -4
  113. package/dist/vtc/rooms/community/create/0.1/payload.js +2 -2
  114. package/dist/vtc/rooms/community/create/0.1/payload.js.map +1 -1
  115. package/dist/vtc/rooms/community/create/0.2/payload.d.ts +989 -0
  116. package/dist/vtc/rooms/community/create/0.2/payload.d.ts.map +1 -0
  117. package/dist/vtc/rooms/community/create/0.2/payload.js +559 -0
  118. package/dist/vtc/rooms/community/create/0.2/payload.js.map +1 -0
  119. package/dist/vtc/rooms/community/create/0.3/payload.d.ts +1013 -0
  120. package/dist/vtc/rooms/community/create/0.3/payload.d.ts.map +1 -0
  121. package/dist/vtc/rooms/community/create/0.3/payload.js +577 -0
  122. package/dist/vtc/rooms/community/create/0.3/payload.js.map +1 -0
  123. package/dist/vtc/rooms/community/get/0.1/payload.d.ts +4 -4
  124. package/dist/vtc/rooms/community/get/0.1/payload.js +2 -2
  125. package/dist/vtc/rooms/community/get/0.1/payload.js.map +1 -1
  126. package/dist/vtc/rooms/community/get/0.2/payload.d.ts +887 -0
  127. package/dist/vtc/rooms/community/get/0.2/payload.d.ts.map +1 -0
  128. package/dist/vtc/rooms/community/get/0.2/payload.js +517 -0
  129. package/dist/vtc/rooms/community/get/0.2/payload.js.map +1 -0
  130. package/dist/vtc/rooms/community/list/0.1/payload.d.ts +4 -4
  131. package/dist/vtc/rooms/community/list/0.1/payload.js +2 -2
  132. package/dist/vtc/rooms/community/list/0.1/payload.js.map +1 -1
  133. package/dist/vtc/rooms/community/list/0.2/payload.d.ts +960 -0
  134. package/dist/vtc/rooms/community/list/0.2/payload.d.ts.map +1 -0
  135. package/dist/vtc/rooms/community/list/0.2/payload.js +544 -0
  136. package/dist/vtc/rooms/community/list/0.2/payload.js.map +1 -0
  137. package/dist/vtc/rooms/community/members/remove/0.2/payload.d.ts +681 -0
  138. package/dist/vtc/rooms/community/members/remove/0.2/payload.d.ts.map +1 -0
  139. package/dist/vtc/rooms/community/members/remove/0.2/payload.js +393 -0
  140. package/dist/vtc/rooms/community/members/remove/0.2/payload.js.map +1 -0
  141. package/dist/vtc/rooms/community/update/0.1/payload.d.ts +1013 -0
  142. package/dist/vtc/rooms/community/update/0.1/payload.d.ts.map +1 -0
  143. package/dist/vtc/rooms/community/update/0.1/payload.js +573 -0
  144. package/dist/vtc/rooms/community/update/0.1/payload.js.map +1 -0
  145. package/dist/vtc/rooms/community/update/0.2/payload.d.ts +1037 -0
  146. package/dist/vtc/rooms/community/update/0.2/payload.d.ts.map +1 -0
  147. package/dist/vtc/rooms/community/update/0.2/payload.js +593 -0
  148. package/dist/vtc/rooms/community/update/0.2/payload.js.map +1 -0
  149. package/dist/vtc/rooms/offers/list/0.1/payload.d.ts +4 -4
  150. package/dist/vtc/rooms/offers/list/0.1/payload.js +2 -2
  151. package/dist/vtc/rooms/offers/list/0.1/payload.js.map +1 -1
  152. package/dist/vtc/rooms/offers/list/0.2/payload.d.ts +736 -0
  153. package/dist/vtc/rooms/offers/list/0.2/payload.d.ts.map +1 -0
  154. package/dist/vtc/rooms/offers/list/0.2/payload.js +430 -0
  155. package/dist/vtc/rooms/offers/list/0.2/payload.js.map +1 -0
  156. package/package.json +1 -1
  157. package/src/_shared/components.ts +426 -1
  158. package/src/index.ts +18 -0
  159. package/src/rooms/_shared/0.1/personal-label.ts +17 -0
  160. package/src/rooms/_shared/0.1/room.ts +1 -1
  161. package/src/rooms/blobs/get/0.1/payload.ts +2 -2
  162. package/src/rooms/blobs/get/0.2/payload.ts +2 -2
  163. package/src/rooms/blobs/upload/begin/0.1/payload.ts +2 -2
  164. package/src/rooms/blobs/upload/begin/0.2/payload.ts +2 -2
  165. package/src/rooms/epoch/chain/0.1/payload.ts +2 -2
  166. package/src/rooms/epoch/commits/0.1/payload.ts +2 -2
  167. package/src/rooms/epoch/mint/0.1/payload.ts +2 -2
  168. package/src/rooms/epoch/prune/0.1/payload.ts +2 -2
  169. package/src/rooms/info/0.1/payload.ts +2 -2
  170. package/src/rooms/keys/label/0.1/payload.ts +474 -0
  171. package/src/rooms/keys/list/0.2/payload.ts +412 -0
  172. package/src/rooms/keys/present/0.2/payload.ts +2 -2
  173. package/src/rooms/keys/profile/read/0.1/payload.ts +1617 -0
  174. package/src/rooms/keys/profile/write/0.1/payload.ts +388 -0
  175. package/src/rooms/owner/claim/0.1/payload.ts +2 -2
  176. package/src/rooms/owner/group/remove/0.2/payload.ts +415 -0
  177. package/src/rooms/owner/revoke/0.1/payload.ts +954 -0
  178. package/src/rooms/owner/transfer/0.1/payload.ts +2 -2
  179. package/src/rooms/records/curate/0.1/payload.ts +2 -2
  180. package/src/rooms/records/get/0.1/payload.ts +2 -2
  181. package/src/rooms/records/get/0.2/payload.ts +2 -2
  182. package/src/rooms/records/list/0.1/payload.ts +2 -2
  183. package/src/rooms/records/list/0.2/payload.ts +2 -2
  184. package/src/rooms/records/put/0.1/payload.ts +2 -2
  185. package/src/rooms/records/put/0.2/payload.ts +2 -2
  186. package/src/rooms/revocations/get/0.1/payload.ts +562 -0
  187. package/src/rooms/revocations/put/0.1/payload.ts +637 -0
  188. package/src/rooms/usage/0.1/payload.ts +2 -2
  189. package/src/vtc/_shared/0.1/community-room.ts +1 -1
  190. package/src/vtc/registry/sync-jobs/retry/0.2/payload.ts +401 -0
  191. package/src/vtc/rooms/community/create/0.1/payload.ts +2 -2
  192. package/src/vtc/rooms/community/create/0.2/payload.ts +613 -0
  193. package/src/vtc/rooms/community/create/0.3/payload.ts +635 -0
  194. package/src/vtc/rooms/community/get/0.1/payload.ts +2 -2
  195. package/src/vtc/rooms/community/get/0.2/payload.ts +549 -0
  196. package/src/vtc/rooms/community/list/0.1/payload.ts +2 -2
  197. package/src/vtc/rooms/community/list/0.2/payload.ts +591 -0
  198. package/src/vtc/rooms/community/members/remove/0.2/payload.ts +439 -0
  199. package/src/vtc/rooms/community/update/0.1/payload.ts +629 -0
  200. package/src/vtc/rooms/community/update/0.2/payload.ts +653 -0
  201. package/src/vtc/rooms/offers/list/0.1/payload.ts +2 -2
  202. package/src/vtc/rooms/offers/list/0.2/payload.ts +473 -0
@@ -0,0 +1,635 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/rooms/community/create/0.3/payload.schema.json
4
+ */
5
+
6
+ import type { CommunityRoomV2, Ext, HostedRoom, Reason, RetentionPolicy, RoomDescription, RoomLabel, RoomTag, RoomTags, StorageConfigId, Visibility } from "../../../../../_shared/components.js";
7
+
8
+
9
+ export interface VTCRoomsCommunityCreatePayload {
10
+ label: RoomLabel;
11
+ /**
12
+ * What the room is for, shown beside its label. Absent: the room has none until an administrator gives it one with vtc/rooms/community/update.
13
+ */
14
+ description?: RoomDescription;
15
+ /**
16
+ * Tags to file the room under, for administrators' filtering. Absent: none.
17
+ */
18
+ tags?: RoomTags;
19
+ /**
20
+ * The tier, fixed for the life of the room. The community's rooms policy decides which it may create.
21
+ */
22
+ visibility: Visibility;
23
+ /**
24
+ * Whether the room keeps its history readable across a membership change. Immutable; absent means `chained`.
25
+ */
26
+ retentionPolicy?: RetentionPolicy;
27
+ /**
28
+ * How long the room is kept after it lapses. Absent: the community's default.
29
+ */
30
+ retentionDays?: number;
31
+ /**
32
+ * The storage config to receive the room's uploads. Absent: what the community's rooms policy decides, else its default config.
33
+ */
34
+ storageConfig?: StorageConfigId;
35
+ reason: Reason;
36
+ ext?: Ext;
37
+ }
38
+ /**
39
+ * Success response to vtc/rooms/community/create. Type https://trusttasks.org/spec/vtc/rooms/community/create/0.3#response. The room as created, owned by the community.
40
+ */
41
+ export interface VTCRoomsCommunityCreateResponsePayload {
42
+ room: CommunityRoomV2;
43
+ /**
44
+ * Whether the room's own profile — its label and description, sealed inside the room for its members — has been written. `written`: the room's members can read it. `pending`: the room exists and the community has not yet written its profile — its VTA or the room's host did not answer, or refused — and will keep trying. The room is created either way.
45
+ */
46
+ roomProfile: "written" | "pending";
47
+ ext?: Ext;
48
+ }
49
+
50
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
51
+ export type { CommunityRoomV2, Ext, HostedRoom, Reason, RetentionPolicy, RoomDescription, RoomLabel, RoomTag, RoomTags, StorageConfigId, Visibility };
52
+
53
+ /** Trust Task type URI. */
54
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/rooms/community/create/0.3" as const;
55
+
56
+ /** Stable alias for this specification's request payload shape. */
57
+ export type Payload = VTCRoomsCommunityCreatePayload;
58
+
59
+ /** Trust Task response type URI (request type URI + "#response"). */
60
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/rooms/community/create/0.3#response" as const;
61
+
62
+ /** Stable alias for this specification's success-response payload shape. */
63
+ export type Response = VTCRoomsCommunityCreateResponsePayload;
64
+
65
+ /**
66
+ * This specification's payload schema, as a value.
67
+ *
68
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
69
+ * rather than only as a `.json` file because TypeScript types are erased
70
+ * at runtime: without a schema a consumer has nothing to validate, and
71
+ * every REQUIRED payload member is optional in practice. Cross-file
72
+ * `$ref`s are already inlined, so it needs no resolver.
73
+ */
74
+ export const PAYLOAD_SCHEMA = {
75
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
76
+ "$id": "https://trusttasks.org/spec/vtc/rooms/community/create/0.3",
77
+ "title": "VTC Rooms Community Create — payload",
78
+ "type": "object",
79
+ "additionalProperties": false,
80
+ "required": [
81
+ "label",
82
+ "visibility",
83
+ "reason"
84
+ ],
85
+ "properties": {
86
+ "label": {
87
+ "$ref": "#/$defs/RoomLabel"
88
+ },
89
+ "description": {
90
+ "$ref": "#/$defs/RoomDescription",
91
+ "description": "What the room is for, shown beside its label. Absent: the room has none until an administrator gives it one with vtc/rooms/community/update."
92
+ },
93
+ "tags": {
94
+ "$ref": "#/$defs/RoomTags",
95
+ "description": "Tags to file the room under, for administrators' filtering. Absent: none."
96
+ },
97
+ "visibility": {
98
+ "$ref": "#/$defs/Visibility",
99
+ "description": "The tier, fixed for the life of the room. The community's rooms policy decides which it may create."
100
+ },
101
+ "retentionPolicy": {
102
+ "$ref": "#/$defs/RetentionPolicy",
103
+ "description": "Whether the room keeps its history readable across a membership change. Immutable; absent means `chained`."
104
+ },
105
+ "retentionDays": {
106
+ "type": "integer",
107
+ "minimum": 1,
108
+ "maximum": 36500,
109
+ "description": "How long the room is kept after it lapses. Absent: the community's default."
110
+ },
111
+ "storageConfig": {
112
+ "$ref": "#/$defs/StorageConfigId",
113
+ "description": "The storage config to receive the room's uploads. Absent: what the community's rooms policy decides, else its default config."
114
+ },
115
+ "reason": {
116
+ "$ref": "#/$defs/Reason"
117
+ },
118
+ "ext": {
119
+ "$ref": "#/$defs/Ext"
120
+ }
121
+ },
122
+ "$defs": {
123
+ "Response": {
124
+ "$anchor": "response",
125
+ "title": "VTC Rooms Community Create — response payload",
126
+ "description": "Success response to vtc/rooms/community/create. Type https://trusttasks.org/spec/vtc/rooms/community/create/0.3#response. The room as created, owned by the community.",
127
+ "type": "object",
128
+ "additionalProperties": false,
129
+ "required": [
130
+ "room",
131
+ "roomProfile"
132
+ ],
133
+ "properties": {
134
+ "room": {
135
+ "$ref": "#/$defs/CommunityRoomV2"
136
+ },
137
+ "roomProfile": {
138
+ "type": "string",
139
+ "enum": [
140
+ "written",
141
+ "pending"
142
+ ],
143
+ "description": "Whether the room's own profile — its label and description, sealed inside the room for its members — has been written. `written`: the room's members can read it. `pending`: the room exists and the community has not yet written its profile — its VTA or the room's host did not answer, or refused — and will keep trying. The room is created either way."
144
+ },
145
+ "ext": {
146
+ "$ref": "#/$defs/Ext"
147
+ }
148
+ }
149
+ },
150
+ "Ext": {
151
+ "title": "Ext",
152
+ "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
+ "type": "object",
154
+ "minProperties": 1,
155
+ "additionalProperties": true,
156
+ "propertyNames": {
157
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
158
+ }
159
+ },
160
+ "CommunityRoomV2": {
161
+ "title": "CommunityRoomV2",
162
+ "type": "object",
163
+ "additionalProperties": false,
164
+ "required": [
165
+ "room",
166
+ "label",
167
+ "admitted",
168
+ "offered"
169
+ ],
170
+ "description": "What vtc/rooms/community/{create,get,list}/0.2 and vtc/rooms/community/update/0.1 return: `CommunityRoom` plus the details an administrator keeps track of a room by — `description`, `tags`, and who last changed them and when. A separate definition, not a change to `CommunityRoom`, so that the 0.1 versions of those tasks keep the exact shape they published. The room's creation is `room.createdAt` and `createdBy`.",
171
+ "properties": {
172
+ "room": {
173
+ "$ref": "#/$defs/HostedRoom"
174
+ },
175
+ "label": {
176
+ "$ref": "#/$defs/RoomLabel"
177
+ },
178
+ "description": {
179
+ "$ref": "#/$defs/RoomDescription",
180
+ "description": "Absent when the room has none."
181
+ },
182
+ "tags": {
183
+ "$ref": "#/$defs/RoomTags",
184
+ "description": "Absent or empty when the room has none."
185
+ },
186
+ "storageConfig": {
187
+ "$ref": "#/$defs/StorageConfigId",
188
+ "description": "The storage config receiving the room's new uploads."
189
+ },
190
+ "admitted": {
191
+ "type": "integer",
192
+ "minimum": 0,
193
+ "description": "Members in state `admitted`."
194
+ },
195
+ "offered": {
196
+ "type": "integer",
197
+ "minimum": 0,
198
+ "description": "Offers not yet accepted or withdrawn."
199
+ },
200
+ "ownerAuthorityValidUntil": {
201
+ "type": "string",
202
+ "format": "date-time",
203
+ "description": "When the community's own `admin` authority over the room expires. A room whose owner's authority lapses can no longer advance its epoch, admit or remove; a community SHOULD renew it well before."
204
+ },
205
+ "createdBy": {
206
+ "type": "string",
207
+ "pattern": "^did:",
208
+ "maxLength": 2048,
209
+ "description": "The administrator who created it."
210
+ },
211
+ "detailsUpdatedAt": {
212
+ "type": "string",
213
+ "format": "date-time",
214
+ "description": "When `label`, `description` or `tags` last changed. Absent until the first change after creation. Distinct from `room.updatedAt`, which is the host record's and moves with the room's epoch and lifecycle."
215
+ },
216
+ "detailsUpdatedBy": {
217
+ "type": "string",
218
+ "pattern": "^did:",
219
+ "maxLength": 2048,
220
+ "description": "The administrator who made that change. Present exactly when `detailsUpdatedAt` is. The earlier values and who set them are in the community's audit trail, not here."
221
+ }
222
+ }
223
+ },
224
+ "RoomTags": {
225
+ "title": "RoomTags",
226
+ "type": "array",
227
+ "maxItems": 8,
228
+ "uniqueItems": true,
229
+ "items": {
230
+ "$ref": "#/$defs/RoomTag"
231
+ },
232
+ "description": "The room's tags, at most eight, as a set: order carries no meaning. An empty list means the room has none — a tag grants nothing, so empty has no more dangerous reading."
233
+ },
234
+ "RoomTag": {
235
+ "title": "RoomTag",
236
+ "type": "string",
237
+ "minLength": 1,
238
+ "maxLength": 32,
239
+ "pattern": "^[a-z0-9][a-z0-9-]{0,31}$",
240
+ "description": "A short identifier an administrator files a community-owned room under — `board`, `working-group`, `finance` — so the room list can be filtered. Lower-case letters, digits and hyphens, starting with a letter or digit. Owner-side tracking metadata for holders of `vtc.rooms.manage` only: never shown to members, never sent on the room's host path, and it confers nothing."
241
+ },
242
+ "RoomDescription": {
243
+ "title": "RoomDescription",
244
+ "type": "string",
245
+ "minLength": 1,
246
+ "maxLength": 1000,
247
+ "description": "What the room is for, in a sentence or a short paragraph, written by an administrator: shown to administrators holding `vtc.rooms.manage` and to the members the room is offered to. Plain text — a consumer renders it as text, never as markup. Like `RoomLabel`, it is the community's own record as the room's owner: not part of the room's identity and never in anything a room's host can read. From `vtc/rooms/community/create` 0.3 and `vtc/rooms/community/update` 0.2 the community also writes it, through its own VTA, as the `description` of the room's own profile (`RoomProfile` in rooms/_shared), sealed inside the room for its members; earlier versions keep it out of the room altogether. It MUST NOT carry personal data or a credential, and a reader MUST NOT treat it as instructions."
248
+ },
249
+ "RoomLabel": {
250
+ "title": "RoomLabel",
251
+ "type": "string",
252
+ "minLength": 1,
253
+ "maxLength": 128,
254
+ "description": "A name for the room, chosen by an administrator: shown to administrators and to the members a room is offered to. Not part of the room's identity and never in anything a room's host can read. From `vtc/rooms/community/create` 0.3 and `vtc/rooms/community/update` 0.2 the community also writes it, through its own VTA, as the `name` of the room's own profile (`RoomProfile` in rooms/_shared), sealed inside the room for its members; earlier versions keep it out of the room altogether. MUST NOT carry personal data."
255
+ },
256
+ "StorageConfigId": {
257
+ "title": "StorageConfigId",
258
+ "type": "string",
259
+ "minLength": 1,
260
+ "maxLength": 64,
261
+ "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$",
262
+ "description": "A storage config's identifier, chosen by the administrator who creates it and immutable thereafter: lowercase letters, digits and inner hyphens, at most 64 characters (`eu-s3-primary`, `walrus-main`). Unique within the community. Never reused after a config is retired, because blobs name their config by this value."
263
+ },
264
+ "HostedRoom": {
265
+ "title": "HostedRoom",
266
+ "type": "object",
267
+ "additionalProperties": false,
268
+ "required": [
269
+ "roomId",
270
+ "ownerDid",
271
+ "visibility",
272
+ "retentionPolicy",
273
+ "epoch",
274
+ "lifecycle",
275
+ "retentionDays",
276
+ "createdAt",
277
+ "updatedAt"
278
+ ],
279
+ "description": "One room, as its host holds it — member for member the `HostedRoom` of vtc/rooms/list/0.1, which defines it inside its own payload schema. Nothing derived from the room's contents, and no member list: the host has none.",
280
+ "properties": {
281
+ "roomId": {
282
+ "type": "string",
283
+ "minLength": 1,
284
+ "maxLength": 512
285
+ },
286
+ "ownerDid": {
287
+ "type": "string",
288
+ "pattern": "^did:",
289
+ "maxLength": 2048
290
+ },
291
+ "visibility": {
292
+ "$ref": "#/$defs/Visibility"
293
+ },
294
+ "retentionPolicy": {
295
+ "$ref": "#/$defs/RetentionPolicy"
296
+ },
297
+ "epoch": {
298
+ "type": "integer",
299
+ "minimum": 0
300
+ },
301
+ "lifecycle": {
302
+ "type": "string",
303
+ "enum": [
304
+ "live",
305
+ "lapsed",
306
+ "dormant",
307
+ "reclaimable"
308
+ ]
309
+ },
310
+ "epochExpiresAt": {
311
+ "type": "integer",
312
+ "minimum": 0
313
+ },
314
+ "retentionDays": {
315
+ "type": "integer",
316
+ "minimum": 0
317
+ },
318
+ "mirrorOf": {
319
+ "type": "string",
320
+ "minLength": 1,
321
+ "maxLength": 2048
322
+ },
323
+ "createdAt": {
324
+ "type": "integer",
325
+ "minimum": 0
326
+ },
327
+ "updatedAt": {
328
+ "type": "integer",
329
+ "minimum": 0
330
+ }
331
+ }
332
+ },
333
+ "RetentionPolicy": {
334
+ "title": "RetentionPolicy",
335
+ "type": "string",
336
+ "enum": [
337
+ "chained",
338
+ "fromJoin"
339
+ ],
340
+ "description": "Whether a room keeps its history readable across a membership change, fixed at creation and immutable thereafter — like `Visibility`, and for the same reason: the rungs of an epoch key chain either exist for an epoch or they do not, and no later change of mind can seal key material that was never sealed or unseal what was already severed. `chained`: each advance produces an `EpochLink`, so every member reads the room's whole retained history however long they have been in it — what a **library** wants, at the cost of post-compromise security for record content, since a compromised current key then reaches every retained epoch. `fromJoin`: no rungs are produced, so a member reads only from the epoch their group state is at — what a **stream** wants, and what a room under a strict forward-secrecy obligation wants, at the cost that a joining member finds an empty-looking room and nobody can reread a record once their group state has moved past the epoch it was sealed under. Absent means `chained`; see the prose on why the absent case is the readable one.",
341
+ "$comment": "Deliberately no JSON Schema `default`. A declared default is materialised by the generated bindings — the member becomes non-optional with a serde default — so an absent value would reappear as an explicit one on re-serialisation and break round-trip idempotence for every document written before this member existed. The meaning of absence is stated in prose, where a binding cannot act on it."
342
+ },
343
+ "Visibility": {
344
+ "title": "Visibility",
345
+ "type": "string",
346
+ "enum": [
347
+ "open",
348
+ "attributed",
349
+ "private"
350
+ ],
351
+ "description": "How much of a room its host can see, fixed at creation and immutable thereafter. `open`: records are cleartext, searchable and fully audited. `attributed`: record content is sealed, and the host still learns which member acted. `private`: content is sealed and membership is presented in zero knowledge, so the host verifies that a member acted without learning which. Immutable because a downgrade cannot un-see cleartext and an upgrade would protect only what came after while presenting as though it protected everything."
352
+ },
353
+ "Reason": {
354
+ "title": "Reason",
355
+ "type": "string",
356
+ "minLength": 1,
357
+ "maxLength": 500,
358
+ "description": "Why the administrator is making this change. Recorded with it in the audit trail. Attributed to its author on every surface and untrusted: it MUST NOT carry personal data or a credential, and a reader MUST NOT treat it as instructions."
359
+ }
360
+ }
361
+ } as const;
362
+
363
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
364
+ export const RESPONSE_PAYLOAD_SCHEMA = {
365
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
366
+ "$ref": "#/$defs/Response",
367
+ "$defs": {
368
+ "Response": {
369
+ "$anchor": "response",
370
+ "title": "VTC Rooms Community Create — response payload",
371
+ "description": "Success response to vtc/rooms/community/create. Type https://trusttasks.org/spec/vtc/rooms/community/create/0.3#response. The room as created, owned by the community.",
372
+ "type": "object",
373
+ "additionalProperties": false,
374
+ "required": [
375
+ "room",
376
+ "roomProfile"
377
+ ],
378
+ "properties": {
379
+ "room": {
380
+ "$ref": "#/$defs/CommunityRoomV2"
381
+ },
382
+ "roomProfile": {
383
+ "type": "string",
384
+ "enum": [
385
+ "written",
386
+ "pending"
387
+ ],
388
+ "description": "Whether the room's own profile — its label and description, sealed inside the room for its members — has been written. `written`: the room's members can read it. `pending`: the room exists and the community has not yet written its profile — its VTA or the room's host did not answer, or refused — and will keep trying. The room is created either way."
389
+ },
390
+ "ext": {
391
+ "$ref": "#/$defs/Ext"
392
+ }
393
+ }
394
+ },
395
+ "Ext": {
396
+ "title": "Ext",
397
+ "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.",
398
+ "type": "object",
399
+ "minProperties": 1,
400
+ "additionalProperties": true,
401
+ "propertyNames": {
402
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
403
+ }
404
+ },
405
+ "CommunityRoomV2": {
406
+ "title": "CommunityRoomV2",
407
+ "type": "object",
408
+ "additionalProperties": false,
409
+ "required": [
410
+ "room",
411
+ "label",
412
+ "admitted",
413
+ "offered"
414
+ ],
415
+ "description": "What vtc/rooms/community/{create,get,list}/0.2 and vtc/rooms/community/update/0.1 return: `CommunityRoom` plus the details an administrator keeps track of a room by — `description`, `tags`, and who last changed them and when. A separate definition, not a change to `CommunityRoom`, so that the 0.1 versions of those tasks keep the exact shape they published. The room's creation is `room.createdAt` and `createdBy`.",
416
+ "properties": {
417
+ "room": {
418
+ "$ref": "#/$defs/HostedRoom"
419
+ },
420
+ "label": {
421
+ "$ref": "#/$defs/RoomLabel"
422
+ },
423
+ "description": {
424
+ "$ref": "#/$defs/RoomDescription",
425
+ "description": "Absent when the room has none."
426
+ },
427
+ "tags": {
428
+ "$ref": "#/$defs/RoomTags",
429
+ "description": "Absent or empty when the room has none."
430
+ },
431
+ "storageConfig": {
432
+ "$ref": "#/$defs/StorageConfigId",
433
+ "description": "The storage config receiving the room's new uploads."
434
+ },
435
+ "admitted": {
436
+ "type": "integer",
437
+ "minimum": 0,
438
+ "description": "Members in state `admitted`."
439
+ },
440
+ "offered": {
441
+ "type": "integer",
442
+ "minimum": 0,
443
+ "description": "Offers not yet accepted or withdrawn."
444
+ },
445
+ "ownerAuthorityValidUntil": {
446
+ "type": "string",
447
+ "format": "date-time",
448
+ "description": "When the community's own `admin` authority over the room expires. A room whose owner's authority lapses can no longer advance its epoch, admit or remove; a community SHOULD renew it well before."
449
+ },
450
+ "createdBy": {
451
+ "type": "string",
452
+ "pattern": "^did:",
453
+ "maxLength": 2048,
454
+ "description": "The administrator who created it."
455
+ },
456
+ "detailsUpdatedAt": {
457
+ "type": "string",
458
+ "format": "date-time",
459
+ "description": "When `label`, `description` or `tags` last changed. Absent until the first change after creation. Distinct from `room.updatedAt`, which is the host record's and moves with the room's epoch and lifecycle."
460
+ },
461
+ "detailsUpdatedBy": {
462
+ "type": "string",
463
+ "pattern": "^did:",
464
+ "maxLength": 2048,
465
+ "description": "The administrator who made that change. Present exactly when `detailsUpdatedAt` is. The earlier values and who set them are in the community's audit trail, not here."
466
+ }
467
+ }
468
+ },
469
+ "RoomTags": {
470
+ "title": "RoomTags",
471
+ "type": "array",
472
+ "maxItems": 8,
473
+ "uniqueItems": true,
474
+ "items": {
475
+ "$ref": "#/$defs/RoomTag"
476
+ },
477
+ "description": "The room's tags, at most eight, as a set: order carries no meaning. An empty list means the room has none — a tag grants nothing, so empty has no more dangerous reading."
478
+ },
479
+ "RoomTag": {
480
+ "title": "RoomTag",
481
+ "type": "string",
482
+ "minLength": 1,
483
+ "maxLength": 32,
484
+ "pattern": "^[a-z0-9][a-z0-9-]{0,31}$",
485
+ "description": "A short identifier an administrator files a community-owned room under — `board`, `working-group`, `finance` — so the room list can be filtered. Lower-case letters, digits and hyphens, starting with a letter or digit. Owner-side tracking metadata for holders of `vtc.rooms.manage` only: never shown to members, never sent on the room's host path, and it confers nothing."
486
+ },
487
+ "RoomDescription": {
488
+ "title": "RoomDescription",
489
+ "type": "string",
490
+ "minLength": 1,
491
+ "maxLength": 1000,
492
+ "description": "What the room is for, in a sentence or a short paragraph, written by an administrator: shown to administrators holding `vtc.rooms.manage` and to the members the room is offered to. Plain text — a consumer renders it as text, never as markup. Like `RoomLabel`, it is the community's own record as the room's owner: not part of the room's identity and never in anything a room's host can read. From `vtc/rooms/community/create` 0.3 and `vtc/rooms/community/update` 0.2 the community also writes it, through its own VTA, as the `description` of the room's own profile (`RoomProfile` in rooms/_shared), sealed inside the room for its members; earlier versions keep it out of the room altogether. It MUST NOT carry personal data or a credential, and a reader MUST NOT treat it as instructions."
493
+ },
494
+ "RoomLabel": {
495
+ "title": "RoomLabel",
496
+ "type": "string",
497
+ "minLength": 1,
498
+ "maxLength": 128,
499
+ "description": "A name for the room, chosen by an administrator: shown to administrators and to the members a room is offered to. Not part of the room's identity and never in anything a room's host can read. From `vtc/rooms/community/create` 0.3 and `vtc/rooms/community/update` 0.2 the community also writes it, through its own VTA, as the `name` of the room's own profile (`RoomProfile` in rooms/_shared), sealed inside the room for its members; earlier versions keep it out of the room altogether. MUST NOT carry personal data."
500
+ },
501
+ "StorageConfigId": {
502
+ "title": "StorageConfigId",
503
+ "type": "string",
504
+ "minLength": 1,
505
+ "maxLength": 64,
506
+ "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$",
507
+ "description": "A storage config's identifier, chosen by the administrator who creates it and immutable thereafter: lowercase letters, digits and inner hyphens, at most 64 characters (`eu-s3-primary`, `walrus-main`). Unique within the community. Never reused after a config is retired, because blobs name their config by this value."
508
+ },
509
+ "HostedRoom": {
510
+ "title": "HostedRoom",
511
+ "type": "object",
512
+ "additionalProperties": false,
513
+ "required": [
514
+ "roomId",
515
+ "ownerDid",
516
+ "visibility",
517
+ "retentionPolicy",
518
+ "epoch",
519
+ "lifecycle",
520
+ "retentionDays",
521
+ "createdAt",
522
+ "updatedAt"
523
+ ],
524
+ "description": "One room, as its host holds it — member for member the `HostedRoom` of vtc/rooms/list/0.1, which defines it inside its own payload schema. Nothing derived from the room's contents, and no member list: the host has none.",
525
+ "properties": {
526
+ "roomId": {
527
+ "type": "string",
528
+ "minLength": 1,
529
+ "maxLength": 512
530
+ },
531
+ "ownerDid": {
532
+ "type": "string",
533
+ "pattern": "^did:",
534
+ "maxLength": 2048
535
+ },
536
+ "visibility": {
537
+ "$ref": "#/$defs/Visibility"
538
+ },
539
+ "retentionPolicy": {
540
+ "$ref": "#/$defs/RetentionPolicy"
541
+ },
542
+ "epoch": {
543
+ "type": "integer",
544
+ "minimum": 0
545
+ },
546
+ "lifecycle": {
547
+ "type": "string",
548
+ "enum": [
549
+ "live",
550
+ "lapsed",
551
+ "dormant",
552
+ "reclaimable"
553
+ ]
554
+ },
555
+ "epochExpiresAt": {
556
+ "type": "integer",
557
+ "minimum": 0
558
+ },
559
+ "retentionDays": {
560
+ "type": "integer",
561
+ "minimum": 0
562
+ },
563
+ "mirrorOf": {
564
+ "type": "string",
565
+ "minLength": 1,
566
+ "maxLength": 2048
567
+ },
568
+ "createdAt": {
569
+ "type": "integer",
570
+ "minimum": 0
571
+ },
572
+ "updatedAt": {
573
+ "type": "integer",
574
+ "minimum": 0
575
+ }
576
+ }
577
+ },
578
+ "RetentionPolicy": {
579
+ "title": "RetentionPolicy",
580
+ "type": "string",
581
+ "enum": [
582
+ "chained",
583
+ "fromJoin"
584
+ ],
585
+ "description": "Whether a room keeps its history readable across a membership change, fixed at creation and immutable thereafter — like `Visibility`, and for the same reason: the rungs of an epoch key chain either exist for an epoch or they do not, and no later change of mind can seal key material that was never sealed or unseal what was already severed. `chained`: each advance produces an `EpochLink`, so every member reads the room's whole retained history however long they have been in it — what a **library** wants, at the cost of post-compromise security for record content, since a compromised current key then reaches every retained epoch. `fromJoin`: no rungs are produced, so a member reads only from the epoch their group state is at — what a **stream** wants, and what a room under a strict forward-secrecy obligation wants, at the cost that a joining member finds an empty-looking room and nobody can reread a record once their group state has moved past the epoch it was sealed under. Absent means `chained`; see the prose on why the absent case is the readable one.",
586
+ "$comment": "Deliberately no JSON Schema `default`. A declared default is materialised by the generated bindings — the member becomes non-optional with a serde default — so an absent value would reappear as an explicit one on re-serialisation and break round-trip idempotence for every document written before this member existed. The meaning of absence is stated in prose, where a binding cannot act on it."
587
+ },
588
+ "Visibility": {
589
+ "title": "Visibility",
590
+ "type": "string",
591
+ "enum": [
592
+ "open",
593
+ "attributed",
594
+ "private"
595
+ ],
596
+ "description": "How much of a room its host can see, fixed at creation and immutable thereafter. `open`: records are cleartext, searchable and fully audited. `attributed`: record content is sealed, and the host still learns which member acted. `private`: content is sealed and membership is presented in zero knowledge, so the host verifies that a member acted without learning which. Immutable because a downgrade cannot un-see cleartext and an upgrade would protect only what came after while presenting as though it protected everything."
597
+ },
598
+ "Reason": {
599
+ "title": "Reason",
600
+ "type": "string",
601
+ "minLength": 1,
602
+ "maxLength": 500,
603
+ "description": "Why the administrator is making this change. Recorded with it in the audit trail. Attributed to its author on every surface and untrusted: it MUST NOT carry personal data or a credential, and a reader MUST NOT treat it as instructions."
604
+ }
605
+ }
606
+ } as const;
607
+
608
+ /**
609
+ * SPEC.md §7.2 policy for the request variant, from this specification's
610
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
611
+ * per-specification and cannot be derived from the document alone, and
612
+ * item 2 needs the schema this carries.
613
+ */
614
+ export const SPEC = {
615
+ typeUri: TYPE_URI,
616
+ isBearer: false,
617
+ isProofRequired: true,
618
+ isRecipientRequired: true,
619
+ isIssuedAtRequired: true,
620
+ payloadSchema: PAYLOAD_SCHEMA,
621
+ } as const;
622
+
623
+ /**
624
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
625
+ * tracks the *issuer* party's requirement because a response swaps the
626
+ * parties (§7.3 item 5).
627
+ */
628
+ export const RESPONSE_SPEC = {
629
+ typeUri: RESPONSE_TYPE_URI,
630
+ isBearer: false,
631
+ isProofRequired: true,
632
+ isRecipientRequired: true,
633
+ isIssuedAtRequired: true,
634
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
635
+ } as const;
@@ -144,7 +144,7 @@ export const PAYLOAD_SCHEMA = {
144
144
  "type": "string",
145
145
  "minLength": 1,
146
146
  "maxLength": 128,
147
- "description": "A name for the room, chosen by an administrator: shown to administrators and to the members a room is offered to. Not part of the room's identity and not sent to the room's host path. MUST NOT carry personal data."
147
+ "description": "A name for the room, chosen by an administrator: shown to administrators and to the members a room is offered to. Not part of the room's identity and never in anything a room's host can read. From `vtc/rooms/community/create` 0.3 and `vtc/rooms/community/update` 0.2 the community also writes it, through its own VTA, as the `name` of the room's own profile (`RoomProfile` in rooms/_shared), sealed inside the room for its members; earlier versions keep it out of the room altogether. MUST NOT carry personal data."
148
148
  },
149
149
  "StorageConfigId": {
150
150
  "title": "StorageConfigId",
@@ -329,7 +329,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
329
329
  "type": "string",
330
330
  "minLength": 1,
331
331
  "maxLength": 128,
332
- "description": "A name for the room, chosen by an administrator: shown to administrators and to the members a room is offered to. Not part of the room's identity and not sent to the room's host path. MUST NOT carry personal data."
332
+ "description": "A name for the room, chosen by an administrator: shown to administrators and to the members a room is offered to. Not part of the room's identity and never in anything a room's host can read. From `vtc/rooms/community/create` 0.3 and `vtc/rooms/community/update` 0.2 the community also writes it, through its own VTA, as the `name` of the room's own profile (`RoomProfile` in rooms/_shared), sealed inside the room for its members; earlier versions keep it out of the room altogether. MUST NOT carry personal data."
333
333
  },
334
334
  "StorageConfigId": {
335
335
  "title": "StorageConfigId",