@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.
- package/dist/index.d.ts +33 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -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/service.d.ts +11 -0
- package/dist/vta/_shared/0.1/service.d.ts.map +1 -0
- package/dist/vta/_shared/0.1/service.js +6 -0
- package/dist/vta/_shared/0.1/service.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/services/disable/1.0/payload.d.ts +438 -0
- package/dist/vta/services/disable/1.0/payload.d.ts.map +1 -0
- package/dist/vta/services/disable/1.0/payload.js +235 -0
- package/dist/vta/services/disable/1.0/payload.js.map +1 -0
- package/dist/vta/services/drain/cancel/1.0/payload.d.ts +234 -0
- package/dist/vta/services/drain/cancel/1.0/payload.d.ts.map +1 -0
- package/dist/vta/services/drain/cancel/1.0/payload.js +131 -0
- package/dist/vta/services/drain/cancel/1.0/payload.js.map +1 -0
- package/dist/vta/services/drain/list/1.0/payload.d.ts +352 -0
- package/dist/vta/services/drain/list/1.0/payload.d.ts.map +1 -0
- package/dist/vta/services/drain/list/1.0/payload.js +189 -0
- package/dist/vta/services/drain/list/1.0/payload.js.map +1 -0
- package/dist/vta/services/enable/1.0/payload.d.ts +511 -0
- package/dist/vta/services/enable/1.0/payload.d.ts.map +1 -0
- package/dist/vta/services/enable/1.0/payload.js +262 -0
- package/dist/vta/services/enable/1.0/payload.js.map +1 -0
- package/dist/vta/services/get/1.0/payload.d.ts +399 -0
- package/dist/vta/services/get/1.0/payload.d.ts.map +1 -0
- package/dist/vta/services/get/1.0/payload.js +219 -0
- package/dist/vta/services/get/1.0/payload.js.map +1 -0
- package/dist/vta/services/list/1.0/payload.d.ts +409 -0
- package/dist/vta/services/list/1.0/payload.d.ts.map +1 -0
- package/dist/vta/services/list/1.0/payload.js +221 -0
- package/dist/vta/services/list/1.0/payload.js.map +1 -0
- package/dist/vta/services/rollback/1.0/payload.d.ts +438 -0
- package/dist/vta/services/rollback/1.0/payload.d.ts.map +1 -0
- package/dist/vta/services/rollback/1.0/payload.js +235 -0
- package/dist/vta/services/rollback/1.0/payload.js.map +1 -0
- package/dist/vta/services/update/1.0/payload.d.ts +511 -0
- package/dist/vta/services/update/1.0/payload.d.ts.map +1 -0
- package/dist/vta/services/update/1.0/payload.js +262 -0
- package/dist/vta/services/update/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 +33 -0
- package/src/vta/_shared/0.1/context.ts +11 -0
- package/src/vta/_shared/0.1/service.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/services/disable/1.0/payload.ts +302 -0
- package/src/vta/services/drain/cancel/1.0/payload.ts +169 -0
- package/src/vta/services/drain/list/1.0/payload.ts +241 -0
- package/src/vta/services/enable/1.0/payload.ts +350 -0
- package/src/vta/services/get/1.0/payload.ts +279 -0
- package/src/vta/services/list/1.0/payload.ts +283 -0
- package/src/vta/services/rollback/1.0/payload.ts +302 -0
- package/src/vta/services/update/1.0/payload.ts +350 -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,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/_shared/0.1/context.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A *context* is the VTA's unit of separation: keys, DIDs, vault entries, policies and memory all belong to exactly one, and an ACL entry's scopes are context ids. Contexts nest — `parent` names the context this one sits under, and `basePath` is the resolved path from the root — so authority granted at an ancestor reaches its descendants. `ContextRecord` is the persisted shape every task in the family returns; it is defined once here because `create`, `get`, `update`, `update-did` and `list` all hand back the same record, and an inline copy per task would fork the moment one of them gained a member.
|
|
8
|
+
*/
|
|
9
|
+
export interface ContextRecordSharedDefinitionForTheVtaContextsSpecFamily {
|
|
10
|
+
[k: string]: unknown | undefined;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/_shared/0.1/service.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A *service* is a transport the agent advertises in its own DID document: DIDComm mediation, a REST endpoint, TSP mediation, or a WebAuthn origin. Enabling or disabling one edits `service` in the agent's did:webvh document and republishes the signed log, so every mutation in this family produces a new log entry rather than flipping a runtime flag — which is why they all return `ServiceMutationResult`. These shapes are defined once because `enable`, `disable`, `update` and `rollback` return the same result, and `list` and `get` return the same state; an inline copy per task would fork the moment one of them gained a member.
|
|
8
|
+
*/
|
|
9
|
+
export interface ServiceDefinitionsSharedAcrossTheVtaServicesSpecFamily {
|
|
10
|
+
[k: string]: unknown | undefined;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/_shared/0.1/webvh-records.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A `did:webvh` DID is published as an append-only log served at a URL. The VTA holds the keys and the authority to append; a *hosting server* serves the log. These definitions describe what the VTA holds about each: the DID record, the server registration, and an agent name bound to a DID. Shared because the DID record is returned by create, get and list, and the server record by list and register.
|
|
8
|
+
*/
|
|
9
|
+
export interface WebVHRecordsSharedDefinitionsForTheVtaWebvhSpecFamily {
|
|
10
|
+
[k: string]: unknown | undefined;
|
|
11
|
+
}
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/contexts/create/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface VTAContextsCreatePayload {
|
|
7
|
+
/**
|
|
8
|
+
* Id for the new context. When `parent` is present this is the leaf segment and the full id becomes `<parent>/<id>`; otherwise it is a top-level id. Must be unique within its parent — a collision is refused, never merged.
|
|
9
|
+
*/
|
|
10
|
+
id: string;
|
|
11
|
+
/**
|
|
12
|
+
* Human-readable name. Operator-facing only; carries no authorization meaning.
|
|
13
|
+
*/
|
|
14
|
+
name: string;
|
|
15
|
+
/**
|
|
16
|
+
* Free-form description.
|
|
17
|
+
*/
|
|
18
|
+
description?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Id of the context to nest under. Absent creates a top-level context. Nesting is not cosmetic: authority granted at the parent reaches this context.
|
|
21
|
+
*/
|
|
22
|
+
parent?: string;
|
|
23
|
+
ext?: Ext;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* 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.
|
|
27
|
+
*/
|
|
28
|
+
export interface Ext {
|
|
29
|
+
[k: string]: unknown | undefined;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A context as the VTA holds it.
|
|
33
|
+
*/
|
|
34
|
+
export interface ContextRecord {
|
|
35
|
+
/**
|
|
36
|
+
* 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.
|
|
37
|
+
*/
|
|
38
|
+
id: string;
|
|
39
|
+
/**
|
|
40
|
+
* Human-readable name. Operator-facing only; carries no authorization meaning, and two contexts may share a name.
|
|
41
|
+
*/
|
|
42
|
+
name: string;
|
|
43
|
+
/**
|
|
44
|
+
* 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.
|
|
45
|
+
*/
|
|
46
|
+
did?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Free-form description.
|
|
49
|
+
*/
|
|
50
|
+
description?: string;
|
|
51
|
+
/**
|
|
52
|
+
* 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.
|
|
53
|
+
*/
|
|
54
|
+
parent?: string;
|
|
55
|
+
/**
|
|
56
|
+
* 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.
|
|
57
|
+
*/
|
|
58
|
+
basePath: string;
|
|
59
|
+
/**
|
|
60
|
+
* RFC 3339.
|
|
61
|
+
*/
|
|
62
|
+
createdAt: string;
|
|
63
|
+
/**
|
|
64
|
+
* RFC 3339.
|
|
65
|
+
*/
|
|
66
|
+
updatedAt: string;
|
|
67
|
+
ext?: Ext;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** Trust Task type URI. */
|
|
71
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/contexts/create/1.0" as const;
|
|
72
|
+
|
|
73
|
+
/** Stable alias for this specification's request payload shape. */
|
|
74
|
+
export type Payload = VTAContextsCreatePayload;
|
|
75
|
+
|
|
76
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
77
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/contexts/create/1.0#response" as const;
|
|
78
|
+
|
|
79
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
80
|
+
export type Response = ContextRecord;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* This specification's payload schema, as a value.
|
|
84
|
+
*
|
|
85
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
86
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
87
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
88
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
89
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
90
|
+
*/
|
|
91
|
+
export const PAYLOAD_SCHEMA = {
|
|
92
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
93
|
+
"$id": "https://trusttasks.org/spec/vta/contexts/create/1.0",
|
|
94
|
+
"title": "VTA Contexts Create — payload",
|
|
95
|
+
"type": "object",
|
|
96
|
+
"additionalProperties": false,
|
|
97
|
+
"required": [
|
|
98
|
+
"id",
|
|
99
|
+
"name"
|
|
100
|
+
],
|
|
101
|
+
"properties": {
|
|
102
|
+
"id": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"minLength": 1,
|
|
105
|
+
"description": "Id for the new context. When `parent` is present this is the leaf segment and the full id becomes `<parent>/<id>`; otherwise it is a top-level id. Must be unique within its parent — a collision is refused, never merged."
|
|
106
|
+
},
|
|
107
|
+
"name": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"minLength": 1,
|
|
110
|
+
"description": "Human-readable name. Operator-facing only; carries no authorization meaning."
|
|
111
|
+
},
|
|
112
|
+
"description": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"description": "Free-form description."
|
|
115
|
+
},
|
|
116
|
+
"parent": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"description": "Id of the context to nest under. Absent creates a top-level context. Nesting is not cosmetic: authority granted at the parent reaches this context."
|
|
119
|
+
},
|
|
120
|
+
"ext": {
|
|
121
|
+
"$ref": "#/$defs/Ext"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"$defs": {
|
|
125
|
+
"Response": {
|
|
126
|
+
"$anchor": "response",
|
|
127
|
+
"title": "VTA Contexts Create — response payload",
|
|
128
|
+
"description": "Success response to vta/contexts/create: the realized context record, at the top level. Type https://trusttasks.org/spec/vta/contexts/create/1.0#response.",
|
|
129
|
+
"$ref": "#/$defs/ContextRecord"
|
|
130
|
+
},
|
|
131
|
+
"ContextRecord": {
|
|
132
|
+
"title": "ContextRecord",
|
|
133
|
+
"description": "A context as the VTA holds it.",
|
|
134
|
+
"type": "object",
|
|
135
|
+
"additionalProperties": false,
|
|
136
|
+
"required": [
|
|
137
|
+
"id",
|
|
138
|
+
"name",
|
|
139
|
+
"basePath",
|
|
140
|
+
"createdAt",
|
|
141
|
+
"updatedAt"
|
|
142
|
+
],
|
|
143
|
+
"properties": {
|
|
144
|
+
"id": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"minLength": 1,
|
|
147
|
+
"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."
|
|
148
|
+
},
|
|
149
|
+
"name": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"minLength": 1,
|
|
152
|
+
"description": "Human-readable name. Operator-facing only; carries no authorization meaning, and two contexts may share a name."
|
|
153
|
+
},
|
|
154
|
+
"did": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"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."
|
|
157
|
+
},
|
|
158
|
+
"description": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"description": "Free-form description."
|
|
161
|
+
},
|
|
162
|
+
"parent": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"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."
|
|
165
|
+
},
|
|
166
|
+
"basePath": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"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."
|
|
169
|
+
},
|
|
170
|
+
"createdAt": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"format": "date-time",
|
|
173
|
+
"description": "RFC 3339."
|
|
174
|
+
},
|
|
175
|
+
"updatedAt": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"format": "date-time",
|
|
178
|
+
"description": "RFC 3339."
|
|
179
|
+
},
|
|
180
|
+
"ext": {
|
|
181
|
+
"$ref": "#/$defs/Ext"
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
"Ext": {
|
|
186
|
+
"title": "Ext",
|
|
187
|
+
"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.",
|
|
188
|
+
"type": "object",
|
|
189
|
+
"minProperties": 1,
|
|
190
|
+
"additionalProperties": true,
|
|
191
|
+
"propertyNames": {
|
|
192
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
} as const;
|
|
197
|
+
|
|
198
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
199
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
200
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
201
|
+
"$ref": "#/$defs/Response",
|
|
202
|
+
"$defs": {
|
|
203
|
+
"Response": {
|
|
204
|
+
"$anchor": "response",
|
|
205
|
+
"title": "VTA Contexts Create — response payload",
|
|
206
|
+
"description": "Success response to vta/contexts/create: the realized context record, at the top level. Type https://trusttasks.org/spec/vta/contexts/create/1.0#response.",
|
|
207
|
+
"$ref": "#/$defs/ContextRecord"
|
|
208
|
+
},
|
|
209
|
+
"ContextRecord": {
|
|
210
|
+
"title": "ContextRecord",
|
|
211
|
+
"description": "A context as the VTA holds it.",
|
|
212
|
+
"type": "object",
|
|
213
|
+
"additionalProperties": false,
|
|
214
|
+
"required": [
|
|
215
|
+
"id",
|
|
216
|
+
"name",
|
|
217
|
+
"basePath",
|
|
218
|
+
"createdAt",
|
|
219
|
+
"updatedAt"
|
|
220
|
+
],
|
|
221
|
+
"properties": {
|
|
222
|
+
"id": {
|
|
223
|
+
"type": "string",
|
|
224
|
+
"minLength": 1,
|
|
225
|
+
"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."
|
|
226
|
+
},
|
|
227
|
+
"name": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"minLength": 1,
|
|
230
|
+
"description": "Human-readable name. Operator-facing only; carries no authorization meaning, and two contexts may share a name."
|
|
231
|
+
},
|
|
232
|
+
"did": {
|
|
233
|
+
"type": "string",
|
|
234
|
+
"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."
|
|
235
|
+
},
|
|
236
|
+
"description": {
|
|
237
|
+
"type": "string",
|
|
238
|
+
"description": "Free-form description."
|
|
239
|
+
},
|
|
240
|
+
"parent": {
|
|
241
|
+
"type": "string",
|
|
242
|
+
"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."
|
|
243
|
+
},
|
|
244
|
+
"basePath": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"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."
|
|
247
|
+
},
|
|
248
|
+
"createdAt": {
|
|
249
|
+
"type": "string",
|
|
250
|
+
"format": "date-time",
|
|
251
|
+
"description": "RFC 3339."
|
|
252
|
+
},
|
|
253
|
+
"updatedAt": {
|
|
254
|
+
"type": "string",
|
|
255
|
+
"format": "date-time",
|
|
256
|
+
"description": "RFC 3339."
|
|
257
|
+
},
|
|
258
|
+
"ext": {
|
|
259
|
+
"$ref": "#/$defs/Ext"
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"Ext": {
|
|
264
|
+
"title": "Ext",
|
|
265
|
+
"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.",
|
|
266
|
+
"type": "object",
|
|
267
|
+
"minProperties": 1,
|
|
268
|
+
"additionalProperties": true,
|
|
269
|
+
"propertyNames": {
|
|
270
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
} as const;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
278
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
279
|
+
* per-specification and cannot be derived from the document alone, and
|
|
280
|
+
* item 2 needs the schema this carries.
|
|
281
|
+
*/
|
|
282
|
+
export const SPEC = {
|
|
283
|
+
typeUri: TYPE_URI,
|
|
284
|
+
isBearer: false,
|
|
285
|
+
isProofRequired: true,
|
|
286
|
+
isRecipientRequired: true,
|
|
287
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
288
|
+
} as const;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
292
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
293
|
+
* parties (§7.3 item 5).
|
|
294
|
+
*/
|
|
295
|
+
export const RESPONSE_SPEC = {
|
|
296
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
297
|
+
isBearer: false,
|
|
298
|
+
isProofRequired: true,
|
|
299
|
+
isRecipientRequired: true,
|
|
300
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
301
|
+
} as const;
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/contexts/delete/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface VTAContextsDeletePayload {
|
|
7
|
+
/**
|
|
8
|
+
* Context to delete.
|
|
9
|
+
*/
|
|
10
|
+
id: string;
|
|
11
|
+
/**
|
|
12
|
+
* Delete even though the context still holds keys, DIDs or templates. Default false, and the default is the point: without it a context holding anything is refused, so the destructive case is always something a caller asked for explicitly.
|
|
13
|
+
*/
|
|
14
|
+
force?: boolean;
|
|
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
|
+
* Success response to vta/contexts/delete. Type https://trusttasks.org/spec/vta/contexts/delete/1.0#response.
|
|
25
|
+
*/
|
|
26
|
+
export interface VTAContextsDeleteResponsePayload {
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the context was removed. A successful response carrying `false` means the VTA declined to act — it is not an error, and a consumer MUST NOT report the deletion as done on the basis of the response status alone.
|
|
30
|
+
*/
|
|
31
|
+
deleted: boolean;
|
|
32
|
+
ext?: Ext;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** Trust Task type URI. */
|
|
36
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/contexts/delete/1.0" as const;
|
|
37
|
+
|
|
38
|
+
/** Stable alias for this specification's request payload shape. */
|
|
39
|
+
export type Payload = VTAContextsDeletePayload;
|
|
40
|
+
|
|
41
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
42
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/contexts/delete/1.0#response" as const;
|
|
43
|
+
|
|
44
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
45
|
+
export type Response = VTAContextsDeleteResponsePayload;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* This specification's payload schema, as a value.
|
|
49
|
+
*
|
|
50
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
51
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
52
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
53
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
54
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
55
|
+
*/
|
|
56
|
+
export const PAYLOAD_SCHEMA = {
|
|
57
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
58
|
+
"$id": "https://trusttasks.org/spec/vta/contexts/delete/1.0",
|
|
59
|
+
"title": "VTA Contexts Delete — payload",
|
|
60
|
+
"type": "object",
|
|
61
|
+
"additionalProperties": false,
|
|
62
|
+
"required": [
|
|
63
|
+
"id"
|
|
64
|
+
],
|
|
65
|
+
"properties": {
|
|
66
|
+
"id": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"minLength": 1,
|
|
69
|
+
"description": "Context to delete."
|
|
70
|
+
},
|
|
71
|
+
"force": {
|
|
72
|
+
"type": "boolean",
|
|
73
|
+
"default": false,
|
|
74
|
+
"description": "Delete even though the context still holds keys, DIDs or templates. Default false, and the default is the point: without it a context holding anything is refused, so the destructive case is always something a caller asked for explicitly."
|
|
75
|
+
},
|
|
76
|
+
"ext": {
|
|
77
|
+
"$ref": "#/$defs/Ext"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"$defs": {
|
|
81
|
+
"Response": {
|
|
82
|
+
"$anchor": "response",
|
|
83
|
+
"title": "VTA Contexts Delete — response payload",
|
|
84
|
+
"description": "Success response to vta/contexts/delete. Type https://trusttasks.org/spec/vta/contexts/delete/1.0#response.",
|
|
85
|
+
"type": "object",
|
|
86
|
+
"additionalProperties": false,
|
|
87
|
+
"required": [
|
|
88
|
+
"id",
|
|
89
|
+
"deleted"
|
|
90
|
+
],
|
|
91
|
+
"properties": {
|
|
92
|
+
"id": {
|
|
93
|
+
"type": "string"
|
|
94
|
+
},
|
|
95
|
+
"deleted": {
|
|
96
|
+
"type": "boolean",
|
|
97
|
+
"description": "Whether the context was removed. A successful response carrying `false` means the VTA declined to act — it is not an error, and a consumer MUST NOT report the deletion as done on the basis of the response status alone."
|
|
98
|
+
},
|
|
99
|
+
"ext": {
|
|
100
|
+
"$ref": "#/$defs/Ext"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"Ext": {
|
|
105
|
+
"title": "Ext",
|
|
106
|
+
"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.",
|
|
107
|
+
"type": "object",
|
|
108
|
+
"minProperties": 1,
|
|
109
|
+
"additionalProperties": true,
|
|
110
|
+
"propertyNames": {
|
|
111
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
} as const;
|
|
116
|
+
|
|
117
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
118
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
119
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
120
|
+
"$ref": "#/$defs/Response",
|
|
121
|
+
"$defs": {
|
|
122
|
+
"Response": {
|
|
123
|
+
"$anchor": "response",
|
|
124
|
+
"title": "VTA Contexts Delete — response payload",
|
|
125
|
+
"description": "Success response to vta/contexts/delete. Type https://trusttasks.org/spec/vta/contexts/delete/1.0#response.",
|
|
126
|
+
"type": "object",
|
|
127
|
+
"additionalProperties": false,
|
|
128
|
+
"required": [
|
|
129
|
+
"id",
|
|
130
|
+
"deleted"
|
|
131
|
+
],
|
|
132
|
+
"properties": {
|
|
133
|
+
"id": {
|
|
134
|
+
"type": "string"
|
|
135
|
+
},
|
|
136
|
+
"deleted": {
|
|
137
|
+
"type": "boolean",
|
|
138
|
+
"description": "Whether the context was removed. A successful response carrying `false` means the VTA declined to act — it is not an error, and a consumer MUST NOT report the deletion as done on the basis of the response status alone."
|
|
139
|
+
},
|
|
140
|
+
"ext": {
|
|
141
|
+
"$ref": "#/$defs/Ext"
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"Ext": {
|
|
146
|
+
"title": "Ext",
|
|
147
|
+
"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.",
|
|
148
|
+
"type": "object",
|
|
149
|
+
"minProperties": 1,
|
|
150
|
+
"additionalProperties": true,
|
|
151
|
+
"propertyNames": {
|
|
152
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
} as const;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
160
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
161
|
+
* per-specification and cannot be derived from the document alone, and
|
|
162
|
+
* item 2 needs the schema this carries.
|
|
163
|
+
*/
|
|
164
|
+
export const SPEC = {
|
|
165
|
+
typeUri: TYPE_URI,
|
|
166
|
+
isBearer: false,
|
|
167
|
+
isProofRequired: true,
|
|
168
|
+
isRecipientRequired: true,
|
|
169
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
170
|
+
} as const;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
174
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
175
|
+
* parties (§7.3 item 5).
|
|
176
|
+
*/
|
|
177
|
+
export const RESPONSE_SPEC = {
|
|
178
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
179
|
+
isBearer: false,
|
|
180
|
+
isProofRequired: true,
|
|
181
|
+
isRecipientRequired: true,
|
|
182
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
183
|
+
} as const;
|