@openvtc/trust-tasks 0.9.0 → 0.11.0

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 (171) hide show
  1. package/dist/index.d.ts +33 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +33 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/vta/_shared/0.1/context.d.ts +11 -0
  6. package/dist/vta/_shared/0.1/context.d.ts.map +1 -0
  7. package/dist/vta/_shared/0.1/context.js +6 -0
  8. package/dist/vta/_shared/0.1/context.js.map +1 -0
  9. package/dist/vta/_shared/0.1/service.d.ts +11 -0
  10. package/dist/vta/_shared/0.1/service.d.ts.map +1 -0
  11. package/dist/vta/_shared/0.1/service.js +6 -0
  12. package/dist/vta/_shared/0.1/service.js.map +1 -0
  13. package/dist/vta/_shared/0.1/webvh-records.d.ts +11 -0
  14. package/dist/vta/_shared/0.1/webvh-records.d.ts.map +1 -0
  15. package/dist/vta/_shared/0.1/webvh-records.js +6 -0
  16. package/dist/vta/_shared/0.1/webvh-records.js.map +1 -0
  17. package/dist/vta/contexts/create/1.0/payload.d.ts +443 -0
  18. package/dist/vta/contexts/create/1.0/payload.d.ts.map +1 -0
  19. package/dist/vta/contexts/create/1.0/payload.js +226 -0
  20. package/dist/vta/contexts/create/1.0/payload.js.map +1 -0
  21. package/dist/vta/contexts/delete/1.0/payload.d.ts +256 -0
  22. package/dist/vta/contexts/delete/1.0/payload.d.ts.map +1 -0
  23. package/dist/vta/contexts/delete/1.0/payload.js +143 -0
  24. package/dist/vta/contexts/delete/1.0/payload.js.map +1 -0
  25. package/dist/vta/contexts/get/1.0/payload.d.ts +405 -0
  26. package/dist/vta/contexts/get/1.0/payload.d.ts.map +1 -0
  27. package/dist/vta/contexts/get/1.0/payload.js +212 -0
  28. package/dist/vta/contexts/get/1.0/payload.js.map +1 -0
  29. package/dist/vta/contexts/list/1.0/payload.d.ts +460 -0
  30. package/dist/vta/contexts/list/1.0/payload.d.ts.map +1 -0
  31. package/dist/vta/contexts/list/1.0/payload.js +237 -0
  32. package/dist/vta/contexts/list/1.0/payload.js.map +1 -0
  33. package/dist/vta/contexts/preview-delete/1.0/payload.d.ts +394 -0
  34. package/dist/vta/contexts/preview-delete/1.0/payload.d.ts.map +1 -0
  35. package/dist/vta/contexts/preview-delete/1.0/payload.js +209 -0
  36. package/dist/vta/contexts/preview-delete/1.0/payload.js.map +1 -0
  37. package/dist/vta/contexts/update/1.0/payload.d.ts +653 -0
  38. package/dist/vta/contexts/update/1.0/payload.d.ts.map +1 -0
  39. package/dist/vta/contexts/update/1.0/payload.js +314 -0
  40. package/dist/vta/contexts/update/1.0/payload.js.map +1 -0
  41. package/dist/vta/contexts/update-did/1.0/payload.d.ts +419 -0
  42. package/dist/vta/contexts/update-did/1.0/payload.d.ts.map +1 -0
  43. package/dist/vta/contexts/update-did/1.0/payload.js +218 -0
  44. package/dist/vta/contexts/update-did/1.0/payload.js.map +1 -0
  45. package/dist/vta/services/disable/1.0/payload.d.ts +438 -0
  46. package/dist/vta/services/disable/1.0/payload.d.ts.map +1 -0
  47. package/dist/vta/services/disable/1.0/payload.js +235 -0
  48. package/dist/vta/services/disable/1.0/payload.js.map +1 -0
  49. package/dist/vta/services/drain/cancel/1.0/payload.d.ts +234 -0
  50. package/dist/vta/services/drain/cancel/1.0/payload.d.ts.map +1 -0
  51. package/dist/vta/services/drain/cancel/1.0/payload.js +131 -0
  52. package/dist/vta/services/drain/cancel/1.0/payload.js.map +1 -0
  53. package/dist/vta/services/drain/list/1.0/payload.d.ts +352 -0
  54. package/dist/vta/services/drain/list/1.0/payload.d.ts.map +1 -0
  55. package/dist/vta/services/drain/list/1.0/payload.js +189 -0
  56. package/dist/vta/services/drain/list/1.0/payload.js.map +1 -0
  57. package/dist/vta/services/enable/1.0/payload.d.ts +511 -0
  58. package/dist/vta/services/enable/1.0/payload.d.ts.map +1 -0
  59. package/dist/vta/services/enable/1.0/payload.js +262 -0
  60. package/dist/vta/services/enable/1.0/payload.js.map +1 -0
  61. package/dist/vta/services/get/1.0/payload.d.ts +399 -0
  62. package/dist/vta/services/get/1.0/payload.d.ts.map +1 -0
  63. package/dist/vta/services/get/1.0/payload.js +219 -0
  64. package/dist/vta/services/get/1.0/payload.js.map +1 -0
  65. package/dist/vta/services/list/1.0/payload.d.ts +409 -0
  66. package/dist/vta/services/list/1.0/payload.d.ts.map +1 -0
  67. package/dist/vta/services/list/1.0/payload.js +221 -0
  68. package/dist/vta/services/list/1.0/payload.js.map +1 -0
  69. package/dist/vta/services/rollback/1.0/payload.d.ts +438 -0
  70. package/dist/vta/services/rollback/1.0/payload.d.ts.map +1 -0
  71. package/dist/vta/services/rollback/1.0/payload.js +235 -0
  72. package/dist/vta/services/rollback/1.0/payload.js.map +1 -0
  73. package/dist/vta/services/update/1.0/payload.d.ts +511 -0
  74. package/dist/vta/services/update/1.0/payload.d.ts.map +1 -0
  75. package/dist/vta/services/update/1.0/payload.js +262 -0
  76. package/dist/vta/services/update/1.0/payload.js.map +1 -0
  77. package/dist/vta/webvh/agent-name/check/1.0/payload.d.ts +301 -0
  78. package/dist/vta/webvh/agent-name/check/1.0/payload.d.ts.map +1 -0
  79. package/dist/vta/webvh/agent-name/check/1.0/payload.js +165 -0
  80. package/dist/vta/webvh/agent-name/check/1.0/payload.js.map +1 -0
  81. package/dist/vta/webvh/agent-name/disable/1.0/payload.d.ts +274 -0
  82. package/dist/vta/webvh/agent-name/disable/1.0/payload.d.ts.map +1 -0
  83. package/dist/vta/webvh/agent-name/disable/1.0/payload.js +153 -0
  84. package/dist/vta/webvh/agent-name/disable/1.0/payload.js.map +1 -0
  85. package/dist/vta/webvh/agent-name/enable/1.0/payload.d.ts +274 -0
  86. package/dist/vta/webvh/agent-name/enable/1.0/payload.d.ts.map +1 -0
  87. package/dist/vta/webvh/agent-name/enable/1.0/payload.js +153 -0
  88. package/dist/vta/webvh/agent-name/enable/1.0/payload.js.map +1 -0
  89. package/dist/vta/webvh/agent-name/list/1.0/payload.d.ts +377 -0
  90. package/dist/vta/webvh/agent-name/list/1.0/payload.d.ts.map +1 -0
  91. package/dist/vta/webvh/agent-name/list/1.0/payload.js +201 -0
  92. package/dist/vta/webvh/agent-name/list/1.0/payload.js.map +1 -0
  93. package/dist/vta/webvh/agent-name/remove/1.0/payload.d.ts +274 -0
  94. package/dist/vta/webvh/agent-name/remove/1.0/payload.d.ts.map +1 -0
  95. package/dist/vta/webvh/agent-name/remove/1.0/payload.js +153 -0
  96. package/dist/vta/webvh/agent-name/remove/1.0/payload.js.map +1 -0
  97. package/dist/vta/webvh/agent-name/set/1.0/payload.d.ts +274 -0
  98. package/dist/vta/webvh/agent-name/set/1.0/payload.d.ts.map +1 -0
  99. package/dist/vta/webvh/agent-name/set/1.0/payload.js +153 -0
  100. package/dist/vta/webvh/agent-name/set/1.0/payload.js.map +1 -0
  101. package/dist/vta/webvh/dids/create/1.0/payload.d.ts +806 -0
  102. package/dist/vta/webvh/dids/create/1.0/payload.d.ts.map +1 -0
  103. package/dist/vta/webvh/dids/create/1.0/payload.js +400 -0
  104. package/dist/vta/webvh/dids/create/1.0/payload.js.map +1 -0
  105. package/dist/vta/webvh/dids/delete/1.0/payload.d.ts +257 -0
  106. package/dist/vta/webvh/dids/delete/1.0/payload.d.ts.map +1 -0
  107. package/dist/vta/webvh/dids/delete/1.0/payload.js +145 -0
  108. package/dist/vta/webvh/dids/delete/1.0/payload.js.map +1 -0
  109. package/dist/vta/webvh/dids/get/1.0/payload.d.ts +539 -0
  110. package/dist/vta/webvh/dids/get/1.0/payload.d.ts.map +1 -0
  111. package/dist/vta/webvh/dids/get/1.0/payload.js +282 -0
  112. package/dist/vta/webvh/dids/get/1.0/payload.js.map +1 -0
  113. package/dist/vta/webvh/dids/list/1.0/payload.d.ts +537 -0
  114. package/dist/vta/webvh/dids/list/1.0/payload.d.ts.map +1 -0
  115. package/dist/vta/webvh/dids/list/1.0/payload.js +278 -0
  116. package/dist/vta/webvh/dids/list/1.0/payload.js.map +1 -0
  117. package/dist/vta/webvh/dids/register-with-server/1.0/payload.d.ts +299 -0
  118. package/dist/vta/webvh/dids/register-with-server/1.0/payload.d.ts.map +1 -0
  119. package/dist/vta/webvh/dids/register-with-server/1.0/payload.js +163 -0
  120. package/dist/vta/webvh/dids/register-with-server/1.0/payload.js.map +1 -0
  121. package/dist/vta/webvh/dids/rotate-keys/1.0/payload.d.ts +357 -0
  122. package/dist/vta/webvh/dids/rotate-keys/1.0/payload.d.ts.map +1 -0
  123. package/dist/vta/webvh/dids/rotate-keys/1.0/payload.js +196 -0
  124. package/dist/vta/webvh/dids/rotate-keys/1.0/payload.js.map +1 -0
  125. package/dist/vta/webvh/servers/list/1.0/payload.d.ts +366 -0
  126. package/dist/vta/webvh/servers/list/1.0/payload.d.ts.map +1 -0
  127. package/dist/vta/webvh/servers/list/1.0/payload.js +200 -0
  128. package/dist/vta/webvh/servers/list/1.0/payload.js.map +1 -0
  129. package/dist/vta/webvh/servers/register/1.0/payload.d.ts +335 -0
  130. package/dist/vta/webvh/servers/register/1.0/payload.d.ts.map +1 -0
  131. package/dist/vta/webvh/servers/register/1.0/payload.js +183 -0
  132. package/dist/vta/webvh/servers/register/1.0/payload.js.map +1 -0
  133. package/dist/vta/webvh/servers/remove/1.0/payload.d.ts +237 -0
  134. package/dist/vta/webvh/servers/remove/1.0/payload.d.ts.map +1 -0
  135. package/dist/vta/webvh/servers/remove/1.0/payload.js +137 -0
  136. package/dist/vta/webvh/servers/remove/1.0/payload.js.map +1 -0
  137. package/package.json +2 -1
  138. package/src/index.ts +33 -0
  139. package/src/vta/_shared/0.1/context.ts +11 -0
  140. package/src/vta/_shared/0.1/service.ts +11 -0
  141. package/src/vta/_shared/0.1/webvh-records.ts +11 -0
  142. package/src/vta/contexts/create/1.0/payload.ts +301 -0
  143. package/src/vta/contexts/delete/1.0/payload.ts +183 -0
  144. package/src/vta/contexts/get/1.0/payload.ts +275 -0
  145. package/src/vta/contexts/list/1.0/payload.ts +309 -0
  146. package/src/vta/contexts/preview-delete/1.0/payload.ts +267 -0
  147. package/src/vta/contexts/update/1.0/payload.ts +421 -0
  148. package/src/vta/contexts/update-did/1.0/payload.ts +285 -0
  149. package/src/vta/services/disable/1.0/payload.ts +302 -0
  150. package/src/vta/services/drain/cancel/1.0/payload.ts +169 -0
  151. package/src/vta/services/drain/list/1.0/payload.ts +241 -0
  152. package/src/vta/services/enable/1.0/payload.ts +350 -0
  153. package/src/vta/services/get/1.0/payload.ts +279 -0
  154. package/src/vta/services/list/1.0/payload.ts +283 -0
  155. package/src/vta/services/rollback/1.0/payload.ts +302 -0
  156. package/src/vta/services/update/1.0/payload.ts +350 -0
  157. package/src/vta/webvh/agent-name/check/1.0/payload.ts +216 -0
  158. package/src/vta/webvh/agent-name/disable/1.0/payload.ts +197 -0
  159. package/src/vta/webvh/agent-name/enable/1.0/payload.ts +197 -0
  160. package/src/vta/webvh/agent-name/list/1.0/payload.ts +258 -0
  161. package/src/vta/webvh/agent-name/remove/1.0/payload.ts +197 -0
  162. package/src/vta/webvh/agent-name/set/1.0/payload.ts +197 -0
  163. package/src/vta/webvh/dids/create/1.0/payload.ts +548 -0
  164. package/src/vta/webvh/dids/delete/1.0/payload.ts +182 -0
  165. package/src/vta/webvh/dids/get/1.0/payload.ts +363 -0
  166. package/src/vta/webvh/dids/list/1.0/payload.ts +361 -0
  167. package/src/vta/webvh/dids/register-with-server/1.0/payload.ts +212 -0
  168. package/src/vta/webvh/dids/rotate-keys/1.0/payload.ts +251 -0
  169. package/src/vta/webvh/servers/list/1.0/payload.ts +248 -0
  170. package/src/vta/webvh/servers/register/1.0/payload.ts +230 -0
  171. package/src/vta/webvh/servers/remove/1.0/payload.ts +170 -0
