@openvtc/trust-tasks 0.28.24 → 0.28.26

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 (223) hide show
  1. package/CHANGELOG.md +107 -0
  2. package/dist/_extends.d.ts.map +1 -1
  3. package/dist/_extends.js +9 -0
  4. package/dist/_extends.js.map +1 -1
  5. package/dist/_shared/components.d.ts +117 -0
  6. package/dist/_shared/components.d.ts.map +1 -1
  7. package/dist/acl/_shared/0.3/acl-entry.d.ts +24 -0
  8. package/dist/acl/_shared/0.3/acl-entry.d.ts.map +1 -0
  9. package/dist/acl/_shared/0.3/acl-entry.js +6 -0
  10. package/dist/acl/_shared/0.3/acl-entry.js.map +1 -0
  11. package/dist/acl/change-role/0.1/payload.d.ts +4 -4
  12. package/dist/acl/change-role/0.1/payload.js +1 -1
  13. package/dist/acl/change-role/0.2/payload.d.ts +14 -2
  14. package/dist/acl/change-role/0.2/payload.d.ts.map +1 -1
  15. package/dist/acl/change-role/0.2/payload.js +1 -1
  16. package/dist/acl/change-role/0.2/payload.js.map +1 -1
  17. package/dist/acl/change-role/0.3/payload.d.ts +1925 -0
  18. package/dist/acl/change-role/0.3/payload.d.ts.map +1 -0
  19. package/dist/acl/change-role/0.3/payload.js +1109 -0
  20. package/dist/acl/change-role/0.3/payload.js.map +1 -0
  21. package/dist/acl/grant/0.1/payload.d.ts +4 -4
  22. package/dist/acl/grant/0.1/payload.js +1 -1
  23. package/dist/acl/grant/0.2/payload.d.ts +14 -2
  24. package/dist/acl/grant/0.2/payload.d.ts.map +1 -1
  25. package/dist/acl/grant/0.2/payload.js +1 -1
  26. package/dist/acl/grant/0.2/payload.js.map +1 -1
  27. package/dist/acl/grant/0.3/payload.d.ts +1895 -0
  28. package/dist/acl/grant/0.3/payload.d.ts.map +1 -0
  29. package/dist/acl/grant/0.3/payload.js +1096 -0
  30. package/dist/acl/grant/0.3/payload.js.map +1 -0
  31. package/dist/acl/list/0.1/payload.d.ts +4 -4
  32. package/dist/acl/list/0.1/payload.js +1 -1
  33. package/dist/acl/list/0.2/payload.d.ts +4 -4
  34. package/dist/acl/list/0.2/payload.js +1 -1
  35. package/dist/acl/list/0.3/payload.d.ts +14 -2
  36. package/dist/acl/list/0.3/payload.d.ts.map +1 -1
  37. package/dist/acl/list/0.3/payload.js +1 -1
  38. package/dist/acl/list/0.3/payload.js.map +1 -1
  39. package/dist/acl/list/0.4/payload.d.ts +2079 -0
  40. package/dist/acl/list/0.4/payload.d.ts.map +1 -0
  41. package/dist/acl/list/0.4/payload.js +1185 -0
  42. package/dist/acl/list/0.4/payload.js.map +1 -0
  43. package/dist/acl/revoke/0.1/payload.d.ts +4 -4
  44. package/dist/acl/revoke/0.1/payload.js +1 -1
  45. package/dist/acl/revoke/0.2/payload.d.ts +14 -2
  46. package/dist/acl/revoke/0.2/payload.d.ts.map +1 -1
  47. package/dist/acl/revoke/0.2/payload.js +1 -1
  48. package/dist/acl/revoke/0.2/payload.js.map +1 -1
  49. package/dist/acl/revoke/0.3/payload.d.ts +2090 -0
  50. package/dist/acl/revoke/0.3/payload.d.ts.map +1 -0
  51. package/dist/acl/revoke/0.3/payload.js +1206 -0
  52. package/dist/acl/revoke/0.3/payload.js.map +1 -0
  53. package/dist/acl/show/0.1/payload.d.ts +4 -4
  54. package/dist/acl/show/0.1/payload.js +1 -1
  55. package/dist/acl/show/0.2/payload.d.ts +14 -2
  56. package/dist/acl/show/0.2/payload.d.ts.map +1 -1
  57. package/dist/acl/show/0.2/payload.js +1 -1
  58. package/dist/acl/show/0.2/payload.js.map +1 -1
  59. package/dist/acl/show/0.3/payload.d.ts +1935 -0
  60. package/dist/acl/show/0.3/payload.d.ts.map +1 -0
  61. package/dist/acl/show/0.3/payload.js +1122 -0
  62. package/dist/acl/show/0.3/payload.js.map +1 -0
  63. package/dist/acl/update/0.1/payload.d.ts +4 -4
  64. package/dist/acl/update/0.1/payload.js +1 -1
  65. package/dist/acl/update/0.2/payload.d.ts +14 -2
  66. package/dist/acl/update/0.2/payload.d.ts.map +1 -1
  67. package/dist/acl/update/0.2/payload.js +1 -1
  68. package/dist/acl/update/0.2/payload.js.map +1 -1
  69. package/dist/acl/update/0.3/payload.d.ts +2042 -0
  70. package/dist/acl/update/0.3/payload.d.ts.map +1 -0
  71. package/dist/acl/update/0.3/payload.js +1163 -0
  72. package/dist/acl/update/0.3/payload.js.map +1 -0
  73. package/dist/index.d.ts +48 -0
  74. package/dist/index.d.ts.map +1 -1
  75. package/dist/index.js +48 -0
  76. package/dist/index.js.map +1 -1
  77. package/dist/rooms/_shared/0.2/room.d.ts +1 -1
  78. package/dist/rooms/_shared/0.2/room.d.ts.map +1 -1
  79. package/dist/rooms/keys/file-key/0.1/payload.d.ts +4 -4
  80. package/dist/rooms/keys/file-key/0.1/payload.js +1 -1
  81. package/dist/rooms/keys/file-key/0.2/payload.d.ts +14 -2
  82. package/dist/rooms/keys/file-key/0.2/payload.d.ts.map +1 -1
  83. package/dist/rooms/keys/file-key/0.2/payload.js +1 -1
  84. package/dist/rooms/keys/file-key/0.2/payload.js.map +1 -1
  85. package/dist/rooms/keys/file-key/0.3/payload.d.ts +396 -0
  86. package/dist/rooms/keys/file-key/0.3/payload.d.ts.map +1 -0
  87. package/dist/rooms/keys/file-key/0.3/payload.js +223 -0
  88. package/dist/rooms/keys/file-key/0.3/payload.js.map +1 -0
  89. package/dist/rooms/keys/open/0.1/payload.d.ts +4 -4
  90. package/dist/rooms/keys/open/0.1/payload.js +1 -1
  91. package/dist/rooms/keys/open/0.2/payload.d.ts +14 -2
  92. package/dist/rooms/keys/open/0.2/payload.d.ts.map +1 -1
  93. package/dist/rooms/keys/open/0.2/payload.js +1 -1
  94. package/dist/rooms/keys/open/0.2/payload.js.map +1 -1
  95. package/dist/rooms/keys/open/0.3/payload.d.ts +413 -0
  96. package/dist/rooms/keys/open/0.3/payload.d.ts.map +1 -0
  97. package/dist/rooms/keys/open/0.3/payload.js +227 -0
  98. package/dist/rooms/keys/open/0.3/payload.js.map +1 -0
  99. package/dist/rooms/keys/read/0.1/payload.d.ts +4 -4
  100. package/dist/rooms/keys/read/0.1/payload.js +1 -1
  101. package/dist/rooms/keys/read/0.2/payload.d.ts +14 -2
  102. package/dist/rooms/keys/read/0.2/payload.d.ts.map +1 -1
  103. package/dist/rooms/keys/read/0.2/payload.js +1 -1
  104. package/dist/rooms/keys/read/0.2/payload.js.map +1 -1
  105. package/dist/rooms/keys/read/0.3/payload.d.ts +1363 -0
  106. package/dist/rooms/keys/read/0.3/payload.d.ts.map +1 -0
  107. package/dist/rooms/keys/read/0.3/payload.js +731 -0
  108. package/dist/rooms/keys/read/0.3/payload.js.map +1 -0
  109. package/dist/rooms/owner/issue-authority/0.2/payload.d.ts +13 -2
  110. package/dist/rooms/owner/issue-authority/0.2/payload.d.ts.map +1 -1
  111. package/dist/rooms/owner/issue-authority/0.2/payload.js +1 -1
  112. package/dist/rooms/owner/issue-authority/0.2/payload.js.map +1 -1
  113. package/dist/rooms/owner/issue-authority/0.3/payload.d.ts +557 -0
  114. package/dist/rooms/owner/issue-authority/0.3/payload.d.ts.map +1 -0
  115. package/dist/rooms/owner/issue-authority/0.3/payload.js +322 -0
  116. package/dist/rooms/owner/issue-authority/0.3/payload.js.map +1 -0
  117. package/dist/rooms/records/get/0.1/payload.d.ts +4 -4
  118. package/dist/rooms/records/get/0.1/payload.js +1 -1
  119. package/dist/rooms/records/get/0.2/payload.d.ts +4 -4
  120. package/dist/rooms/records/get/0.2/payload.js +1 -1
  121. package/dist/rooms/records/get/0.3/payload.d.ts +13 -2
  122. package/dist/rooms/records/get/0.3/payload.d.ts.map +1 -1
  123. package/dist/rooms/records/get/0.3/payload.js +1 -1
  124. package/dist/rooms/records/get/0.3/payload.js.map +1 -1
  125. package/dist/rooms/records/get/0.4/payload.d.ts +1140 -0
  126. package/dist/rooms/records/get/0.4/payload.d.ts.map +1 -0
  127. package/dist/rooms/records/get/0.4/payload.js +613 -0
  128. package/dist/rooms/records/get/0.4/payload.js.map +1 -0
  129. package/dist/vault/sign-trust-task/0.2/payload.d.ts +5 -5
  130. package/dist/vault/sign-trust-task/0.2/payload.js +2 -2
  131. package/dist/vta/_shared/0.1/memory-record.d.ts +1 -1
  132. package/dist/vta/_shared/0.1/memory-record.d.ts.map +1 -1
  133. package/dist/vta/memory/delete/0.1/payload.d.ts +4 -4
  134. package/dist/vta/memory/delete/0.1/payload.js +1 -1
  135. package/dist/vta/memory/delete/0.2/payload.d.ts +14 -2
  136. package/dist/vta/memory/delete/0.2/payload.d.ts.map +1 -1
  137. package/dist/vta/memory/delete/0.2/payload.js +1 -1
  138. package/dist/vta/memory/delete/0.2/payload.js.map +1 -1
  139. package/dist/vta/memory/delete/0.3/payload.d.ts +491 -0
  140. package/dist/vta/memory/delete/0.3/payload.d.ts.map +1 -0
  141. package/dist/vta/memory/delete/0.3/payload.js +266 -0
  142. package/dist/vta/memory/delete/0.3/payload.js.map +1 -0
  143. package/dist/vta/memory/get/0.1/payload.d.ts +14 -2
  144. package/dist/vta/memory/get/0.1/payload.d.ts.map +1 -1
  145. package/dist/vta/memory/get/0.1/payload.js +1 -1
  146. package/dist/vta/memory/get/0.1/payload.js.map +1 -1
  147. package/dist/vta/memory/get/0.2/payload.d.ts +722 -0
  148. package/dist/vta/memory/get/0.2/payload.d.ts.map +1 -0
  149. package/dist/vta/memory/get/0.2/payload.js +391 -0
  150. package/dist/vta/memory/get/0.2/payload.js.map +1 -0
  151. package/dist/vta/memory/list/0.1/payload.d.ts +4 -4
  152. package/dist/vta/memory/list/0.1/payload.js +1 -1
  153. package/dist/vta/memory/list/0.2/payload.d.ts +14 -2
  154. package/dist/vta/memory/list/0.2/payload.d.ts.map +1 -1
  155. package/dist/vta/memory/list/0.2/payload.js +1 -1
  156. package/dist/vta/memory/list/0.2/payload.js.map +1 -1
  157. package/dist/vta/memory/list/0.3/payload.d.ts +769 -0
  158. package/dist/vta/memory/list/0.3/payload.d.ts.map +1 -0
  159. package/dist/vta/memory/list/0.3/payload.js +405 -0
  160. package/dist/vta/memory/list/0.3/payload.js.map +1 -0
  161. package/dist/vta/memory/put/0.1/payload.d.ts +4 -4
  162. package/dist/vta/memory/put/0.1/payload.js +1 -1
  163. package/dist/vta/memory/put/0.2/payload.d.ts +14 -2
  164. package/dist/vta/memory/put/0.2/payload.d.ts.map +1 -1
  165. package/dist/vta/memory/put/0.2/payload.js +1 -1
  166. package/dist/vta/memory/put/0.2/payload.js.map +1 -1
  167. package/dist/vta/memory/put/0.3/payload.d.ts +566 -0
  168. package/dist/vta/memory/put/0.3/payload.d.ts.map +1 -0
  169. package/dist/vta/memory/put/0.3/payload.js +306 -0
  170. package/dist/vta/memory/put/0.3/payload.js.map +1 -0
  171. package/package.json +1 -1
  172. package/src/_extends.ts +9 -0
  173. package/src/_shared/components.ts +117 -0
  174. package/src/acl/_shared/0.3/acl-entry.ts +25 -0
  175. package/src/acl/change-role/0.1/payload.ts +5 -5
  176. package/src/acl/change-role/0.2/payload.ts +15 -3
  177. package/src/acl/change-role/0.3/payload.ts +1167 -0
  178. package/src/acl/grant/0.1/payload.ts +5 -5
  179. package/src/acl/grant/0.2/payload.ts +15 -3
  180. package/src/acl/grant/0.3/payload.ts +1146 -0
  181. package/src/acl/list/0.1/payload.ts +5 -5
  182. package/src/acl/list/0.2/payload.ts +5 -5
  183. package/src/acl/list/0.3/payload.ts +15 -3
  184. package/src/acl/list/0.4/payload.ts +1267 -0
  185. package/src/acl/revoke/0.1/payload.ts +5 -5
  186. package/src/acl/revoke/0.2/payload.ts +15 -3
  187. package/src/acl/revoke/0.3/payload.ts +1278 -0
  188. package/src/acl/show/0.1/payload.ts +5 -5
  189. package/src/acl/show/0.2/payload.ts +15 -3
  190. package/src/acl/show/0.3/payload.ts +1172 -0
  191. package/src/acl/update/0.1/payload.ts +5 -5
  192. package/src/acl/update/0.2/payload.ts +15 -3
  193. package/src/acl/update/0.3/payload.ts +1258 -0
  194. package/src/index.ts +48 -0
  195. package/src/rooms/_shared/0.2/room.ts +1 -1
  196. package/src/rooms/keys/file-key/0.1/payload.ts +5 -5
  197. package/src/rooms/keys/file-key/0.2/payload.ts +15 -3
  198. package/src/rooms/keys/file-key/0.3/payload.ts +286 -0
  199. package/src/rooms/keys/open/0.1/payload.ts +5 -5
  200. package/src/rooms/keys/open/0.2/payload.ts +15 -3
  201. package/src/rooms/keys/open/0.3/payload.ts +299 -0
  202. package/src/rooms/keys/read/0.1/payload.ts +5 -5
  203. package/src/rooms/keys/read/0.2/payload.ts +15 -3
  204. package/src/rooms/keys/read/0.3/payload.ts +901 -0
  205. package/src/rooms/owner/issue-authority/0.2/payload.ts +14 -3
  206. package/src/rooms/owner/issue-authority/0.3/payload.ts +388 -0
  207. package/src/rooms/records/get/0.1/payload.ts +5 -5
  208. package/src/rooms/records/get/0.2/payload.ts +5 -5
  209. package/src/rooms/records/get/0.3/payload.ts +14 -3
  210. package/src/rooms/records/get/0.4/payload.ts +730 -0
  211. package/src/vault/sign-trust-task/0.2/payload.ts +3 -3
  212. package/src/vta/_shared/0.1/memory-record.ts +1 -1
  213. package/src/vta/memory/delete/0.1/payload.ts +5 -5
  214. package/src/vta/memory/delete/0.2/payload.ts +15 -3
  215. package/src/vta/memory/delete/0.3/payload.ts +334 -0
  216. package/src/vta/memory/get/0.1/payload.ts +15 -3
  217. package/src/vta/memory/get/0.2/payload.ts +460 -0
  218. package/src/vta/memory/list/0.1/payload.ts +5 -5
  219. package/src/vta/memory/list/0.2/payload.ts +15 -3
  220. package/src/vta/memory/list/0.3/payload.ts +491 -0
  221. package/src/vta/memory/put/0.1/payload.ts +5 -5
  222. package/src/vta/memory/put/0.2/payload.ts +15 -3
  223. package/src/vta/memory/put/0.3/payload.ts +379 -0
