@openvtc/trust-tasks 0.2.1 → 0.2.3
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/package.json +1 -1
- package/src/chat/message/1.0/payload.ts +87 -0
- package/src/index.ts +13 -0
- package/src/vta/contexts/did-templates/create/1.0/payload.ts +73 -0
- package/src/vta/contexts/did-templates/delete/1.0/payload.ts +31 -0
- package/src/vta/contexts/did-templates/get/1.0/payload.ts +31 -0
- package/src/vta/contexts/did-templates/list/1.0/payload.ts +27 -0
- package/src/vta/contexts/did-templates/render/1.0/payload.ts +37 -0
- package/src/vta/contexts/did-templates/update/1.0/payload.ts +77 -0
- package/src/vta/did-templates/create/1.0/payload.ts +69 -0
- package/src/vta/did-templates/delete/1.0/payload.ts +27 -0
- package/src/vta/did-templates/get/1.0/payload.ts +27 -0
- package/src/vta/did-templates/list/1.0/payload.ts +23 -0
- package/src/vta/did-templates/render/1.0/payload.ts +33 -0
- package/src/vta/did-templates/update/1.0/payload.ts +73 -0
package/package.json
CHANGED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/chat/message/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A conversational message exchanged between an AI agent and a messaging-platform bridge. Signed by its author (via the document `proof`) and hash-linked to the previous message in the conversation (`prev`), so a third party can verify each message's author and ordering after the transport has closed — for audit and dispute resolution. Conversations and contacts are referenced by opaque, bridge-issued handles, never raw platform addresses.
|
|
8
|
+
*/
|
|
9
|
+
export interface ChatMessagePayload {
|
|
10
|
+
/**
|
|
11
|
+
* Opaque, bridge-issued conversation handle. MUST NOT be a raw platform address (phone number, chat id).
|
|
12
|
+
*/
|
|
13
|
+
conversationId: string;
|
|
14
|
+
/**
|
|
15
|
+
* `inbound` = platform → agent (the bridge attests what it received and normalized); `outbound` = agent → platform (authored by the agent).
|
|
16
|
+
*/
|
|
17
|
+
direction: "inbound" | "outbound";
|
|
18
|
+
/**
|
|
19
|
+
* OPTIONAL. Platform key the message belongs to (e.g. `signal`, `whatsapp`). Advisory.
|
|
20
|
+
*/
|
|
21
|
+
platform?: string;
|
|
22
|
+
/**
|
|
23
|
+
* OPTIONAL. Plain-text body. Absent for attachment-only messages.
|
|
24
|
+
*/
|
|
25
|
+
text?: string;
|
|
26
|
+
/**
|
|
27
|
+
* OPTIONAL. Attachments carried by reference, never inline.
|
|
28
|
+
*/
|
|
29
|
+
attachments?: AttachmentRef[];
|
|
30
|
+
/**
|
|
31
|
+
* OPTIONAL. The `id` of the message this one replies to.
|
|
32
|
+
*/
|
|
33
|
+
replyToId?: string;
|
|
34
|
+
prev?: ChainLink;
|
|
35
|
+
/**
|
|
36
|
+
* RFC 3339 timestamp the author asserts for this message.
|
|
37
|
+
*/
|
|
38
|
+
sentAt: string;
|
|
39
|
+
ext?: Ext;
|
|
40
|
+
}
|
|
41
|
+
export interface AttachmentRef {
|
|
42
|
+
/**
|
|
43
|
+
* Opaque attachment id, resolvable via the bridge's attachment fetch.
|
|
44
|
+
*/
|
|
45
|
+
id: string;
|
|
46
|
+
/**
|
|
47
|
+
* OPTIONAL. Suggested filename.
|
|
48
|
+
*/
|
|
49
|
+
filename?: string;
|
|
50
|
+
/**
|
|
51
|
+
* IANA media type (e.g. `image/jpeg`).
|
|
52
|
+
*/
|
|
53
|
+
mediaType: string;
|
|
54
|
+
/**
|
|
55
|
+
* OPTIONAL. Size in bytes, if known ahead of fetch.
|
|
56
|
+
*/
|
|
57
|
+
sizeBytes?: number;
|
|
58
|
+
/**
|
|
59
|
+
* OPTIONAL. Multihash digest of the attachment bytes, so the reference is itself verifiable and tamper-evident.
|
|
60
|
+
*/
|
|
61
|
+
digest?: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* OPTIONAL on the first message in a conversation; present on every message thereafter. Links to the previous message so the conversation forms a verifiable, ordered chain.
|
|
65
|
+
*/
|
|
66
|
+
export interface ChainLink {
|
|
67
|
+
/**
|
|
68
|
+
* The `id` of the previous `chat/message` Trust Task document in this conversation.
|
|
69
|
+
*/
|
|
70
|
+
id: string;
|
|
71
|
+
/**
|
|
72
|
+
* Multihash digest (e.g. `sha-256`) over the previous document, so a gap, reorder, or removal in the chain is detectable.
|
|
73
|
+
*/
|
|
74
|
+
digest: string;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* 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.
|
|
78
|
+
*/
|
|
79
|
+
export interface Ext {
|
|
80
|
+
[k: string]: unknown | undefined;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** Trust Task type URI. */
|
|
84
|
+
export const TYPE_URI = "https://trusttasks.org/spec/chat/message/1.0" as const;
|
|
85
|
+
|
|
86
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
87
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/chat/message/1.0#response" as const;
|
package/src/index.ts
CHANGED
|
@@ -31,6 +31,7 @@ export * as AuthStepUpApproveResponse_v0_2 from "./auth/step-up/approve-response
|
|
|
31
31
|
export * as AuthStepUpPolicy_v0_1 from "./auth/step-up/policy/0.1/payload";
|
|
32
32
|
export * as AuthStepUpPolicy_v0_2 from "./auth/step-up/policy/0.2/payload";
|
|
33
33
|
export * as AuthWhoami_v0_1 from "./auth/whoami/0.1/payload";
|
|
34
|
+
export * as ChatMessage_v1_0 from "./chat/message/1.0/payload";
|
|
34
35
|
export * as ConfirmRequest_v0_1 from "./confirm/request/0.1/payload";
|
|
35
36
|
export * as ConfirmResponse_v0_1 from "./confirm/response/0.1/payload";
|
|
36
37
|
export * as DeviceBindingShared_v0_1 from "./device/_shared/0.1/device-binding";
|
|
@@ -127,6 +128,18 @@ export * as VaultUpsert_v0_2 from "./vault/upsert/0.2/payload";
|
|
|
127
128
|
export * as VaultUsage_v0_1 from "./vault/usage/0.1/payload";
|
|
128
129
|
export * as VaultUsage_v0_2 from "./vault/usage/0.2/payload";
|
|
129
130
|
export * as PasskeyVmShared_v0_1 from "./vta/_shared/0.1/passkey-vm";
|
|
131
|
+
export * as VtaContextsDidTemplatesCreate_v1_0 from "./vta/contexts/did-templates/create/1.0/payload";
|
|
132
|
+
export * as VtaContextsDidTemplatesDelete_v1_0 from "./vta/contexts/did-templates/delete/1.0/payload";
|
|
133
|
+
export * as VtaContextsDidTemplatesGet_v1_0 from "./vta/contexts/did-templates/get/1.0/payload";
|
|
134
|
+
export * as VtaContextsDidTemplatesList_v1_0 from "./vta/contexts/did-templates/list/1.0/payload";
|
|
135
|
+
export * as VtaContextsDidTemplatesRender_v1_0 from "./vta/contexts/did-templates/render/1.0/payload";
|
|
136
|
+
export * as VtaContextsDidTemplatesUpdate_v1_0 from "./vta/contexts/did-templates/update/1.0/payload";
|
|
137
|
+
export * as VtaDidTemplatesCreate_v1_0 from "./vta/did-templates/create/1.0/payload";
|
|
138
|
+
export * as VtaDidTemplatesDelete_v1_0 from "./vta/did-templates/delete/1.0/payload";
|
|
139
|
+
export * as VtaDidTemplatesGet_v1_0 from "./vta/did-templates/get/1.0/payload";
|
|
140
|
+
export * as VtaDidTemplatesList_v1_0 from "./vta/did-templates/list/1.0/payload";
|
|
141
|
+
export * as VtaDidTemplatesRender_v1_0 from "./vta/did-templates/render/1.0/payload";
|
|
142
|
+
export * as VtaDidTemplatesUpdate_v1_0 from "./vta/did-templates/update/1.0/payload";
|
|
130
143
|
export * as VtaPasskeyVmsEnrollChallenge_v0_1 from "./vta/passkey-vms/enroll-challenge/0.1/payload";
|
|
131
144
|
export * as VtaPasskeyVmsEnrollSubmit_v0_1 from "./vta/passkey-vms/enroll-submit/0.1/payload";
|
|
132
145
|
export * as VtaPasskeyVmsList_v0_1 from "./vta/passkey-vms/list/0.1/payload";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/contexts/did-templates/create/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Create a new DID template scoped to a context on a VTA. Gated on the context's admin (or super-admin). The template's own `name` is the resource id within the context scope; the VTA refuses duplicates (use update to replace). The success response is the persisted DidTemplateRecord.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTAContextDIDTemplateCreatePayload {
|
|
10
|
+
/**
|
|
11
|
+
* The context the template is scoped to.
|
|
12
|
+
*/
|
|
13
|
+
contextId: string;
|
|
14
|
+
template: DidTemplate;
|
|
15
|
+
ext?: Ext;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Full template document to store. Validated against the v1 template schema before persistence; an invalid shape is rejected with the framework's `malformedRequest`.
|
|
19
|
+
*/
|
|
20
|
+
export interface DidTemplate {
|
|
21
|
+
/**
|
|
22
|
+
* Template schema version. Currently always 1.
|
|
23
|
+
*/
|
|
24
|
+
schemaVersion: 1;
|
|
25
|
+
/**
|
|
26
|
+
* Template id within its scope. Lowercase alphanumeric and hyphen only.
|
|
27
|
+
*/
|
|
28
|
+
name: string;
|
|
29
|
+
/**
|
|
30
|
+
* Classification hint, e.g. `mediator`, `did-host-http`, `app`. Drives downstream provisioning behaviour.
|
|
31
|
+
*/
|
|
32
|
+
kind: string;
|
|
33
|
+
/**
|
|
34
|
+
* Human-readable description of what the template provisions.
|
|
35
|
+
*/
|
|
36
|
+
description?: string | null;
|
|
37
|
+
/**
|
|
38
|
+
* DID methods this template targets, e.g. ["webvh", "web"] for a hosted DID or ["key"] for a did:key.
|
|
39
|
+
*/
|
|
40
|
+
methods?: string[];
|
|
41
|
+
/**
|
|
42
|
+
* Variables the caller MUST supply at render time. MUST NOT include reserved ambient names (DID, SIGNING_KEY_MB, KA_KEY_MB, VTA_DID, VTA_URL, CONTEXT_ID, CONTEXT_DID, NOW).
|
|
43
|
+
*/
|
|
44
|
+
requiredVars?: string[];
|
|
45
|
+
/**
|
|
46
|
+
* Variables with default values, keyed by variable name.
|
|
47
|
+
*/
|
|
48
|
+
optionalVars?: {
|
|
49
|
+
[k: string]: unknown | undefined;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Hints for CLI / setup wizards (e.g. preRotationCount, portable, addMediatorService).
|
|
53
|
+
*/
|
|
54
|
+
defaults?: {
|
|
55
|
+
[k: string]: unknown | undefined;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* The DID document body with `{TOKEN}` placeholders. `document.id` MUST contain the `{DID}` placeholder. Every `{TOKEN}` MUST be declared in requiredVars/optionalVars or be a reserved ambient name.
|
|
59
|
+
*/
|
|
60
|
+
document: {};
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
64
|
+
*/
|
|
65
|
+
export interface Ext {
|
|
66
|
+
[k: string]: unknown | undefined;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** Trust Task type URI. */
|
|
70
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/contexts/did-templates/create/1.0" as const;
|
|
71
|
+
|
|
72
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
73
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/contexts/did-templates/create/1.0#response" as const;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/contexts/did-templates/delete/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Remove a DID template scoped to a context on a VTA by name. Gated on the context's admin (or super-admin). The success response echoes the name and confirms deletion.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTAContextDIDTemplateDeletePayload {
|
|
10
|
+
/**
|
|
11
|
+
* The context the template is scoped to.
|
|
12
|
+
*/
|
|
13
|
+
contextId: string;
|
|
14
|
+
/**
|
|
15
|
+
* Resource id of the template to remove within the context scope.
|
|
16
|
+
*/
|
|
17
|
+
name: string;
|
|
18
|
+
ext?: Ext;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
22
|
+
*/
|
|
23
|
+
export interface Ext {
|
|
24
|
+
[k: string]: unknown | undefined;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Trust Task type URI. */
|
|
28
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/contexts/did-templates/delete/1.0" as const;
|
|
29
|
+
|
|
30
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
31
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/contexts/did-templates/delete/1.0#response" as const;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/contexts/did-templates/get/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Fetch one context-scoped DID template by name from a VTA. Gated on context access. The success response is the persisted DidTemplateRecord.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTAContextDIDTemplateGetPayload {
|
|
10
|
+
/**
|
|
11
|
+
* The context the template is scoped to.
|
|
12
|
+
*/
|
|
13
|
+
contextId: string;
|
|
14
|
+
/**
|
|
15
|
+
* Template id within the context scope.
|
|
16
|
+
*/
|
|
17
|
+
name: string;
|
|
18
|
+
ext?: Ext;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
22
|
+
*/
|
|
23
|
+
export interface Ext {
|
|
24
|
+
[k: string]: unknown | undefined;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Trust Task type URI. */
|
|
28
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/contexts/did-templates/get/1.0" as const;
|
|
29
|
+
|
|
30
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
31
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/contexts/did-templates/get/1.0#response" as const;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/contexts/did-templates/list/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* List the DID templates scoped to a context on a VTA. Gated on context access. The success response is the set of persisted DidTemplateRecords for the context.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTAContextDIDTemplateListPayload {
|
|
10
|
+
/**
|
|
11
|
+
* The context the templates are scoped to.
|
|
12
|
+
*/
|
|
13
|
+
contextId: string;
|
|
14
|
+
ext?: Ext;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
18
|
+
*/
|
|
19
|
+
export interface Ext {
|
|
20
|
+
[k: string]: unknown | undefined;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Trust Task type URI. */
|
|
24
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/contexts/did-templates/list/1.0" as const;
|
|
25
|
+
|
|
26
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
27
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/contexts/did-templates/list/1.0#response" as const;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/contexts/did-templates/render/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Render a context-scoped DID template to a DID document on a VTA. Gated on context access. The VTA fills `{TOKEN}` placeholders with caller-supplied variables plus ambient values it injects server-side. The success response is the rendered DID document.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTAContextDIDTemplateRenderPayload {
|
|
10
|
+
/**
|
|
11
|
+
* The context the template is scoped to.
|
|
12
|
+
*/
|
|
13
|
+
contextId: string;
|
|
14
|
+
/**
|
|
15
|
+
* Resource id of the template to render within the context scope.
|
|
16
|
+
*/
|
|
17
|
+
name: string;
|
|
18
|
+
/**
|
|
19
|
+
* Caller-supplied variables; the VTA also injects ambient VTA_DID, VTA_URL, NOW, CONTEXT_ID, and CONTEXT_DID (if set on the context) server-side.
|
|
20
|
+
*/
|
|
21
|
+
vars?: {
|
|
22
|
+
[k: string]: unknown | undefined;
|
|
23
|
+
};
|
|
24
|
+
ext?: Ext;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
28
|
+
*/
|
|
29
|
+
export interface Ext {
|
|
30
|
+
[k: string]: unknown | undefined;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** Trust Task type URI. */
|
|
34
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/contexts/did-templates/render/1.0" as const;
|
|
35
|
+
|
|
36
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
37
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/contexts/did-templates/render/1.0#response" as const;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/contexts/did-templates/update/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Replace an existing DID template scoped to a context on a VTA. Gated on the context's admin (or super-admin). `name` is the resource id within the context scope and MUST equal `template.name`. The VTA preserves the original createdAt/createdBy and advances updatedAt. The success response is the persisted DidTemplateRecord.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTAContextDIDTemplateUpdatePayload {
|
|
10
|
+
/**
|
|
11
|
+
* The context the template is scoped to.
|
|
12
|
+
*/
|
|
13
|
+
contextId: string;
|
|
14
|
+
/**
|
|
15
|
+
* Resource id of the template to replace; MUST equal `template.name`.
|
|
16
|
+
*/
|
|
17
|
+
name: string;
|
|
18
|
+
template: DidTemplate;
|
|
19
|
+
ext?: Ext;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Full replacement template document. Validated against the v1 template schema before persistence; an invalid shape is rejected with the framework's `malformedRequest`.
|
|
23
|
+
*/
|
|
24
|
+
export interface DidTemplate {
|
|
25
|
+
/**
|
|
26
|
+
* Template schema version. Currently always 1.
|
|
27
|
+
*/
|
|
28
|
+
schemaVersion: 1;
|
|
29
|
+
/**
|
|
30
|
+
* Template id within its scope. Lowercase alphanumeric and hyphen only.
|
|
31
|
+
*/
|
|
32
|
+
name: string;
|
|
33
|
+
/**
|
|
34
|
+
* Classification hint, e.g. `mediator`, `did-host-http`, `app`. Drives downstream provisioning behaviour.
|
|
35
|
+
*/
|
|
36
|
+
kind: string;
|
|
37
|
+
/**
|
|
38
|
+
* Human-readable description of what the template provisions.
|
|
39
|
+
*/
|
|
40
|
+
description?: string | null;
|
|
41
|
+
/**
|
|
42
|
+
* DID methods this template targets, e.g. ["webvh", "web"] for a hosted DID or ["key"] for a did:key.
|
|
43
|
+
*/
|
|
44
|
+
methods?: string[];
|
|
45
|
+
/**
|
|
46
|
+
* Variables the caller MUST supply at render time. MUST NOT include reserved ambient names (DID, SIGNING_KEY_MB, KA_KEY_MB, VTA_DID, VTA_URL, CONTEXT_ID, CONTEXT_DID, NOW).
|
|
47
|
+
*/
|
|
48
|
+
requiredVars?: string[];
|
|
49
|
+
/**
|
|
50
|
+
* Variables with default values, keyed by variable name.
|
|
51
|
+
*/
|
|
52
|
+
optionalVars?: {
|
|
53
|
+
[k: string]: unknown | undefined;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Hints for CLI / setup wizards (e.g. preRotationCount, portable, addMediatorService).
|
|
57
|
+
*/
|
|
58
|
+
defaults?: {
|
|
59
|
+
[k: string]: unknown | undefined;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* The DID document body with `{TOKEN}` placeholders. `document.id` MUST contain the `{DID}` placeholder. Every `{TOKEN}` MUST be declared in requiredVars/optionalVars or be a reserved ambient name.
|
|
63
|
+
*/
|
|
64
|
+
document: {};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
68
|
+
*/
|
|
69
|
+
export interface Ext {
|
|
70
|
+
[k: string]: unknown | undefined;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** Trust Task type URI. */
|
|
74
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/contexts/did-templates/update/1.0" as const;
|
|
75
|
+
|
|
76
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
77
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/contexts/did-templates/update/1.0#response" as const;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/did-templates/create/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Create a new global DID template on a VTA. Super-admin gated. The template's own `name` is the resource id within the global scope; the VTA refuses duplicates (use update to replace). The success response is the persisted DidTemplateRecord.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTADIDTemplateCreatePayload {
|
|
10
|
+
template: DidTemplate;
|
|
11
|
+
ext?: Ext;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Full template document to store. Validated against the v1 template schema before persistence; an invalid shape is rejected with the framework's `malformedRequest`.
|
|
15
|
+
*/
|
|
16
|
+
export interface DidTemplate {
|
|
17
|
+
/**
|
|
18
|
+
* Template schema version. Currently always 1.
|
|
19
|
+
*/
|
|
20
|
+
schemaVersion: 1;
|
|
21
|
+
/**
|
|
22
|
+
* Template id within its scope. Lowercase alphanumeric and hyphen only.
|
|
23
|
+
*/
|
|
24
|
+
name: string;
|
|
25
|
+
/**
|
|
26
|
+
* Classification hint, e.g. `mediator`, `did-host-http`, `app`. Drives downstream provisioning behaviour.
|
|
27
|
+
*/
|
|
28
|
+
kind: string;
|
|
29
|
+
/**
|
|
30
|
+
* Human-readable description of what the template provisions.
|
|
31
|
+
*/
|
|
32
|
+
description?: string | null;
|
|
33
|
+
/**
|
|
34
|
+
* DID methods this template targets, e.g. ["webvh", "web"] for a hosted DID or ["key"] for a did:key.
|
|
35
|
+
*/
|
|
36
|
+
methods?: string[];
|
|
37
|
+
/**
|
|
38
|
+
* Variables the caller MUST supply at render time. MUST NOT include reserved ambient names (DID, SIGNING_KEY_MB, KA_KEY_MB, VTA_DID, VTA_URL, CONTEXT_ID, CONTEXT_DID, NOW).
|
|
39
|
+
*/
|
|
40
|
+
requiredVars?: string[];
|
|
41
|
+
/**
|
|
42
|
+
* Variables with default values, keyed by variable name.
|
|
43
|
+
*/
|
|
44
|
+
optionalVars?: {
|
|
45
|
+
[k: string]: unknown | undefined;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Hints for CLI / setup wizards (e.g. preRotationCount, portable, addMediatorService).
|
|
49
|
+
*/
|
|
50
|
+
defaults?: {
|
|
51
|
+
[k: string]: unknown | undefined;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* The DID document body with `{TOKEN}` placeholders. `document.id` MUST contain the `{DID}` placeholder. Every `{TOKEN}` MUST be declared in requiredVars/optionalVars or be a reserved ambient name.
|
|
55
|
+
*/
|
|
56
|
+
document: {};
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
60
|
+
*/
|
|
61
|
+
export interface Ext {
|
|
62
|
+
[k: string]: unknown | undefined;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** Trust Task type URI. */
|
|
66
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/did-templates/create/1.0" as const;
|
|
67
|
+
|
|
68
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
69
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/did-templates/create/1.0#response" as const;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/did-templates/delete/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Remove a global DID template from a VTA by name. Super-admin gated. The success response echoes the deleted name for audit pipelines.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTADIDTemplateDeletePayload {
|
|
10
|
+
/**
|
|
11
|
+
* Resource id — the name of the global template to remove.
|
|
12
|
+
*/
|
|
13
|
+
name: string;
|
|
14
|
+
ext?: Ext;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
18
|
+
*/
|
|
19
|
+
export interface Ext {
|
|
20
|
+
[k: string]: unknown | undefined;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Trust Task type URI. */
|
|
24
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/did-templates/delete/1.0" as const;
|
|
25
|
+
|
|
26
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
27
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/did-templates/delete/1.0#response" as const;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/did-templates/get/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Fetch one global DID template on a VTA by name. Open to any authenticated caller. The success response is the persisted DidTemplateRecord.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTADIDTemplateGetPayload {
|
|
10
|
+
/**
|
|
11
|
+
* Template name to fetch.
|
|
12
|
+
*/
|
|
13
|
+
name: string;
|
|
14
|
+
ext?: Ext;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
18
|
+
*/
|
|
19
|
+
export interface Ext {
|
|
20
|
+
[k: string]: unknown | undefined;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Trust Task type URI. */
|
|
24
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/did-templates/get/1.0" as const;
|
|
25
|
+
|
|
26
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
27
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/did-templates/get/1.0#response" as const;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/did-templates/list/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* List all global DID templates on a VTA. Open to any authenticated caller. The request takes no parameters. The success response is the array of persisted DidTemplateRecords.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTADIDTemplateListPayload {
|
|
10
|
+
ext?: Ext;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
14
|
+
*/
|
|
15
|
+
export interface Ext {
|
|
16
|
+
[k: string]: unknown | undefined;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Trust Task type URI. */
|
|
20
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/did-templates/list/1.0" as const;
|
|
21
|
+
|
|
22
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
23
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/did-templates/list/1.0#response" as const;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/did-templates/render/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Render a global DID template to a DID document. Authenticated callers supply variables; the VTA injects ambient variables (VTA_DID, VTA_URL, NOW) server-side, merges the caller's on top, substitutes every placeholder, and returns the rendered document.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTADIDTemplateRenderPayload {
|
|
10
|
+
/**
|
|
11
|
+
* Resource id — the name of the global template to render.
|
|
12
|
+
*/
|
|
13
|
+
name: string;
|
|
14
|
+
/**
|
|
15
|
+
* Caller-supplied template variables, keyed by name. The VTA injects ambient variables VTA_DID, VTA_URL, NOW server-side and merges these on top.
|
|
16
|
+
*/
|
|
17
|
+
vars?: {
|
|
18
|
+
[k: string]: unknown | undefined;
|
|
19
|
+
};
|
|
20
|
+
ext?: Ext;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
24
|
+
*/
|
|
25
|
+
export interface Ext {
|
|
26
|
+
[k: string]: unknown | undefined;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** Trust Task type URI. */
|
|
30
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/did-templates/render/1.0" as const;
|
|
31
|
+
|
|
32
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
33
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/did-templates/render/1.0#response" as const;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/did-templates/update/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Replace an existing global DID template on a VTA. Super-admin gated. The `name` is the resource id within the global scope and MUST equal `template.name`; the VTA replaces the stored body, preserving createdAt/createdBy and advancing updatedAt. The success response is the persisted DidTemplateRecord.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTADIDTemplateUpdatePayload {
|
|
10
|
+
/**
|
|
11
|
+
* Resource id — the template's name. MUST equal `template.name` or the VTA rejects with the framework's `malformedRequest`.
|
|
12
|
+
*/
|
|
13
|
+
name: string;
|
|
14
|
+
template: DidTemplate;
|
|
15
|
+
ext?: Ext;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Full replacement template document. Validated against the v1 template schema before persistence; an invalid shape is rejected with the framework's `malformedRequest`.
|
|
19
|
+
*/
|
|
20
|
+
export interface DidTemplate {
|
|
21
|
+
/**
|
|
22
|
+
* Template schema version. Currently always 1.
|
|
23
|
+
*/
|
|
24
|
+
schemaVersion: 1;
|
|
25
|
+
/**
|
|
26
|
+
* Template id within its scope. Lowercase alphanumeric and hyphen only.
|
|
27
|
+
*/
|
|
28
|
+
name: string;
|
|
29
|
+
/**
|
|
30
|
+
* Classification hint, e.g. `mediator`, `did-host-http`, `app`. Drives downstream provisioning behaviour.
|
|
31
|
+
*/
|
|
32
|
+
kind: string;
|
|
33
|
+
/**
|
|
34
|
+
* Human-readable description of what the template provisions.
|
|
35
|
+
*/
|
|
36
|
+
description?: string | null;
|
|
37
|
+
/**
|
|
38
|
+
* DID methods this template targets, e.g. ["webvh", "web"] for a hosted DID or ["key"] for a did:key.
|
|
39
|
+
*/
|
|
40
|
+
methods?: string[];
|
|
41
|
+
/**
|
|
42
|
+
* Variables the caller MUST supply at render time. MUST NOT include reserved ambient names (DID, SIGNING_KEY_MB, KA_KEY_MB, VTA_DID, VTA_URL, CONTEXT_ID, CONTEXT_DID, NOW).
|
|
43
|
+
*/
|
|
44
|
+
requiredVars?: string[];
|
|
45
|
+
/**
|
|
46
|
+
* Variables with default values, keyed by variable name.
|
|
47
|
+
*/
|
|
48
|
+
optionalVars?: {
|
|
49
|
+
[k: string]: unknown | undefined;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Hints for CLI / setup wizards (e.g. preRotationCount, portable, addMediatorService).
|
|
53
|
+
*/
|
|
54
|
+
defaults?: {
|
|
55
|
+
[k: string]: unknown | undefined;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* The DID document body with `{TOKEN}` placeholders. `document.id` MUST contain the `{DID}` placeholder. Every `{TOKEN}` MUST be declared in requiredVars/optionalVars or be a reserved ambient name.
|
|
59
|
+
*/
|
|
60
|
+
document: {};
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
64
|
+
*/
|
|
65
|
+
export interface Ext {
|
|
66
|
+
[k: string]: unknown | undefined;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** Trust Task type URI. */
|
|
70
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/did-templates/update/1.0" as const;
|
|
71
|
+
|
|
72
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
73
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/did-templates/update/1.0#response" as const;
|