@@ -0,0 +1,267 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/contexts/preview-delete/1.0/payload.schema.json
4
+ */
5
+
6
+ /**
7
+ * Request payload for vta/contexts/preview-delete: what deleting this context would destroy, computed without destroying it.
8
+ */
9
+ export interface VTAContextsPreviewDeletePayload {
10
+ /**
11
+ * Context to preview the deletion of.
12
+ */
13
+ id: string;
14
+ ext?: Ext;
15
+ }
16
+ /**
17
+ * 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.
18
+ */
19
+ export interface Ext {
20
+ [k: string]: unknown | undefined;
21
+ }
22
+ /**
23
+ * Success response to vta/contexts/preview-delete. Every array is what WOULD be affected; nothing has been. Type https://trusttasks.org/spec/vta/contexts/preview-delete/1.0#response.
24
+ */
25
+ export interface VTAContextsPreviewDeleteResponsePayload {
26
+ /**
27
+ * The context previewed.
28
+ */
29
+ id: string;
30
+ /**
31
+ * Key ids that would be destroyed. A derived key can be re-derived from the seed; an internally-generated one cannot be recovered by any means, and this list does not distinguish them — a consumer rendering it for a human SHOULD resolve each key before presenting the choice.
32
+ */
33
+ keys: string[];
34
+ /**
35
+ * did:webvh DIDs that would stop being served. Anything that recorded one as an issuer or subject is left pointing at nothing.
36
+ */
37
+ webvhDids: string[];
38
+ /**
39
+ * Subjects whose ACL entry would be removed outright, because this context was its only scope.
40
+ */
41
+ aclEntriesRemoved: string[];
42
+ /**
43
+ * Subjects whose ACL entry would be narrowed — they hold other scopes and keep them.
44
+ */
45
+ aclEntriesUpdated: string[];
46
+ /**
47
+ * DID templates scoped to this context that would be removed.
48
+ */
49
+ didTemplates?: string[];
50
+ ext?: Ext;
51
+ }
52
+
53
+ /** Trust Task type URI. */
54
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/contexts/preview-delete/1.0" as const;
55
+
56
+ /** Stable alias for this specification's request payload shape. */
57
+ export type Payload = VTAContextsPreviewDeletePayload;
58
+
59
+ /** Trust Task response type URI (request type URI + "#response"). */
60
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/contexts/preview-delete/1.0#response" as const;
61
+
62
+ /** Stable alias for this specification's success-response payload shape. */
63
+ export type Response = VTAContextsPreviewDeleteResponsePayload;
64
+
65
+ /**
66
+ * This specification's payload schema, as a value.
67
+ *
68
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
69
+ * rather than only as a `.json` file because TypeScript types are erased
70
+ * at runtime: without a schema a consumer has nothing to validate, and
71
+ * every REQUIRED payload member is optional in practice. Cross-file
72
+ * `$ref`s are already inlined, so it needs no resolver.
73
+ */
74
+ export const PAYLOAD_SCHEMA = {
75
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
76
+ "$id": "https://trusttasks.org/spec/vta/contexts/preview-delete/1.0",
77
+ "title": "VTA Contexts Preview-Delete — payload",
78
+ "description": "Request payload for vta/contexts/preview-delete: what deleting this context would destroy, computed without destroying it.",
79
+ "type": "object",
80
+ "additionalProperties": false,
81
+ "required": [
82
+ "id"
83
+ ],
84
+ "properties": {
85
+ "id": {
86
+ "type": "string",
87
+ "minLength": 1,
88
+ "description": "Context to preview the deletion of."
89
+ },
90
+ "ext": {
91
+ "$ref": "#/$defs/Ext"
92
+ }
93
+ },
94
+ "$defs": {
95
+ "Response": {
96
+ "$anchor": "response",
97
+ "title": "VTA Contexts Preview-Delete — response payload",
98
+ "description": "Success response to vta/contexts/preview-delete. Every array is what WOULD be affected; nothing has been. Type https://trusttasks.org/spec/vta/contexts/preview-delete/1.0#response.",
99
+ "type": "object",
100
+ "additionalProperties": false,
101
+ "required": [
102
+ "id",
103
+ "keys",
104
+ "webvhDids",
105
+ "aclEntriesRemoved",
106
+ "aclEntriesUpdated"
107
+ ],
108
+ "properties": {
109
+ "id": {
110
+ "type": "string",
111
+ "description": "The context previewed."
112
+ },
113
+ "keys": {
114
+ "type": "array",
115
+ "items": {
116
+ "type": "string"
117
+ },
118
+ "description": "Key ids that would be destroyed. A derived key can be re-derived from the seed; an internally-generated one cannot be recovered by any means, and this list does not distinguish them — a consumer rendering it for a human SHOULD resolve each key before presenting the choice."
119
+ },
120
+ "webvhDids": {
121
+ "type": "array",
122
+ "items": {
123
+ "type": "string"
124
+ },
125
+ "description": "did:webvh DIDs that would stop being served. Anything that recorded one as an issuer or subject is left pointing at nothing."
126
+ },
127
+ "aclEntriesRemoved": {
128
+ "type": "array",
129
+ "items": {
130
+ "type": "string"
131
+ },
132
+ "description": "Subjects whose ACL entry would be removed outright, because this context was its only scope."
133
+ },
134
+ "aclEntriesUpdated": {
135
+ "type": "array",
136
+ "items": {
137
+ "type": "string"
138
+ },
139
+ "description": "Subjects whose ACL entry would be narrowed — they hold other scopes and keep them."
140
+ },
141
+ "didTemplates": {
142
+ "type": "array",
143
+ "items": {
144
+ "type": "string"
145
+ },
146
+ "description": "DID templates scoped to this context that would be removed."
147
+ },
148
+ "ext": {
149
+ "$ref": "#/$defs/Ext"
150
+ }
151
+ }
152
+ },
153
+ "Ext": {
154
+ "title": "Ext",
155
+ "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.",
156
+ "type": "object",
157
+ "minProperties": 1,
158
+ "additionalProperties": true,
159
+ "propertyNames": {
160
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
161
+ }
162
+ }
163
+ }
164
+ } as const;
165
+
166
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
167
+ export const RESPONSE_PAYLOAD_SCHEMA = {
168
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
169
+ "$ref": "#/$defs/Response",
170
+ "$defs": {
171
+ "Response": {
172
+ "$anchor": "response",
173
+ "title": "VTA Contexts Preview-Delete — response payload",
174
+ "description": "Success response to vta/contexts/preview-delete. Every array is what WOULD be affected; nothing has been. Type https://trusttasks.org/spec/vta/contexts/preview-delete/1.0#response.",
175
+ "type": "object",
176
+ "additionalProperties": false,
177
+ "required": [
178
+ "id",
179
+ "keys",
180
+ "webvhDids",
181
+ "aclEntriesRemoved",
182
+ "aclEntriesUpdated"
183
+ ],
184
+ "properties": {
185
+ "id": {
186
+ "type": "string",
187
+ "description": "The context previewed."
188
+ },
189
+ "keys": {
190
+ "type": "array",
191
+ "items": {
192
+ "type": "string"
193
+ },
194
+ "description": "Key ids that would be destroyed. A derived key can be re-derived from the seed; an internally-generated one cannot be recovered by any means, and this list does not distinguish them — a consumer rendering it for a human SHOULD resolve each key before presenting the choice."
195
+ },
196
+ "webvhDids": {
197
+ "type": "array",
198
+ "items": {
199
+ "type": "string"
200
+ },
201
+ "description": "did:webvh DIDs that would stop being served. Anything that recorded one as an issuer or subject is left pointing at nothing."
202
+ },
203
+ "aclEntriesRemoved": {
204
+ "type": "array",
205
+ "items": {
206
+ "type": "string"
207
+ },
208
+ "description": "Subjects whose ACL entry would be removed outright, because this context was its only scope."
209
+ },
210
+ "aclEntriesUpdated": {
211
+ "type": "array",
212
+ "items": {
213
+ "type": "string"
214
+ },
215
+ "description": "Subjects whose ACL entry would be narrowed — they hold other scopes and keep them."
216
+ },
217
+ "didTemplates": {
218
+ "type": "array",
219
+ "items": {
220
+ "type": "string"
221
+ },
222
+ "description": "DID templates scoped to this context that would be removed."
223
+ },
224
+ "ext": {
225
+ "$ref": "#/$defs/Ext"
226
+ }
227
+ }
228
+ },
229
+ "Ext": {
230
+ "title": "Ext",
231
+ "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.",
232
+ "type": "object",
233
+ "minProperties": 1,
234
+ "additionalProperties": true,
235
+ "propertyNames": {
236
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
237
+ }
238
+ }
239
+ }
240
+ } as const;
241
+
242
+ /**
243
+ * SPEC.md §7.2 policy for the request variant, from this specification's
244
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
245
+ * per-specification and cannot be derived from the document alone, and
246
+ * item 2 needs the schema this carries.
247
+ */
248
+ export const SPEC = {
249
+ typeUri: TYPE_URI,
250
+ isBearer: false,
251
+ isProofRequired: false,
252
+ isRecipientRequired: true,
253
+ payloadSchema: PAYLOAD_SCHEMA,
254
+ } as const;
255
+
256
+ /**
257
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
258
+ * tracks the *issuer* party's requirement because a response swaps the
259
+ * parties (§7.3 item 5).
260
+ */
261
+ export const RESPONSE_SPEC = {
262
+ typeUri: RESPONSE_TYPE_URI,
263
+ isBearer: false,
264
+ isProofRequired: false,
265
+ isRecipientRequired: true,
266
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
267
+ } as const;
@@ -0,0 +1,421 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/contexts/update/1.0/payload.schema.json
4
+ */
5
+
6
+ /**
7
+ * Request payload for vta/contexts/update. Every member except `id` is optional and omitting one leaves that field unchanged — this is a patch, not a replacement.
8
+ */
9
+ export interface VTAContextsUpdatePayload {
10
+ /**
11
+ * Context to update. Not itself changeable: an id is what ACL scopes name, so renaming one would silently unhook every grant that referenced it.
12
+ */
13
+ id: string;
14
+ /**
15
+ * New human-readable name.
16
+ */
17
+ name?: string;
18
+ /**
19
+ * DID this context acts as. Prefer vta/contexts/update-did, which is the task named and audited for this change; setting it here is permitted for a maintainer that treats the two as one write.
20
+ */
21
+ did?: string;
22
+ /**
23
+ * New description.
24
+ */
25
+ description?: string;
26
+ contextPolicy?: ContextPolicy;
27
+ ext?: Ext;
28
+ }
29
+ /**
30
+ * Replacement policy for the context. Supplied whole: the members present in the new policy are the policy, and one omitted from it becomes unrestricted rather than retaining its previous value.
31
+ */
32
+ export interface ContextPolicy {
33
+ /**
34
+ * VIDs permitted to receive presentations from this context. Absent: any verifier. Present-but-empty: none.
35
+ */
36
+ trustedVerifiers?: string[];
37
+ /**
38
+ * Credential types that may be presented from this context. Absent: any type. Present-but-empty: none.
39
+ */
40
+ presentableTypes?: string[];
41
+ /**
42
+ * Key ids the signing oracle may be invoked on within this context. Absent: every key the context holds. Present-but-empty: no keys.
43
+ */
44
+ signableKeys?: string[];
45
+ /**
46
+ * Whether material in this context may leave it through an export. Defaults to true; set it to false for a context whose contents must not be extractable.
47
+ */
48
+ exportAllowed?: boolean;
49
+ /**
50
+ * Resource limits for the context. Shape is maintainer-defined.
51
+ */
52
+ quotas?: {
53
+ [k: string]: unknown | undefined;
54
+ };
55
+ ext?: Ext;
56
+ }
57
+ /**
58
+ * 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.
59
+ */
60
+ export interface Ext {
61
+ [k: string]: unknown | undefined;
62
+ }
63
+ /**
64
+ * A context as the VTA holds it.
65
+ */
66
+ export interface ContextRecord {
67
+ /**
68
+ * Context id. For a nested context this is the full path (`parent/leaf`), not the leaf alone — an ACL scope naming this context must use this value verbatim.
69
+ */
70
+ id: string;
71
+ /**
72
+ * Human-readable name. Operator-facing only; carries no authorization meaning, and two contexts may share a name.
73
+ */
74
+ name: string;
75
+ /**
76
+ * DID this context acts as, when one has been assigned. Absent means the context has no identity of its own yet — not that it has been denied one.
77
+ */
78
+ did?: string;
79
+ /**
80
+ * Free-form description.
81
+ */
82
+ description?: string;
83
+ /**
84
+ * Id of the context this one nests under. Absent for a top-level context. Authority granted at a parent reaches its children, so this member is load-bearing for anyone reasoning about scope.
85
+ */
86
+ parent?: string;
87
+ /**
88
+ * Resolved path from the root context, as the VTA derives it from the parent chain. Consumers MUST treat this as derived state: it is recomputed by the maintainer and is not independently settable.
89
+ */
90
+ basePath: string;
91
+ /**
92
+ * RFC 3339.
93
+ */
94
+ createdAt: string;
95
+ /**
96
+ * RFC 3339.
97
+ */
98
+ updatedAt: string;
99
+ ext?: Ext;
100
+ }
101
+
102
+ /** Trust Task type URI. */
103
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/contexts/update/1.0" as const;
104
+
105
+ /** Stable alias for this specification's request payload shape. */
106
+ export type Payload = VTAContextsUpdatePayload;
107
+
108
+ /** Trust Task response type URI (request type URI + "#response"). */
109
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/contexts/update/1.0#response" as const;
110
+
111
+ /** Stable alias for this specification's success-response payload shape. */
112
+ export type Response = ContextRecord;
113
+
114
+ /**
115
+ * This specification's payload schema, as a value.
116
+ *
117
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
118
+ * rather than only as a `.json` file because TypeScript types are erased
119
+ * at runtime: without a schema a consumer has nothing to validate, and
120
+ * every REQUIRED payload member is optional in practice. Cross-file
121
+ * `$ref`s are already inlined, so it needs no resolver.
122
+ */
123
+ export const PAYLOAD_SCHEMA = {
124
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
125
+ "$id": "https://trusttasks.org/spec/vta/contexts/update/1.0",
126
+ "title": "VTA Contexts Update — payload",
127
+ "description": "Request payload for vta/contexts/update. Every member except `id` is optional and omitting one leaves that field unchanged — this is a patch, not a replacement.",
128
+ "type": "object",
129
+ "additionalProperties": false,
130
+ "required": [
131
+ "id"
132
+ ],
133
+ "properties": {
134
+ "id": {
135
+ "type": "string",
136
+ "minLength": 1,
137
+ "description": "Context to update. Not itself changeable: an id is what ACL scopes name, so renaming one would silently unhook every grant that referenced it."
138
+ },
139
+ "name": {
140
+ "type": "string",
141
+ "minLength": 1,
142
+ "description": "New human-readable name."
143
+ },
144
+ "did": {
145
+ "type": "string",
146
+ "description": "DID this context acts as. Prefer vta/contexts/update-did, which is the task named and audited for this change; setting it here is permitted for a maintainer that treats the two as one write."
147
+ },
148
+ "description": {
149
+ "type": "string",
150
+ "description": "New description."
151
+ },
152
+ "contextPolicy": {
153
+ "$ref": "#/$defs/ContextPolicy",
154
+ "description": "Replacement policy for the context. Supplied whole: the members present in the new policy are the policy, and one omitted from it becomes unrestricted rather than retaining its previous value."
155
+ },
156
+ "ext": {
157
+ "$ref": "#/$defs/Ext"
158
+ }
159
+ },
160
+ "$defs": {
161
+ "Response": {
162
+ "$anchor": "response",
163
+ "title": "VTA Contexts Update — response payload",
164
+ "description": "Success response to vta/contexts/update: the context as it now stands. Type https://trusttasks.org/spec/vta/contexts/update/1.0#response.",
165
+ "$ref": "#/$defs/ContextRecord"
166
+ },
167
+ "ContextRecord": {
168
+ "title": "ContextRecord",
169
+ "description": "A context as the VTA holds it.",
170
+ "type": "object",
171
+ "additionalProperties": false,
172
+ "required": [
173
+ "id",
174
+ "name",
175
+ "basePath",
176
+ "createdAt",
177
+ "updatedAt"
178
+ ],
179
+ "properties": {
180
+ "id": {
181
+ "type": "string",
182
+ "minLength": 1,
183
+ "description": "Context id. For a nested context this is the full path (`parent/leaf`), not the leaf alone — an ACL scope naming this context must use this value verbatim."
184
+ },
185
+ "name": {
186
+ "type": "string",
187
+ "minLength": 1,
188
+ "description": "Human-readable name. Operator-facing only; carries no authorization meaning, and two contexts may share a name."
189
+ },
190
+ "did": {
191
+ "type": "string",
192
+ "description": "DID this context acts as, when one has been assigned. Absent means the context has no identity of its own yet — not that it has been denied one."
193
+ },
194
+ "description": {
195
+ "type": "string",
196
+ "description": "Free-form description."
197
+ },
198
+ "parent": {
199
+ "type": "string",
200
+ "description": "Id of the context this one nests under. Absent for a top-level context. Authority granted at a parent reaches its children, so this member is load-bearing for anyone reasoning about scope."
201
+ },
202
+ "basePath": {
203
+ "type": "string",
204
+ "description": "Resolved path from the root context, as the VTA derives it from the parent chain. Consumers MUST treat this as derived state: it is recomputed by the maintainer and is not independently settable."
205
+ },
206
+ "createdAt": {
207
+ "type": "string",
208
+ "format": "date-time",
209
+ "description": "RFC 3339."
210
+ },
211
+ "updatedAt": {
212
+ "type": "string",
213
+ "format": "date-time",
214
+ "description": "RFC 3339."
215
+ },
216
+ "ext": {
217
+ "$ref": "#/$defs/Ext"
218
+ }
219
+ }
220
+ },
221
+ "Ext": {
222
+ "title": "Ext",
223
+ "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.",
224
+ "type": "object",
225
+ "minProperties": 1,
226
+ "additionalProperties": true,
227
+ "propertyNames": {
228
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
229
+ }
230
+ },
231
+ "ContextPolicy": {
232
+ "title": "ContextPolicy",
233
+ "description": "Per-context restrictions the VTA enforces. Every member is optional, and **absence means unrestricted, not empty** — a policy that omits `presentableTypes` permits every type, while one that sets it to `[]` permits none. The two are opposite instructions and a consumer MUST NOT collapse them.",
234
+ "type": "object",
235
+ "additionalProperties": false,
236
+ "properties": {
237
+ "trustedVerifiers": {
238
+ "type": "array",
239
+ "items": {
240
+ "type": "string"
241
+ },
242
+ "description": "VIDs permitted to receive presentations from this context. Absent: any verifier. Present-but-empty: none."
243
+ },
244
+ "presentableTypes": {
245
+ "type": "array",
246
+ "items": {
247
+ "type": "string"
248
+ },
249
+ "description": "Credential types that may be presented from this context. Absent: any type. Present-but-empty: none."
250
+ },
251
+ "signableKeys": {
252
+ "type": "array",
253
+ "items": {
254
+ "type": "string"
255
+ },
256
+ "description": "Key ids the signing oracle may be invoked on within this context. Absent: every key the context holds. Present-but-empty: no keys."
257
+ },
258
+ "exportAllowed": {
259
+ "type": "boolean",
260
+ "default": true,
261
+ "description": "Whether material in this context may leave it through an export. Defaults to true; set it to false for a context whose contents must not be extractable."
262
+ },
263
+ "quotas": {
264
+ "type": "object",
265
+ "description": "Resource limits for the context. Shape is maintainer-defined.",
266
+ "additionalProperties": true
267
+ },
268
+ "ext": {
269
+ "$ref": "#/$defs/Ext"
270
+ }
271
+ }
272
+ }
273
+ }
274
+ } as const;
275
+
276
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
277
+ export const RESPONSE_PAYLOAD_SCHEMA = {
278
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
279
+ "$ref": "#/$defs/Response",
280
+ "$defs": {
281
+ "Response": {
282
+ "$anchor": "response",
283
+ "title": "VTA Contexts Update — response payload",
284
+ "description": "Success response to vta/contexts/update: the context as it now stands. Type https://trusttasks.org/spec/vta/contexts/update/1.0#response.",
285
+ "$ref": "#/$defs/ContextRecord"
286
+ },
287
+ "ContextRecord": {
288
+ "title": "ContextRecord",
289
+ "description": "A context as the VTA holds it.",
290
+ "type": "object",
291
+ "additionalProperties": false,
292
+ "required": [
293
+ "id",
294
+ "name",
295
+ "basePath",
296
+ "createdAt",
297
+ "updatedAt"
298
+ ],
299
+ "properties": {
300
+ "id": {
301
+ "type": "string",
302
+ "minLength": 1,
303
+ "description": "Context id. For a nested context this is the full path (`parent/leaf`), not the leaf alone — an ACL scope naming this context must use this value verbatim."
304
+ },
305
+ "name": {
306
+ "type": "string",
307
+ "minLength": 1,
308
+ "description": "Human-readable name. Operator-facing only; carries no authorization meaning, and two contexts may share a name."
309
+ },
310
+ "did": {
311
+ "type": "string",
312
+ "description": "DID this context acts as, when one has been assigned. Absent means the context has no identity of its own yet — not that it has been denied one."
313
+ },
314
+ "description": {
315
+ "type": "string",
316
+ "description": "Free-form description."
317
+ },
318
+ "parent": {
319
+ "type": "string",
320
+ "description": "Id of the context this one nests under. Absent for a top-level context. Authority granted at a parent reaches its children, so this member is load-bearing for anyone reasoning about scope."
321
+ },
322
+ "basePath": {
323
+ "type": "string",
324
+ "description": "Resolved path from the root context, as the VTA derives it from the parent chain. Consumers MUST treat this as derived state: it is recomputed by the maintainer and is not independently settable."
325
+ },
326
+ "createdAt": {
327
+ "type": "string",
328
+ "format": "date-time",
329
+ "description": "RFC 3339."
330
+ },
331
+ "updatedAt": {
332
+ "type": "string",
333
+ "format": "date-time",
334
+ "description": "RFC 3339."
335
+ },
336
+ "ext": {
337
+ "$ref": "#/$defs/Ext"
338
+ }
339
+ }
340
+ },
341
+ "Ext": {
342
+ "title": "Ext",
343
+ "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.",
344
+ "type": "object",
345
+ "minProperties": 1,
346
+ "additionalProperties": true,
347
+ "propertyNames": {
348
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
349
+ }
350
+ },
351
+ "ContextPolicy": {
352
+ "title": "ContextPolicy",
353
+ "description": "Per-context restrictions the VTA enforces. Every member is optional, and **absence means unrestricted, not empty** — a policy that omits `presentableTypes` permits every type, while one that sets it to `[]` permits none. The two are opposite instructions and a consumer MUST NOT collapse them.",
354
+ "type": "object",
355
+ "additionalProperties": false,
356
+ "properties": {
357
+ "trustedVerifiers": {
358
+ "type": "array",
359
+ "items": {
360
+ "type": "string"
361
+ },
362
+ "description": "VIDs permitted to receive presentations from this context. Absent: any verifier. Present-but-empty: none."
363
+ },
364
+ "presentableTypes": {
365
+ "type": "array",
366
+ "items": {
367
+ "type": "string"
368
+ },
369
+ "description": "Credential types that may be presented from this context. Absent: any type. Present-but-empty: none."
370
+ },
371
+ "signableKeys": {
372
+ "type": "array",
373
+ "items": {
374
+ "type": "string"
375
+ },
376
+ "description": "Key ids the signing oracle may be invoked on within this context. Absent: every key the context holds. Present-but-empty: no keys."
377
+ },
378
+ "exportAllowed": {
379
+ "type": "boolean",
380
+ "default": true,
381
+ "description": "Whether material in this context may leave it through an export. Defaults to true; set it to false for a context whose contents must not be extractable."
382
+ },
383
+ "quotas": {
384
+ "type": "object",
385
+ "description": "Resource limits for the context. Shape is maintainer-defined.",
386
+ "additionalProperties": true
387
+ },
388
+ "ext": {
389
+ "$ref": "#/$defs/Ext"
390
+ }
391
+ }
392
+ }
393
+ }
394
+ } as const;
395
+
396
+ /**
397
+ * SPEC.md §7.2 policy for the request variant, from this specification's
398
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
399
+ * per-specification and cannot be derived from the document alone, and
400
+ * item 2 needs the schema this carries.
401
+ */
402
+ export const SPEC = {
403
+ typeUri: TYPE_URI,
404
+ isBearer: false,
405
+ isProofRequired: true,
406
+ isRecipientRequired: true,
407
+ payloadSchema: PAYLOAD_SCHEMA,
408
+ } as const;
409
+
410
+ /**
411
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
412
+ * tracks the *issuer* party's requirement because a response swaps the
413
+ * parties (§7.3 item 5).
414
+ */
415
+ export const RESPONSE_SPEC = {
416
+ typeUri: RESPONSE_TYPE_URI,
417
+ isBearer: false,
418
+ isProofRequired: true,
419
+ isRecipientRequired: true,
420
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
421
+ } as const;