@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,301 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/webvh/agent-name/check/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Ask whether a name is free before trying to take it.
|
|
7
|
+
*/
|
|
8
|
+
export interface VTAWebVHAgentNameCheckPayload {
|
|
9
|
+
/**
|
|
10
|
+
* DID the name is bound to.
|
|
11
|
+
*/
|
|
12
|
+
did: string;
|
|
13
|
+
/**
|
|
14
|
+
* The name, without the host — the full form is `<host>/@<name>`.
|
|
15
|
+
*/
|
|
16
|
+
name: string;
|
|
17
|
+
ext?: Ext;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 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.
|
|
21
|
+
*/
|
|
22
|
+
export interface Ext {
|
|
23
|
+
[k: string]: unknown | undefined;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Success response to vta/webvh/agent-name/check. Type https://trusttasks.org/spec/vta/webvh/agent-name/check/1.0#response.
|
|
27
|
+
*/
|
|
28
|
+
export interface VTAWebVHAgentNameCheckResponsePayload {
|
|
29
|
+
name: string;
|
|
30
|
+
/**
|
|
31
|
+
* Host the name would live under. A name is only unique within its host.
|
|
32
|
+
*/
|
|
33
|
+
domain: string;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the name can be taken **now**. It is a snapshot, not a hold: another caller may take it between this answer and the attempt.
|
|
36
|
+
*/
|
|
37
|
+
available: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the name is withheld by the host's own policy rather than taken by a DID. A reserved name is not available and will not become so by waiting.
|
|
40
|
+
*/
|
|
41
|
+
reserved: boolean;
|
|
42
|
+
ext?: Ext;
|
|
43
|
+
}
|
|
44
|
+
/** Trust Task type URI. */
|
|
45
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/vta/webvh/agent-name/check/1.0";
|
|
46
|
+
/** Stable alias for this specification's request payload shape. */
|
|
47
|
+
export type Payload = VTAWebVHAgentNameCheckPayload;
|
|
48
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
49
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vta/webvh/agent-name/check/1.0#response";
|
|
50
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
51
|
+
export type Response = VTAWebVHAgentNameCheckResponsePayload;
|
|
52
|
+
/**
|
|
53
|
+
* This specification's payload schema, as a value.
|
|
54
|
+
*
|
|
55
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
56
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
57
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
58
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
59
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
60
|
+
*/
|
|
61
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
62
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
63
|
+
readonly $id: "https://trusttasks.org/spec/vta/webvh/agent-name/check/1.0";
|
|
64
|
+
readonly title: "VTA WebVH Agent-Name Check — payload";
|
|
65
|
+
readonly description: "Ask whether a name is free before trying to take it.";
|
|
66
|
+
readonly type: "object";
|
|
67
|
+
readonly additionalProperties: false;
|
|
68
|
+
readonly required: readonly ["did", "name"];
|
|
69
|
+
readonly properties: {
|
|
70
|
+
readonly did: {
|
|
71
|
+
readonly type: "string";
|
|
72
|
+
readonly minLength: 1;
|
|
73
|
+
readonly description: "DID the name is bound to.";
|
|
74
|
+
};
|
|
75
|
+
readonly name: {
|
|
76
|
+
readonly type: "string";
|
|
77
|
+
readonly minLength: 1;
|
|
78
|
+
readonly description: "The name, without the host — the full form is `<host>/@<name>`.";
|
|
79
|
+
};
|
|
80
|
+
readonly ext: {
|
|
81
|
+
readonly $ref: "#/$defs/Ext";
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
readonly $defs: {
|
|
85
|
+
readonly Response: {
|
|
86
|
+
readonly $anchor: "response";
|
|
87
|
+
readonly title: "VTA WebVH Agent-Name Check — response payload";
|
|
88
|
+
readonly description: "Success response to vta/webvh/agent-name/check. Type https://trusttasks.org/spec/vta/webvh/agent-name/check/1.0#response.";
|
|
89
|
+
readonly type: "object";
|
|
90
|
+
readonly additionalProperties: false;
|
|
91
|
+
readonly required: readonly ["name", "domain", "available", "reserved"];
|
|
92
|
+
readonly properties: {
|
|
93
|
+
readonly name: {
|
|
94
|
+
readonly type: "string";
|
|
95
|
+
};
|
|
96
|
+
readonly domain: {
|
|
97
|
+
readonly type: "string";
|
|
98
|
+
readonly description: "Host the name would live under. A name is only unique within its host.";
|
|
99
|
+
};
|
|
100
|
+
readonly available: {
|
|
101
|
+
readonly type: "boolean";
|
|
102
|
+
readonly description: "Whether the name can be taken **now**. It is a snapshot, not a hold: another caller may take it between this answer and the attempt.";
|
|
103
|
+
};
|
|
104
|
+
readonly reserved: {
|
|
105
|
+
readonly type: "boolean";
|
|
106
|
+
readonly description: "Whether the name is withheld by the host's own policy rather than taken by a DID. A reserved name is not available and will not become so by waiting.";
|
|
107
|
+
};
|
|
108
|
+
readonly ext: {
|
|
109
|
+
readonly $ref: "#/$defs/Ext";
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
readonly Ext: {
|
|
114
|
+
readonly title: "Ext";
|
|
115
|
+
readonly 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.";
|
|
116
|
+
readonly type: "object";
|
|
117
|
+
readonly minProperties: 1;
|
|
118
|
+
readonly additionalProperties: true;
|
|
119
|
+
readonly propertyNames: {
|
|
120
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
126
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
127
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
128
|
+
readonly $ref: "#/$defs/Response";
|
|
129
|
+
readonly $defs: {
|
|
130
|
+
readonly Response: {
|
|
131
|
+
readonly $anchor: "response";
|
|
132
|
+
readonly title: "VTA WebVH Agent-Name Check — response payload";
|
|
133
|
+
readonly description: "Success response to vta/webvh/agent-name/check. Type https://trusttasks.org/spec/vta/webvh/agent-name/check/1.0#response.";
|
|
134
|
+
readonly type: "object";
|
|
135
|
+
readonly additionalProperties: false;
|
|
136
|
+
readonly required: readonly ["name", "domain", "available", "reserved"];
|
|
137
|
+
readonly properties: {
|
|
138
|
+
readonly name: {
|
|
139
|
+
readonly type: "string";
|
|
140
|
+
};
|
|
141
|
+
readonly domain: {
|
|
142
|
+
readonly type: "string";
|
|
143
|
+
readonly description: "Host the name would live under. A name is only unique within its host.";
|
|
144
|
+
};
|
|
145
|
+
readonly available: {
|
|
146
|
+
readonly type: "boolean";
|
|
147
|
+
readonly description: "Whether the name can be taken **now**. It is a snapshot, not a hold: another caller may take it between this answer and the attempt.";
|
|
148
|
+
};
|
|
149
|
+
readonly reserved: {
|
|
150
|
+
readonly type: "boolean";
|
|
151
|
+
readonly description: "Whether the name is withheld by the host's own policy rather than taken by a DID. A reserved name is not available and will not become so by waiting.";
|
|
152
|
+
};
|
|
153
|
+
readonly ext: {
|
|
154
|
+
readonly $ref: "#/$defs/Ext";
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
readonly Ext: {
|
|
159
|
+
readonly title: "Ext";
|
|
160
|
+
readonly 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.";
|
|
161
|
+
readonly type: "object";
|
|
162
|
+
readonly minProperties: 1;
|
|
163
|
+
readonly additionalProperties: true;
|
|
164
|
+
readonly propertyNames: {
|
|
165
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
172
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
173
|
+
* per-specification and cannot be derived from the document alone, and
|
|
174
|
+
* item 2 needs the schema this carries.
|
|
175
|
+
*/
|
|
176
|
+
export declare const SPEC: {
|
|
177
|
+
readonly typeUri: "https://trusttasks.org/spec/vta/webvh/agent-name/check/1.0";
|
|
178
|
+
readonly isBearer: false;
|
|
179
|
+
readonly isProofRequired: false;
|
|
180
|
+
readonly isRecipientRequired: true;
|
|
181
|
+
readonly payloadSchema: {
|
|
182
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
183
|
+
readonly $id: "https://trusttasks.org/spec/vta/webvh/agent-name/check/1.0";
|
|
184
|
+
readonly title: "VTA WebVH Agent-Name Check — payload";
|
|
185
|
+
readonly description: "Ask whether a name is free before trying to take it.";
|
|
186
|
+
readonly type: "object";
|
|
187
|
+
readonly additionalProperties: false;
|
|
188
|
+
readonly required: readonly ["did", "name"];
|
|
189
|
+
readonly properties: {
|
|
190
|
+
readonly did: {
|
|
191
|
+
readonly type: "string";
|
|
192
|
+
readonly minLength: 1;
|
|
193
|
+
readonly description: "DID the name is bound to.";
|
|
194
|
+
};
|
|
195
|
+
readonly name: {
|
|
196
|
+
readonly type: "string";
|
|
197
|
+
readonly minLength: 1;
|
|
198
|
+
readonly description: "The name, without the host — the full form is `<host>/@<name>`.";
|
|
199
|
+
};
|
|
200
|
+
readonly ext: {
|
|
201
|
+
readonly $ref: "#/$defs/Ext";
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
readonly $defs: {
|
|
205
|
+
readonly Response: {
|
|
206
|
+
readonly $anchor: "response";
|
|
207
|
+
readonly title: "VTA WebVH Agent-Name Check — response payload";
|
|
208
|
+
readonly description: "Success response to vta/webvh/agent-name/check. Type https://trusttasks.org/spec/vta/webvh/agent-name/check/1.0#response.";
|
|
209
|
+
readonly type: "object";
|
|
210
|
+
readonly additionalProperties: false;
|
|
211
|
+
readonly required: readonly ["name", "domain", "available", "reserved"];
|
|
212
|
+
readonly properties: {
|
|
213
|
+
readonly name: {
|
|
214
|
+
readonly type: "string";
|
|
215
|
+
};
|
|
216
|
+
readonly domain: {
|
|
217
|
+
readonly type: "string";
|
|
218
|
+
readonly description: "Host the name would live under. A name is only unique within its host.";
|
|
219
|
+
};
|
|
220
|
+
readonly available: {
|
|
221
|
+
readonly type: "boolean";
|
|
222
|
+
readonly description: "Whether the name can be taken **now**. It is a snapshot, not a hold: another caller may take it between this answer and the attempt.";
|
|
223
|
+
};
|
|
224
|
+
readonly reserved: {
|
|
225
|
+
readonly type: "boolean";
|
|
226
|
+
readonly description: "Whether the name is withheld by the host's own policy rather than taken by a DID. A reserved name is not available and will not become so by waiting.";
|
|
227
|
+
};
|
|
228
|
+
readonly ext: {
|
|
229
|
+
readonly $ref: "#/$defs/Ext";
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
readonly Ext: {
|
|
234
|
+
readonly title: "Ext";
|
|
235
|
+
readonly 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.";
|
|
236
|
+
readonly type: "object";
|
|
237
|
+
readonly minProperties: 1;
|
|
238
|
+
readonly additionalProperties: true;
|
|
239
|
+
readonly propertyNames: {
|
|
240
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
/**
|
|
247
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
248
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
249
|
+
* parties (§7.3 item 5).
|
|
250
|
+
*/
|
|
251
|
+
export declare const RESPONSE_SPEC: {
|
|
252
|
+
readonly typeUri: "https://trusttasks.org/spec/vta/webvh/agent-name/check/1.0#response";
|
|
253
|
+
readonly isBearer: false;
|
|
254
|
+
readonly isProofRequired: false;
|
|
255
|
+
readonly isRecipientRequired: true;
|
|
256
|
+
readonly payloadSchema: {
|
|
257
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
258
|
+
readonly $ref: "#/$defs/Response";
|
|
259
|
+
readonly $defs: {
|
|
260
|
+
readonly Response: {
|
|
261
|
+
readonly $anchor: "response";
|
|
262
|
+
readonly title: "VTA WebVH Agent-Name Check — response payload";
|
|
263
|
+
readonly description: "Success response to vta/webvh/agent-name/check. Type https://trusttasks.org/spec/vta/webvh/agent-name/check/1.0#response.";
|
|
264
|
+
readonly type: "object";
|
|
265
|
+
readonly additionalProperties: false;
|
|
266
|
+
readonly required: readonly ["name", "domain", "available", "reserved"];
|
|
267
|
+
readonly properties: {
|
|
268
|
+
readonly name: {
|
|
269
|
+
readonly type: "string";
|
|
270
|
+
};
|
|
271
|
+
readonly domain: {
|
|
272
|
+
readonly type: "string";
|
|
273
|
+
readonly description: "Host the name would live under. A name is only unique within its host.";
|
|
274
|
+
};
|
|
275
|
+
readonly available: {
|
|
276
|
+
readonly type: "boolean";
|
|
277
|
+
readonly description: "Whether the name can be taken **now**. It is a snapshot, not a hold: another caller may take it between this answer and the attempt.";
|
|
278
|
+
};
|
|
279
|
+
readonly reserved: {
|
|
280
|
+
readonly type: "boolean";
|
|
281
|
+
readonly description: "Whether the name is withheld by the host's own policy rather than taken by a DID. A reserved name is not available and will not become so by waiting.";
|
|
282
|
+
};
|
|
283
|
+
readonly ext: {
|
|
284
|
+
readonly $ref: "#/$defs/Ext";
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
readonly Ext: {
|
|
289
|
+
readonly title: "Ext";
|
|
290
|
+
readonly 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.";
|
|
291
|
+
readonly type: "object";
|
|
292
|
+
readonly minProperties: 1;
|
|
293
|
+
readonly additionalProperties: true;
|
|
294
|
+
readonly propertyNames: {
|
|
295
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../../src/vta/webvh/agent-name/check/1.0/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AACD;;GAEG;AACH,MAAM,WAAW,qCAAqC;IACpD,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,4DAAqE,CAAC;AAE9F,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,6BAA6B,CAAC;AAEpD,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,qEAA8E,CAAC;AAEhH,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,qCAAqC,CAAC;AAE7D;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuEjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgD1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMhB,CAAC"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/webvh/agent-name/check/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/webvh/agent-name/check/1.0";
|
|
7
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
8
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/webvh/agent-name/check/1.0#response";
|
|
9
|
+
/**
|
|
10
|
+
* This specification's payload schema, as a value.
|
|
11
|
+
*
|
|
12
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
13
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
14
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
15
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
16
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
17
|
+
*/
|
|
18
|
+
export const PAYLOAD_SCHEMA = {
|
|
19
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
20
|
+
"$id": "https://trusttasks.org/spec/vta/webvh/agent-name/check/1.0",
|
|
21
|
+
"title": "VTA WebVH Agent-Name Check — payload",
|
|
22
|
+
"description": "Ask whether a name is free before trying to take it.",
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": [
|
|
26
|
+
"did",
|
|
27
|
+
"name"
|
|
28
|
+
],
|
|
29
|
+
"properties": {
|
|
30
|
+
"did": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"minLength": 1,
|
|
33
|
+
"description": "DID the name is bound to."
|
|
34
|
+
},
|
|
35
|
+
"name": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"minLength": 1,
|
|
38
|
+
"description": "The name, without the host — the full form is `<host>/@<name>`."
|
|
39
|
+
},
|
|
40
|
+
"ext": {
|
|
41
|
+
"$ref": "#/$defs/Ext"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"$defs": {
|
|
45
|
+
"Response": {
|
|
46
|
+
"$anchor": "response",
|
|
47
|
+
"title": "VTA WebVH Agent-Name Check — response payload",
|
|
48
|
+
"description": "Success response to vta/webvh/agent-name/check. Type https://trusttasks.org/spec/vta/webvh/agent-name/check/1.0#response.",
|
|
49
|
+
"type": "object",
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"required": [
|
|
52
|
+
"name",
|
|
53
|
+
"domain",
|
|
54
|
+
"available",
|
|
55
|
+
"reserved"
|
|
56
|
+
],
|
|
57
|
+
"properties": {
|
|
58
|
+
"name": {
|
|
59
|
+
"type": "string"
|
|
60
|
+
},
|
|
61
|
+
"domain": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"description": "Host the name would live under. A name is only unique within its host."
|
|
64
|
+
},
|
|
65
|
+
"available": {
|
|
66
|
+
"type": "boolean",
|
|
67
|
+
"description": "Whether the name can be taken **now**. It is a snapshot, not a hold: another caller may take it between this answer and the attempt."
|
|
68
|
+
},
|
|
69
|
+
"reserved": {
|
|
70
|
+
"type": "boolean",
|
|
71
|
+
"description": "Whether the name is withheld by the host's own policy rather than taken by a DID. A reserved name is not available and will not become so by waiting."
|
|
72
|
+
},
|
|
73
|
+
"ext": {
|
|
74
|
+
"$ref": "#/$defs/Ext"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"Ext": {
|
|
79
|
+
"title": "Ext",
|
|
80
|
+
"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.",
|
|
81
|
+
"type": "object",
|
|
82
|
+
"minProperties": 1,
|
|
83
|
+
"additionalProperties": true,
|
|
84
|
+
"propertyNames": {
|
|
85
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
91
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
92
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
93
|
+
"$ref": "#/$defs/Response",
|
|
94
|
+
"$defs": {
|
|
95
|
+
"Response": {
|
|
96
|
+
"$anchor": "response",
|
|
97
|
+
"title": "VTA WebVH Agent-Name Check — response payload",
|
|
98
|
+
"description": "Success response to vta/webvh/agent-name/check. Type https://trusttasks.org/spec/vta/webvh/agent-name/check/1.0#response.",
|
|
99
|
+
"type": "object",
|
|
100
|
+
"additionalProperties": false,
|
|
101
|
+
"required": [
|
|
102
|
+
"name",
|
|
103
|
+
"domain",
|
|
104
|
+
"available",
|
|
105
|
+
"reserved"
|
|
106
|
+
],
|
|
107
|
+
"properties": {
|
|
108
|
+
"name": {
|
|
109
|
+
"type": "string"
|
|
110
|
+
},
|
|
111
|
+
"domain": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"description": "Host the name would live under. A name is only unique within its host."
|
|
114
|
+
},
|
|
115
|
+
"available": {
|
|
116
|
+
"type": "boolean",
|
|
117
|
+
"description": "Whether the name can be taken **now**. It is a snapshot, not a hold: another caller may take it between this answer and the attempt."
|
|
118
|
+
},
|
|
119
|
+
"reserved": {
|
|
120
|
+
"type": "boolean",
|
|
121
|
+
"description": "Whether the name is withheld by the host's own policy rather than taken by a DID. A reserved name is not available and will not become so by waiting."
|
|
122
|
+
},
|
|
123
|
+
"ext": {
|
|
124
|
+
"$ref": "#/$defs/Ext"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"Ext": {
|
|
129
|
+
"title": "Ext",
|
|
130
|
+
"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.",
|
|
131
|
+
"type": "object",
|
|
132
|
+
"minProperties": 1,
|
|
133
|
+
"additionalProperties": true,
|
|
134
|
+
"propertyNames": {
|
|
135
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
142
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
143
|
+
* per-specification and cannot be derived from the document alone, and
|
|
144
|
+
* item 2 needs the schema this carries.
|
|
145
|
+
*/
|
|
146
|
+
export const SPEC = {
|
|
147
|
+
typeUri: TYPE_URI,
|
|
148
|
+
isBearer: false,
|
|
149
|
+
isProofRequired: false,
|
|
150
|
+
isRecipientRequired: true,
|
|
151
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
155
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
156
|
+
* parties (§7.3 item 5).
|
|
157
|
+
*/
|
|
158
|
+
export const RESPONSE_SPEC = {
|
|
159
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
160
|
+
isBearer: false,
|
|
161
|
+
isProofRequired: false,
|
|
162
|
+
isRecipientRequired: true,
|
|
163
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
164
|
+
};
|
|
165
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../../src/vta/webvh/agent-name/check/1.0/payload.ts"],"names":[],"mappings":"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"}
|