@openvtc/trust-tasks 0.19.17 → 0.19.18
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/CHANGELOG.md +2 -0
- package/dist/_runtime/consume.d.ts +1 -1
- package/dist/_runtime/consume.js +2 -2
- package/dist/_shared/components.d.ts +8 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/persona/attribute/promote/1.0/payload.d.ts +506 -0
- package/dist/persona/attribute/promote/1.0/payload.d.ts.map +1 -0
- package/dist/persona/attribute/promote/1.0/payload.js +263 -0
- package/dist/persona/attribute/promote/1.0/payload.js.map +1 -0
- package/dist/persona/binding/get/1.0/payload.d.ts +24 -0
- package/dist/persona/binding/get/1.0/payload.d.ts.map +1 -1
- package/dist/persona/binding/get/1.0/payload.js +10 -0
- package/dist/persona/binding/get/1.0/payload.js.map +1 -1
- package/dist/persona/binding/list/1.0/payload.d.ts +24 -0
- package/dist/persona/binding/list/1.0/payload.d.ts.map +1 -1
- package/dist/persona/binding/list/1.0/payload.js +10 -0
- package/dist/persona/binding/list/1.0/payload.js.map +1 -1
- package/dist/persona/binding/set/1.0/payload.d.ts +38 -0
- package/dist/persona/binding/set/1.0/payload.d.ts.map +1 -1
- package/dist/persona/binding/set/1.0/payload.js +15 -0
- package/dist/persona/binding/set/1.0/payload.js.map +1 -1
- package/dist/persona/local/binding/set/1.0/payload.d.ts +14 -0
- package/dist/persona/local/binding/set/1.0/payload.d.ts.map +1 -1
- package/dist/persona/local/binding/set/1.0/payload.js +5 -0
- package/dist/persona/local/binding/set/1.0/payload.js.map +1 -1
- package/dist/persona/profile/compose/1.0/payload.d.ts +951 -0
- package/dist/persona/profile/compose/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/compose/1.0/payload.js +526 -0
- package/dist/persona/profile/compose/1.0/payload.js.map +1 -0
- package/dist/persona/profile/delete/1.0/payload.d.ts +71 -0
- package/dist/persona/profile/delete/1.0/payload.d.ts.map +1 -1
- package/dist/persona/profile/delete/1.0/payload.js +38 -0
- package/dist/persona/profile/delete/1.0/payload.js.map +1 -1
- package/dist/persona/profile/get/1.0/payload.d.ts +115 -0
- package/dist/persona/profile/get/1.0/payload.d.ts.map +1 -1
- package/dist/persona/profile/get/1.0/payload.js +66 -0
- package/dist/persona/profile/get/1.0/payload.js.map +1 -1
- package/dist/persona/profile/list/1.0/payload.d.ts +58 -0
- package/dist/persona/profile/list/1.0/payload.d.ts.map +1 -1
- package/dist/persona/profile/list/1.0/payload.js +33 -0
- package/dist/persona/profile/list/1.0/payload.js.map +1 -1
- package/dist/persona/profile/reinstate/1.0/payload.d.ts +325 -0
- package/dist/persona/profile/reinstate/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/reinstate/1.0/payload.js +181 -0
- package/dist/persona/profile/reinstate/1.0/payload.js.map +1 -0
- package/dist/persona/profile/retire/1.0/payload.d.ts +436 -0
- package/dist/persona/profile/retire/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/retire/1.0/payload.js +238 -0
- package/dist/persona/profile/retire/1.0/payload.js.map +1 -0
- package/dist/trust-task-control/0.1/payload.d.ts +19 -19
- package/dist/trust-task-control/0.1/payload.js +7 -7
- package/dist/trust-task-discovery/0.1/payload.d.ts +3 -3
- package/dist/trust-task-discovery/0.1/payload.js +1 -1
- package/dist/trust-task-discovery/0.2/payload.d.ts +368 -0
- package/dist/trust-task-discovery/0.2/payload.d.ts.map +1 -0
- package/dist/trust-task-discovery/0.2/payload.js +186 -0
- package/dist/trust-task-discovery/0.2/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_runtime/consume.ts +2 -2
- package/src/_shared/components.ts +8 -0
- package/src/index.ts +5 -0
- package/src/persona/attribute/promote/1.0/payload.ts +344 -0
- package/src/persona/binding/get/1.0/payload.ts +14 -0
- package/src/persona/binding/list/1.0/payload.ts +14 -0
- package/src/persona/binding/set/1.0/payload.ts +23 -0
- package/src/persona/local/binding/set/1.0/payload.ts +9 -0
- package/src/persona/profile/compose/1.0/payload.ts +641 -0
- package/src/persona/profile/delete/1.0/payload.ts +45 -0
- package/src/persona/profile/get/1.0/payload.ts +73 -0
- package/src/persona/profile/list/1.0/payload.ts +37 -0
- package/src/persona/profile/reinstate/1.0/payload.ts +219 -0
- package/src/persona/profile/retire/1.0/payload.ts +289 -0
- package/src/trust-task-control/0.1/payload.ts +12 -12
- package/src/trust-task-discovery/0.1/payload.ts +2 -2
- package/src/trust-task-discovery/0.2/payload.ts +286 -0
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/trust-task-discovery/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Request payload for the framework-defined trust-task-discovery exchange. Carries zero or more slug-glob patterns the discoverer wants the responder to filter against. The response payload schema is reachable via $anchor: 'response'.
|
|
8
|
+
*/
|
|
9
|
+
export interface TrustTaskDiscoveryPayload {
|
|
10
|
+
/**
|
|
11
|
+
* Patterns are ORed: a slug matches the query if at least one pattern matches it. If the array is omitted or empty, the responder MUST treat the query as ['*'] — return every supported task. Bounded at 16 entries as parser hardening (SPEC.md §12.2), not as a capability limit: matching an unbounded pattern list against every published slug is work a responder does on an unauthenticated request, and a discoverer wanting more asks for '*' and filters locally.
|
|
12
|
+
*
|
|
13
|
+
* @maxItems 16
|
|
14
|
+
*/
|
|
15
|
+
patterns?:
|
|
16
|
+
| []
|
|
17
|
+
| [string]
|
|
18
|
+
| [string, string]
|
|
19
|
+
| [string, string, string]
|
|
20
|
+
| [string, string, string, string]
|
|
21
|
+
| [string, string, string, string, string]
|
|
22
|
+
| [string, string, string, string, string, string]
|
|
23
|
+
| [string, string, string, string, string, string, string]
|
|
24
|
+
| [string, string, string, string, string, string, string, string]
|
|
25
|
+
| [string, string, string, string, string, string, string, string, string]
|
|
26
|
+
| [string, string, string, string, string, string, string, string, string, string]
|
|
27
|
+
| [string, string, string, string, string, string, string, string, string, string, string]
|
|
28
|
+
| [string, string, string, string, string, string, string, string, string, string, string, string]
|
|
29
|
+
| [string, string, string, string, string, string, string, string, string, string, string, string, string]
|
|
30
|
+
| [string, string, string, string, string, string, string, string, string, string, string, string, string, string]
|
|
31
|
+
| [
|
|
32
|
+
string,
|
|
33
|
+
string,
|
|
34
|
+
string,
|
|
35
|
+
string,
|
|
36
|
+
string,
|
|
37
|
+
string,
|
|
38
|
+
string,
|
|
39
|
+
string,
|
|
40
|
+
string,
|
|
41
|
+
string,
|
|
42
|
+
string,
|
|
43
|
+
string,
|
|
44
|
+
string,
|
|
45
|
+
string,
|
|
46
|
+
string
|
|
47
|
+
]
|
|
48
|
+
| [
|
|
49
|
+
string,
|
|
50
|
+
string,
|
|
51
|
+
string,
|
|
52
|
+
string,
|
|
53
|
+
string,
|
|
54
|
+
string,
|
|
55
|
+
string,
|
|
56
|
+
string,
|
|
57
|
+
string,
|
|
58
|
+
string,
|
|
59
|
+
string,
|
|
60
|
+
string,
|
|
61
|
+
string,
|
|
62
|
+
string,
|
|
63
|
+
string,
|
|
64
|
+
string
|
|
65
|
+
];
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* List of bare Type URIs the responding party supports. Carried in a Trust Task document whose type is https://trusttasks.org/spec/trust-task-discovery/0.2#response.
|
|
69
|
+
*/
|
|
70
|
+
export interface TrustTaskDiscoveryResponsePayload {
|
|
71
|
+
/**
|
|
72
|
+
* Each entry's Type URI MUST match at least one of the request's patterns (if any were supplied). Order is not significant. Duplicates by Type URI are not permitted, regardless of whether the entry is in shorthand or expanded form.
|
|
73
|
+
*/
|
|
74
|
+
supportedTypes: (
|
|
75
|
+
| string
|
|
76
|
+
| {
|
|
77
|
+
/**
|
|
78
|
+
* A bare Type URI (no #request or #response fragment). The responder supports both request and response variants of every entry it lists.
|
|
79
|
+
*/
|
|
80
|
+
type: string;
|
|
81
|
+
/**
|
|
82
|
+
* Reverse-DNS `ext` namespaces this responder requires on inbound documents of this Type URI as a matter of local policy (SPEC.md §4.5.1, §7.2). A producer that does not populate every listed namespace will receive a `malformedRequest` rejection. Optional; reserved-but-recognized in 0.1, RECOMMENDED in future revisions for responders that enforce such policies.
|
|
83
|
+
*
|
|
84
|
+
* @minItems 1
|
|
85
|
+
*/
|
|
86
|
+
requiredExt?: [string, ...string[]];
|
|
87
|
+
}
|
|
88
|
+
)[];
|
|
89
|
+
/**
|
|
90
|
+
* MAJOR.MINOR.PATCH version of the Trust Tasks framework specification (SPEC.md) the responder targets — three-part, as the framework has been versioned since 0.4.0 (SPEC.md §5.1.1), and exactly the value a Trust Task specification declares as its target framework version. Lets a discoverer reason about compatibility (SPEC.md §5.2) and select the envelope schema a responder's documents are validated against, which is keyed by the full release: a PATCH is never substituted for another. RECOMMENDED. Two-part in trust-task-discovery/0.1, which could not express a PATCH.
|
|
91
|
+
*/
|
|
92
|
+
frameworkVersion?: string;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** Trust Task type URI. */
|
|
96
|
+
export const TYPE_URI = "https://trusttasks.org/spec/trust-task-discovery/0.2" as const;
|
|
97
|
+
|
|
98
|
+
/** Stable alias for this specification's request payload shape. */
|
|
99
|
+
export type Payload = TrustTaskDiscoveryPayload;
|
|
100
|
+
|
|
101
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
102
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/trust-task-discovery/0.2#response" as const;
|
|
103
|
+
|
|
104
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
105
|
+
export type Response = TrustTaskDiscoveryResponsePayload;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* This specification's payload schema, as a value.
|
|
109
|
+
*
|
|
110
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
111
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
112
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
113
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
114
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
115
|
+
*/
|
|
116
|
+
export const PAYLOAD_SCHEMA = {
|
|
117
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
118
|
+
"$id": "https://trusttasks.org/spec/trust-task-discovery/0.2",
|
|
119
|
+
"title": "Trust Task Discovery — payload",
|
|
120
|
+
"description": "Request payload for the framework-defined trust-task-discovery exchange. Carries zero or more slug-glob patterns the discoverer wants the responder to filter against. The response payload schema is reachable via $anchor: 'response'.",
|
|
121
|
+
"type": "object",
|
|
122
|
+
"additionalProperties": false,
|
|
123
|
+
"properties": {
|
|
124
|
+
"patterns": {
|
|
125
|
+
"type": "array",
|
|
126
|
+
"maxItems": 16,
|
|
127
|
+
"items": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"minLength": 1,
|
|
130
|
+
"description": "Slug-glob pattern. Matches: '*' (every slug); '<prefix>/*' (any slug starting with '<prefix>/' — e.g. 'acl/*' matches 'acl/grant', 'acl/revoke', 'acl/grant/sub'); otherwise an exact slug match. Wildcards anywhere other than as a trailing segment are not interpreted — the only sigils are the trailing '/*' and the bare '*'."
|
|
131
|
+
},
|
|
132
|
+
"description": "Patterns are ORed: a slug matches the query if at least one pattern matches it. If the array is omitted or empty, the responder MUST treat the query as ['*'] — return every supported task. Bounded at 16 entries as parser hardening (SPEC.md §12.2), not as a capability limit: matching an unbounded pattern list against every published slug is work a responder does on an unauthenticated request, and a discoverer wanting more asks for '*' and filters locally."
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"$defs": {
|
|
136
|
+
"Response": {
|
|
137
|
+
"$anchor": "response",
|
|
138
|
+
"title": "Trust Task Discovery — response payload",
|
|
139
|
+
"description": "List of bare Type URIs the responding party supports. Carried in a Trust Task document whose type is https://trusttasks.org/spec/trust-task-discovery/0.2#response.",
|
|
140
|
+
"type": "object",
|
|
141
|
+
"additionalProperties": false,
|
|
142
|
+
"required": [
|
|
143
|
+
"supportedTypes"
|
|
144
|
+
],
|
|
145
|
+
"properties": {
|
|
146
|
+
"supportedTypes": {
|
|
147
|
+
"type": "array",
|
|
148
|
+
"items": {
|
|
149
|
+
"oneOf": [
|
|
150
|
+
{
|
|
151
|
+
"type": "string",
|
|
152
|
+
"format": "uri",
|
|
153
|
+
"description": "Shorthand form: a bare Type URI string. Equivalent to an object with only the `type` member set."
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"type": "object",
|
|
157
|
+
"additionalProperties": false,
|
|
158
|
+
"required": [
|
|
159
|
+
"type"
|
|
160
|
+
],
|
|
161
|
+
"properties": {
|
|
162
|
+
"type": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"format": "uri",
|
|
165
|
+
"description": "A bare Type URI (no #request or #response fragment). The responder supports both request and response variants of every entry it lists."
|
|
166
|
+
},
|
|
167
|
+
"requiredExt": {
|
|
168
|
+
"type": "array",
|
|
169
|
+
"items": {
|
|
170
|
+
"type": "string",
|
|
171
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
172
|
+
},
|
|
173
|
+
"minItems": 1,
|
|
174
|
+
"uniqueItems": true,
|
|
175
|
+
"description": "Reverse-DNS `ext` namespaces this responder requires on inbound documents of this Type URI as a matter of local policy (SPEC.md §4.5.1, §7.2). A producer that does not populate every listed namespace will receive a `malformedRequest` rejection. Optional; reserved-but-recognized in 0.1, RECOMMENDED in future revisions for responders that enforce such policies."
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"description": "Object form: lists a Type URI together with optional capability annotations."
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"description": "An entry in the supportedTypes list. SHORTHAND: a bare Type URI string. EXPANDED: an object with `type` and optional capability annotations (`requiredExt`)."
|
|
182
|
+
},
|
|
183
|
+
"description": "Each entry's Type URI MUST match at least one of the request's patterns (if any were supplied). Order is not significant. Duplicates by Type URI are not permitted, regardless of whether the entry is in shorthand or expanded form."
|
|
184
|
+
},
|
|
185
|
+
"frameworkVersion": {
|
|
186
|
+
"type": "string",
|
|
187
|
+
"pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$",
|
|
188
|
+
"description": "MAJOR.MINOR.PATCH version of the Trust Tasks framework specification (SPEC.md) the responder targets — three-part, as the framework has been versioned since 0.4.0 (SPEC.md §5.1.1), and exactly the value a Trust Task specification declares as its target framework version. Lets a discoverer reason about compatibility (SPEC.md §5.2) and select the envelope schema a responder's documents are validated against, which is keyed by the full release: a PATCH is never substituted for another. RECOMMENDED. Two-part in trust-task-discovery/0.1, which could not express a PATCH."
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
} as const;
|
|
194
|
+
|
|
195
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
196
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
197
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
198
|
+
"$ref": "#/$defs/Response",
|
|
199
|
+
"$defs": {
|
|
200
|
+
"Response": {
|
|
201
|
+
"$anchor": "response",
|
|
202
|
+
"title": "Trust Task Discovery — response payload",
|
|
203
|
+
"description": "List of bare Type URIs the responding party supports. Carried in a Trust Task document whose type is https://trusttasks.org/spec/trust-task-discovery/0.2#response.",
|
|
204
|
+
"type": "object",
|
|
205
|
+
"additionalProperties": false,
|
|
206
|
+
"required": [
|
|
207
|
+
"supportedTypes"
|
|
208
|
+
],
|
|
209
|
+
"properties": {
|
|
210
|
+
"supportedTypes": {
|
|
211
|
+
"type": "array",
|
|
212
|
+
"items": {
|
|
213
|
+
"oneOf": [
|
|
214
|
+
{
|
|
215
|
+
"type": "string",
|
|
216
|
+
"format": "uri",
|
|
217
|
+
"description": "Shorthand form: a bare Type URI string. Equivalent to an object with only the `type` member set."
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"type": "object",
|
|
221
|
+
"additionalProperties": false,
|
|
222
|
+
"required": [
|
|
223
|
+
"type"
|
|
224
|
+
],
|
|
225
|
+
"properties": {
|
|
226
|
+
"type": {
|
|
227
|
+
"type": "string",
|
|
228
|
+
"format": "uri",
|
|
229
|
+
"description": "A bare Type URI (no #request or #response fragment). The responder supports both request and response variants of every entry it lists."
|
|
230
|
+
},
|
|
231
|
+
"requiredExt": {
|
|
232
|
+
"type": "array",
|
|
233
|
+
"items": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
236
|
+
},
|
|
237
|
+
"minItems": 1,
|
|
238
|
+
"uniqueItems": true,
|
|
239
|
+
"description": "Reverse-DNS `ext` namespaces this responder requires on inbound documents of this Type URI as a matter of local policy (SPEC.md §4.5.1, §7.2). A producer that does not populate every listed namespace will receive a `malformedRequest` rejection. Optional; reserved-but-recognized in 0.1, RECOMMENDED in future revisions for responders that enforce such policies."
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"description": "Object form: lists a Type URI together with optional capability annotations."
|
|
243
|
+
}
|
|
244
|
+
],
|
|
245
|
+
"description": "An entry in the supportedTypes list. SHORTHAND: a bare Type URI string. EXPANDED: an object with `type` and optional capability annotations (`requiredExt`)."
|
|
246
|
+
},
|
|
247
|
+
"description": "Each entry's Type URI MUST match at least one of the request's patterns (if any were supplied). Order is not significant. Duplicates by Type URI are not permitted, regardless of whether the entry is in shorthand or expanded form."
|
|
248
|
+
},
|
|
249
|
+
"frameworkVersion": {
|
|
250
|
+
"type": "string",
|
|
251
|
+
"pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$",
|
|
252
|
+
"description": "MAJOR.MINOR.PATCH version of the Trust Tasks framework specification (SPEC.md) the responder targets — three-part, as the framework has been versioned since 0.4.0 (SPEC.md §5.1.1), and exactly the value a Trust Task specification declares as its target framework version. Lets a discoverer reason about compatibility (SPEC.md §5.2) and select the envelope schema a responder's documents are validated against, which is keyed by the full release: a PATCH is never substituted for another. RECOMMENDED. Two-part in trust-task-discovery/0.1, which could not express a PATCH."
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
} as const;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
261
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
262
|
+
* per-specification and cannot be derived from the document alone, and
|
|
263
|
+
* item 2 needs the schema this carries.
|
|
264
|
+
*/
|
|
265
|
+
export const SPEC = {
|
|
266
|
+
typeUri: TYPE_URI,
|
|
267
|
+
isBearer: false,
|
|
268
|
+
isProofRequired: false,
|
|
269
|
+
isRecipientRequired: true,
|
|
270
|
+
isIssuedAtRequired: false,
|
|
271
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
272
|
+
} as const;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
276
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
277
|
+
* parties (§7.3 item 5).
|
|
278
|
+
*/
|
|
279
|
+
export const RESPONSE_SPEC = {
|
|
280
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
281
|
+
isBearer: false,
|
|
282
|
+
isProofRequired: false,
|
|
283
|
+
isRecipientRequired: true,
|
|
284
|
+
isIssuedAtRequired: false,
|
|
285
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
286
|
+
} as const;
|