@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,230 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/webvh/servers/register/1.0/payload.schema.json
4
+ */
5
+
6
+ export interface VTAWebVHServersRegisterPayload {
7
+ /**
8
+ * Local id for the server. Referenced by every DID published through it.
9
+ */
10
+ id: string;
11
+ /**
12
+ * The server's DID, used to authenticate it. Absent where the VTA resolves it during registration.
13
+ */
14
+ did?: string;
15
+ label?: string;
16
+ ext?: Ext;
17
+ }
18
+ /**
19
+ * 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.
20
+ */
21
+ export interface Ext {
22
+ [k: string]: unknown | undefined;
23
+ }
24
+ /**
25
+ * A hosting server the VTA is registered with. Carries no credential: what the VTA holds to authenticate against the server is never part of this record and never leaves it.
26
+ */
27
+ export interface WebvhServerRecord {
28
+ /**
29
+ * Local id for the server, chosen by the operator.
30
+ */
31
+ id: string;
32
+ /**
33
+ * The server's own DID, used to authenticate it.
34
+ */
35
+ did: string;
36
+ label?: string;
37
+ createdAt: string;
38
+ updatedAt: string;
39
+ ext?: Ext;
40
+ }
41
+
42
+ /** Trust Task type URI. */
43
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/webvh/servers/register/1.0" as const;
44
+
45
+ /** Stable alias for this specification's request payload shape. */
46
+ export type Payload = VTAWebVHServersRegisterPayload;
47
+
48
+ /** Trust Task response type URI (request type URI + "#response"). */
49
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/webvh/servers/register/1.0#response" as const;
50
+
51
+ /** Stable alias for this specification's success-response payload shape. */
52
+ export type Response = WebvhServerRecord;
53
+
54
+ /**
55
+ * This specification's payload schema, as a value.
56
+ *
57
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
58
+ * rather than only as a `.json` file because TypeScript types are erased
59
+ * at runtime: without a schema a consumer has nothing to validate, and
60
+ * every REQUIRED payload member is optional in practice. Cross-file
61
+ * `$ref`s are already inlined, so it needs no resolver.
62
+ */
63
+ export const PAYLOAD_SCHEMA = {
64
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
65
+ "$id": "https://trusttasks.org/spec/vta/webvh/servers/register/1.0",
66
+ "title": "VTA WebVH Servers Register — payload",
67
+ "type": "object",
68
+ "additionalProperties": false,
69
+ "required": [
70
+ "id"
71
+ ],
72
+ "properties": {
73
+ "id": {
74
+ "type": "string",
75
+ "minLength": 1,
76
+ "description": "Local id for the server. Referenced by every DID published through it."
77
+ },
78
+ "did": {
79
+ "type": "string",
80
+ "description": "The server's DID, used to authenticate it. Absent where the VTA resolves it during registration."
81
+ },
82
+ "label": {
83
+ "type": "string"
84
+ },
85
+ "ext": {
86
+ "$ref": "#/$defs/Ext"
87
+ }
88
+ },
89
+ "$defs": {
90
+ "Response": {
91
+ "$anchor": "response",
92
+ "title": "VTA WebVH Servers Register — response payload",
93
+ "description": "Success response to vta/webvh/servers/register: the registration the VTA now holds. Type https://trusttasks.org/spec/vta/webvh/servers/register/1.0#response.",
94
+ "$ref": "#/$defs/WebvhServerRecord"
95
+ },
96
+ "WebvhServerRecord": {
97
+ "title": "WebvhServerRecord",
98
+ "description": "A hosting server the VTA is registered with. Carries no credential: what the VTA holds to authenticate against the server is never part of this record and never leaves it.",
99
+ "type": "object",
100
+ "additionalProperties": false,
101
+ "required": [
102
+ "id",
103
+ "did",
104
+ "createdAt",
105
+ "updatedAt"
106
+ ],
107
+ "properties": {
108
+ "id": {
109
+ "type": "string",
110
+ "description": "Local id for the server, chosen by the operator."
111
+ },
112
+ "did": {
113
+ "type": "string",
114
+ "description": "The server's own DID, used to authenticate it."
115
+ },
116
+ "label": {
117
+ "type": "string"
118
+ },
119
+ "createdAt": {
120
+ "type": "string",
121
+ "format": "date-time"
122
+ },
123
+ "updatedAt": {
124
+ "type": "string",
125
+ "format": "date-time"
126
+ },
127
+ "ext": {
128
+ "$ref": "#/$defs/Ext"
129
+ }
130
+ }
131
+ },
132
+ "Ext": {
133
+ "title": "Ext",
134
+ "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.",
135
+ "type": "object",
136
+ "minProperties": 1,
137
+ "additionalProperties": true,
138
+ "propertyNames": {
139
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
140
+ }
141
+ }
142
+ }
143
+ } as const;
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": "VTA WebVH Servers Register — response payload",
153
+ "description": "Success response to vta/webvh/servers/register: the registration the VTA now holds. Type https://trusttasks.org/spec/vta/webvh/servers/register/1.0#response.",
154
+ "$ref": "#/$defs/WebvhServerRecord"
155
+ },
156
+ "WebvhServerRecord": {
157
+ "title": "WebvhServerRecord",
158
+ "description": "A hosting server the VTA is registered with. Carries no credential: what the VTA holds to authenticate against the server is never part of this record and never leaves it.",
159
+ "type": "object",
160
+ "additionalProperties": false,
161
+ "required": [
162
+ "id",
163
+ "did",
164
+ "createdAt",
165
+ "updatedAt"
166
+ ],
167
+ "properties": {
168
+ "id": {
169
+ "type": "string",
170
+ "description": "Local id for the server, chosen by the operator."
171
+ },
172
+ "did": {
173
+ "type": "string",
174
+ "description": "The server's own DID, used to authenticate it."
175
+ },
176
+ "label": {
177
+ "type": "string"
178
+ },
179
+ "createdAt": {
180
+ "type": "string",
181
+ "format": "date-time"
182
+ },
183
+ "updatedAt": {
184
+ "type": "string",
185
+ "format": "date-time"
186
+ },
187
+ "ext": {
188
+ "$ref": "#/$defs/Ext"
189
+ }
190
+ }
191
+ },
192
+ "Ext": {
193
+ "title": "Ext",
194
+ "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.",
195
+ "type": "object",
196
+ "minProperties": 1,
197
+ "additionalProperties": true,
198
+ "propertyNames": {
199
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
200
+ }
201
+ }
202
+ }
203
+ } as const;
204
+
205
+ /**
206
+ * SPEC.md §7.2 policy for the request variant, from this specification's
207
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
208
+ * per-specification and cannot be derived from the document alone, and
209
+ * item 2 needs the schema this carries.
210
+ */
211
+ export const SPEC = {
212
+ typeUri: TYPE_URI,
213
+ isBearer: false,
214
+ isProofRequired: true,
215
+ isRecipientRequired: true,
216
+ payloadSchema: PAYLOAD_SCHEMA,
217
+ } as const;
218
+
219
+ /**
220
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
221
+ * tracks the *issuer* party's requirement because a response swaps the
222
+ * parties (§7.3 item 5).
223
+ */
224
+ export const RESPONSE_SPEC = {
225
+ typeUri: RESPONSE_TYPE_URI,
226
+ isBearer: false,
227
+ isProofRequired: true,
228
+ isRecipientRequired: true,
229
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
230
+ } as const;
@@ -0,0 +1,170 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/webvh/servers/remove/1.0/payload.schema.json
4
+ */
5
+
6
+ export interface VTAWebVHServersRemovePayload {
7
+ id: string;
8
+ ext?: Ext;
9
+ }
10
+ /**
11
+ * 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.
12
+ */
13
+ export interface Ext {
14
+ [k: string]: unknown | undefined;
15
+ }
16
+ /**
17
+ * Success response to vta/webvh/servers/remove. Type https://trusttasks.org/spec/vta/webvh/servers/remove/1.0#response.
18
+ */
19
+ export interface VTAWebVHServersRemoveResponsePayload {
20
+ id: string;
21
+ /**
22
+ * Whether the registration was removed. Removing it does not unpublish anything: DIDs the server already serves keep resolving, and the VTA simply loses its route for updating them.
23
+ */
24
+ removed: boolean;
25
+ ext?: Ext;
26
+ }
27
+
28
+ /** Trust Task type URI. */
29
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/webvh/servers/remove/1.0" as const;
30
+
31
+ /** Stable alias for this specification's request payload shape. */
32
+ export type Payload = VTAWebVHServersRemovePayload;
33
+
34
+ /** Trust Task response type URI (request type URI + "#response"). */
35
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/webvh/servers/remove/1.0#response" as const;
36
+
37
+ /** Stable alias for this specification's success-response payload shape. */
38
+ export type Response = VTAWebVHServersRemoveResponsePayload;
39
+
40
+ /**
41
+ * This specification's payload schema, as a value.
42
+ *
43
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
44
+ * rather than only as a `.json` file because TypeScript types are erased
45
+ * at runtime: without a schema a consumer has nothing to validate, and
46
+ * every REQUIRED payload member is optional in practice. Cross-file
47
+ * `$ref`s are already inlined, so it needs no resolver.
48
+ */
49
+ export const PAYLOAD_SCHEMA = {
50
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
51
+ "$id": "https://trusttasks.org/spec/vta/webvh/servers/remove/1.0",
52
+ "title": "VTA WebVH Servers Remove — payload",
53
+ "type": "object",
54
+ "additionalProperties": false,
55
+ "required": [
56
+ "id"
57
+ ],
58
+ "properties": {
59
+ "id": {
60
+ "type": "string",
61
+ "minLength": 1
62
+ },
63
+ "ext": {
64
+ "$ref": "#/$defs/Ext"
65
+ }
66
+ },
67
+ "$defs": {
68
+ "Response": {
69
+ "$anchor": "response",
70
+ "title": "VTA WebVH Servers Remove — response payload",
71
+ "description": "Success response to vta/webvh/servers/remove. Type https://trusttasks.org/spec/vta/webvh/servers/remove/1.0#response.",
72
+ "type": "object",
73
+ "additionalProperties": false,
74
+ "required": [
75
+ "id",
76
+ "removed"
77
+ ],
78
+ "properties": {
79
+ "id": {
80
+ "type": "string"
81
+ },
82
+ "removed": {
83
+ "type": "boolean",
84
+ "description": "Whether the registration was removed. Removing it does not unpublish anything: DIDs the server already serves keep resolving, and the VTA simply loses its route for updating them."
85
+ },
86
+ "ext": {
87
+ "$ref": "#/$defs/Ext"
88
+ }
89
+ }
90
+ },
91
+ "Ext": {
92
+ "title": "Ext",
93
+ "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.",
94
+ "type": "object",
95
+ "minProperties": 1,
96
+ "additionalProperties": true,
97
+ "propertyNames": {
98
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
99
+ }
100
+ }
101
+ }
102
+ } as const;
103
+
104
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
105
+ export const RESPONSE_PAYLOAD_SCHEMA = {
106
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
107
+ "$ref": "#/$defs/Response",
108
+ "$defs": {
109
+ "Response": {
110
+ "$anchor": "response",
111
+ "title": "VTA WebVH Servers Remove — response payload",
112
+ "description": "Success response to vta/webvh/servers/remove. Type https://trusttasks.org/spec/vta/webvh/servers/remove/1.0#response.",
113
+ "type": "object",
114
+ "additionalProperties": false,
115
+ "required": [
116
+ "id",
117
+ "removed"
118
+ ],
119
+ "properties": {
120
+ "id": {
121
+ "type": "string"
122
+ },
123
+ "removed": {
124
+ "type": "boolean",
125
+ "description": "Whether the registration was removed. Removing it does not unpublish anything: DIDs the server already serves keep resolving, and the VTA simply loses its route for updating them."
126
+ },
127
+ "ext": {
128
+ "$ref": "#/$defs/Ext"
129
+ }
130
+ }
131
+ },
132
+ "Ext": {
133
+ "title": "Ext",
134
+ "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.",
135
+ "type": "object",
136
+ "minProperties": 1,
137
+ "additionalProperties": true,
138
+ "propertyNames": {
139
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
140
+ }
141
+ }
142
+ }
143
+ } as const;
144
+
145
+ /**
146
+ * SPEC.md §7.2 policy for the request variant, from this specification's
147
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
148
+ * per-specification and cannot be derived from the document alone, and
149
+ * item 2 needs the schema this carries.
150
+ */
151
+ export const SPEC = {
152
+ typeUri: TYPE_URI,
153
+ isBearer: false,
154
+ isProofRequired: true,
155
+ isRecipientRequired: true,
156
+ payloadSchema: PAYLOAD_SCHEMA,
157
+ } as const;
158
+
159
+ /**
160
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
161
+ * tracks the *issuer* party's requirement because a response swaps the
162
+ * parties (§7.3 item 5).
163
+ */
164
+ export const RESPONSE_SPEC = {
165
+ typeUri: RESPONSE_TYPE_URI,
166
+ isBearer: false,
167
+ isProofRequired: true,
168
+ isRecipientRequired: true,
169
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
170
+ } as const;