@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,275 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/contexts/get/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface VTAContextsGetPayload {
|
|
7
|
+
/**
|
|
8
|
+
* Context id. For a nested context this is the full path (`parent/leaf`).
|
|
9
|
+
*/
|
|
10
|
+
id: string;
|
|
11
|
+
ext?: Ext;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 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.
|
|
15
|
+
*/
|
|
16
|
+
export interface Ext {
|
|
17
|
+
[k: string]: unknown | undefined;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A context as the VTA holds it.
|
|
21
|
+
*/
|
|
22
|
+
export interface ContextRecord {
|
|
23
|
+
/**
|
|
24
|
+
* 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.
|
|
25
|
+
*/
|
|
26
|
+
id: string;
|
|
27
|
+
/**
|
|
28
|
+
* Human-readable name. Operator-facing only; carries no authorization meaning, and two contexts may share a name.
|
|
29
|
+
*/
|
|
30
|
+
name: string;
|
|
31
|
+
/**
|
|
32
|
+
* 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.
|
|
33
|
+
*/
|
|
34
|
+
did?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Free-form description.
|
|
37
|
+
*/
|
|
38
|
+
description?: string;
|
|
39
|
+
/**
|
|
40
|
+
* 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.
|
|
41
|
+
*/
|
|
42
|
+
parent?: string;
|
|
43
|
+
/**
|
|
44
|
+
* 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.
|
|
45
|
+
*/
|
|
46
|
+
basePath: string;
|
|
47
|
+
/**
|
|
48
|
+
* RFC 3339.
|
|
49
|
+
*/
|
|
50
|
+
createdAt: string;
|
|
51
|
+
/**
|
|
52
|
+
* RFC 3339.
|
|
53
|
+
*/
|
|
54
|
+
updatedAt: string;
|
|
55
|
+
ext?: Ext;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** Trust Task type URI. */
|
|
59
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/contexts/get/1.0" as const;
|
|
60
|
+
|
|
61
|
+
/** Stable alias for this specification's request payload shape. */
|
|
62
|
+
export type Payload = VTAContextsGetPayload;
|
|
63
|
+
|
|
64
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
65
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/contexts/get/1.0#response" as const;
|
|
66
|
+
|
|
67
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
68
|
+
export type Response = ContextRecord;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* This specification's payload schema, as a value.
|
|
72
|
+
*
|
|
73
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
74
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
75
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
76
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
77
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
78
|
+
*/
|
|
79
|
+
export const PAYLOAD_SCHEMA = {
|
|
80
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
81
|
+
"$id": "https://trusttasks.org/spec/vta/contexts/get/1.0",
|
|
82
|
+
"title": "VTA Contexts Get — payload",
|
|
83
|
+
"type": "object",
|
|
84
|
+
"additionalProperties": false,
|
|
85
|
+
"required": [
|
|
86
|
+
"id"
|
|
87
|
+
],
|
|
88
|
+
"properties": {
|
|
89
|
+
"id": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"minLength": 1,
|
|
92
|
+
"description": "Context id. For a nested context this is the full path (`parent/leaf`)."
|
|
93
|
+
},
|
|
94
|
+
"ext": {
|
|
95
|
+
"$ref": "#/$defs/Ext"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"$defs": {
|
|
99
|
+
"Response": {
|
|
100
|
+
"$anchor": "response",
|
|
101
|
+
"title": "VTA Contexts Get — response payload",
|
|
102
|
+
"description": "Success response to vta/contexts/get: the context record, at the top level rather than wrapped. Type https://trusttasks.org/spec/vta/contexts/get/1.0#response.",
|
|
103
|
+
"$ref": "#/$defs/ContextRecord"
|
|
104
|
+
},
|
|
105
|
+
"ContextRecord": {
|
|
106
|
+
"title": "ContextRecord",
|
|
107
|
+
"description": "A context as the VTA holds it.",
|
|
108
|
+
"type": "object",
|
|
109
|
+
"additionalProperties": false,
|
|
110
|
+
"required": [
|
|
111
|
+
"id",
|
|
112
|
+
"name",
|
|
113
|
+
"basePath",
|
|
114
|
+
"createdAt",
|
|
115
|
+
"updatedAt"
|
|
116
|
+
],
|
|
117
|
+
"properties": {
|
|
118
|
+
"id": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"minLength": 1,
|
|
121
|
+
"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."
|
|
122
|
+
},
|
|
123
|
+
"name": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"minLength": 1,
|
|
126
|
+
"description": "Human-readable name. Operator-facing only; carries no authorization meaning, and two contexts may share a name."
|
|
127
|
+
},
|
|
128
|
+
"did": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"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."
|
|
131
|
+
},
|
|
132
|
+
"description": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"description": "Free-form description."
|
|
135
|
+
},
|
|
136
|
+
"parent": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"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."
|
|
139
|
+
},
|
|
140
|
+
"basePath": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"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."
|
|
143
|
+
},
|
|
144
|
+
"createdAt": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"format": "date-time",
|
|
147
|
+
"description": "RFC 3339."
|
|
148
|
+
},
|
|
149
|
+
"updatedAt": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"format": "date-time",
|
|
152
|
+
"description": "RFC 3339."
|
|
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
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
173
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
174
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
175
|
+
"$ref": "#/$defs/Response",
|
|
176
|
+
"$defs": {
|
|
177
|
+
"Response": {
|
|
178
|
+
"$anchor": "response",
|
|
179
|
+
"title": "VTA Contexts Get — response payload",
|
|
180
|
+
"description": "Success response to vta/contexts/get: the context record, at the top level rather than wrapped. Type https://trusttasks.org/spec/vta/contexts/get/1.0#response.",
|
|
181
|
+
"$ref": "#/$defs/ContextRecord"
|
|
182
|
+
},
|
|
183
|
+
"ContextRecord": {
|
|
184
|
+
"title": "ContextRecord",
|
|
185
|
+
"description": "A context as the VTA holds it.",
|
|
186
|
+
"type": "object",
|
|
187
|
+
"additionalProperties": false,
|
|
188
|
+
"required": [
|
|
189
|
+
"id",
|
|
190
|
+
"name",
|
|
191
|
+
"basePath",
|
|
192
|
+
"createdAt",
|
|
193
|
+
"updatedAt"
|
|
194
|
+
],
|
|
195
|
+
"properties": {
|
|
196
|
+
"id": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"minLength": 1,
|
|
199
|
+
"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."
|
|
200
|
+
},
|
|
201
|
+
"name": {
|
|
202
|
+
"type": "string",
|
|
203
|
+
"minLength": 1,
|
|
204
|
+
"description": "Human-readable name. Operator-facing only; carries no authorization meaning, and two contexts may share a name."
|
|
205
|
+
},
|
|
206
|
+
"did": {
|
|
207
|
+
"type": "string",
|
|
208
|
+
"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."
|
|
209
|
+
},
|
|
210
|
+
"description": {
|
|
211
|
+
"type": "string",
|
|
212
|
+
"description": "Free-form description."
|
|
213
|
+
},
|
|
214
|
+
"parent": {
|
|
215
|
+
"type": "string",
|
|
216
|
+
"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."
|
|
217
|
+
},
|
|
218
|
+
"basePath": {
|
|
219
|
+
"type": "string",
|
|
220
|
+
"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."
|
|
221
|
+
},
|
|
222
|
+
"createdAt": {
|
|
223
|
+
"type": "string",
|
|
224
|
+
"format": "date-time",
|
|
225
|
+
"description": "RFC 3339."
|
|
226
|
+
},
|
|
227
|
+
"updatedAt": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"format": "date-time",
|
|
230
|
+
"description": "RFC 3339."
|
|
231
|
+
},
|
|
232
|
+
"ext": {
|
|
233
|
+
"$ref": "#/$defs/Ext"
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"Ext": {
|
|
238
|
+
"title": "Ext",
|
|
239
|
+
"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.",
|
|
240
|
+
"type": "object",
|
|
241
|
+
"minProperties": 1,
|
|
242
|
+
"additionalProperties": true,
|
|
243
|
+
"propertyNames": {
|
|
244
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
} as const;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
252
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
253
|
+
* per-specification and cannot be derived from the document alone, and
|
|
254
|
+
* item 2 needs the schema this carries.
|
|
255
|
+
*/
|
|
256
|
+
export const SPEC = {
|
|
257
|
+
typeUri: TYPE_URI,
|
|
258
|
+
isBearer: false,
|
|
259
|
+
isProofRequired: false,
|
|
260
|
+
isRecipientRequired: true,
|
|
261
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
262
|
+
} as const;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
266
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
267
|
+
* parties (§7.3 item 5).
|
|
268
|
+
*/
|
|
269
|
+
export const RESPONSE_SPEC = {
|
|
270
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
271
|
+
isBearer: false,
|
|
272
|
+
isProofRequired: false,
|
|
273
|
+
isRecipientRequired: true,
|
|
274
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
275
|
+
} as const;
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/contexts/list/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Request payload for vta/contexts/list. Takes no filters: the result is already narrowed to what the caller may reach.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTAContextsListPayload {
|
|
10
|
+
ext?: Ext;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 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.
|
|
14
|
+
*/
|
|
15
|
+
export interface Ext {
|
|
16
|
+
[k: string]: unknown | undefined;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Success response to vta/contexts/list. Type https://trusttasks.org/spec/vta/contexts/list/1.0#response.
|
|
20
|
+
*/
|
|
21
|
+
export interface VTAContextsListResponsePayload {
|
|
22
|
+
/**
|
|
23
|
+
* Contexts the caller may access, in maintainer-defined order. An empty array means the caller can reach none — which is a successful answer, and is not distinguishable from a VTA that holds none. A caller needing that distinction wants vta/contexts/get on a known id, which answers notFound.
|
|
24
|
+
*/
|
|
25
|
+
contexts: ContextRecord[];
|
|
26
|
+
ext?: Ext;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A context as the VTA holds it.
|
|
30
|
+
*/
|
|
31
|
+
export interface ContextRecord {
|
|
32
|
+
/**
|
|
33
|
+
* 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.
|
|
34
|
+
*/
|
|
35
|
+
id: string;
|
|
36
|
+
/**
|
|
37
|
+
* Human-readable name. Operator-facing only; carries no authorization meaning, and two contexts may share a name.
|
|
38
|
+
*/
|
|
39
|
+
name: string;
|
|
40
|
+
/**
|
|
41
|
+
* 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.
|
|
42
|
+
*/
|
|
43
|
+
did?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Free-form description.
|
|
46
|
+
*/
|
|
47
|
+
description?: string;
|
|
48
|
+
/**
|
|
49
|
+
* 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.
|
|
50
|
+
*/
|
|
51
|
+
parent?: string;
|
|
52
|
+
/**
|
|
53
|
+
* 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.
|
|
54
|
+
*/
|
|
55
|
+
basePath: string;
|
|
56
|
+
/**
|
|
57
|
+
* RFC 3339.
|
|
58
|
+
*/
|
|
59
|
+
createdAt: string;
|
|
60
|
+
/**
|
|
61
|
+
* RFC 3339.
|
|
62
|
+
*/
|
|
63
|
+
updatedAt: string;
|
|
64
|
+
ext?: Ext;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** Trust Task type URI. */
|
|
68
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/contexts/list/1.0" as const;
|
|
69
|
+
|
|
70
|
+
/** Stable alias for this specification's request payload shape. */
|
|
71
|
+
export type Payload = VTAContextsListPayload;
|
|
72
|
+
|
|
73
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
74
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/contexts/list/1.0#response" as const;
|
|
75
|
+
|
|
76
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
77
|
+
export type Response = VTAContextsListResponsePayload;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* This specification's payload schema, as a value.
|
|
81
|
+
*
|
|
82
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
83
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
84
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
85
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
86
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
87
|
+
*/
|
|
88
|
+
export const PAYLOAD_SCHEMA = {
|
|
89
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
90
|
+
"$id": "https://trusttasks.org/spec/vta/contexts/list/1.0",
|
|
91
|
+
"title": "VTA Contexts List — payload",
|
|
92
|
+
"description": "Request payload for vta/contexts/list. Takes no filters: the result is already narrowed to what the caller may reach.",
|
|
93
|
+
"type": "object",
|
|
94
|
+
"additionalProperties": false,
|
|
95
|
+
"properties": {
|
|
96
|
+
"ext": {
|
|
97
|
+
"$ref": "#/$defs/Ext"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"$defs": {
|
|
101
|
+
"Response": {
|
|
102
|
+
"$anchor": "response",
|
|
103
|
+
"title": "VTA Contexts List — response payload",
|
|
104
|
+
"description": "Success response to vta/contexts/list. Type https://trusttasks.org/spec/vta/contexts/list/1.0#response.",
|
|
105
|
+
"type": "object",
|
|
106
|
+
"additionalProperties": false,
|
|
107
|
+
"required": [
|
|
108
|
+
"contexts"
|
|
109
|
+
],
|
|
110
|
+
"properties": {
|
|
111
|
+
"contexts": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"description": "Contexts the caller may access, in maintainer-defined order. An empty array means the caller can reach none — which is a successful answer, and is not distinguishable from a VTA that holds none. A caller needing that distinction wants vta/contexts/get on a known id, which answers notFound.",
|
|
114
|
+
"items": {
|
|
115
|
+
"$ref": "#/$defs/ContextRecord"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"ext": {
|
|
119
|
+
"$ref": "#/$defs/Ext"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"Ext": {
|
|
124
|
+
"title": "Ext",
|
|
125
|
+
"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.",
|
|
126
|
+
"type": "object",
|
|
127
|
+
"minProperties": 1,
|
|
128
|
+
"additionalProperties": true,
|
|
129
|
+
"propertyNames": {
|
|
130
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"ContextRecord": {
|
|
134
|
+
"title": "ContextRecord",
|
|
135
|
+
"description": "A context as the VTA holds it.",
|
|
136
|
+
"type": "object",
|
|
137
|
+
"additionalProperties": false,
|
|
138
|
+
"required": [
|
|
139
|
+
"id",
|
|
140
|
+
"name",
|
|
141
|
+
"basePath",
|
|
142
|
+
"createdAt",
|
|
143
|
+
"updatedAt"
|
|
144
|
+
],
|
|
145
|
+
"properties": {
|
|
146
|
+
"id": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"minLength": 1,
|
|
149
|
+
"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."
|
|
150
|
+
},
|
|
151
|
+
"name": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"minLength": 1,
|
|
154
|
+
"description": "Human-readable name. Operator-facing only; carries no authorization meaning, and two contexts may share a name."
|
|
155
|
+
},
|
|
156
|
+
"did": {
|
|
157
|
+
"type": "string",
|
|
158
|
+
"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."
|
|
159
|
+
},
|
|
160
|
+
"description": {
|
|
161
|
+
"type": "string",
|
|
162
|
+
"description": "Free-form description."
|
|
163
|
+
},
|
|
164
|
+
"parent": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"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."
|
|
167
|
+
},
|
|
168
|
+
"basePath": {
|
|
169
|
+
"type": "string",
|
|
170
|
+
"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."
|
|
171
|
+
},
|
|
172
|
+
"createdAt": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"format": "date-time",
|
|
175
|
+
"description": "RFC 3339."
|
|
176
|
+
},
|
|
177
|
+
"updatedAt": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"format": "date-time",
|
|
180
|
+
"description": "RFC 3339."
|
|
181
|
+
},
|
|
182
|
+
"ext": {
|
|
183
|
+
"$ref": "#/$defs/Ext"
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
} as const;
|
|
189
|
+
|
|
190
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
191
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
192
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
193
|
+
"$ref": "#/$defs/Response",
|
|
194
|
+
"$defs": {
|
|
195
|
+
"Response": {
|
|
196
|
+
"$anchor": "response",
|
|
197
|
+
"title": "VTA Contexts List — response payload",
|
|
198
|
+
"description": "Success response to vta/contexts/list. Type https://trusttasks.org/spec/vta/contexts/list/1.0#response.",
|
|
199
|
+
"type": "object",
|
|
200
|
+
"additionalProperties": false,
|
|
201
|
+
"required": [
|
|
202
|
+
"contexts"
|
|
203
|
+
],
|
|
204
|
+
"properties": {
|
|
205
|
+
"contexts": {
|
|
206
|
+
"type": "array",
|
|
207
|
+
"description": "Contexts the caller may access, in maintainer-defined order. An empty array means the caller can reach none — which is a successful answer, and is not distinguishable from a VTA that holds none. A caller needing that distinction wants vta/contexts/get on a known id, which answers notFound.",
|
|
208
|
+
"items": {
|
|
209
|
+
"$ref": "#/$defs/ContextRecord"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"ext": {
|
|
213
|
+
"$ref": "#/$defs/Ext"
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"Ext": {
|
|
218
|
+
"title": "Ext",
|
|
219
|
+
"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.",
|
|
220
|
+
"type": "object",
|
|
221
|
+
"minProperties": 1,
|
|
222
|
+
"additionalProperties": true,
|
|
223
|
+
"propertyNames": {
|
|
224
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"ContextRecord": {
|
|
228
|
+
"title": "ContextRecord",
|
|
229
|
+
"description": "A context as the VTA holds it.",
|
|
230
|
+
"type": "object",
|
|
231
|
+
"additionalProperties": false,
|
|
232
|
+
"required": [
|
|
233
|
+
"id",
|
|
234
|
+
"name",
|
|
235
|
+
"basePath",
|
|
236
|
+
"createdAt",
|
|
237
|
+
"updatedAt"
|
|
238
|
+
],
|
|
239
|
+
"properties": {
|
|
240
|
+
"id": {
|
|
241
|
+
"type": "string",
|
|
242
|
+
"minLength": 1,
|
|
243
|
+
"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."
|
|
244
|
+
},
|
|
245
|
+
"name": {
|
|
246
|
+
"type": "string",
|
|
247
|
+
"minLength": 1,
|
|
248
|
+
"description": "Human-readable name. Operator-facing only; carries no authorization meaning, and two contexts may share a name."
|
|
249
|
+
},
|
|
250
|
+
"did": {
|
|
251
|
+
"type": "string",
|
|
252
|
+
"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."
|
|
253
|
+
},
|
|
254
|
+
"description": {
|
|
255
|
+
"type": "string",
|
|
256
|
+
"description": "Free-form description."
|
|
257
|
+
},
|
|
258
|
+
"parent": {
|
|
259
|
+
"type": "string",
|
|
260
|
+
"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."
|
|
261
|
+
},
|
|
262
|
+
"basePath": {
|
|
263
|
+
"type": "string",
|
|
264
|
+
"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."
|
|
265
|
+
},
|
|
266
|
+
"createdAt": {
|
|
267
|
+
"type": "string",
|
|
268
|
+
"format": "date-time",
|
|
269
|
+
"description": "RFC 3339."
|
|
270
|
+
},
|
|
271
|
+
"updatedAt": {
|
|
272
|
+
"type": "string",
|
|
273
|
+
"format": "date-time",
|
|
274
|
+
"description": "RFC 3339."
|
|
275
|
+
},
|
|
276
|
+
"ext": {
|
|
277
|
+
"$ref": "#/$defs/Ext"
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
} as const;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
286
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
287
|
+
* per-specification and cannot be derived from the document alone, and
|
|
288
|
+
* item 2 needs the schema this carries.
|
|
289
|
+
*/
|
|
290
|
+
export const SPEC = {
|
|
291
|
+
typeUri: TYPE_URI,
|
|
292
|
+
isBearer: false,
|
|
293
|
+
isProofRequired: false,
|
|
294
|
+
isRecipientRequired: true,
|
|
295
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
296
|
+
} as const;
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
300
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
301
|
+
* parties (§7.3 item 5).
|
|
302
|
+
*/
|
|
303
|
+
export const RESPONSE_SPEC = {
|
|
304
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
305
|
+
isBearer: false,
|
|
306
|
+
isProofRequired: false,
|
|
307
|
+
isRecipientRequired: true,
|
|
308
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
309
|
+
} as const;
|