@openvtc/trust-tasks 0.9.0 → 0.10.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.
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -1
- package/dist/vta/_shared/0.1/context.d.ts +11 -0
- package/dist/vta/_shared/0.1/context.d.ts.map +1 -0
- package/dist/vta/_shared/0.1/context.js +6 -0
- package/dist/vta/_shared/0.1/context.js.map +1 -0
- package/dist/vta/_shared/0.1/webvh-records.d.ts +11 -0
- package/dist/vta/_shared/0.1/webvh-records.d.ts.map +1 -0
- package/dist/vta/_shared/0.1/webvh-records.js +6 -0
- package/dist/vta/_shared/0.1/webvh-records.js.map +1 -0
- package/dist/vta/contexts/create/1.0/payload.d.ts +443 -0
- package/dist/vta/contexts/create/1.0/payload.d.ts.map +1 -0
- package/dist/vta/contexts/create/1.0/payload.js +226 -0
- package/dist/vta/contexts/create/1.0/payload.js.map +1 -0
- package/dist/vta/contexts/delete/1.0/payload.d.ts +256 -0
- package/dist/vta/contexts/delete/1.0/payload.d.ts.map +1 -0
- package/dist/vta/contexts/delete/1.0/payload.js +143 -0
- package/dist/vta/contexts/delete/1.0/payload.js.map +1 -0
- package/dist/vta/contexts/get/1.0/payload.d.ts +405 -0
- package/dist/vta/contexts/get/1.0/payload.d.ts.map +1 -0
- package/dist/vta/contexts/get/1.0/payload.js +212 -0
- package/dist/vta/contexts/get/1.0/payload.js.map +1 -0
- package/dist/vta/contexts/list/1.0/payload.d.ts +460 -0
- package/dist/vta/contexts/list/1.0/payload.d.ts.map +1 -0
- package/dist/vta/contexts/list/1.0/payload.js +237 -0
- package/dist/vta/contexts/list/1.0/payload.js.map +1 -0
- package/dist/vta/contexts/preview-delete/1.0/payload.d.ts +394 -0
- package/dist/vta/contexts/preview-delete/1.0/payload.d.ts.map +1 -0
- package/dist/vta/contexts/preview-delete/1.0/payload.js +209 -0
- package/dist/vta/contexts/preview-delete/1.0/payload.js.map +1 -0
- package/dist/vta/contexts/update/1.0/payload.d.ts +653 -0
- package/dist/vta/contexts/update/1.0/payload.d.ts.map +1 -0
- package/dist/vta/contexts/update/1.0/payload.js +314 -0
- package/dist/vta/contexts/update/1.0/payload.js.map +1 -0
- package/dist/vta/contexts/update-did/1.0/payload.d.ts +419 -0
- package/dist/vta/contexts/update-did/1.0/payload.d.ts.map +1 -0
- package/dist/vta/contexts/update-did/1.0/payload.js +218 -0
- package/dist/vta/contexts/update-did/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/agent-name/check/1.0/payload.d.ts +301 -0
- package/dist/vta/webvh/agent-name/check/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/agent-name/check/1.0/payload.js +165 -0
- package/dist/vta/webvh/agent-name/check/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/agent-name/disable/1.0/payload.d.ts +274 -0
- package/dist/vta/webvh/agent-name/disable/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/agent-name/disable/1.0/payload.js +153 -0
- package/dist/vta/webvh/agent-name/disable/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/agent-name/enable/1.0/payload.d.ts +274 -0
- package/dist/vta/webvh/agent-name/enable/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/agent-name/enable/1.0/payload.js +153 -0
- package/dist/vta/webvh/agent-name/enable/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/agent-name/list/1.0/payload.d.ts +377 -0
- package/dist/vta/webvh/agent-name/list/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/agent-name/list/1.0/payload.js +201 -0
- package/dist/vta/webvh/agent-name/list/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/agent-name/remove/1.0/payload.d.ts +274 -0
- package/dist/vta/webvh/agent-name/remove/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/agent-name/remove/1.0/payload.js +153 -0
- package/dist/vta/webvh/agent-name/remove/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/agent-name/set/1.0/payload.d.ts +274 -0
- package/dist/vta/webvh/agent-name/set/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/agent-name/set/1.0/payload.js +153 -0
- package/dist/vta/webvh/agent-name/set/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/create/1.0/payload.d.ts +806 -0
- package/dist/vta/webvh/dids/create/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/create/1.0/payload.js +400 -0
- package/dist/vta/webvh/dids/create/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/delete/1.0/payload.d.ts +257 -0
- package/dist/vta/webvh/dids/delete/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/delete/1.0/payload.js +145 -0
- package/dist/vta/webvh/dids/delete/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/get/1.0/payload.d.ts +539 -0
- package/dist/vta/webvh/dids/get/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/get/1.0/payload.js +282 -0
- package/dist/vta/webvh/dids/get/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/list/1.0/payload.d.ts +537 -0
- package/dist/vta/webvh/dids/list/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/list/1.0/payload.js +278 -0
- package/dist/vta/webvh/dids/list/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/register-with-server/1.0/payload.d.ts +299 -0
- package/dist/vta/webvh/dids/register-with-server/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/register-with-server/1.0/payload.js +163 -0
- package/dist/vta/webvh/dids/register-with-server/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/rotate-keys/1.0/payload.d.ts +357 -0
- package/dist/vta/webvh/dids/rotate-keys/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/rotate-keys/1.0/payload.js +196 -0
- package/dist/vta/webvh/dids/rotate-keys/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/servers/list/1.0/payload.d.ts +366 -0
- package/dist/vta/webvh/servers/list/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/servers/list/1.0/payload.js +200 -0
- package/dist/vta/webvh/servers/list/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/servers/register/1.0/payload.d.ts +335 -0
- package/dist/vta/webvh/servers/register/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/servers/register/1.0/payload.js +183 -0
- package/dist/vta/webvh/servers/register/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/servers/remove/1.0/payload.d.ts +237 -0
- package/dist/vta/webvh/servers/remove/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/servers/remove/1.0/payload.js +137 -0
- package/dist/vta/webvh/servers/remove/1.0/payload.js.map +1 -0
- package/package.json +2 -1
- package/src/index.ts +24 -0
- package/src/vta/_shared/0.1/context.ts +11 -0
- package/src/vta/_shared/0.1/webvh-records.ts +11 -0
- package/src/vta/contexts/create/1.0/payload.ts +301 -0
- package/src/vta/contexts/delete/1.0/payload.ts +183 -0
- package/src/vta/contexts/get/1.0/payload.ts +275 -0
- package/src/vta/contexts/list/1.0/payload.ts +309 -0
- package/src/vta/contexts/preview-delete/1.0/payload.ts +267 -0
- package/src/vta/contexts/update/1.0/payload.ts +421 -0
- package/src/vta/contexts/update-did/1.0/payload.ts +285 -0
- package/src/vta/webvh/agent-name/check/1.0/payload.ts +216 -0
- package/src/vta/webvh/agent-name/disable/1.0/payload.ts +197 -0
- package/src/vta/webvh/agent-name/enable/1.0/payload.ts +197 -0
- package/src/vta/webvh/agent-name/list/1.0/payload.ts +258 -0
- package/src/vta/webvh/agent-name/remove/1.0/payload.ts +197 -0
- package/src/vta/webvh/agent-name/set/1.0/payload.ts +197 -0
- package/src/vta/webvh/dids/create/1.0/payload.ts +548 -0
- package/src/vta/webvh/dids/delete/1.0/payload.ts +182 -0
- package/src/vta/webvh/dids/get/1.0/payload.ts +363 -0
- package/src/vta/webvh/dids/list/1.0/payload.ts +361 -0
- package/src/vta/webvh/dids/register-with-server/1.0/payload.ts +212 -0
- package/src/vta/webvh/dids/rotate-keys/1.0/payload.ts +251 -0
- package/src/vta/webvh/servers/list/1.0/payload.ts +248 -0
- package/src/vta/webvh/servers/register/1.0/payload.ts +230 -0
- package/src/vta/webvh/servers/remove/1.0/payload.ts +170 -0
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/contexts/update-did/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface VTAContextsUpdateDIDPayload {
|
|
7
|
+
/**
|
|
8
|
+
* Context whose DID is being set.
|
|
9
|
+
*/
|
|
10
|
+
id: string;
|
|
11
|
+
/**
|
|
12
|
+
* The DID this context acts as from now on. Anything that authenticated or signed as the previous DID keeps referring to it; this task does not migrate those references, and a consumer MUST NOT imply that it does.
|
|
13
|
+
*/
|
|
14
|
+
did: string;
|
|
15
|
+
ext?: Ext;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* 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.
|
|
19
|
+
*/
|
|
20
|
+
export interface Ext {
|
|
21
|
+
[k: string]: unknown | undefined;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A context as the VTA holds it.
|
|
25
|
+
*/
|
|
26
|
+
export interface ContextRecord {
|
|
27
|
+
/**
|
|
28
|
+
* 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.
|
|
29
|
+
*/
|
|
30
|
+
id: string;
|
|
31
|
+
/**
|
|
32
|
+
* Human-readable name. Operator-facing only; carries no authorization meaning, and two contexts may share a name.
|
|
33
|
+
*/
|
|
34
|
+
name: string;
|
|
35
|
+
/**
|
|
36
|
+
* 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.
|
|
37
|
+
*/
|
|
38
|
+
did?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Free-form description.
|
|
41
|
+
*/
|
|
42
|
+
description?: string;
|
|
43
|
+
/**
|
|
44
|
+
* 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.
|
|
45
|
+
*/
|
|
46
|
+
parent?: string;
|
|
47
|
+
/**
|
|
48
|
+
* 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.
|
|
49
|
+
*/
|
|
50
|
+
basePath: string;
|
|
51
|
+
/**
|
|
52
|
+
* RFC 3339.
|
|
53
|
+
*/
|
|
54
|
+
createdAt: string;
|
|
55
|
+
/**
|
|
56
|
+
* RFC 3339.
|
|
57
|
+
*/
|
|
58
|
+
updatedAt: string;
|
|
59
|
+
ext?: Ext;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** Trust Task type URI. */
|
|
63
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/contexts/update-did/1.0" as const;
|
|
64
|
+
|
|
65
|
+
/** Stable alias for this specification's request payload shape. */
|
|
66
|
+
export type Payload = VTAContextsUpdateDIDPayload;
|
|
67
|
+
|
|
68
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
69
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/contexts/update-did/1.0#response" as const;
|
|
70
|
+
|
|
71
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
72
|
+
export type Response = ContextRecord;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* This specification's payload schema, as a value.
|
|
76
|
+
*
|
|
77
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
78
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
79
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
80
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
81
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
82
|
+
*/
|
|
83
|
+
export const PAYLOAD_SCHEMA = {
|
|
84
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
85
|
+
"$id": "https://trusttasks.org/spec/vta/contexts/update-did/1.0",
|
|
86
|
+
"title": "VTA Contexts Update-DID — payload",
|
|
87
|
+
"type": "object",
|
|
88
|
+
"additionalProperties": false,
|
|
89
|
+
"required": [
|
|
90
|
+
"id",
|
|
91
|
+
"did"
|
|
92
|
+
],
|
|
93
|
+
"properties": {
|
|
94
|
+
"id": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"minLength": 1,
|
|
97
|
+
"description": "Context whose DID is being set."
|
|
98
|
+
},
|
|
99
|
+
"did": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"minLength": 1,
|
|
102
|
+
"description": "The DID this context acts as from now on. Anything that authenticated or signed as the previous DID keeps referring to it; this task does not migrate those references, and a consumer MUST NOT imply that it does."
|
|
103
|
+
},
|
|
104
|
+
"ext": {
|
|
105
|
+
"$ref": "#/$defs/Ext"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"$defs": {
|
|
109
|
+
"Response": {
|
|
110
|
+
"$anchor": "response",
|
|
111
|
+
"title": "VTA Contexts Update-DID — response payload",
|
|
112
|
+
"description": "Success response to vta/contexts/update-did: the context as it now stands. Type https://trusttasks.org/spec/vta/contexts/update-did/1.0#response.",
|
|
113
|
+
"$ref": "#/$defs/ContextRecord"
|
|
114
|
+
},
|
|
115
|
+
"ContextRecord": {
|
|
116
|
+
"title": "ContextRecord",
|
|
117
|
+
"description": "A context as the VTA holds it.",
|
|
118
|
+
"type": "object",
|
|
119
|
+
"additionalProperties": false,
|
|
120
|
+
"required": [
|
|
121
|
+
"id",
|
|
122
|
+
"name",
|
|
123
|
+
"basePath",
|
|
124
|
+
"createdAt",
|
|
125
|
+
"updatedAt"
|
|
126
|
+
],
|
|
127
|
+
"properties": {
|
|
128
|
+
"id": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"minLength": 1,
|
|
131
|
+
"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."
|
|
132
|
+
},
|
|
133
|
+
"name": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"minLength": 1,
|
|
136
|
+
"description": "Human-readable name. Operator-facing only; carries no authorization meaning, and two contexts may share a name."
|
|
137
|
+
},
|
|
138
|
+
"did": {
|
|
139
|
+
"type": "string",
|
|
140
|
+
"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."
|
|
141
|
+
},
|
|
142
|
+
"description": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"description": "Free-form description."
|
|
145
|
+
},
|
|
146
|
+
"parent": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"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."
|
|
149
|
+
},
|
|
150
|
+
"basePath": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"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."
|
|
153
|
+
},
|
|
154
|
+
"createdAt": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"format": "date-time",
|
|
157
|
+
"description": "RFC 3339."
|
|
158
|
+
},
|
|
159
|
+
"updatedAt": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"format": "date-time",
|
|
162
|
+
"description": "RFC 3339."
|
|
163
|
+
},
|
|
164
|
+
"ext": {
|
|
165
|
+
"$ref": "#/$defs/Ext"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"Ext": {
|
|
170
|
+
"title": "Ext",
|
|
171
|
+
"description": "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.",
|
|
172
|
+
"type": "object",
|
|
173
|
+
"minProperties": 1,
|
|
174
|
+
"additionalProperties": true,
|
|
175
|
+
"propertyNames": {
|
|
176
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
} as const;
|
|
181
|
+
|
|
182
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
183
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
184
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
185
|
+
"$ref": "#/$defs/Response",
|
|
186
|
+
"$defs": {
|
|
187
|
+
"Response": {
|
|
188
|
+
"$anchor": "response",
|
|
189
|
+
"title": "VTA Contexts Update-DID — response payload",
|
|
190
|
+
"description": "Success response to vta/contexts/update-did: the context as it now stands. Type https://trusttasks.org/spec/vta/contexts/update-did/1.0#response.",
|
|
191
|
+
"$ref": "#/$defs/ContextRecord"
|
|
192
|
+
},
|
|
193
|
+
"ContextRecord": {
|
|
194
|
+
"title": "ContextRecord",
|
|
195
|
+
"description": "A context as the VTA holds it.",
|
|
196
|
+
"type": "object",
|
|
197
|
+
"additionalProperties": false,
|
|
198
|
+
"required": [
|
|
199
|
+
"id",
|
|
200
|
+
"name",
|
|
201
|
+
"basePath",
|
|
202
|
+
"createdAt",
|
|
203
|
+
"updatedAt"
|
|
204
|
+
],
|
|
205
|
+
"properties": {
|
|
206
|
+
"id": {
|
|
207
|
+
"type": "string",
|
|
208
|
+
"minLength": 1,
|
|
209
|
+
"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."
|
|
210
|
+
},
|
|
211
|
+
"name": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"minLength": 1,
|
|
214
|
+
"description": "Human-readable name. Operator-facing only; carries no authorization meaning, and two contexts may share a name."
|
|
215
|
+
},
|
|
216
|
+
"did": {
|
|
217
|
+
"type": "string",
|
|
218
|
+
"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."
|
|
219
|
+
},
|
|
220
|
+
"description": {
|
|
221
|
+
"type": "string",
|
|
222
|
+
"description": "Free-form description."
|
|
223
|
+
},
|
|
224
|
+
"parent": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"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."
|
|
227
|
+
},
|
|
228
|
+
"basePath": {
|
|
229
|
+
"type": "string",
|
|
230
|
+
"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."
|
|
231
|
+
},
|
|
232
|
+
"createdAt": {
|
|
233
|
+
"type": "string",
|
|
234
|
+
"format": "date-time",
|
|
235
|
+
"description": "RFC 3339."
|
|
236
|
+
},
|
|
237
|
+
"updatedAt": {
|
|
238
|
+
"type": "string",
|
|
239
|
+
"format": "date-time",
|
|
240
|
+
"description": "RFC 3339."
|
|
241
|
+
},
|
|
242
|
+
"ext": {
|
|
243
|
+
"$ref": "#/$defs/Ext"
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"Ext": {
|
|
248
|
+
"title": "Ext",
|
|
249
|
+
"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.",
|
|
250
|
+
"type": "object",
|
|
251
|
+
"minProperties": 1,
|
|
252
|
+
"additionalProperties": true,
|
|
253
|
+
"propertyNames": {
|
|
254
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
} as const;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
262
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
263
|
+
* per-specification and cannot be derived from the document alone, and
|
|
264
|
+
* item 2 needs the schema this carries.
|
|
265
|
+
*/
|
|
266
|
+
export const SPEC = {
|
|
267
|
+
typeUri: TYPE_URI,
|
|
268
|
+
isBearer: false,
|
|
269
|
+
isProofRequired: true,
|
|
270
|
+
isRecipientRequired: true,
|
|
271
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
272
|
+
} as const;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
276
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
277
|
+
* parties (§7.3 item 5).
|
|
278
|
+
*/
|
|
279
|
+
export const RESPONSE_SPEC = {
|
|
280
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
281
|
+
isBearer: false,
|
|
282
|
+
isProofRequired: true,
|
|
283
|
+
isRecipientRequired: true,
|
|
284
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
285
|
+
} as const;
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/webvh/agent-name/check/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Ask whether a name is free before trying to take it.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTAWebVHAgentNameCheckPayload {
|
|
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/check. Type https://trusttasks.org/spec/vta/webvh/agent-name/check/1.0#response.
|
|
28
|
+
*/
|
|
29
|
+
export interface VTAWebVHAgentNameCheckResponsePayload {
|
|
30
|
+
name: string;
|
|
31
|
+
/**
|
|
32
|
+
* Host the name would live under. A name is only unique within its host.
|
|
33
|
+
*/
|
|
34
|
+
domain: string;
|
|
35
|
+
/**
|
|
36
|
+
* Whether the name can be taken **now**. It is a snapshot, not a hold: another caller may take it between this answer and the attempt.
|
|
37
|
+
*/
|
|
38
|
+
available: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Whether the name is withheld by the host's own policy rather than taken by a DID. A reserved name is not available and will not become so by waiting.
|
|
41
|
+
*/
|
|
42
|
+
reserved: boolean;
|
|
43
|
+
ext?: Ext;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Trust Task type URI. */
|
|
47
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/webvh/agent-name/check/1.0" as const;
|
|
48
|
+
|
|
49
|
+
/** Stable alias for this specification's request payload shape. */
|
|
50
|
+
export type Payload = VTAWebVHAgentNameCheckPayload;
|
|
51
|
+
|
|
52
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
53
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/webvh/agent-name/check/1.0#response" as const;
|
|
54
|
+
|
|
55
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
56
|
+
export type Response = VTAWebVHAgentNameCheckResponsePayload;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* This specification's payload schema, as a value.
|
|
60
|
+
*
|
|
61
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
62
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
63
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
64
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
65
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
66
|
+
*/
|
|
67
|
+
export const PAYLOAD_SCHEMA = {
|
|
68
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
69
|
+
"$id": "https://trusttasks.org/spec/vta/webvh/agent-name/check/1.0",
|
|
70
|
+
"title": "VTA WebVH Agent-Name Check — payload",
|
|
71
|
+
"description": "Ask whether a name is free before trying to take it.",
|
|
72
|
+
"type": "object",
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"required": [
|
|
75
|
+
"did",
|
|
76
|
+
"name"
|
|
77
|
+
],
|
|
78
|
+
"properties": {
|
|
79
|
+
"did": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"minLength": 1,
|
|
82
|
+
"description": "DID the name is bound to."
|
|
83
|
+
},
|
|
84
|
+
"name": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"minLength": 1,
|
|
87
|
+
"description": "The name, without the host — the full form is `<host>/@<name>`."
|
|
88
|
+
},
|
|
89
|
+
"ext": {
|
|
90
|
+
"$ref": "#/$defs/Ext"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"$defs": {
|
|
94
|
+
"Response": {
|
|
95
|
+
"$anchor": "response",
|
|
96
|
+
"title": "VTA WebVH Agent-Name Check — response payload",
|
|
97
|
+
"description": "Success response to vta/webvh/agent-name/check. Type https://trusttasks.org/spec/vta/webvh/agent-name/check/1.0#response.",
|
|
98
|
+
"type": "object",
|
|
99
|
+
"additionalProperties": false,
|
|
100
|
+
"required": [
|
|
101
|
+
"name",
|
|
102
|
+
"domain",
|
|
103
|
+
"available",
|
|
104
|
+
"reserved"
|
|
105
|
+
],
|
|
106
|
+
"properties": {
|
|
107
|
+
"name": {
|
|
108
|
+
"type": "string"
|
|
109
|
+
},
|
|
110
|
+
"domain": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"description": "Host the name would live under. A name is only unique within its host."
|
|
113
|
+
},
|
|
114
|
+
"available": {
|
|
115
|
+
"type": "boolean",
|
|
116
|
+
"description": "Whether the name can be taken **now**. It is a snapshot, not a hold: another caller may take it between this answer and the attempt."
|
|
117
|
+
},
|
|
118
|
+
"reserved": {
|
|
119
|
+
"type": "boolean",
|
|
120
|
+
"description": "Whether the name is withheld by the host's own policy rather than taken by a DID. A reserved name is not available and will not become so by waiting."
|
|
121
|
+
},
|
|
122
|
+
"ext": {
|
|
123
|
+
"$ref": "#/$defs/Ext"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"Ext": {
|
|
128
|
+
"title": "Ext",
|
|
129
|
+
"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.",
|
|
130
|
+
"type": "object",
|
|
131
|
+
"minProperties": 1,
|
|
132
|
+
"additionalProperties": true,
|
|
133
|
+
"propertyNames": {
|
|
134
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
} as const;
|
|
139
|
+
|
|
140
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
141
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
142
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
143
|
+
"$ref": "#/$defs/Response",
|
|
144
|
+
"$defs": {
|
|
145
|
+
"Response": {
|
|
146
|
+
"$anchor": "response",
|
|
147
|
+
"title": "VTA WebVH Agent-Name Check — response payload",
|
|
148
|
+
"description": "Success response to vta/webvh/agent-name/check. Type https://trusttasks.org/spec/vta/webvh/agent-name/check/1.0#response.",
|
|
149
|
+
"type": "object",
|
|
150
|
+
"additionalProperties": false,
|
|
151
|
+
"required": [
|
|
152
|
+
"name",
|
|
153
|
+
"domain",
|
|
154
|
+
"available",
|
|
155
|
+
"reserved"
|
|
156
|
+
],
|
|
157
|
+
"properties": {
|
|
158
|
+
"name": {
|
|
159
|
+
"type": "string"
|
|
160
|
+
},
|
|
161
|
+
"domain": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"description": "Host the name would live under. A name is only unique within its host."
|
|
164
|
+
},
|
|
165
|
+
"available": {
|
|
166
|
+
"type": "boolean",
|
|
167
|
+
"description": "Whether the name can be taken **now**. It is a snapshot, not a hold: another caller may take it between this answer and the attempt."
|
|
168
|
+
},
|
|
169
|
+
"reserved": {
|
|
170
|
+
"type": "boolean",
|
|
171
|
+
"description": "Whether the name is withheld by the host's own policy rather than taken by a DID. A reserved name is not available and will not become so by waiting."
|
|
172
|
+
},
|
|
173
|
+
"ext": {
|
|
174
|
+
"$ref": "#/$defs/Ext"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"Ext": {
|
|
179
|
+
"title": "Ext",
|
|
180
|
+
"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.",
|
|
181
|
+
"type": "object",
|
|
182
|
+
"minProperties": 1,
|
|
183
|
+
"additionalProperties": true,
|
|
184
|
+
"propertyNames": {
|
|
185
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
} as const;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
193
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
194
|
+
* per-specification and cannot be derived from the document alone, and
|
|
195
|
+
* item 2 needs the schema this carries.
|
|
196
|
+
*/
|
|
197
|
+
export const SPEC = {
|
|
198
|
+
typeUri: TYPE_URI,
|
|
199
|
+
isBearer: false,
|
|
200
|
+
isProofRequired: false,
|
|
201
|
+
isRecipientRequired: true,
|
|
202
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
203
|
+
} as const;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
207
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
208
|
+
* parties (§7.3 item 5).
|
|
209
|
+
*/
|
|
210
|
+
export const RESPONSE_SPEC = {
|
|
211
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
212
|
+
isBearer: false,
|
|
213
|
+
isProofRequired: false,
|
|
214
|
+
isRecipientRequired: true,
|
|
215
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
216
|
+
} 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/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;
|