@openvtc/trust-tasks 0.26.14 → 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 (197) hide show
  1. package/CHANGELOG.md +114 -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 +17 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +17 -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/rooms/community/create/0.1/payload.d.ts +4 -4
  109. package/dist/vtc/rooms/community/create/0.1/payload.js +2 -2
  110. package/dist/vtc/rooms/community/create/0.1/payload.js.map +1 -1
  111. package/dist/vtc/rooms/community/create/0.2/payload.d.ts +989 -0
  112. package/dist/vtc/rooms/community/create/0.2/payload.d.ts.map +1 -0
  113. package/dist/vtc/rooms/community/create/0.2/payload.js +559 -0
  114. package/dist/vtc/rooms/community/create/0.2/payload.js.map +1 -0
  115. package/dist/vtc/rooms/community/create/0.3/payload.d.ts +1013 -0
  116. package/dist/vtc/rooms/community/create/0.3/payload.d.ts.map +1 -0
  117. package/dist/vtc/rooms/community/create/0.3/payload.js +577 -0
  118. package/dist/vtc/rooms/community/create/0.3/payload.js.map +1 -0
  119. package/dist/vtc/rooms/community/get/0.1/payload.d.ts +4 -4
  120. package/dist/vtc/rooms/community/get/0.1/payload.js +2 -2
  121. package/dist/vtc/rooms/community/get/0.1/payload.js.map +1 -1
  122. package/dist/vtc/rooms/community/get/0.2/payload.d.ts +887 -0
  123. package/dist/vtc/rooms/community/get/0.2/payload.d.ts.map +1 -0
  124. package/dist/vtc/rooms/community/get/0.2/payload.js +517 -0
  125. package/dist/vtc/rooms/community/get/0.2/payload.js.map +1 -0
  126. package/dist/vtc/rooms/community/list/0.1/payload.d.ts +4 -4
  127. package/dist/vtc/rooms/community/list/0.1/payload.js +2 -2
  128. package/dist/vtc/rooms/community/list/0.1/payload.js.map +1 -1
  129. package/dist/vtc/rooms/community/list/0.2/payload.d.ts +960 -0
  130. package/dist/vtc/rooms/community/list/0.2/payload.d.ts.map +1 -0
  131. package/dist/vtc/rooms/community/list/0.2/payload.js +544 -0
  132. package/dist/vtc/rooms/community/list/0.2/payload.js.map +1 -0
  133. package/dist/vtc/rooms/community/members/remove/0.2/payload.d.ts +681 -0
  134. package/dist/vtc/rooms/community/members/remove/0.2/payload.d.ts.map +1 -0
  135. package/dist/vtc/rooms/community/members/remove/0.2/payload.js +393 -0
  136. package/dist/vtc/rooms/community/members/remove/0.2/payload.js.map +1 -0
  137. package/dist/vtc/rooms/community/update/0.1/payload.d.ts +1013 -0
  138. package/dist/vtc/rooms/community/update/0.1/payload.d.ts.map +1 -0
  139. package/dist/vtc/rooms/community/update/0.1/payload.js +573 -0
  140. package/dist/vtc/rooms/community/update/0.1/payload.js.map +1 -0
  141. package/dist/vtc/rooms/community/update/0.2/payload.d.ts +1037 -0
  142. package/dist/vtc/rooms/community/update/0.2/payload.d.ts.map +1 -0
  143. package/dist/vtc/rooms/community/update/0.2/payload.js +593 -0
  144. package/dist/vtc/rooms/community/update/0.2/payload.js.map +1 -0
  145. package/dist/vtc/rooms/offers/list/0.1/payload.d.ts +4 -4
  146. package/dist/vtc/rooms/offers/list/0.1/payload.js +2 -2
  147. package/dist/vtc/rooms/offers/list/0.1/payload.js.map +1 -1
  148. package/dist/vtc/rooms/offers/list/0.2/payload.d.ts +736 -0
  149. package/dist/vtc/rooms/offers/list/0.2/payload.d.ts.map +1 -0
  150. package/dist/vtc/rooms/offers/list/0.2/payload.js +430 -0
  151. package/dist/vtc/rooms/offers/list/0.2/payload.js.map +1 -0
  152. package/package.json +1 -1
  153. package/src/_shared/components.ts +426 -1
  154. package/src/index.ts +17 -0
  155. package/src/rooms/_shared/0.1/personal-label.ts +17 -0
  156. package/src/rooms/_shared/0.1/room.ts +1 -1
  157. package/src/rooms/blobs/get/0.1/payload.ts +2 -2
  158. package/src/rooms/blobs/get/0.2/payload.ts +2 -2
  159. package/src/rooms/blobs/upload/begin/0.1/payload.ts +2 -2
  160. package/src/rooms/blobs/upload/begin/0.2/payload.ts +2 -2
  161. package/src/rooms/epoch/chain/0.1/payload.ts +2 -2
  162. package/src/rooms/epoch/commits/0.1/payload.ts +2 -2
  163. package/src/rooms/epoch/mint/0.1/payload.ts +2 -2
  164. package/src/rooms/epoch/prune/0.1/payload.ts +2 -2
  165. package/src/rooms/info/0.1/payload.ts +2 -2
  166. package/src/rooms/keys/label/0.1/payload.ts +474 -0
  167. package/src/rooms/keys/list/0.2/payload.ts +412 -0
  168. package/src/rooms/keys/present/0.2/payload.ts +2 -2
  169. package/src/rooms/keys/profile/read/0.1/payload.ts +1617 -0
  170. package/src/rooms/keys/profile/write/0.1/payload.ts +388 -0
  171. package/src/rooms/owner/claim/0.1/payload.ts +2 -2
  172. package/src/rooms/owner/group/remove/0.2/payload.ts +415 -0
  173. package/src/rooms/owner/revoke/0.1/payload.ts +954 -0
  174. package/src/rooms/owner/transfer/0.1/payload.ts +2 -2
  175. package/src/rooms/records/curate/0.1/payload.ts +2 -2
  176. package/src/rooms/records/get/0.1/payload.ts +2 -2
  177. package/src/rooms/records/get/0.2/payload.ts +2 -2
  178. package/src/rooms/records/list/0.1/payload.ts +2 -2
  179. package/src/rooms/records/list/0.2/payload.ts +2 -2
  180. package/src/rooms/records/put/0.1/payload.ts +2 -2
  181. package/src/rooms/records/put/0.2/payload.ts +2 -2
  182. package/src/rooms/revocations/get/0.1/payload.ts +562 -0
  183. package/src/rooms/revocations/put/0.1/payload.ts +637 -0
  184. package/src/rooms/usage/0.1/payload.ts +2 -2
  185. package/src/vtc/_shared/0.1/community-room.ts +1 -1
  186. package/src/vtc/rooms/community/create/0.1/payload.ts +2 -2
  187. package/src/vtc/rooms/community/create/0.2/payload.ts +613 -0
  188. package/src/vtc/rooms/community/create/0.3/payload.ts +635 -0
  189. package/src/vtc/rooms/community/get/0.1/payload.ts +2 -2
  190. package/src/vtc/rooms/community/get/0.2/payload.ts +549 -0
  191. package/src/vtc/rooms/community/list/0.1/payload.ts +2 -2
  192. package/src/vtc/rooms/community/list/0.2/payload.ts +591 -0
  193. package/src/vtc/rooms/community/members/remove/0.2/payload.ts +439 -0
  194. package/src/vtc/rooms/community/update/0.1/payload.ts +629 -0
  195. package/src/vtc/rooms/community/update/0.2/payload.ts +653 -0
  196. package/src/vtc/rooms/offers/list/0.1/payload.ts +2 -2
  197. package/src/vtc/rooms/offers/list/0.2/payload.ts +473 -0
