@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,439 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/rooms/community/members/remove/0.2/payload.schema.json
4
+ */
5
+
6
+ import type { DigestMultibase, Ext, MemberAction, MemberActions, MemberState, Reason, RevocationHead, RoomMember } from "../../../../../../_shared/components.js";
7
+
8
+
9
+ export interface VTCRoomsCommunityMembersRemovePayload {
10
+ /**
11
+ * The room's identifier: its DID.
12
+ */
13
+ roomId: string;
14
+ member: string;
15
+ reason: Reason;
16
+ ext?: Ext;
17
+ }
18
+ /**
19
+ * Success response to vtc/rooms/community/members/remove. Type https://trusttasks.org/spec/vtc/rooms/community/members/remove/0.2#response. The member as recorded, in state `removed`; on `open` and `attributed` rooms the revocation list in force at the room's host, from which the member's credentials are refused; and on a sealed tier the epoch the room advanced to.
20
+ */
21
+ export interface VTCRoomsCommunityMembersRemoveResponsePayload {
22
+ member: RoomMember;
23
+ /**
24
+ * On an `open` or `attributed` room: the room's revocation list carrying the withdrawal, as the room's host accepted it. From then on the host refuses every credential the room issued the member before `revokedAt`. Absent on a `private` room, where a member cannot be withdrawn one at a time and their credentials are honoured until `member.validUntil`.
25
+ */
26
+ revocation?: RevocationHead;
27
+ /**
28
+ * Present with `revocation`: the withdrawal's time.
29
+ */
30
+ revokedAt?: string;
31
+ /**
32
+ * On a sealed tier, the room epoch after the removal.
33
+ */
34
+ epoch?: number;
35
+ ext?: Ext;
36
+ }
37
+
38
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
39
+ export type { DigestMultibase, Ext, MemberAction, MemberActions, MemberState, Reason, RevocationHead, RoomMember };
40
+
41
+ /** Trust Task type URI. */
42
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/rooms/community/members/remove/0.2" as const;
43
+
44
+ /** Stable alias for this specification's request payload shape. */
45
+ export type Payload = VTCRoomsCommunityMembersRemovePayload;
46
+
47
+ /** Trust Task response type URI (request type URI + "#response"). */
48
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/rooms/community/members/remove/0.2#response" as const;
49
+
50
+ /** Stable alias for this specification's success-response payload shape. */
51
+ export type Response = VTCRoomsCommunityMembersRemoveResponsePayload;
52
+
53
+ /**
54
+ * This specification's payload schema, as a value.
55
+ *
56
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
57
+ * rather than only as a `.json` file because TypeScript types are erased
58
+ * at runtime: without a schema a consumer has nothing to validate, and
59
+ * every REQUIRED payload member is optional in practice. Cross-file
60
+ * `$ref`s are already inlined, so it needs no resolver.
61
+ */
62
+ export const PAYLOAD_SCHEMA = {
63
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
64
+ "$id": "https://trusttasks.org/spec/vtc/rooms/community/members/remove/0.2",
65
+ "title": "VTC Rooms Community Members Remove — payload",
66
+ "type": "object",
67
+ "additionalProperties": false,
68
+ "required": [
69
+ "roomId",
70
+ "member",
71
+ "reason"
72
+ ],
73
+ "properties": {
74
+ "roomId": {
75
+ "type": "string",
76
+ "minLength": 1,
77
+ "maxLength": 512,
78
+ "description": "The room's identifier: its DID."
79
+ },
80
+ "member": {
81
+ "type": "string",
82
+ "pattern": "^did:",
83
+ "maxLength": 2048
84
+ },
85
+ "reason": {
86
+ "$ref": "#/$defs/Reason"
87
+ },
88
+ "ext": {
89
+ "$ref": "#/$defs/Ext"
90
+ }
91
+ },
92
+ "$defs": {
93
+ "Response": {
94
+ "$anchor": "response",
95
+ "title": "VTC Rooms Community Members Remove — response payload",
96
+ "description": "Success response to vtc/rooms/community/members/remove. Type https://trusttasks.org/spec/vtc/rooms/community/members/remove/0.2#response. The member as recorded, in state `removed`; on `open` and `attributed` rooms the revocation list in force at the room's host, from which the member's credentials are refused; and on a sealed tier the epoch the room advanced to.",
97
+ "type": "object",
98
+ "additionalProperties": false,
99
+ "required": [
100
+ "member"
101
+ ],
102
+ "properties": {
103
+ "member": {
104
+ "$ref": "#/$defs/RoomMember"
105
+ },
106
+ "revocation": {
107
+ "$ref": "#/$defs/RevocationHead",
108
+ "description": "On an `open` or `attributed` room: the room's revocation list carrying the withdrawal, as the room's host accepted it. From then on the host refuses every credential the room issued the member before `revokedAt`. Absent on a `private` room, where a member cannot be withdrawn one at a time and their credentials are honoured until `member.validUntil`."
109
+ },
110
+ "revokedAt": {
111
+ "type": "string",
112
+ "format": "date-time",
113
+ "description": "Present with `revocation`: the withdrawal's time."
114
+ },
115
+ "epoch": {
116
+ "type": "integer",
117
+ "minimum": 2,
118
+ "description": "On a sealed tier, the room epoch after the removal."
119
+ },
120
+ "ext": {
121
+ "$ref": "#/$defs/Ext"
122
+ }
123
+ }
124
+ },
125
+ "Ext": {
126
+ "title": "Ext",
127
+ "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.",
128
+ "type": "object",
129
+ "minProperties": 1,
130
+ "additionalProperties": true,
131
+ "propertyNames": {
132
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
133
+ }
134
+ },
135
+ "RevocationHead": {
136
+ "title": "RevocationHead",
137
+ "type": "object",
138
+ "additionalProperties": false,
139
+ "required": [
140
+ "sequence",
141
+ "digest"
142
+ ],
143
+ "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.",
144
+ "properties": {
145
+ "sequence": {
146
+ "type": "integer",
147
+ "minimum": 1,
148
+ "description": "The list's `sequence`."
149
+ },
150
+ "digest": {
151
+ "$ref": "#/$defs/DigestMultibase",
152
+ "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."
153
+ }
154
+ }
155
+ },
156
+ "DigestMultibase": {
157
+ "title": "DigestMultibase",
158
+ "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`.",
159
+ "type": "string",
160
+ "minLength": 16,
161
+ "pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
162
+ "examples": [
163
+ "zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
164
+ ]
165
+ },
166
+ "RoomMember": {
167
+ "title": "RoomMember",
168
+ "type": "object",
169
+ "additionalProperties": false,
170
+ "required": [
171
+ "member",
172
+ "actions",
173
+ "validUntil",
174
+ "state",
175
+ "offeredAt"
176
+ ],
177
+ "description": "One party the community admitted to a room it owns, or offered admission to.",
178
+ "properties": {
179
+ "member": {
180
+ "type": "string",
181
+ "pattern": "^did:",
182
+ "maxLength": 2048
183
+ },
184
+ "actions": {
185
+ "$ref": "#/$defs/MemberActions"
186
+ },
187
+ "validUntil": {
188
+ "type": "string",
189
+ "format": "date-time",
190
+ "description": "When the member's authority credential expires."
191
+ },
192
+ "state": {
193
+ "$ref": "#/$defs/MemberState"
194
+ },
195
+ "offeredAt": {
196
+ "type": "string",
197
+ "format": "date-time"
198
+ },
199
+ "admittedAt": {
200
+ "type": "string",
201
+ "format": "date-time"
202
+ },
203
+ "removedAt": {
204
+ "type": "string",
205
+ "format": "date-time"
206
+ }
207
+ }
208
+ },
209
+ "MemberState": {
210
+ "title": "MemberState",
211
+ "type": "string",
212
+ "enum": [
213
+ "offered",
214
+ "admitted",
215
+ "removed"
216
+ ],
217
+ "description": "Where an admission stands. `offered`: credentials issued and waiting for the member to collect and accept them. `admitted`: accepted — on a sealed tier, the member is in the room's group. `removed`: an administrator removed them; on a sealed tier the room has advanced past them."
218
+ },
219
+ "MemberActions": {
220
+ "title": "MemberActions",
221
+ "type": "array",
222
+ "minItems": 1,
223
+ "maxItems": 3,
224
+ "uniqueItems": true,
225
+ "items": {
226
+ "$ref": "#/$defs/MemberAction"
227
+ },
228
+ "description": "The actions granted, at least one. An empty list confers nothing rather than everything, and a schema that allowed it would make the more dangerous reading available to a careless consumer."
229
+ },
230
+ "MemberAction": {
231
+ "title": "MemberAction",
232
+ "type": "string",
233
+ "enum": [
234
+ "read",
235
+ "write",
236
+ "curate"
237
+ ],
238
+ "description": "What a member of a community-owned room may do there. `admin` is not among them: minting epochs, admitting and removing members are the community's, as the room's owner, and are exercised through the vtc/rooms/community/* tasks rather than by any member's credential. `curate` is not implied by `write`."
239
+ },
240
+ "Reason": {
241
+ "title": "Reason",
242
+ "type": "string",
243
+ "minLength": 1,
244
+ "maxLength": 500,
245
+ "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."
246
+ }
247
+ }
248
+ } as const;
249
+
250
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
251
+ export const RESPONSE_PAYLOAD_SCHEMA = {
252
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
253
+ "$ref": "#/$defs/Response",
254
+ "$defs": {
255
+ "Response": {
256
+ "$anchor": "response",
257
+ "title": "VTC Rooms Community Members Remove — response payload",
258
+ "description": "Success response to vtc/rooms/community/members/remove. Type https://trusttasks.org/spec/vtc/rooms/community/members/remove/0.2#response. The member as recorded, in state `removed`; on `open` and `attributed` rooms the revocation list in force at the room's host, from which the member's credentials are refused; and on a sealed tier the epoch the room advanced to.",
259
+ "type": "object",
260
+ "additionalProperties": false,
261
+ "required": [
262
+ "member"
263
+ ],
264
+ "properties": {
265
+ "member": {
266
+ "$ref": "#/$defs/RoomMember"
267
+ },
268
+ "revocation": {
269
+ "$ref": "#/$defs/RevocationHead",
270
+ "description": "On an `open` or `attributed` room: the room's revocation list carrying the withdrawal, as the room's host accepted it. From then on the host refuses every credential the room issued the member before `revokedAt`. Absent on a `private` room, where a member cannot be withdrawn one at a time and their credentials are honoured until `member.validUntil`."
271
+ },
272
+ "revokedAt": {
273
+ "type": "string",
274
+ "format": "date-time",
275
+ "description": "Present with `revocation`: the withdrawal's time."
276
+ },
277
+ "epoch": {
278
+ "type": "integer",
279
+ "minimum": 2,
280
+ "description": "On a sealed tier, the room epoch after the removal."
281
+ },
282
+ "ext": {
283
+ "$ref": "#/$defs/Ext"
284
+ }
285
+ }
286
+ },
287
+ "Ext": {
288
+ "title": "Ext",
289
+ "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.",
290
+ "type": "object",
291
+ "minProperties": 1,
292
+ "additionalProperties": true,
293
+ "propertyNames": {
294
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
295
+ }
296
+ },
297
+ "RevocationHead": {
298
+ "title": "RevocationHead",
299
+ "type": "object",
300
+ "additionalProperties": false,
301
+ "required": [
302
+ "sequence",
303
+ "digest"
304
+ ],
305
+ "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.",
306
+ "properties": {
307
+ "sequence": {
308
+ "type": "integer",
309
+ "minimum": 1,
310
+ "description": "The list's `sequence`."
311
+ },
312
+ "digest": {
313
+ "$ref": "#/$defs/DigestMultibase",
314
+ "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."
315
+ }
316
+ }
317
+ },
318
+ "DigestMultibase": {
319
+ "title": "DigestMultibase",
320
+ "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`.",
321
+ "type": "string",
322
+ "minLength": 16,
323
+ "pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
324
+ "examples": [
325
+ "zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
326
+ ]
327
+ },
328
+ "RoomMember": {
329
+ "title": "RoomMember",
330
+ "type": "object",
331
+ "additionalProperties": false,
332
+ "required": [
333
+ "member",
334
+ "actions",
335
+ "validUntil",
336
+ "state",
337
+ "offeredAt"
338
+ ],
339
+ "description": "One party the community admitted to a room it owns, or offered admission to.",
340
+ "properties": {
341
+ "member": {
342
+ "type": "string",
343
+ "pattern": "^did:",
344
+ "maxLength": 2048
345
+ },
346
+ "actions": {
347
+ "$ref": "#/$defs/MemberActions"
348
+ },
349
+ "validUntil": {
350
+ "type": "string",
351
+ "format": "date-time",
352
+ "description": "When the member's authority credential expires."
353
+ },
354
+ "state": {
355
+ "$ref": "#/$defs/MemberState"
356
+ },
357
+ "offeredAt": {
358
+ "type": "string",
359
+ "format": "date-time"
360
+ },
361
+ "admittedAt": {
362
+ "type": "string",
363
+ "format": "date-time"
364
+ },
365
+ "removedAt": {
366
+ "type": "string",
367
+ "format": "date-time"
368
+ }
369
+ }
370
+ },
371
+ "MemberState": {
372
+ "title": "MemberState",
373
+ "type": "string",
374
+ "enum": [
375
+ "offered",
376
+ "admitted",
377
+ "removed"
378
+ ],
379
+ "description": "Where an admission stands. `offered`: credentials issued and waiting for the member to collect and accept them. `admitted`: accepted — on a sealed tier, the member is in the room's group. `removed`: an administrator removed them; on a sealed tier the room has advanced past them."
380
+ },
381
+ "MemberActions": {
382
+ "title": "MemberActions",
383
+ "type": "array",
384
+ "minItems": 1,
385
+ "maxItems": 3,
386
+ "uniqueItems": true,
387
+ "items": {
388
+ "$ref": "#/$defs/MemberAction"
389
+ },
390
+ "description": "The actions granted, at least one. An empty list confers nothing rather than everything, and a schema that allowed it would make the more dangerous reading available to a careless consumer."
391
+ },
392
+ "MemberAction": {
393
+ "title": "MemberAction",
394
+ "type": "string",
395
+ "enum": [
396
+ "read",
397
+ "write",
398
+ "curate"
399
+ ],
400
+ "description": "What a member of a community-owned room may do there. `admin` is not among them: minting epochs, admitting and removing members are the community's, as the room's owner, and are exercised through the vtc/rooms/community/* tasks rather than by any member's credential. `curate` is not implied by `write`."
401
+ },
402
+ "Reason": {
403
+ "title": "Reason",
404
+ "type": "string",
405
+ "minLength": 1,
406
+ "maxLength": 500,
407
+ "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."
408
+ }
409
+ }
410
+ } as const;
411
+
412
+ /**
413
+ * SPEC.md §7.2 policy for the request variant, from this specification's
414
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
415
+ * per-specification and cannot be derived from the document alone, and
416
+ * item 2 needs the schema this carries.
417
+ */
418
+ export const SPEC = {
419
+ typeUri: TYPE_URI,
420
+ isBearer: false,
421
+ isProofRequired: true,
422
+ isRecipientRequired: true,
423
+ isIssuedAtRequired: true,
424
+ payloadSchema: PAYLOAD_SCHEMA,
425
+ } as const;
426
+
427
+ /**
428
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
429
+ * tracks the *issuer* party's requirement because a response swaps the
430
+ * parties (§7.3 item 5).
431
+ */
432
+ export const RESPONSE_SPEC = {
433
+ typeUri: RESPONSE_TYPE_URI,
434
+ isBearer: false,
435
+ isProofRequired: true,
436
+ isRecipientRequired: true,
437
+ isIssuedAtRequired: true,
438
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
439
+ } as const;