@openvtc/trust-tasks 0.19.17 → 0.19.19
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 +4 -0
- package/dist/_runtime/consume.d.ts +1 -1
- package/dist/_runtime/consume.js +2 -2
- package/dist/_shared/components.d.ts +46 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/persona/_shared/0.1/persona-record.d.ts +1 -1
- package/dist/persona/_shared/0.1/persona-record.d.ts.map +1 -1
- package/dist/persona/attribute/list/1.0/payload.d.ts +124 -4
- package/dist/persona/attribute/list/1.0/payload.d.ts.map +1 -1
- package/dist/persona/attribute/list/1.0/payload.js +72 -2
- package/dist/persona/attribute/list/1.0/payload.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/attribute/put/1.0/payload.d.ts +110 -4
- package/dist/persona/attribute/put/1.0/payload.d.ts.map +1 -1
- package/dist/persona/attribute/put/1.0/payload.js +62 -2
- package/dist/persona/attribute/put/1.0/payload.js.map +1 -1
- 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/contact/get/1.0/payload.d.ts +84 -4
- package/dist/persona/contact/get/1.0/payload.d.ts.map +1 -1
- package/dist/persona/contact/get/1.0/payload.js +52 -2
- package/dist/persona/contact/get/1.0/payload.js.map +1 -1
- package/dist/persona/contact/put/1.0/payload.d.ts +84 -4
- package/dist/persona/contact/put/1.0/payload.d.ts.map +1 -1
- package/dist/persona/contact/put/1.0/payload.js +52 -2
- package/dist/persona/contact/put/1.0/payload.js.map +1 -1
- package/dist/persona/disclosure/preview/1.0/payload.d.ts +5 -5
- package/dist/persona/disclosure/preview/1.0/payload.d.ts.map +1 -1
- package/dist/persona/disclosure/preview/1.0/payload.js +4 -2
- package/dist/persona/disclosure/preview/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 +965 -0
- package/dist/persona/profile/compose/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/compose/1.0/payload.js +531 -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 +345 -6
- package/dist/persona/profile/get/1.0/payload.d.ts.map +1 -1
- package/dist/persona/profile/get/1.0/payload.js +206 -2
- package/dist/persona/profile/get/1.0/payload.js.map +1 -1
- package/dist/persona/profile/list/1.0/payload.d.ts +288 -6
- package/dist/persona/profile/list/1.0/payload.d.ts.map +1 -1
- package/dist/persona/profile/list/1.0/payload.js +173 -2
- package/dist/persona/profile/list/1.0/payload.js.map +1 -1
- package/dist/persona/profile/put/1.0/payload.d.ts +230 -6
- package/dist/persona/profile/put/1.0/payload.d.ts.map +1 -1
- package/dist/persona/profile/put/1.0/payload.js +138 -2
- package/dist/persona/profile/put/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/persona/profile/timeline/1.0/payload.d.ts +588 -0
- package/dist/persona/profile/timeline/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/timeline/1.0/payload.js +322 -0
- package/dist/persona/profile/timeline/1.0/payload.js.map +1 -0
- package/dist/persona/profile/usage/1.0/payload.d.ts +533 -0
- package/dist/persona/profile/usage/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/usage/1.0/payload.js +302 -0
- package/dist/persona/profile/usage/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/dist/vtc/invitations/deliver/0.1/payload.d.ts +318 -0
- package/dist/vtc/invitations/deliver/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/invitations/deliver/0.1/payload.js +183 -0
- package/dist/vtc/invitations/deliver/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_runtime/consume.ts +2 -2
- package/src/_shared/components.ts +49 -0
- package/src/index.ts +8 -0
- package/src/persona/_shared/0.1/persona-record.ts +1 -1
- package/src/persona/attribute/list/1.0/payload.ts +72 -2
- package/src/persona/attribute/promote/1.0/payload.ts +344 -0
- package/src/persona/attribute/put/1.0/payload.ts +68 -2
- 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/contact/get/1.0/payload.ts +52 -2
- package/src/persona/contact/put/1.0/payload.ts +52 -2
- package/src/persona/disclosure/preview/1.0/payload.ts +5 -3
- package/src/persona/local/binding/set/1.0/payload.ts +9 -0
- package/src/persona/profile/compose/1.0/payload.ts +650 -0
- package/src/persona/profile/delete/1.0/payload.ts +45 -0
- package/src/persona/profile/get/1.0/payload.ts +215 -4
- package/src/persona/profile/list/1.0/payload.ts +179 -4
- package/src/persona/profile/put/1.0/payload.ts +144 -4
- package/src/persona/profile/reinstate/1.0/payload.ts +219 -0
- package/src/persona/profile/retire/1.0/payload.ts +289 -0
- package/src/persona/profile/timeline/1.0/payload.ts +402 -0
- package/src/persona/profile/usage/1.0/payload.ts +354 -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
- package/src/vtc/invitations/deliver/0.1/payload.ts +234 -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;
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/invitations/deliver/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Deliver an issued invitation to the DID it admits: push an offer to that DID, or return the offer for a QR code. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTCInvitationsDeliverPayload {
|
|
13
|
+
/**
|
|
14
|
+
* Identifier of the invitation to deliver, as `vtc/invitations/list` reports it.
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
/**
|
|
18
|
+
* `message`: the community sends a `credential-exchange/offer` to the invited DID over a transport that DID advertises. `offer`: the community returns the offer, for the inviter to hand over out of band — typically as a QR code.
|
|
19
|
+
*/
|
|
20
|
+
channel: "message" | "offer";
|
|
21
|
+
ext?: Ext;
|
|
22
|
+
}
|
|
23
|
+
export interface VTCInvitationsDeliverResponsePayload {
|
|
24
|
+
/**
|
|
25
|
+
* The invitation's identifier, echoed.
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* The channel used, echoed.
|
|
30
|
+
*/
|
|
31
|
+
channel: "message" | "offer";
|
|
32
|
+
/**
|
|
33
|
+
* Present exactly when `channel` is `offer`: an OID4VCI Credential Offer object, carried verbatim, whose pre-authorized code redeems only for the invited DID. Its members are OID4VCI's and are deliberately not re-specified here.
|
|
34
|
+
*/
|
|
35
|
+
offer?: {};
|
|
36
|
+
/**
|
|
37
|
+
* When this delivery's offer lapses. Never later than the invitation's own expiry.
|
|
38
|
+
*/
|
|
39
|
+
expiresAt: string;
|
|
40
|
+
ext?: Ext;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
44
|
+
export type { Ext };
|
|
45
|
+
|
|
46
|
+
/** Trust Task type URI. */
|
|
47
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/invitations/deliver/0.1" as const;
|
|
48
|
+
|
|
49
|
+
/** Stable alias for this specification's request payload shape. */
|
|
50
|
+
export type Payload = VTCInvitationsDeliverPayload;
|
|
51
|
+
|
|
52
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
53
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/invitations/deliver/0.1#response" as const;
|
|
54
|
+
|
|
55
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
56
|
+
export type Response = VTCInvitationsDeliverResponsePayload;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* This specification's payload schema, as a value.
|
|
60
|
+
*
|
|
61
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
62
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
63
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
64
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
65
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
66
|
+
*/
|
|
67
|
+
export const PAYLOAD_SCHEMA = {
|
|
68
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
69
|
+
"$id": "https://trusttasks.org/spec/vtc/invitations/deliver/0.1",
|
|
70
|
+
"title": "VTC Invitations Deliver — payload",
|
|
71
|
+
"description": "Deliver an issued invitation to the DID it admits: push an offer to that DID, or return the offer for a QR code. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
|
|
72
|
+
"type": "object",
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"required": [
|
|
75
|
+
"id",
|
|
76
|
+
"channel"
|
|
77
|
+
],
|
|
78
|
+
"properties": {
|
|
79
|
+
"id": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"minLength": 1,
|
|
82
|
+
"maxLength": 256,
|
|
83
|
+
"description": "Identifier of the invitation to deliver, as `vtc/invitations/list` reports it."
|
|
84
|
+
},
|
|
85
|
+
"channel": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"enum": [
|
|
88
|
+
"message",
|
|
89
|
+
"offer"
|
|
90
|
+
],
|
|
91
|
+
"description": "`message`: the community sends a `credential-exchange/offer` to the invited DID over a transport that DID advertises. `offer`: the community returns the offer, for the inviter to hand over out of band — typically as a QR code."
|
|
92
|
+
},
|
|
93
|
+
"ext": {
|
|
94
|
+
"$ref": "#/$defs/Ext"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"$defs": {
|
|
98
|
+
"Response": {
|
|
99
|
+
"$anchor": "response",
|
|
100
|
+
"title": "VTC Invitations Deliver — response payload",
|
|
101
|
+
"type": "object",
|
|
102
|
+
"additionalProperties": false,
|
|
103
|
+
"required": [
|
|
104
|
+
"id",
|
|
105
|
+
"channel",
|
|
106
|
+
"expiresAt"
|
|
107
|
+
],
|
|
108
|
+
"properties": {
|
|
109
|
+
"id": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"minLength": 1,
|
|
112
|
+
"maxLength": 256,
|
|
113
|
+
"description": "The invitation's identifier, echoed."
|
|
114
|
+
},
|
|
115
|
+
"channel": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"enum": [
|
|
118
|
+
"message",
|
|
119
|
+
"offer"
|
|
120
|
+
],
|
|
121
|
+
"description": "The channel used, echoed."
|
|
122
|
+
},
|
|
123
|
+
"offer": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"description": "Present exactly when `channel` is `offer`: an OID4VCI Credential Offer object, carried verbatim, whose pre-authorized code redeems only for the invited DID. Its members are OID4VCI's and are deliberately not re-specified here."
|
|
126
|
+
},
|
|
127
|
+
"expiresAt": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"format": "date-time",
|
|
130
|
+
"description": "When this delivery's offer lapses. Never later than the invitation's own expiry."
|
|
131
|
+
},
|
|
132
|
+
"ext": {
|
|
133
|
+
"$ref": "#/$defs/Ext"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"Ext": {
|
|
138
|
+
"title": "Ext",
|
|
139
|
+
"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.",
|
|
140
|
+
"type": "object",
|
|
141
|
+
"minProperties": 1,
|
|
142
|
+
"additionalProperties": true,
|
|
143
|
+
"propertyNames": {
|
|
144
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
} as const;
|
|
149
|
+
|
|
150
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
151
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
152
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
153
|
+
"$ref": "#/$defs/Response",
|
|
154
|
+
"$defs": {
|
|
155
|
+
"Response": {
|
|
156
|
+
"$anchor": "response",
|
|
157
|
+
"title": "VTC Invitations Deliver — response payload",
|
|
158
|
+
"type": "object",
|
|
159
|
+
"additionalProperties": false,
|
|
160
|
+
"required": [
|
|
161
|
+
"id",
|
|
162
|
+
"channel",
|
|
163
|
+
"expiresAt"
|
|
164
|
+
],
|
|
165
|
+
"properties": {
|
|
166
|
+
"id": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"minLength": 1,
|
|
169
|
+
"maxLength": 256,
|
|
170
|
+
"description": "The invitation's identifier, echoed."
|
|
171
|
+
},
|
|
172
|
+
"channel": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"enum": [
|
|
175
|
+
"message",
|
|
176
|
+
"offer"
|
|
177
|
+
],
|
|
178
|
+
"description": "The channel used, echoed."
|
|
179
|
+
},
|
|
180
|
+
"offer": {
|
|
181
|
+
"type": "object",
|
|
182
|
+
"description": "Present exactly when `channel` is `offer`: an OID4VCI Credential Offer object, carried verbatim, whose pre-authorized code redeems only for the invited DID. Its members are OID4VCI's and are deliberately not re-specified here."
|
|
183
|
+
},
|
|
184
|
+
"expiresAt": {
|
|
185
|
+
"type": "string",
|
|
186
|
+
"format": "date-time",
|
|
187
|
+
"description": "When this delivery's offer lapses. Never later than the invitation's own expiry."
|
|
188
|
+
},
|
|
189
|
+
"ext": {
|
|
190
|
+
"$ref": "#/$defs/Ext"
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"Ext": {
|
|
195
|
+
"title": "Ext",
|
|
196
|
+
"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.",
|
|
197
|
+
"type": "object",
|
|
198
|
+
"minProperties": 1,
|
|
199
|
+
"additionalProperties": true,
|
|
200
|
+
"propertyNames": {
|
|
201
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
} as const;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
209
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
210
|
+
* per-specification and cannot be derived from the document alone, and
|
|
211
|
+
* item 2 needs the schema this carries.
|
|
212
|
+
*/
|
|
213
|
+
export const SPEC = {
|
|
214
|
+
typeUri: TYPE_URI,
|
|
215
|
+
isBearer: false,
|
|
216
|
+
isProofRequired: true,
|
|
217
|
+
isRecipientRequired: true,
|
|
218
|
+
isIssuedAtRequired: true,
|
|
219
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
220
|
+
} as const;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
224
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
225
|
+
* parties (§7.3 item 5).
|
|
226
|
+
*/
|
|
227
|
+
export const RESPONSE_SPEC = {
|
|
228
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
229
|
+
isBearer: false,
|
|
230
|
+
isProofRequired: true,
|
|
231
|
+
isRecipientRequired: true,
|
|
232
|
+
isIssuedAtRequired: true,
|
|
233
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
234
|
+
} as const;
|