@@ -0,0 +1,415 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/owner/group/remove/0.2/payload.schema.json
4
+ */
5
+
6
+ import type { DigestMultibase, Ext, RevocationHead } from "../../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * A room's owner asks their own agent to remove a member: withdraw every credential the room gave them, at its host at once, and then remove their leaf from the room's MLS group and advance its epoch. 0.2 adds the withdrawal, made first.
11
+ */
12
+ export interface RoomsOwnerGroupRemovePayload {
13
+ /**
14
+ * The room whose group loses a member. The recipient MUST hold its group and a signing key for it.
15
+ */
16
+ roomId: string;
17
+ /**
18
+ * The room's host, as a DID: where the withdrawal is delivered first and the room's epoch advances.
19
+ */
20
+ host: string;
21
+ /**
22
+ * Any other host serving the room, as DIDs. Each is delivered the withdrawal too: a host that does not hold it honours the member's credentials still.
23
+ *
24
+ * @maxItems 7
25
+ */
26
+ mirrors?:
27
+ | []
28
+ | [string]
29
+ | [string, string]
30
+ | [string, string, string]
31
+ | [string, string, string, string]
32
+ | [string, string, string, string, string]
33
+ | [string, string, string, string, string, string]
34
+ | [string, string, string, string, string, string, string];
35
+ /**
36
+ * The DID whose leaf is removed, and whose credentials the room withdraws. Never the recipient's own leaf.
37
+ */
38
+ member: string;
39
+ /**
40
+ * Which held key signs the room's revocation list as the room, named explicitly as for rooms/owner/revoke.
41
+ */
42
+ signingKeyId: string;
43
+ /**
44
+ * OPTIONAL. When the last credential the room issued `member` expires, after which the withdrawal can be dropped from the room's list.
45
+ */
46
+ until?: string;
47
+ /**
48
+ * Why, carried to the host's epoch advance. Untrusted and attributed to its author: it MUST NOT carry personal data or a credential. Never put into the revocation list.
49
+ */
50
+ reason?: string;
51
+ /**
52
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
53
+ */
54
+ ext?: Ext;
55
+ }
56
+ /**
57
+ * Success response to rooms/owner/group/remove. Type https://trusttasks.org/spec/rooms/owner/group/remove/0.2#response. The revocation list in force at the host, and the room's new epoch, which the removed member holds no key for.
58
+ */
59
+ export interface RoomsOwnerGroupRemoveResponsePayload {
60
+ /**
61
+ * The room.
62
+ */
63
+ roomId: string;
64
+ /**
65
+ * Who was removed.
66
+ */
67
+ member: string;
68
+ /**
69
+ * The revocation list carrying the withdrawal, as `host` accepted it.
70
+ */
71
+ revocation: RevocationHead;
72
+ /**
73
+ * The withdrawal's `revokedAt`: credentials the room issued `member` before it are refused, and fresh ones issued after it are not.
74
+ */
75
+ revokedAt?: string;
76
+ /**
77
+ * The room epoch after the removal, as the host recorded it.
78
+ */
79
+ epoch: number;
80
+ /**
81
+ * Mirrors that did not confirm the withdrawal. Each still honours the member's credentials until the list is delivered — with rooms/owner/revoke and no `withdraw`. Absent when every mirror confirmed.
82
+ *
83
+ * @maxItems 7
84
+ */
85
+ mirrorsPending?:
86
+ | []
87
+ | [string]
88
+ | [string, string]
89
+ | [string, string, string]
90
+ | [string, string, string, string]
91
+ | [string, string, string, string, string]
92
+ | [string, string, string, string, string, string]
93
+ | [string, string, string, string, string, string, string];
94
+ ext?: Ext;
95
+ }
96
+
97
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
98
+ export type { DigestMultibase, Ext, RevocationHead };
99
+
100
+ /** Trust Task type URI. */
101
+ export const TYPE_URI = "https://trusttasks.org/spec/rooms/owner/group/remove/0.2" as const;
102
+
103
+ /** Stable alias for this specification's request payload shape. */
104
+ export type Payload = RoomsOwnerGroupRemovePayload;
105
+
106
+ /** Trust Task response type URI (request type URI + "#response"). */
107
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/owner/group/remove/0.2#response" as const;
108
+
109
+ /** Stable alias for this specification's success-response payload shape. */
110
+ export type Response = RoomsOwnerGroupRemoveResponsePayload;
111
+
112
+ /**
113
+ * This specification's payload schema, as a value.
114
+ *
115
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
116
+ * rather than only as a `.json` file because TypeScript types are erased
117
+ * at runtime: without a schema a consumer has nothing to validate, and
118
+ * every REQUIRED payload member is optional in practice. Cross-file
119
+ * `$ref`s are already inlined, so it needs no resolver.
120
+ */
121
+ export const PAYLOAD_SCHEMA = {
122
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
123
+ "$id": "https://trusttasks.org/spec/rooms/owner/group/remove/0.2",
124
+ "title": "Rooms Owner Group Remove — payload",
125
+ "description": "A room's owner asks their own agent to remove a member: withdraw every credential the room gave them, at its host at once, and then remove their leaf from the room's MLS group and advance its epoch. 0.2 adds the withdrawal, made first.",
126
+ "type": "object",
127
+ "additionalProperties": false,
128
+ "required": [
129
+ "roomId",
130
+ "host",
131
+ "member",
132
+ "signingKeyId"
133
+ ],
134
+ "properties": {
135
+ "roomId": {
136
+ "type": "string",
137
+ "minLength": 1,
138
+ "maxLength": 512,
139
+ "description": "The room whose group loses a member. The recipient MUST hold its group and a signing key for it."
140
+ },
141
+ "host": {
142
+ "type": "string",
143
+ "pattern": "^did:",
144
+ "maxLength": 2048,
145
+ "description": "The room's host, as a DID: where the withdrawal is delivered first and the room's epoch advances."
146
+ },
147
+ "mirrors": {
148
+ "type": "array",
149
+ "maxItems": 7,
150
+ "uniqueItems": true,
151
+ "items": {
152
+ "type": "string",
153
+ "pattern": "^did:",
154
+ "maxLength": 2048
155
+ },
156
+ "description": "Any other host serving the room, as DIDs. Each is delivered the withdrawal too: a host that does not hold it honours the member's credentials still."
157
+ },
158
+ "member": {
159
+ "type": "string",
160
+ "pattern": "^did:",
161
+ "maxLength": 2048,
162
+ "description": "The DID whose leaf is removed, and whose credentials the room withdraws. Never the recipient's own leaf."
163
+ },
164
+ "signingKeyId": {
165
+ "type": "string",
166
+ "minLength": 1,
167
+ "maxLength": 256,
168
+ "description": "Which held key signs the room's revocation list as the room, named explicitly as for rooms/owner/revoke."
169
+ },
170
+ "until": {
171
+ "type": "string",
172
+ "format": "date-time",
173
+ "description": "OPTIONAL. When the last credential the room issued `member` expires, after which the withdrawal can be dropped from the room's list."
174
+ },
175
+ "reason": {
176
+ "type": "string",
177
+ "minLength": 1,
178
+ "maxLength": 500,
179
+ "description": "Why, carried to the host's epoch advance. Untrusted and attributed to its author: it MUST NOT carry personal data or a credential. Never put into the revocation list."
180
+ },
181
+ "ext": {
182
+ "$ref": "#/$defs/Ext",
183
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
184
+ }
185
+ },
186
+ "$defs": {
187
+ "Response": {
188
+ "$anchor": "response",
189
+ "title": "Rooms Owner Group Remove — response payload",
190
+ "description": "Success response to rooms/owner/group/remove. Type https://trusttasks.org/spec/rooms/owner/group/remove/0.2#response. The revocation list in force at the host, and the room's new epoch, which the removed member holds no key for.",
191
+ "type": "object",
192
+ "additionalProperties": false,
193
+ "required": [
194
+ "roomId",
195
+ "member",
196
+ "revocation",
197
+ "epoch"
198
+ ],
199
+ "properties": {
200
+ "roomId": {
201
+ "type": "string",
202
+ "minLength": 1,
203
+ "maxLength": 512,
204
+ "description": "The room."
205
+ },
206
+ "member": {
207
+ "type": "string",
208
+ "pattern": "^did:",
209
+ "maxLength": 2048,
210
+ "description": "Who was removed."
211
+ },
212
+ "revocation": {
213
+ "$ref": "#/$defs/RevocationHead",
214
+ "description": "The revocation list carrying the withdrawal, as `host` accepted it."
215
+ },
216
+ "revokedAt": {
217
+ "type": "string",
218
+ "format": "date-time",
219
+ "description": "The withdrawal's `revokedAt`: credentials the room issued `member` before it are refused, and fresh ones issued after it are not."
220
+ },
221
+ "epoch": {
222
+ "type": "integer",
223
+ "minimum": 2,
224
+ "description": "The room epoch after the removal, as the host recorded it."
225
+ },
226
+ "mirrorsPending": {
227
+ "type": "array",
228
+ "maxItems": 7,
229
+ "items": {
230
+ "type": "string",
231
+ "pattern": "^did:",
232
+ "maxLength": 2048
233
+ },
234
+ "description": "Mirrors that did not confirm the withdrawal. Each still honours the member's credentials until the list is delivered — with rooms/owner/revoke and no `withdraw`. Absent when every mirror confirmed."
235
+ },
236
+ "ext": {
237
+ "$ref": "#/$defs/Ext"
238
+ }
239
+ }
240
+ },
241
+ "Ext": {
242
+ "title": "Ext",
243
+ "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.",
244
+ "type": "object",
245
+ "minProperties": 1,
246
+ "additionalProperties": true,
247
+ "propertyNames": {
248
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
249
+ }
250
+ },
251
+ "RevocationHead": {
252
+ "title": "RevocationHead",
253
+ "type": "object",
254
+ "additionalProperties": false,
255
+ "required": [
256
+ "sequence",
257
+ "digest"
258
+ ],
259
+ "description": "Which `RevocationList` a party holds, without its entries: comparable between the room's key holder and a host, and between two hosts, without disclosing whom the room withdrew.",
260
+ "properties": {
261
+ "sequence": {
262
+ "type": "integer",
263
+ "minimum": 1,
264
+ "description": "The list's `sequence`."
265
+ },
266
+ "digest": {
267
+ "$ref": "#/$defs/DigestMultibase",
268
+ "description": "SHA-256 multihash of the list's RFC 8785 (JCS) canonicalization, `proof` included. Two parties holding one sequence with different digests have been given two lists the room signed at one sequence."
269
+ }
270
+ }
271
+ },
272
+ "DigestMultibase": {
273
+ "title": "DigestMultibase",
274
+ "description": "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.",
275
+ "type": "string",
276
+ "minLength": 16,
277
+ "pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
278
+ "examples": [
279
+ "zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
280
+ ]
281
+ }
282
+ }
283
+ } as const;
284
+
285
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
286
+ export const RESPONSE_PAYLOAD_SCHEMA = {
287
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
288
+ "$ref": "#/$defs/Response",
289
+ "$defs": {
290
+ "Response": {
291
+ "$anchor": "response",
292
+ "title": "Rooms Owner Group Remove — response payload",
293
+ "description": "Success response to rooms/owner/group/remove. Type https://trusttasks.org/spec/rooms/owner/group/remove/0.2#response. The revocation list in force at the host, and the room's new epoch, which the removed member holds no key for.",
294
+ "type": "object",
295
+ "additionalProperties": false,
296
+ "required": [
297
+ "roomId",
298
+ "member",
299
+ "revocation",
300
+ "epoch"
301
+ ],
302
+ "properties": {
303
+ "roomId": {
304
+ "type": "string",
305
+ "minLength": 1,
306
+ "maxLength": 512,
307
+ "description": "The room."
308
+ },
309
+ "member": {
310
+ "type": "string",
311
+ "pattern": "^did:",
312
+ "maxLength": 2048,
313
+ "description": "Who was removed."
314
+ },
315
+ "revocation": {
316
+ "$ref": "#/$defs/RevocationHead",
317
+ "description": "The revocation list carrying the withdrawal, as `host` accepted it."
318
+ },
319
+ "revokedAt": {
320
+ "type": "string",
321
+ "format": "date-time",
322
+ "description": "The withdrawal's `revokedAt`: credentials the room issued `member` before it are refused, and fresh ones issued after it are not."
323
+ },
324
+ "epoch": {
325
+ "type": "integer",
326
+ "minimum": 2,
327
+ "description": "The room epoch after the removal, as the host recorded it."
328
+ },
329
+ "mirrorsPending": {
330
+ "type": "array",
331
+ "maxItems": 7,
332
+ "items": {
333
+ "type": "string",
334
+ "pattern": "^did:",
335
+ "maxLength": 2048
336
+ },
337
+ "description": "Mirrors that did not confirm the withdrawal. Each still honours the member's credentials until the list is delivered — with rooms/owner/revoke and no `withdraw`. Absent when every mirror confirmed."
338
+ },
339
+ "ext": {
340
+ "$ref": "#/$defs/Ext"
341
+ }
342
+ }
343
+ },
344
+ "Ext": {
345
+ "title": "Ext",
346
+ "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.",
347
+ "type": "object",
348
+ "minProperties": 1,
349
+ "additionalProperties": true,
350
+ "propertyNames": {
351
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
352
+ }
353
+ },
354
+ "RevocationHead": {
355
+ "title": "RevocationHead",
356
+ "type": "object",
357
+ "additionalProperties": false,
358
+ "required": [
359
+ "sequence",
360
+ "digest"
361
+ ],
362
+ "description": "Which `RevocationList` a party holds, without its entries: comparable between the room's key holder and a host, and between two hosts, without disclosing whom the room withdrew.",
363
+ "properties": {
364
+ "sequence": {
365
+ "type": "integer",
366
+ "minimum": 1,
367
+ "description": "The list's `sequence`."
368
+ },
369
+ "digest": {
370
+ "$ref": "#/$defs/DigestMultibase",
371
+ "description": "SHA-256 multihash of the list's RFC 8785 (JCS) canonicalization, `proof` included. Two parties holding one sequence with different digests have been given two lists the room signed at one sequence."
372
+ }
373
+ }
374
+ },
375
+ "DigestMultibase": {
376
+ "title": "DigestMultibase",
377
+ "description": "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.",
378
+ "type": "string",
379
+ "minLength": 16,
380
+ "pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
381
+ "examples": [
382
+ "zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
383
+ ]
384
+ }
385
+ }
386
+ } as const;
387
+
388
+ /**
389
+ * SPEC.md §7.2 policy for the request variant, from this specification's
390
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
391
+ * per-specification and cannot be derived from the document alone, and
392
+ * item 2 needs the schema this carries.
393
+ */
394
+ export const SPEC = {
395
+ typeUri: TYPE_URI,
396
+ isBearer: false,
397
+ isProofRequired: true,
398
+ isRecipientRequired: true,
399
+ isIssuedAtRequired: true,
400
+ payloadSchema: PAYLOAD_SCHEMA,
401
+ } as const;
402
+
403
+ /**
404
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
405
+ * tracks the *issuer* party's requirement because a response swaps the
406
+ * parties (§7.3 item 5).
407
+ */
408
+ export const RESPONSE_SPEC = {
409
+ typeUri: RESPONSE_TYPE_URI,
410
+ isBearer: false,
411
+ isProofRequired: true,
412
+ isRecipientRequired: true,
413
+ isIssuedAtRequired: true,
414
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
415
+ } as const;