@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,197 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/webvh/agent-name/disable/1.0/payload.schema.json
4
+ */
5
+
6
+ /**
7
+ * Stop a name resolving while continuing to hold it. Unlike `remove`, nobody else can take it.
8
+ */
9
+ export interface VTAWebVHAgentNameDisablePayload {
10
+ /**
11
+ * DID the name is bound to.
12
+ */
13
+ did: string;
14
+ /**
15
+ * The name, without the host — the full form is `<host>/@<name>`.
16
+ */
17
+ name: string;
18
+ ext?: Ext;
19
+ }
20
+ /**
21
+ * 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.
22
+ */
23
+ export interface Ext {
24
+ [k: string]: unknown | undefined;
25
+ }
26
+ /**
27
+ * Success response to vta/webvh/agent-name/disable. Type https://trusttasks.org/spec/vta/webvh/agent-name/disable/1.0#response.
28
+ */
29
+ export interface VTAWebVHAgentNameDisableResponsePayload {
30
+ did: string;
31
+ name: string;
32
+ /**
33
+ * Whether the name resolves after this call.
34
+ */
35
+ enabled: boolean;
36
+ ext?: Ext;
37
+ }
38
+
39
+ /** Trust Task type URI. */
40
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/webvh/agent-name/disable/1.0" as const;
41
+
42
+ /** Stable alias for this specification's request payload shape. */
43
+ export type Payload = VTAWebVHAgentNameDisablePayload;
44
+
45
+ /** Trust Task response type URI (request type URI + "#response"). */
46
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/webvh/agent-name/disable/1.0#response" as const;
47
+
48
+ /** Stable alias for this specification's success-response payload shape. */
49
+ export type Response = VTAWebVHAgentNameDisableResponsePayload;
50
+
51
+ /**
52
+ * This specification's payload schema, as a value.
53
+ *
54
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
55
+ * rather than only as a `.json` file because TypeScript types are erased
56
+ * at runtime: without a schema a consumer has nothing to validate, and
57
+ * every REQUIRED payload member is optional in practice. Cross-file
58
+ * `$ref`s are already inlined, so it needs no resolver.
59
+ */
60
+ export const PAYLOAD_SCHEMA = {
61
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
62
+ "$id": "https://trusttasks.org/spec/vta/webvh/agent-name/disable/1.0",
63
+ "title": "VTA WebVH Agent-Name Disable — payload",
64
+ "description": "Stop a name resolving while continuing to hold it. Unlike `remove`, nobody else can take it.",
65
+ "type": "object",
66
+ "additionalProperties": false,
67
+ "required": [
68
+ "did",
69
+ "name"
70
+ ],
71
+ "properties": {
72
+ "did": {
73
+ "type": "string",
74
+ "minLength": 1,
75
+ "description": "DID the name is bound to."
76
+ },
77
+ "name": {
78
+ "type": "string",
79
+ "minLength": 1,
80
+ "description": "The name, without the host — the full form is `<host>/@<name>`."
81
+ },
82
+ "ext": {
83
+ "$ref": "#/$defs/Ext"
84
+ }
85
+ },
86
+ "$defs": {
87
+ "Response": {
88
+ "$anchor": "response",
89
+ "title": "VTA WebVH Agent-Name Disable — response payload",
90
+ "description": "Success response to vta/webvh/agent-name/disable. Type https://trusttasks.org/spec/vta/webvh/agent-name/disable/1.0#response.",
91
+ "type": "object",
92
+ "additionalProperties": false,
93
+ "required": [
94
+ "did",
95
+ "name",
96
+ "enabled"
97
+ ],
98
+ "properties": {
99
+ "did": {
100
+ "type": "string"
101
+ },
102
+ "name": {
103
+ "type": "string"
104
+ },
105
+ "enabled": {
106
+ "type": "boolean",
107
+ "description": "Whether the name resolves after this call."
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
+ }
125
+ } as const;
126
+
127
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
128
+ export const RESPONSE_PAYLOAD_SCHEMA = {
129
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
130
+ "$ref": "#/$defs/Response",
131
+ "$defs": {
132
+ "Response": {
133
+ "$anchor": "response",
134
+ "title": "VTA WebVH Agent-Name Disable — response payload",
135
+ "description": "Success response to vta/webvh/agent-name/disable. Type https://trusttasks.org/spec/vta/webvh/agent-name/disable/1.0#response.",
136
+ "type": "object",
137
+ "additionalProperties": false,
138
+ "required": [
139
+ "did",
140
+ "name",
141
+ "enabled"
142
+ ],
143
+ "properties": {
144
+ "did": {
145
+ "type": "string"
146
+ },
147
+ "name": {
148
+ "type": "string"
149
+ },
150
+ "enabled": {
151
+ "type": "boolean",
152
+ "description": "Whether the name resolves after this call."
153
+ },
154
+ "ext": {
155
+ "$ref": "#/$defs/Ext"
156
+ }
157
+ }
158
+ },
159
+ "Ext": {
160
+ "title": "Ext",
161
+ "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.",
162
+ "type": "object",
163
+ "minProperties": 1,
164
+ "additionalProperties": true,
165
+ "propertyNames": {
166
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
167
+ }
168
+ }
169
+ }
170
+ } as const;
171
+
172
+ /**
173
+ * SPEC.md §7.2 policy for the request variant, from this specification's
174
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
175
+ * per-specification and cannot be derived from the document alone, and
176
+ * item 2 needs the schema this carries.
177
+ */
178
+ export const SPEC = {
179
+ typeUri: TYPE_URI,
180
+ isBearer: false,
181
+ isProofRequired: true,
182
+ isRecipientRequired: true,
183
+ payloadSchema: PAYLOAD_SCHEMA,
184
+ } as const;
185
+
186
+ /**
187
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
188
+ * tracks the *issuer* party's requirement because a response swaps the
189
+ * parties (§7.3 item 5).
190
+ */
191
+ export const RESPONSE_SPEC = {
192
+ typeUri: RESPONSE_TYPE_URI,
193
+ isBearer: false,
194
+ isProofRequired: true,
195
+ isRecipientRequired: true,
196
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
197
+ } as const;
@@ -0,0 +1,197 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/webvh/agent-name/enable/1.0/payload.schema.json
4
+ */
5
+
6
+ /**
7
+ * Make a held name resolve again.
8
+ */
9
+ export interface VTAWebVHAgentNameEnablePayload {
10
+ /**
11
+ * DID the name is bound to.
12
+ */
13
+ did: string;
14
+ /**
15
+ * The name, without the host — the full form is `<host>/@<name>`.
16
+ */
17
+ name: string;
18
+ ext?: Ext;
19
+ }
20
+ /**
21
+ * 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.
22
+ */
23
+ export interface Ext {
24
+ [k: string]: unknown | undefined;
25
+ }
26
+ /**
27
+ * Success response to vta/webvh/agent-name/enable. Type https://trusttasks.org/spec/vta/webvh/agent-name/enable/1.0#response.
28
+ */
29
+ export interface VTAWebVHAgentNameEnableResponsePayload {
30
+ did: string;
31
+ name: string;
32
+ /**
33
+ * Whether the name resolves after this call.
34
+ */
35
+ enabled: boolean;
36
+ ext?: Ext;
37
+ }
38
+
39
+ /** Trust Task type URI. */
40
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/webvh/agent-name/enable/1.0" as const;
41
+
42
+ /** Stable alias for this specification's request payload shape. */
43
+ export type Payload = VTAWebVHAgentNameEnablePayload;
44
+
45
+ /** Trust Task response type URI (request type URI + "#response"). */
46
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/webvh/agent-name/enable/1.0#response" as const;
47
+
48
+ /** Stable alias for this specification's success-response payload shape. */
49
+ export type Response = VTAWebVHAgentNameEnableResponsePayload;
50
+
51
+ /**
52
+ * This specification's payload schema, as a value.
53
+ *
54
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
55
+ * rather than only as a `.json` file because TypeScript types are erased
56
+ * at runtime: without a schema a consumer has nothing to validate, and
57
+ * every REQUIRED payload member is optional in practice. Cross-file
58
+ * `$ref`s are already inlined, so it needs no resolver.
59
+ */
60
+ export const PAYLOAD_SCHEMA = {
61
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
62
+ "$id": "https://trusttasks.org/spec/vta/webvh/agent-name/enable/1.0",
63
+ "title": "VTA WebVH Agent-Name Enable — payload",
64
+ "description": "Make a held name resolve again.",
65
+ "type": "object",
66
+ "additionalProperties": false,
67
+ "required": [
68
+ "did",
69
+ "name"
70
+ ],
71
+ "properties": {
72
+ "did": {
73
+ "type": "string",
74
+ "minLength": 1,
75
+ "description": "DID the name is bound to."
76
+ },
77
+ "name": {
78
+ "type": "string",
79
+ "minLength": 1,
80
+ "description": "The name, without the host — the full form is `<host>/@<name>`."
81
+ },
82
+ "ext": {
83
+ "$ref": "#/$defs/Ext"
84
+ }
85
+ },
86
+ "$defs": {
87
+ "Response": {
88
+ "$anchor": "response",
89
+ "title": "VTA WebVH Agent-Name Enable — response payload",
90
+ "description": "Success response to vta/webvh/agent-name/enable. Type https://trusttasks.org/spec/vta/webvh/agent-name/enable/1.0#response.",
91
+ "type": "object",
92
+ "additionalProperties": false,
93
+ "required": [
94
+ "did",
95
+ "name",
96
+ "enabled"
97
+ ],
98
+ "properties": {
99
+ "did": {
100
+ "type": "string"
101
+ },
102
+ "name": {
103
+ "type": "string"
104
+ },
105
+ "enabled": {
106
+ "type": "boolean",
107
+ "description": "Whether the name resolves after this call."
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
+ }
125
+ } as const;
126
+
127
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
128
+ export const RESPONSE_PAYLOAD_SCHEMA = {
129
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
130
+ "$ref": "#/$defs/Response",
131
+ "$defs": {
132
+ "Response": {
133
+ "$anchor": "response",
134
+ "title": "VTA WebVH Agent-Name Enable — response payload",
135
+ "description": "Success response to vta/webvh/agent-name/enable. Type https://trusttasks.org/spec/vta/webvh/agent-name/enable/1.0#response.",
136
+ "type": "object",
137
+ "additionalProperties": false,
138
+ "required": [
139
+ "did",
140
+ "name",
141
+ "enabled"
142
+ ],
143
+ "properties": {
144
+ "did": {
145
+ "type": "string"
146
+ },
147
+ "name": {
148
+ "type": "string"
149
+ },
150
+ "enabled": {
151
+ "type": "boolean",
152
+ "description": "Whether the name resolves after this call."
153
+ },
154
+ "ext": {
155
+ "$ref": "#/$defs/Ext"
156
+ }
157
+ }
158
+ },
159
+ "Ext": {
160
+ "title": "Ext",
161
+ "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.",
162
+ "type": "object",
163
+ "minProperties": 1,
164
+ "additionalProperties": true,
165
+ "propertyNames": {
166
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
167
+ }
168
+ }
169
+ }
170
+ } as const;
171
+
172
+ /**
173
+ * SPEC.md §7.2 policy for the request variant, from this specification's
174
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
175
+ * per-specification and cannot be derived from the document alone, and
176
+ * item 2 needs the schema this carries.
177
+ */
178
+ export const SPEC = {
179
+ typeUri: TYPE_URI,
180
+ isBearer: false,
181
+ isProofRequired: true,
182
+ isRecipientRequired: true,
183
+ payloadSchema: PAYLOAD_SCHEMA,
184
+ } as const;
185
+
186
+ /**
187
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
188
+ * tracks the *issuer* party's requirement because a response swaps the
189
+ * parties (§7.3 item 5).
190
+ */
191
+ export const RESPONSE_SPEC = {
192
+ typeUri: RESPONSE_TYPE_URI,
193
+ isBearer: false,
194
+ isProofRequired: true,
195
+ isRecipientRequired: true,
196
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
197
+ } as const;
@@ -0,0 +1,258 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/webvh/agent-name/list/1.0/payload.schema.json
4
+ */
5
+
6
+ /**
7
+ * Every agent name held for a DID, enabled or not.
8
+ */
9
+ export interface VTAWebVHAgentNameListPayload {
10
+ /**
11
+ * DID the name is bound to.
12
+ */
13
+ did: 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/webvh/agent-name/list. Type https://trusttasks.org/spec/vta/webvh/agent-name/list/1.0#response.
24
+ */
25
+ export interface VTAWebVHAgentNameListResponsePayload {
26
+ did: string;
27
+ /**
28
+ * Names held for the DID, including disabled ones — a disabled name is still held and cannot be taken by anyone else.
29
+ */
30
+ names: AgentNameEntry[];
31
+ ext?: Ext;
32
+ }
33
+ /**
34
+ * An agent name bound to a DID. A name is only ever authoritative in the DID→name direction: the DID document's `alsoKnownAs` is what proves the binding, because anyone controlling a domain can point a name at somebody else's DID.
35
+ */
36
+ export interface AgentNameEntry {
37
+ /**
38
+ * The name, without the host — the full form is `<host>/@<name>`.
39
+ */
40
+ name: string;
41
+ /**
42
+ * Whether the name currently resolves. A disabled name is still held — it is not available for anyone else to take.
43
+ */
44
+ enabled: boolean;
45
+ /**
46
+ * Unix epoch seconds.
47
+ */
48
+ createdAt?: number;
49
+ ext?: Ext;
50
+ }
51
+
52
+ /** Trust Task type URI. */
53
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/webvh/agent-name/list/1.0" as const;
54
+
55
+ /** Stable alias for this specification's request payload shape. */
56
+ export type Payload = VTAWebVHAgentNameListPayload;
57
+
58
+ /** Trust Task response type URI (request type URI + "#response"). */
59
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/webvh/agent-name/list/1.0#response" as const;
60
+
61
+ /** Stable alias for this specification's success-response payload shape. */
62
+ export type Response = VTAWebVHAgentNameListResponsePayload;
63
+
64
+ /**
65
+ * This specification's payload schema, as a value.
66
+ *
67
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
68
+ * rather than only as a `.json` file because TypeScript types are erased
69
+ * at runtime: without a schema a consumer has nothing to validate, and
70
+ * every REQUIRED payload member is optional in practice. Cross-file
71
+ * `$ref`s are already inlined, so it needs no resolver.
72
+ */
73
+ export const PAYLOAD_SCHEMA = {
74
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
75
+ "$id": "https://trusttasks.org/spec/vta/webvh/agent-name/list/1.0",
76
+ "title": "VTA WebVH Agent-Name List — payload",
77
+ "description": "Every agent name held for a DID, enabled or not.",
78
+ "type": "object",
79
+ "additionalProperties": false,
80
+ "required": [
81
+ "did"
82
+ ],
83
+ "properties": {
84
+ "did": {
85
+ "type": "string",
86
+ "minLength": 1,
87
+ "description": "DID the name is bound to."
88
+ },
89
+ "ext": {
90
+ "$ref": "#/$defs/Ext"
91
+ }
92
+ },
93
+ "$defs": {
94
+ "Response": {
95
+ "$anchor": "response",
96
+ "title": "VTA WebVH Agent-Name List — response payload",
97
+ "description": "Success response to vta/webvh/agent-name/list. Type https://trusttasks.org/spec/vta/webvh/agent-name/list/1.0#response.",
98
+ "type": "object",
99
+ "additionalProperties": false,
100
+ "required": [
101
+ "did",
102
+ "names"
103
+ ],
104
+ "properties": {
105
+ "did": {
106
+ "type": "string"
107
+ },
108
+ "names": {
109
+ "type": "array",
110
+ "description": "Names held for the DID, including disabled ones — a disabled name is still held and cannot be taken by anyone else.",
111
+ "items": {
112
+ "$ref": "#/$defs/AgentNameEntry"
113
+ }
114
+ },
115
+ "ext": {
116
+ "$ref": "#/$defs/Ext"
117
+ }
118
+ }
119
+ },
120
+ "Ext": {
121
+ "title": "Ext",
122
+ "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.",
123
+ "type": "object",
124
+ "minProperties": 1,
125
+ "additionalProperties": true,
126
+ "propertyNames": {
127
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
128
+ }
129
+ },
130
+ "AgentNameEntry": {
131
+ "title": "AgentNameEntry",
132
+ "description": "An agent name bound to a DID. A name is only ever authoritative in the DID→name direction: the DID document's `alsoKnownAs` is what proves the binding, because anyone controlling a domain can point a name at somebody else's DID.",
133
+ "type": "object",
134
+ "additionalProperties": false,
135
+ "required": [
136
+ "name",
137
+ "enabled"
138
+ ],
139
+ "properties": {
140
+ "name": {
141
+ "type": "string",
142
+ "description": "The name, without the host — the full form is `<host>/@<name>`."
143
+ },
144
+ "enabled": {
145
+ "type": "boolean",
146
+ "description": "Whether the name currently resolves. A disabled name is still held — it is not available for anyone else to take."
147
+ },
148
+ "createdAt": {
149
+ "type": "integer",
150
+ "minimum": 0,
151
+ "description": "Unix epoch seconds."
152
+ },
153
+ "ext": {
154
+ "$ref": "#/$defs/Ext"
155
+ }
156
+ }
157
+ }
158
+ }
159
+ } as const;
160
+
161
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
162
+ export const RESPONSE_PAYLOAD_SCHEMA = {
163
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
164
+ "$ref": "#/$defs/Response",
165
+ "$defs": {
166
+ "Response": {
167
+ "$anchor": "response",
168
+ "title": "VTA WebVH Agent-Name List — response payload",
169
+ "description": "Success response to vta/webvh/agent-name/list. Type https://trusttasks.org/spec/vta/webvh/agent-name/list/1.0#response.",
170
+ "type": "object",
171
+ "additionalProperties": false,
172
+ "required": [
173
+ "did",
174
+ "names"
175
+ ],
176
+ "properties": {
177
+ "did": {
178
+ "type": "string"
179
+ },
180
+ "names": {
181
+ "type": "array",
182
+ "description": "Names held for the DID, including disabled ones — a disabled name is still held and cannot be taken by anyone else.",
183
+ "items": {
184
+ "$ref": "#/$defs/AgentNameEntry"
185
+ }
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
+ "AgentNameEntry": {
203
+ "title": "AgentNameEntry",
204
+ "description": "An agent name bound to a DID. A name is only ever authoritative in the DID→name direction: the DID document's `alsoKnownAs` is what proves the binding, because anyone controlling a domain can point a name at somebody else's DID.",
205
+ "type": "object",
206
+ "additionalProperties": false,
207
+ "required": [
208
+ "name",
209
+ "enabled"
210
+ ],
211
+ "properties": {
212
+ "name": {
213
+ "type": "string",
214
+ "description": "The name, without the host — the full form is `<host>/@<name>`."
215
+ },
216
+ "enabled": {
217
+ "type": "boolean",
218
+ "description": "Whether the name currently resolves. A disabled name is still held — it is not available for anyone else to take."
219
+ },
220
+ "createdAt": {
221
+ "type": "integer",
222
+ "minimum": 0,
223
+ "description": "Unix epoch seconds."
224
+ },
225
+ "ext": {
226
+ "$ref": "#/$defs/Ext"
227
+ }
228
+ }
229
+ }
230
+ }
231
+ } as const;
232
+
233
+ /**
234
+ * SPEC.md §7.2 policy for the request variant, from this specification's
235
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
236
+ * per-specification and cannot be derived from the document alone, and
237
+ * item 2 needs the schema this carries.
238
+ */
239
+ export const SPEC = {
240
+ typeUri: TYPE_URI,
241
+ isBearer: false,
242
+ isProofRequired: false,
243
+ isRecipientRequired: true,
244
+ payloadSchema: PAYLOAD_SCHEMA,
245
+ } as const;
246
+
247
+ /**
248
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
249
+ * tracks the *issuer* party's requirement because a response swaps the
250
+ * parties (§7.3 item 5).
251
+ */
252
+ export const RESPONSE_SPEC = {
253
+ typeUri: RESPONSE_TYPE_URI,
254
+ isBearer: false,
255
+ isProofRequired: false,
256
+ isRecipientRequired: true,
257
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
258
+ } as const;