@@ -0,0 +1,413 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/keys/open/0.3/payload.schema.json
4
+ */
5
+ import type { Ext, Purpose_AclV0_3 as Purpose, Purpose_AclV0_31, Purpose_AclV0_32, RecordPurpose } from "../../../../_shared/components.js";
6
+ /**
7
+ * An agent asks the party holding its principal's room keys to open one sealed record. The key never crosses to the agent: this is a decryption oracle, not a key-release call.
8
+ */
9
+ export interface RoomsKeysOpenPayload {
10
+ /**
11
+ * The room the record belongs to. Part of the record's associated data, so a caller naming the wrong room gets an authentication failure rather than someone else's plaintext.
12
+ */
13
+ roomId: string;
14
+ /**
15
+ * The record's key within the room.
16
+ */
17
+ key: string;
18
+ /**
19
+ * The record's version. Bound into the associated data, so a record served at a different version does not open.
20
+ */
21
+ version: number;
22
+ /**
23
+ * The sealed record exactly as the host returned it.
24
+ */
25
+ sealed: {
26
+ /**
27
+ * base64url.
28
+ */
29
+ ciphertext: string;
30
+ /**
31
+ * base64url.
32
+ */
33
+ nonce: string;
34
+ /**
35
+ * The epoch it was sealed under. The oracle refuses an epoch it holds no key for rather than guessing.
36
+ */
37
+ epoch: number;
38
+ };
39
+ /**
40
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
41
+ */
42
+ ext?: Ext;
43
+ /**
44
+ * OPTIONAL. The one purpose the caller will use the content this request discloses for (VTI-ACL-103), as `RecordPurpose` defines it. A purpose not granted is refused with `purposeNotGranted`. May be omitted where exactly one purpose is granted, or `any`.
45
+ */
46
+ purpose?: RecordPurpose;
47
+ }
48
+ /**
49
+ * Success response to rooms/keys/open. Type https://trusttasks.org/spec/rooms/keys/open/0.2#response.
50
+ */
51
+ export interface RoomsKeysOpenResponsePayload {
52
+ /**
53
+ * The opened record, base64url. The only thing that crosses back — never the key.
54
+ */
55
+ plaintext: string;
56
+ ext?: Ext;
57
+ }
58
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
59
+ export type { Ext, Purpose, Purpose_AclV0_31, Purpose_AclV0_32, RecordPurpose };
60
+ /** Trust Task type URI. */
61
+ export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/keys/open/0.3";
62
+ /**
63
+ * The earlier version of this specification that this one declares it
64
+ * extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
65
+ * `null`. Only the direct declaration — follow the chain with
66
+ * `extendsChain` / `readForSpec`.
67
+ */
68
+ export declare const EXTENDS: string | null;
69
+ /**
70
+ * Why this version is deprecated, or `null` while it is current. A
71
+ * superseded or retired version is still supported, and is withdrawn from
72
+ * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
73
+ * Versions").
74
+ */
75
+ export declare const DEPRECATION: string | null;
76
+ /** Stable alias for this specification's request payload shape. */
77
+ export type Payload = RoomsKeysOpenPayload;
78
+ /** Trust Task response type URI (request type URI + "#response"). */
79
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/rooms/keys/open/0.3#response";
80
+ /** Stable alias for this specification's success-response payload shape. */
81
+ export type Response = RoomsKeysOpenResponsePayload;
82
+ /**
83
+ * This specification's payload schema, as a value.
84
+ *
85
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
86
+ * rather than only as a `.json` file because TypeScript types are erased
87
+ * at runtime: without a schema a consumer has nothing to validate, and
88
+ * every REQUIRED payload member is optional in practice. Cross-file
89
+ * `$ref`s are already inlined, so it needs no resolver.
90
+ */
91
+ export declare const PAYLOAD_SCHEMA: {
92
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
93
+ readonly $id: "https://trusttasks.org/spec/rooms/keys/open/0.3";
94
+ readonly title: "Rooms Keys Open — payload";
95
+ readonly description: "An agent asks the party holding its principal's room keys to open one sealed record. The key never crosses to the agent: this is a decryption oracle, not a key-release call.";
96
+ readonly type: "object";
97
+ readonly additionalProperties: false;
98
+ readonly required: readonly ["roomId", "key", "version", "sealed"];
99
+ readonly properties: {
100
+ readonly roomId: {
101
+ readonly type: "string";
102
+ readonly description: "The room the record belongs to. Part of the record's associated data, so a caller naming the wrong room gets an authentication failure rather than someone else's plaintext.";
103
+ };
104
+ readonly key: {
105
+ readonly type: "string";
106
+ readonly maxLength: 512;
107
+ readonly description: "The record's key within the room.";
108
+ };
109
+ readonly version: {
110
+ readonly type: "integer";
111
+ readonly minimum: 1;
112
+ readonly description: "The record's version. Bound into the associated data, so a record served at a different version does not open.";
113
+ };
114
+ readonly sealed: {
115
+ readonly type: "object";
116
+ readonly additionalProperties: false;
117
+ readonly required: readonly ["ciphertext", "nonce", "epoch"];
118
+ readonly description: "The sealed record exactly as the host returned it.";
119
+ readonly properties: {
120
+ readonly ciphertext: {
121
+ readonly type: "string";
122
+ readonly description: "base64url.";
123
+ };
124
+ readonly nonce: {
125
+ readonly type: "string";
126
+ readonly description: "base64url.";
127
+ };
128
+ readonly epoch: {
129
+ readonly type: "integer";
130
+ readonly minimum: 1;
131
+ readonly description: "The epoch it was sealed under. The oracle refuses an epoch it holds no key for rather than guessing.";
132
+ };
133
+ };
134
+ };
135
+ readonly ext: {
136
+ readonly $ref: "#/$defs/Ext";
137
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
138
+ };
139
+ readonly purpose: {
140
+ readonly $ref: "#/$defs/RecordPurpose";
141
+ readonly description: "OPTIONAL. The one purpose the caller will use the content this request discloses for (VTI-ACL-103), as `RecordPurpose` defines it. A purpose not granted is refused with `purposeNotGranted`. May be omitted where exactly one purpose is granted, or `any`.";
142
+ };
143
+ };
144
+ readonly $defs: {
145
+ readonly Response: {
146
+ readonly $anchor: "response";
147
+ readonly title: "Rooms Keys Open — response payload";
148
+ readonly description: "Success response to rooms/keys/open. Type https://trusttasks.org/spec/rooms/keys/open/0.2#response.";
149
+ readonly type: "object";
150
+ readonly additionalProperties: false;
151
+ readonly required: readonly ["plaintext"];
152
+ readonly properties: {
153
+ readonly plaintext: {
154
+ readonly type: "string";
155
+ readonly description: "The opened record, base64url. The only thing that crosses back — never the key.";
156
+ };
157
+ readonly ext: {
158
+ readonly $ref: "#/$defs/Ext";
159
+ };
160
+ };
161
+ };
162
+ readonly Ext: {
163
+ readonly title: "Ext";
164
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
165
+ readonly type: "object";
166
+ readonly minProperties: 1;
167
+ readonly additionalProperties: true;
168
+ readonly propertyNames: {
169
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
170
+ };
171
+ };
172
+ readonly RecordPurpose: {
173
+ readonly title: "RecordPurpose";
174
+ readonly description: "The one purpose for which a caller will use room content a request discloses (VTI-ACL-103): a name registered in the VTI specification's purpose registry (`personalisation`, `taskExecution`, `analytics`, `modelTraining`) or an absolute IRI. Granted only as the caller's authority grants it — `any` grants every purpose but `modelTraining` — refused otherwise (`purposeNotGranted`), and recorded with the read. Distinct from `PermittedUse`, which is what a record's author permits and is a statement, not a grant.";
175
+ readonly $ref: "#/$defs/Purpose";
176
+ };
177
+ readonly Purpose: {
178
+ readonly title: "Purpose";
179
+ readonly description: "What content is used for: a lowerCamelCase name registered in the VTI specification's purpose registry (Appendix H) — `personalisation`, `taskExecution`, `analytics`, `modelTraining` at the time of writing — or an absolute IRI naming a purpose defined elsewhere, such as a purpose of the W3C Data Privacy Vocabulary (`https://w3id.org/dpv#ServicePersonalisation`). Compared by exact string equality: a consumer MUST NOT treat a purpose it does not recognise as equal to any other, and grants only a request naming exactly a listed purpose (VTI-ACL-109). A registered name is never an IRI, because it contains no `:`.";
180
+ readonly type: "string";
181
+ readonly maxLength: 2048;
182
+ readonly anyOf: readonly [{
183
+ readonly pattern: "^[a-z][a-zA-Z0-9]{0,63}$";
184
+ }, {
185
+ readonly pattern: "^[a-zA-Z][a-zA-Z0-9+.-]*:[^\\s]+$";
186
+ }];
187
+ };
188
+ };
189
+ };
190
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
191
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
192
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
193
+ readonly $ref: "#/$defs/Response";
194
+ readonly $defs: {
195
+ readonly Response: {
196
+ readonly $anchor: "response";
197
+ readonly title: "Rooms Keys Open — response payload";
198
+ readonly description: "Success response to rooms/keys/open. Type https://trusttasks.org/spec/rooms/keys/open/0.2#response.";
199
+ readonly type: "object";
200
+ readonly additionalProperties: false;
201
+ readonly required: readonly ["plaintext"];
202
+ readonly properties: {
203
+ readonly plaintext: {
204
+ readonly type: "string";
205
+ readonly description: "The opened record, base64url. The only thing that crosses back — never the key.";
206
+ };
207
+ readonly ext: {
208
+ readonly $ref: "#/$defs/Ext";
209
+ };
210
+ };
211
+ };
212
+ readonly Ext: {
213
+ readonly title: "Ext";
214
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
215
+ readonly type: "object";
216
+ readonly minProperties: 1;
217
+ readonly additionalProperties: true;
218
+ readonly propertyNames: {
219
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
220
+ };
221
+ };
222
+ readonly RecordPurpose: {
223
+ readonly title: "RecordPurpose";
224
+ readonly description: "The one purpose for which a caller will use room content a request discloses (VTI-ACL-103): a name registered in the VTI specification's purpose registry (`personalisation`, `taskExecution`, `analytics`, `modelTraining`) or an absolute IRI. Granted only as the caller's authority grants it — `any` grants every purpose but `modelTraining` — refused otherwise (`purposeNotGranted`), and recorded with the read. Distinct from `PermittedUse`, which is what a record's author permits and is a statement, not a grant.";
225
+ readonly $ref: "#/$defs/Purpose";
226
+ };
227
+ readonly Purpose: {
228
+ readonly title: "Purpose";
229
+ readonly description: "What content is used for: a lowerCamelCase name registered in the VTI specification's purpose registry (Appendix H) — `personalisation`, `taskExecution`, `analytics`, `modelTraining` at the time of writing — or an absolute IRI naming a purpose defined elsewhere, such as a purpose of the W3C Data Privacy Vocabulary (`https://w3id.org/dpv#ServicePersonalisation`). Compared by exact string equality: a consumer MUST NOT treat a purpose it does not recognise as equal to any other, and grants only a request naming exactly a listed purpose (VTI-ACL-109). A registered name is never an IRI, because it contains no `:`.";
230
+ readonly type: "string";
231
+ readonly maxLength: 2048;
232
+ readonly anyOf: readonly [{
233
+ readonly pattern: "^[a-z][a-zA-Z0-9]{0,63}$";
234
+ }, {
235
+ readonly pattern: "^[a-zA-Z][a-zA-Z0-9+.-]*:[^\\s]+$";
236
+ }];
237
+ };
238
+ };
239
+ };
240
+ /**
241
+ * SPEC.md §7.2 policy for the request variant, from this specification's
242
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
243
+ * per-specification and cannot be derived from the document alone, and
244
+ * item 2 needs the schema this carries.
245
+ */
246
+ export declare const SPEC: {
247
+ readonly typeUri: "https://trusttasks.org/spec/rooms/keys/open/0.3";
248
+ readonly isBearer: false;
249
+ readonly isProofRequired: true;
250
+ readonly isRecipientRequired: true;
251
+ readonly isIssuedAtRequired: true;
252
+ readonly payloadSchema: {
253
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
254
+ readonly $id: "https://trusttasks.org/spec/rooms/keys/open/0.3";
255
+ readonly title: "Rooms Keys Open — payload";
256
+ readonly description: "An agent asks the party holding its principal's room keys to open one sealed record. The key never crosses to the agent: this is a decryption oracle, not a key-release call.";
257
+ readonly type: "object";
258
+ readonly additionalProperties: false;
259
+ readonly required: readonly ["roomId", "key", "version", "sealed"];
260
+ readonly properties: {
261
+ readonly roomId: {
262
+ readonly type: "string";
263
+ readonly description: "The room the record belongs to. Part of the record's associated data, so a caller naming the wrong room gets an authentication failure rather than someone else's plaintext.";
264
+ };
265
+ readonly key: {
266
+ readonly type: "string";
267
+ readonly maxLength: 512;
268
+ readonly description: "The record's key within the room.";
269
+ };
270
+ readonly version: {
271
+ readonly type: "integer";
272
+ readonly minimum: 1;
273
+ readonly description: "The record's version. Bound into the associated data, so a record served at a different version does not open.";
274
+ };
275
+ readonly sealed: {
276
+ readonly type: "object";
277
+ readonly additionalProperties: false;
278
+ readonly required: readonly ["ciphertext", "nonce", "epoch"];
279
+ readonly description: "The sealed record exactly as the host returned it.";
280
+ readonly properties: {
281
+ readonly ciphertext: {
282
+ readonly type: "string";
283
+ readonly description: "base64url.";
284
+ };
285
+ readonly nonce: {
286
+ readonly type: "string";
287
+ readonly description: "base64url.";
288
+ };
289
+ readonly epoch: {
290
+ readonly type: "integer";
291
+ readonly minimum: 1;
292
+ readonly description: "The epoch it was sealed under. The oracle refuses an epoch it holds no key for rather than guessing.";
293
+ };
294
+ };
295
+ };
296
+ readonly ext: {
297
+ readonly $ref: "#/$defs/Ext";
298
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
299
+ };
300
+ readonly purpose: {
301
+ readonly $ref: "#/$defs/RecordPurpose";
302
+ readonly description: "OPTIONAL. The one purpose the caller will use the content this request discloses for (VTI-ACL-103), as `RecordPurpose` defines it. A purpose not granted is refused with `purposeNotGranted`. May be omitted where exactly one purpose is granted, or `any`.";
303
+ };
304
+ };
305
+ readonly $defs: {
306
+ readonly Response: {
307
+ readonly $anchor: "response";
308
+ readonly title: "Rooms Keys Open — response payload";
309
+ readonly description: "Success response to rooms/keys/open. Type https://trusttasks.org/spec/rooms/keys/open/0.2#response.";
310
+ readonly type: "object";
311
+ readonly additionalProperties: false;
312
+ readonly required: readonly ["plaintext"];
313
+ readonly properties: {
314
+ readonly plaintext: {
315
+ readonly type: "string";
316
+ readonly description: "The opened record, base64url. The only thing that crosses back — never the key.";
317
+ };
318
+ readonly ext: {
319
+ readonly $ref: "#/$defs/Ext";
320
+ };
321
+ };
322
+ };
323
+ readonly Ext: {
324
+ readonly title: "Ext";
325
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
326
+ readonly type: "object";
327
+ readonly minProperties: 1;
328
+ readonly additionalProperties: true;
329
+ readonly propertyNames: {
330
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
331
+ };
332
+ };
333
+ readonly RecordPurpose: {
334
+ readonly title: "RecordPurpose";
335
+ readonly description: "The one purpose for which a caller will use room content a request discloses (VTI-ACL-103): a name registered in the VTI specification's purpose registry (`personalisation`, `taskExecution`, `analytics`, `modelTraining`) or an absolute IRI. Granted only as the caller's authority grants it — `any` grants every purpose but `modelTraining` — refused otherwise (`purposeNotGranted`), and recorded with the read. Distinct from `PermittedUse`, which is what a record's author permits and is a statement, not a grant.";
336
+ readonly $ref: "#/$defs/Purpose";
337
+ };
338
+ readonly Purpose: {
339
+ readonly title: "Purpose";
340
+ readonly description: "What content is used for: a lowerCamelCase name registered in the VTI specification's purpose registry (Appendix H) — `personalisation`, `taskExecution`, `analytics`, `modelTraining` at the time of writing — or an absolute IRI naming a purpose defined elsewhere, such as a purpose of the W3C Data Privacy Vocabulary (`https://w3id.org/dpv#ServicePersonalisation`). Compared by exact string equality: a consumer MUST NOT treat a purpose it does not recognise as equal to any other, and grants only a request naming exactly a listed purpose (VTI-ACL-109). A registered name is never an IRI, because it contains no `:`.";
341
+ readonly type: "string";
342
+ readonly maxLength: 2048;
343
+ readonly anyOf: readonly [{
344
+ readonly pattern: "^[a-z][a-zA-Z0-9]{0,63}$";
345
+ }, {
346
+ readonly pattern: "^[a-zA-Z][a-zA-Z0-9+.-]*:[^\\s]+$";
347
+ }];
348
+ };
349
+ };
350
+ };
351
+ };
352
+ /**
353
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
354
+ * tracks the *issuer* party's requirement because a response swaps the
355
+ * parties (§7.3 item 5).
356
+ */
357
+ export declare const RESPONSE_SPEC: {
358
+ readonly typeUri: "https://trusttasks.org/spec/rooms/keys/open/0.3#response";
359
+ readonly isBearer: false;
360
+ readonly isProofRequired: true;
361
+ readonly isRecipientRequired: true;
362
+ readonly isIssuedAtRequired: true;
363
+ readonly payloadSchema: {
364
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
365
+ readonly $ref: "#/$defs/Response";
366
+ readonly $defs: {
367
+ readonly Response: {
368
+ readonly $anchor: "response";
369
+ readonly title: "Rooms Keys Open — response payload";
370
+ readonly description: "Success response to rooms/keys/open. Type https://trusttasks.org/spec/rooms/keys/open/0.2#response.";
371
+ readonly type: "object";
372
+ readonly additionalProperties: false;
373
+ readonly required: readonly ["plaintext"];
374
+ readonly properties: {
375
+ readonly plaintext: {
376
+ readonly type: "string";
377
+ readonly description: "The opened record, base64url. The only thing that crosses back — never the key.";
378
+ };
379
+ readonly ext: {
380
+ readonly $ref: "#/$defs/Ext";
381
+ };
382
+ };
383
+ };
384
+ readonly Ext: {
385
+ readonly title: "Ext";
386
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
387
+ readonly type: "object";
388
+ readonly minProperties: 1;
389
+ readonly additionalProperties: true;
390
+ readonly propertyNames: {
391
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
392
+ };
393
+ };
394
+ readonly RecordPurpose: {
395
+ readonly title: "RecordPurpose";
396
+ readonly description: "The one purpose for which a caller will use room content a request discloses (VTI-ACL-103): a name registered in the VTI specification's purpose registry (`personalisation`, `taskExecution`, `analytics`, `modelTraining`) or an absolute IRI. Granted only as the caller's authority grants it — `any` grants every purpose but `modelTraining` — refused otherwise (`purposeNotGranted`), and recorded with the read. Distinct from `PermittedUse`, which is what a record's author permits and is a statement, not a grant.";
397
+ readonly $ref: "#/$defs/Purpose";
398
+ };
399
+ readonly Purpose: {
400
+ readonly title: "Purpose";
401
+ readonly description: "What content is used for: a lowerCamelCase name registered in the VTI specification's purpose registry (Appendix H) — `personalisation`, `taskExecution`, `analytics`, `modelTraining` at the time of writing — or an absolute IRI naming a purpose defined elsewhere, such as a purpose of the W3C Data Privacy Vocabulary (`https://w3id.org/dpv#ServicePersonalisation`). Compared by exact string equality: a consumer MUST NOT treat a purpose it does not recognise as equal to any other, and grants only a request naming exactly a listed purpose (VTI-ACL-109). A registered name is never an IRI, because it contains no `:`.";
402
+ readonly type: "string";
403
+ readonly maxLength: 2048;
404
+ readonly anyOf: readonly [{
405
+ readonly pattern: "^[a-z][a-zA-Z0-9]{0,63}$";
406
+ }, {
407
+ readonly pattern: "^[a-zA-Z][a-zA-Z0-9+.-]*:[^\\s]+$";
408
+ }];
409
+ };
410
+ };
411
+ };
412
+ };
413
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/rooms/keys/open/0.3/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,eAAe,IAAI,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAG5I;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,MAAM,EAAE;QACN;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QACnB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;IACV;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AACD;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,GAAG,EAAE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,CAAC;AAEhF,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,iDAA0D,CAAC;AAEnF;;;;;GAKG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,GAAG,IAAY,CAAC;AAE5C;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,GAAG,IAAW,CAAC;AAE/C,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,oBAAoB,CAAC;AAE3C,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,0DAAmE,CAAC;AAErG,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,4BAA4B,CAAC;AAEpD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgHjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqD1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
@@ -0,0 +1,227 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/keys/open/0.3/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/rooms/keys/open/0.3";
7
+ /**
8
+ * The earlier version of this specification that this one declares it
9
+ * extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
10
+ * `null`. Only the direct declaration — follow the chain with
11
+ * `extendsChain` / `readForSpec`.
12
+ */
13
+ export const EXTENDS = "0.2";
14
+ /**
15
+ * Why this version is deprecated, or `null` while it is current. A
16
+ * superseded or retired version is still supported, and is withdrawn from
17
+ * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
18
+ * Versions").
19
+ */
20
+ export const DEPRECATION = null;
21
+ /** Trust Task response type URI (request type URI + "#response"). */
22
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/keys/open/0.3#response";
23
+ /**
24
+ * This specification's payload schema, as a value.
25
+ *
26
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
27
+ * rather than only as a `.json` file because TypeScript types are erased
28
+ * at runtime: without a schema a consumer has nothing to validate, and
29
+ * every REQUIRED payload member is optional in practice. Cross-file
30
+ * `$ref`s are already inlined, so it needs no resolver.
31
+ */
32
+ export const PAYLOAD_SCHEMA = {
33
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
34
+ "$id": "https://trusttasks.org/spec/rooms/keys/open/0.3",
35
+ "title": "Rooms Keys Open — payload",
36
+ "description": "An agent asks the party holding its principal's room keys to open one sealed record. The key never crosses to the agent: this is a decryption oracle, not a key-release call.",
37
+ "type": "object",
38
+ "additionalProperties": false,
39
+ "required": [
40
+ "roomId",
41
+ "key",
42
+ "version",
43
+ "sealed"
44
+ ],
45
+ "properties": {
46
+ "roomId": {
47
+ "type": "string",
48
+ "description": "The room the record belongs to. Part of the record's associated data, so a caller naming the wrong room gets an authentication failure rather than someone else's plaintext."
49
+ },
50
+ "key": {
51
+ "type": "string",
52
+ "maxLength": 512,
53
+ "description": "The record's key within the room."
54
+ },
55
+ "version": {
56
+ "type": "integer",
57
+ "minimum": 1,
58
+ "description": "The record's version. Bound into the associated data, so a record served at a different version does not open."
59
+ },
60
+ "sealed": {
61
+ "type": "object",
62
+ "additionalProperties": false,
63
+ "required": [
64
+ "ciphertext",
65
+ "nonce",
66
+ "epoch"
67
+ ],
68
+ "description": "The sealed record exactly as the host returned it.",
69
+ "properties": {
70
+ "ciphertext": {
71
+ "type": "string",
72
+ "description": "base64url."
73
+ },
74
+ "nonce": {
75
+ "type": "string",
76
+ "description": "base64url."
77
+ },
78
+ "epoch": {
79
+ "type": "integer",
80
+ "minimum": 1,
81
+ "description": "The epoch it was sealed under. The oracle refuses an epoch it holds no key for rather than guessing."
82
+ }
83
+ }
84
+ },
85
+ "ext": {
86
+ "$ref": "#/$defs/Ext",
87
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
88
+ },
89
+ "purpose": {
90
+ "$ref": "#/$defs/RecordPurpose",
91
+ "description": "OPTIONAL. The one purpose the caller will use the content this request discloses for (VTI-ACL-103), as `RecordPurpose` defines it. A purpose not granted is refused with `purposeNotGranted`. May be omitted where exactly one purpose is granted, or `any`."
92
+ }
93
+ },
94
+ "$defs": {
95
+ "Response": {
96
+ "$anchor": "response",
97
+ "title": "Rooms Keys Open — response payload",
98
+ "description": "Success response to rooms/keys/open. Type https://trusttasks.org/spec/rooms/keys/open/0.2#response.",
99
+ "type": "object",
100
+ "additionalProperties": false,
101
+ "required": [
102
+ "plaintext"
103
+ ],
104
+ "properties": {
105
+ "plaintext": {
106
+ "type": "string",
107
+ "description": "The opened record, base64url. The only thing that crosses back — never the key."
108
+ },
109
+ "ext": {
110
+ "$ref": "#/$defs/Ext"
111
+ }
112
+ }
113
+ },
114
+ "Ext": {
115
+ "title": "Ext",
116
+ "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.",
117
+ "type": "object",
118
+ "minProperties": 1,
119
+ "additionalProperties": true,
120
+ "propertyNames": {
121
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
122
+ }
123
+ },
124
+ "RecordPurpose": {
125
+ "title": "RecordPurpose",
126
+ "description": "The one purpose for which a caller will use room content a request discloses (VTI-ACL-103): a name registered in the VTI specification's purpose registry (`personalisation`, `taskExecution`, `analytics`, `modelTraining`) or an absolute IRI. Granted only as the caller's authority grants it — `any` grants every purpose but `modelTraining` — refused otherwise (`purposeNotGranted`), and recorded with the read. Distinct from `PermittedUse`, which is what a record's author permits and is a statement, not a grant.",
127
+ "$ref": "#/$defs/Purpose"
128
+ },
129
+ "Purpose": {
130
+ "title": "Purpose",
131
+ "description": "What content is used for: a lowerCamelCase name registered in the VTI specification's purpose registry (Appendix H) — `personalisation`, `taskExecution`, `analytics`, `modelTraining` at the time of writing — or an absolute IRI naming a purpose defined elsewhere, such as a purpose of the W3C Data Privacy Vocabulary (`https://w3id.org/dpv#ServicePersonalisation`). Compared by exact string equality: a consumer MUST NOT treat a purpose it does not recognise as equal to any other, and grants only a request naming exactly a listed purpose (VTI-ACL-109). A registered name is never an IRI, because it contains no `:`.",
132
+ "type": "string",
133
+ "maxLength": 2048,
134
+ "anyOf": [
135
+ {
136
+ "pattern": "^[a-z][a-zA-Z0-9]{0,63}$"
137
+ },
138
+ {
139
+ "pattern": "^[a-zA-Z][a-zA-Z0-9+.-]*:[^\\s]+$"
140
+ }
141
+ ]
142
+ }
143
+ }
144
+ };
145
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
146
+ export const RESPONSE_PAYLOAD_SCHEMA = {
147
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
148
+ "$ref": "#/$defs/Response",
149
+ "$defs": {
150
+ "Response": {
151
+ "$anchor": "response",
152
+ "title": "Rooms Keys Open — response payload",
153
+ "description": "Success response to rooms/keys/open. Type https://trusttasks.org/spec/rooms/keys/open/0.2#response.",
154
+ "type": "object",
155
+ "additionalProperties": false,
156
+ "required": [
157
+ "plaintext"
158
+ ],
159
+ "properties": {
160
+ "plaintext": {
161
+ "type": "string",
162
+ "description": "The opened record, base64url. The only thing that crosses back — never the key."
163
+ },
164
+ "ext": {
165
+ "$ref": "#/$defs/Ext"
166
+ }
167
+ }
168
+ },
169
+ "Ext": {
170
+ "title": "Ext",
171
+ "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.",
172
+ "type": "object",
173
+ "minProperties": 1,
174
+ "additionalProperties": true,
175
+ "propertyNames": {
176
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
177
+ }
178
+ },
179
+ "RecordPurpose": {
180
+ "title": "RecordPurpose",
181
+ "description": "The one purpose for which a caller will use room content a request discloses (VTI-ACL-103): a name registered in the VTI specification's purpose registry (`personalisation`, `taskExecution`, `analytics`, `modelTraining`) or an absolute IRI. Granted only as the caller's authority grants it — `any` grants every purpose but `modelTraining` — refused otherwise (`purposeNotGranted`), and recorded with the read. Distinct from `PermittedUse`, which is what a record's author permits and is a statement, not a grant.",
182
+ "$ref": "#/$defs/Purpose"
183
+ },
184
+ "Purpose": {
185
+ "title": "Purpose",
186
+ "description": "What content is used for: a lowerCamelCase name registered in the VTI specification's purpose registry (Appendix H) — `personalisation`, `taskExecution`, `analytics`, `modelTraining` at the time of writing — or an absolute IRI naming a purpose defined elsewhere, such as a purpose of the W3C Data Privacy Vocabulary (`https://w3id.org/dpv#ServicePersonalisation`). Compared by exact string equality: a consumer MUST NOT treat a purpose it does not recognise as equal to any other, and grants only a request naming exactly a listed purpose (VTI-ACL-109). A registered name is never an IRI, because it contains no `:`.",
187
+ "type": "string",
188
+ "maxLength": 2048,
189
+ "anyOf": [
190
+ {
191
+ "pattern": "^[a-z][a-zA-Z0-9]{0,63}$"
192
+ },
193
+ {
194
+ "pattern": "^[a-zA-Z][a-zA-Z0-9+.-]*:[^\\s]+$"
195
+ }
196
+ ]
197
+ }
198
+ }
199
+ };
200
+ /**
201
+ * SPEC.md §7.2 policy for the request variant, from this specification's
202
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
203
+ * per-specification and cannot be derived from the document alone, and
204
+ * item 2 needs the schema this carries.
205
+ */
206
+ export const SPEC = {
207
+ typeUri: TYPE_URI,
208
+ isBearer: false,
209
+ isProofRequired: true,
210
+ isRecipientRequired: true,
211
+ isIssuedAtRequired: true,
212
+ payloadSchema: PAYLOAD_SCHEMA,
213
+ };
214
+ /**
215
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
216
+ * tracks the *issuer* party's requirement because a response swaps the
217
+ * parties (§7.3 item 5).
218
+ */
219
+ export const RESPONSE_SPEC = {
220
+ typeUri: RESPONSE_TYPE_URI,
221
+ isBearer: false,
222
+ isProofRequired: true,
223
+ isRecipientRequired: true,
224
+ isIssuedAtRequired: true,
225
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
226
+ };
227
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/rooms/keys/open/0.3/payload.ts"],"names":[],"mappings":"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"}