@openvtc/trust-tasks 0.21.10 → 0.21.12
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 +106 -0
- package/dist/_framework/0.4/framework.d.ts +1 -1
- package/dist/_framework/0.4/framework.d.ts.map +1 -1
- package/dist/_shared/components.d.ts +371 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/auth/_shared/0.1/signing-key.d.ts +16 -0
- package/dist/auth/_shared/0.1/signing-key.d.ts.map +1 -0
- package/dist/auth/_shared/0.1/signing-key.js +6 -0
- package/dist/auth/_shared/0.1/signing-key.js.map +1 -0
- package/dist/auth/signing-key/enroll/0.1/payload.d.ts +545 -0
- package/dist/auth/signing-key/enroll/0.1/payload.d.ts.map +1 -0
- package/dist/auth/signing-key/enroll/0.1/payload.js +307 -0
- package/dist/auth/signing-key/enroll/0.1/payload.js.map +1 -0
- package/dist/auth/signing-key/list/0.1/payload.d.ts +509 -0
- package/dist/auth/signing-key/list/0.1/payload.d.ts.map +1 -0
- package/dist/auth/signing-key/list/0.1/payload.js +289 -0
- package/dist/auth/signing-key/list/0.1/payload.js.map +1 -0
- package/dist/auth/signing-key/revoke/0.1/payload.d.ts +292 -0
- package/dist/auth/signing-key/revoke/0.1/payload.d.ts.map +1 -0
- package/dist/auth/signing-key/revoke/0.1/payload.js +167 -0
- package/dist/auth/signing-key/revoke/0.1/payload.js.map +1 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +39 -0
- package/dist/index.js.map +1 -1
- package/dist/trust-task-discovery/0.3/payload.d.ts +483 -0
- package/dist/trust-task-discovery/0.3/payload.d.ts.map +1 -0
- package/dist/trust-task-discovery/0.3/payload.js +242 -0
- package/dist/trust-task-discovery/0.3/payload.js.map +1 -0
- package/dist/vtc/_shared/0.1/community-presentation.d.ts +16 -0
- package/dist/vtc/_shared/0.1/community-presentation.d.ts.map +1 -0
- package/dist/vtc/_shared/0.1/community-presentation.js +6 -0
- package/dist/vtc/_shared/0.1/community-presentation.js.map +1 -0
- package/dist/vtc/_shared/0.1/relationship-lifecycle.d.ts +16 -0
- package/dist/vtc/_shared/0.1/relationship-lifecycle.d.ts.map +1 -0
- package/dist/vtc/_shared/0.1/relationship-lifecycle.js +6 -0
- package/dist/vtc/_shared/0.1/relationship-lifecycle.js.map +1 -0
- package/dist/vtc/_shared/0.1/schema-registry.d.ts +16 -0
- package/dist/vtc/_shared/0.1/schema-registry.d.ts.map +1 -0
- package/dist/vtc/_shared/0.1/schema-registry.js +6 -0
- package/dist/vtc/_shared/0.1/schema-registry.js.map +1 -0
- package/dist/vtc/_shared/0.1/vetting-auto-grant.d.ts +16 -0
- package/dist/vtc/_shared/0.1/vetting-auto-grant.d.ts.map +1 -0
- package/dist/vtc/_shared/0.1/vetting-auto-grant.js +6 -0
- package/dist/vtc/_shared/0.1/vetting-auto-grant.js.map +1 -0
- package/dist/vtc/_shared/0.1/website-transfer.d.ts +16 -0
- package/dist/vtc/_shared/0.1/website-transfer.d.ts.map +1 -0
- package/dist/vtc/_shared/0.1/website-transfer.js +6 -0
- package/dist/vtc/_shared/0.1/website-transfer.js.map +1 -0
- package/dist/vtc/community/branding/show/0.1/payload.d.ts +319 -0
- package/dist/vtc/community/branding/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/community/branding/show/0.1/payload.js +179 -0
- package/dist/vtc/community/branding/show/0.1/payload.js.map +1 -0
- package/dist/vtc/community/branding/update/0.1/payload.d.ts +328 -0
- package/dist/vtc/community/branding/update/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/community/branding/update/0.1/payload.js +185 -0
- package/dist/vtc/community/branding/update/0.1/payload.js.map +1 -0
- package/dist/vtc/community/join-discovery/show/0.1/payload.d.ts +267 -0
- package/dist/vtc/community/join-discovery/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/community/join-discovery/show/0.1/payload.js +157 -0
- package/dist/vtc/community/join-discovery/show/0.1/payload.js.map +1 -0
- package/dist/vtc/community/join-discovery/update/0.1/payload.d.ts +276 -0
- package/dist/vtc/community/join-discovery/update/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/community/join-discovery/update/0.1/payload.js +163 -0
- package/dist/vtc/community/join-discovery/update/0.1/payload.js.map +1 -0
- package/dist/vtc/community/requested-attributes/show/0.1/payload.d.ts +339 -0
- package/dist/vtc/community/requested-attributes/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/community/requested-attributes/show/0.1/payload.js +193 -0
- package/dist/vtc/community/requested-attributes/show/0.1/payload.js.map +1 -0
- package/dist/vtc/community/requested-attributes/update/0.1/payload.d.ts +348 -0
- package/dist/vtc/community/requested-attributes/update/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/community/requested-attributes/update/0.1/payload.js +199 -0
- package/dist/vtc/community/requested-attributes/update/0.1/payload.js.map +1 -0
- package/dist/vtc/join-requests/query/0.1/payload.d.ts +412 -0
- package/dist/vtc/join-requests/query/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/join-requests/query/0.1/payload.js +228 -0
- package/dist/vtc/join-requests/query/0.1/payload.js.map +1 -0
- package/dist/vtc/join-requests/vetting/show/0.1/payload.d.ts +1016 -0
- package/dist/vtc/join-requests/vetting/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/join-requests/vetting/show/0.1/payload.js +509 -0
- package/dist/vtc/join-requests/vetting/show/0.1/payload.js.map +1 -0
- package/dist/vtc/relationships/restore/0.1/payload.d.ts +462 -0
- package/dist/vtc/relationships/restore/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/relationships/restore/0.1/payload.js +270 -0
- package/dist/vtc/relationships/restore/0.1/payload.js.map +1 -0
- package/dist/vtc/relationships/suspend/0.1/payload.d.ts +462 -0
- package/dist/vtc/relationships/suspend/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/relationships/suspend/0.1/payload.js +270 -0
- package/dist/vtc/relationships/suspend/0.1/payload.js.map +1 -0
- package/dist/vtc/rooms/list/0.1/payload.d.ts +653 -0
- package/dist/vtc/rooms/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/list/0.1/payload.js +360 -0
- package/dist/vtc/rooms/list/0.1/payload.js.map +1 -0
- package/dist/vtc/schemas/accepts/delete/0.1/payload.d.ts +240 -0
- package/dist/vtc/schemas/accepts/delete/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/schemas/accepts/delete/0.1/payload.js +141 -0
- package/dist/vtc/schemas/accepts/delete/0.1/payload.js.map +1 -0
- package/dist/vtc/schemas/accepts/list/0.1/payload.d.ts +1214 -0
- package/dist/vtc/schemas/accepts/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/schemas/accepts/list/0.1/payload.js +681 -0
- package/dist/vtc/schemas/accepts/list/0.1/payload.js.map +1 -0
- package/dist/vtc/schemas/accepts/register/0.1/payload.d.ts +1165 -0
- package/dist/vtc/schemas/accepts/register/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/schemas/accepts/register/0.1/payload.js +665 -0
- package/dist/vtc/schemas/accepts/register/0.1/payload.js.map +1 -0
- package/dist/vtc/schemas/accepts/show/0.1/payload.d.ts +1144 -0
- package/dist/vtc/schemas/accepts/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/schemas/accepts/show/0.1/payload.js +655 -0
- package/dist/vtc/schemas/accepts/show/0.1/payload.js.map +1 -0
- package/dist/vtc/schemas/delete/0.1/payload.d.ts +240 -0
- package/dist/vtc/schemas/delete/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/schemas/delete/0.1/payload.js +141 -0
- package/dist/vtc/schemas/delete/0.1/payload.js.map +1 -0
- package/dist/vtc/schemas/list/0.1/payload.d.ts +541 -0
- package/dist/vtc/schemas/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/schemas/list/0.1/payload.js +300 -0
- package/dist/vtc/schemas/list/0.1/payload.js.map +1 -0
- package/dist/vtc/schemas/register/0.1/payload.d.ts +512 -0
- package/dist/vtc/schemas/register/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/schemas/register/0.1/payload.js +292 -0
- package/dist/vtc/schemas/register/0.1/payload.js.map +1 -0
- package/dist/vtc/schemas/show/0.1/payload.d.ts +484 -0
- package/dist/vtc/schemas/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/schemas/show/0.1/payload.js +279 -0
- package/dist/vtc/schemas/show/0.1/payload.js.map +1 -0
- package/dist/vtc/vetting/auto-grant/show/0.1/payload.d.ts +463 -0
- package/dist/vtc/vetting/auto-grant/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/vetting/auto-grant/show/0.1/payload.js +269 -0
- package/dist/vtc/vetting/auto-grant/show/0.1/payload.js.map +1 -0
- package/dist/vtc/vetting/auto-grant/update/0.1/payload.d.ts +491 -0
- package/dist/vtc/vetting/auto-grant/update/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/vetting/auto-grant/update/0.1/payload.js +282 -0
- package/dist/vtc/vetting/auto-grant/update/0.1/payload.js.map +1 -0
- package/dist/vtc/vetting/revocations/list/0.1/payload.d.ts +608 -0
- package/dist/vtc/vetting/revocations/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/vetting/revocations/list/0.1/payload.js +332 -0
- package/dist/vtc/vetting/revocations/list/0.1/payload.js.map +1 -0
- package/dist/vtc/vetting/vetters/grants/list/0.1/payload.d.ts +992 -0
- package/dist/vtc/vetting/vetters/grants/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/vetting/vetters/grants/list/0.1/payload.js +461 -0
- package/dist/vtc/vetting/vetters/grants/list/0.1/payload.js.map +1 -0
- package/dist/vtc/website/deploy/0.1/payload.d.ts +369 -0
- package/dist/vtc/website/deploy/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/website/deploy/0.1/payload.js +213 -0
- package/dist/vtc/website/deploy/0.1/payload.js.map +1 -0
- package/dist/vtc/website/files/show/0.1/payload.d.ts +455 -0
- package/dist/vtc/website/files/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/website/files/show/0.1/payload.js +247 -0
- package/dist/vtc/website/files/show/0.1/payload.js.map +1 -0
- package/dist/vtc/website/upload/abort/0.1/payload.d.ts +256 -0
- package/dist/vtc/website/upload/abort/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/website/upload/abort/0.1/payload.js +149 -0
- package/dist/vtc/website/upload/abort/0.1/payload.js.map +1 -0
- package/dist/vtc/website/upload/begin/0.1/payload.d.ts +658 -0
- package/dist/vtc/website/upload/begin/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/website/upload/begin/0.1/payload.js +375 -0
- package/dist/vtc/website/upload/begin/0.1/payload.js.map +1 -0
- package/dist/vtc/website/upload/chunk/0.1/payload.d.ts +447 -0
- package/dist/vtc/website/upload/chunk/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/website/upload/chunk/0.1/payload.js +253 -0
- package/dist/vtc/website/upload/chunk/0.1/payload.js.map +1 -0
- package/dist/vtc/website/upload/commit/0.1/payload.d.ts +603 -0
- package/dist/vtc/website/upload/commit/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/website/upload/commit/0.1/payload.js +337 -0
- package/dist/vtc/website/upload/commit/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_framework/0.4/framework.ts +1 -1
- package/src/_shared/components.ts +371 -0
- package/src/auth/_shared/0.1/signing-key.ts +17 -0
- package/src/auth/signing-key/enroll/0.1/payload.ts +349 -0
- package/src/auth/signing-key/list/0.1/payload.ts +323 -0
- package/src/auth/signing-key/revoke/0.1/payload.ts +204 -0
- package/src/index.ts +39 -0
- package/src/trust-task-discovery/0.3/payload.ts +357 -0
- package/src/vtc/_shared/0.1/community-presentation.ts +17 -0
- package/src/vtc/_shared/0.1/relationship-lifecycle.ts +17 -0
- package/src/vtc/_shared/0.1/schema-registry.ts +17 -0
- package/src/vtc/_shared/0.1/vetting-auto-grant.ts +17 -0
- package/src/vtc/_shared/0.1/website-transfer.ts +17 -0
- package/src/vtc/community/branding/show/0.1/payload.ts +207 -0
- package/src/vtc/community/branding/update/0.1/payload.ts +214 -0
- package/src/vtc/community/join-discovery/show/0.1/payload.ts +185 -0
- package/src/vtc/community/join-discovery/update/0.1/payload.ts +192 -0
- package/src/vtc/community/requested-attributes/show/0.1/payload.ts +221 -0
- package/src/vtc/community/requested-attributes/update/0.1/payload.ts +228 -0
- package/src/vtc/join-requests/query/0.1/payload.ts +285 -0
- package/src/vtc/join-requests/vetting/show/0.1/payload.ts +740 -0
- package/src/vtc/relationships/restore/0.1/payload.ts +307 -0
- package/src/vtc/relationships/suspend/0.1/payload.ts +307 -0
- package/src/vtc/rooms/list/0.1/payload.ts +449 -0
- package/src/vtc/schemas/accepts/delete/0.1/payload.ts +170 -0
- package/src/vtc/schemas/accepts/list/0.1/payload.ts +724 -0
- package/src/vtc/schemas/accepts/register/0.1/payload.ts +697 -0
- package/src/vtc/schemas/accepts/show/0.1/payload.ts +684 -0
- package/src/vtc/schemas/delete/0.1/payload.ts +170 -0
- package/src/vtc/schemas/list/0.1/payload.ts +344 -0
- package/src/vtc/schemas/register/0.1/payload.ts +325 -0
- package/src/vtc/schemas/show/0.1/payload.ts +308 -0
- package/src/vtc/vetting/auto-grant/show/0.1/payload.ts +297 -0
- package/src/vtc/vetting/auto-grant/update/0.1/payload.ts +316 -0
- package/src/vtc/vetting/revocations/list/0.1/payload.ts +416 -0
- package/src/vtc/vetting/vetters/grants/list/0.1/payload.ts +700 -0
- package/src/vtc/website/deploy/0.1/payload.ts +255 -0
- package/src/vtc/website/files/show/0.1/payload.ts +303 -0
- package/src/vtc/website/upload/abort/0.1/payload.ts +182 -0
- package/src/vtc/website/upload/begin/0.1/payload.ts +408 -0
- package/src/vtc/website/upload/chunk/0.1/payload.ts +295 -0
- package/src/vtc/website/upload/commit/0.1/payload.ts +385 -0
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/trust-task-discovery/0.3/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.3#response. A response-level `acceptanceWindow` is the window the responder applies to every listed Type URI whose entry carries none of its own. Where neither is present for an entry, the discoverer has learnt nothing about that entry's window and MUST NOT read the absence as the absence of a window.
|
|
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
|
+
acceptanceWindow?: AcceptanceWindow;
|
|
88
|
+
}
|
|
89
|
+
)[];
|
|
90
|
+
/**
|
|
91
|
+
* 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.
|
|
92
|
+
*/
|
|
93
|
+
frameworkVersion?: string;
|
|
94
|
+
acceptanceWindow?: AcceptanceWindow;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The freshness bounds a responder applies, as a consumer, to the `issuedAt` of a document it receives (SPEC.md §7.2 item 13). A responder refuses a document when now > issuedAt + maxAgeSeconds + clockSkewSeconds, and when issuedAt > now + clockSkewSeconds. It says nothing about `expiresAt`, which is honoured independently (SPEC.md §7.2 item 4). Both members are whole seconds.
|
|
98
|
+
*/
|
|
99
|
+
export interface AcceptanceWindow {
|
|
100
|
+
/**
|
|
101
|
+
* The greatest age, in whole seconds, of a document's `issuedAt` at which the responder still accepts the document, before any clock-skew tolerance is applied.
|
|
102
|
+
*/
|
|
103
|
+
maxAgeSeconds: number;
|
|
104
|
+
/**
|
|
105
|
+
* The clock-skew tolerance, in whole seconds, the responder applies in both directions: added to maxAgeSeconds for a document in its past, and allowed for an `issuedAt` in its future (SPEC.md §4.2, §7.2 item 13). Zero when it applies none.
|
|
106
|
+
*/
|
|
107
|
+
clockSkewSeconds: number;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/** Trust Task type URI. */
|
|
111
|
+
export const TYPE_URI = "https://trusttasks.org/spec/trust-task-discovery/0.3" as const;
|
|
112
|
+
|
|
113
|
+
/** Stable alias for this specification's request payload shape. */
|
|
114
|
+
export type Payload = TrustTaskDiscoveryPayload;
|
|
115
|
+
|
|
116
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
117
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/trust-task-discovery/0.3#response" as const;
|
|
118
|
+
|
|
119
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
120
|
+
export type Response = TrustTaskDiscoveryResponsePayload;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* This specification's payload schema, as a value.
|
|
124
|
+
*
|
|
125
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
126
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
127
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
128
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
129
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
130
|
+
*/
|
|
131
|
+
export const PAYLOAD_SCHEMA = {
|
|
132
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
133
|
+
"$id": "https://trusttasks.org/spec/trust-task-discovery/0.3",
|
|
134
|
+
"title": "Trust Task Discovery — payload",
|
|
135
|
+
"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'.",
|
|
136
|
+
"type": "object",
|
|
137
|
+
"additionalProperties": false,
|
|
138
|
+
"properties": {
|
|
139
|
+
"patterns": {
|
|
140
|
+
"type": "array",
|
|
141
|
+
"maxItems": 16,
|
|
142
|
+
"items": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"minLength": 1,
|
|
145
|
+
"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 '*'."
|
|
146
|
+
},
|
|
147
|
+
"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."
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"$defs": {
|
|
151
|
+
"AcceptanceWindow": {
|
|
152
|
+
"title": "Acceptance window",
|
|
153
|
+
"description": "The freshness bounds a responder applies, as a consumer, to the `issuedAt` of a document it receives (SPEC.md §7.2 item 13). A responder refuses a document when now > issuedAt + maxAgeSeconds + clockSkewSeconds, and when issuedAt > now + clockSkewSeconds. It says nothing about `expiresAt`, which is honoured independently (SPEC.md §7.2 item 4). Both members are whole seconds.",
|
|
154
|
+
"type": "object",
|
|
155
|
+
"additionalProperties": false,
|
|
156
|
+
"required": [
|
|
157
|
+
"maxAgeSeconds",
|
|
158
|
+
"clockSkewSeconds"
|
|
159
|
+
],
|
|
160
|
+
"properties": {
|
|
161
|
+
"maxAgeSeconds": {
|
|
162
|
+
"type": "integer",
|
|
163
|
+
"minimum": 1,
|
|
164
|
+
"description": "The greatest age, in whole seconds, of a document's `issuedAt` at which the responder still accepts the document, before any clock-skew tolerance is applied."
|
|
165
|
+
},
|
|
166
|
+
"clockSkewSeconds": {
|
|
167
|
+
"type": "integer",
|
|
168
|
+
"minimum": 0,
|
|
169
|
+
"description": "The clock-skew tolerance, in whole seconds, the responder applies in both directions: added to maxAgeSeconds for a document in its past, and allowed for an `issuedAt` in its future (SPEC.md §4.2, §7.2 item 13). Zero when it applies none."
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"Response": {
|
|
174
|
+
"$anchor": "response",
|
|
175
|
+
"title": "Trust Task Discovery — response payload",
|
|
176
|
+
"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.3#response. A response-level `acceptanceWindow` is the window the responder applies to every listed Type URI whose entry carries none of its own. Where neither is present for an entry, the discoverer has learnt nothing about that entry's window and MUST NOT read the absence as the absence of a window.",
|
|
177
|
+
"type": "object",
|
|
178
|
+
"additionalProperties": false,
|
|
179
|
+
"required": [
|
|
180
|
+
"supportedTypes"
|
|
181
|
+
],
|
|
182
|
+
"properties": {
|
|
183
|
+
"supportedTypes": {
|
|
184
|
+
"type": "array",
|
|
185
|
+
"items": {
|
|
186
|
+
"oneOf": [
|
|
187
|
+
{
|
|
188
|
+
"type": "string",
|
|
189
|
+
"format": "uri",
|
|
190
|
+
"description": "Shorthand form: a bare Type URI string. Equivalent to an object with only the `type` member set."
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"type": "object",
|
|
194
|
+
"additionalProperties": false,
|
|
195
|
+
"required": [
|
|
196
|
+
"type"
|
|
197
|
+
],
|
|
198
|
+
"properties": {
|
|
199
|
+
"type": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"format": "uri",
|
|
202
|
+
"description": "A bare Type URI (no #request or #response fragment). The responder supports both request and response variants of every entry it lists."
|
|
203
|
+
},
|
|
204
|
+
"requiredExt": {
|
|
205
|
+
"type": "array",
|
|
206
|
+
"items": {
|
|
207
|
+
"type": "string",
|
|
208
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
209
|
+
},
|
|
210
|
+
"minItems": 1,
|
|
211
|
+
"uniqueItems": true,
|
|
212
|
+
"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."
|
|
213
|
+
},
|
|
214
|
+
"acceptanceWindow": {
|
|
215
|
+
"$ref": "#/$defs/AcceptanceWindow"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"description": "Object form: lists a Type URI together with optional capability annotations. An `acceptanceWindow` here is the window the responder applies to documents of this Type URI, and takes precedence over the response-level `acceptanceWindow` for this entry."
|
|
219
|
+
}
|
|
220
|
+
],
|
|
221
|
+
"description": "An entry in the supportedTypes list. SHORTHAND: a bare Type URI string. EXPANDED: an object with `type` and optional capability annotations (`requiredExt`, `acceptanceWindow`)."
|
|
222
|
+
},
|
|
223
|
+
"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."
|
|
224
|
+
},
|
|
225
|
+
"frameworkVersion": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$",
|
|
228
|
+
"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."
|
|
229
|
+
},
|
|
230
|
+
"acceptanceWindow": {
|
|
231
|
+
"$ref": "#/$defs/AcceptanceWindow"
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
} as const;
|
|
237
|
+
|
|
238
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
239
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
240
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
241
|
+
"$ref": "#/$defs/Response",
|
|
242
|
+
"$defs": {
|
|
243
|
+
"AcceptanceWindow": {
|
|
244
|
+
"title": "Acceptance window",
|
|
245
|
+
"description": "The freshness bounds a responder applies, as a consumer, to the `issuedAt` of a document it receives (SPEC.md §7.2 item 13). A responder refuses a document when now > issuedAt + maxAgeSeconds + clockSkewSeconds, and when issuedAt > now + clockSkewSeconds. It says nothing about `expiresAt`, which is honoured independently (SPEC.md §7.2 item 4). Both members are whole seconds.",
|
|
246
|
+
"type": "object",
|
|
247
|
+
"additionalProperties": false,
|
|
248
|
+
"required": [
|
|
249
|
+
"maxAgeSeconds",
|
|
250
|
+
"clockSkewSeconds"
|
|
251
|
+
],
|
|
252
|
+
"properties": {
|
|
253
|
+
"maxAgeSeconds": {
|
|
254
|
+
"type": "integer",
|
|
255
|
+
"minimum": 1,
|
|
256
|
+
"description": "The greatest age, in whole seconds, of a document's `issuedAt` at which the responder still accepts the document, before any clock-skew tolerance is applied."
|
|
257
|
+
},
|
|
258
|
+
"clockSkewSeconds": {
|
|
259
|
+
"type": "integer",
|
|
260
|
+
"minimum": 0,
|
|
261
|
+
"description": "The clock-skew tolerance, in whole seconds, the responder applies in both directions: added to maxAgeSeconds for a document in its past, and allowed for an `issuedAt` in its future (SPEC.md §4.2, §7.2 item 13). Zero when it applies none."
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"Response": {
|
|
266
|
+
"$anchor": "response",
|
|
267
|
+
"title": "Trust Task Discovery — response payload",
|
|
268
|
+
"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.3#response. A response-level `acceptanceWindow` is the window the responder applies to every listed Type URI whose entry carries none of its own. Where neither is present for an entry, the discoverer has learnt nothing about that entry's window and MUST NOT read the absence as the absence of a window.",
|
|
269
|
+
"type": "object",
|
|
270
|
+
"additionalProperties": false,
|
|
271
|
+
"required": [
|
|
272
|
+
"supportedTypes"
|
|
273
|
+
],
|
|
274
|
+
"properties": {
|
|
275
|
+
"supportedTypes": {
|
|
276
|
+
"type": "array",
|
|
277
|
+
"items": {
|
|
278
|
+
"oneOf": [
|
|
279
|
+
{
|
|
280
|
+
"type": "string",
|
|
281
|
+
"format": "uri",
|
|
282
|
+
"description": "Shorthand form: a bare Type URI string. Equivalent to an object with only the `type` member set."
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"type": "object",
|
|
286
|
+
"additionalProperties": false,
|
|
287
|
+
"required": [
|
|
288
|
+
"type"
|
|
289
|
+
],
|
|
290
|
+
"properties": {
|
|
291
|
+
"type": {
|
|
292
|
+
"type": "string",
|
|
293
|
+
"format": "uri",
|
|
294
|
+
"description": "A bare Type URI (no #request or #response fragment). The responder supports both request and response variants of every entry it lists."
|
|
295
|
+
},
|
|
296
|
+
"requiredExt": {
|
|
297
|
+
"type": "array",
|
|
298
|
+
"items": {
|
|
299
|
+
"type": "string",
|
|
300
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
301
|
+
},
|
|
302
|
+
"minItems": 1,
|
|
303
|
+
"uniqueItems": true,
|
|
304
|
+
"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."
|
|
305
|
+
},
|
|
306
|
+
"acceptanceWindow": {
|
|
307
|
+
"$ref": "#/$defs/AcceptanceWindow"
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"description": "Object form: lists a Type URI together with optional capability annotations. An `acceptanceWindow` here is the window the responder applies to documents of this Type URI, and takes precedence over the response-level `acceptanceWindow` for this entry."
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
"description": "An entry in the supportedTypes list. SHORTHAND: a bare Type URI string. EXPANDED: an object with `type` and optional capability annotations (`requiredExt`, `acceptanceWindow`)."
|
|
314
|
+
},
|
|
315
|
+
"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."
|
|
316
|
+
},
|
|
317
|
+
"frameworkVersion": {
|
|
318
|
+
"type": "string",
|
|
319
|
+
"pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$",
|
|
320
|
+
"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."
|
|
321
|
+
},
|
|
322
|
+
"acceptanceWindow": {
|
|
323
|
+
"$ref": "#/$defs/AcceptanceWindow"
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
} as const;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
332
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
333
|
+
* per-specification and cannot be derived from the document alone, and
|
|
334
|
+
* item 2 needs the schema this carries.
|
|
335
|
+
*/
|
|
336
|
+
export const SPEC = {
|
|
337
|
+
typeUri: TYPE_URI,
|
|
338
|
+
isBearer: false,
|
|
339
|
+
isProofRequired: false,
|
|
340
|
+
isRecipientRequired: true,
|
|
341
|
+
isIssuedAtRequired: false,
|
|
342
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
343
|
+
} as const;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
347
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
348
|
+
* parties (§7.3 item 5).
|
|
349
|
+
*/
|
|
350
|
+
export const RESPONSE_SPEC = {
|
|
351
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
352
|
+
isBearer: false,
|
|
353
|
+
isProofRequired: false,
|
|
354
|
+
isRecipientRequired: true,
|
|
355
|
+
isIssuedAtRequired: false,
|
|
356
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
357
|
+
} as const;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/_shared/0.1/community-presentation.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Shared types for vtc/community/{branding,requested-attributes,join-discovery}/*: how a community asks to be shown to a prospective applicant, what it asks an applicant to tell it about themselves, and whether it answers its join manifest to a caller it cannot identify. `CommunityBranding` and `RequestedAttribute` are copied member for member from vtc/join-requests/manifest/0.2, which publishes both to applicants; the manifest's own copies are that task's local definitions and re-pinning them here is an editorial follow-up. Not itself a Trust Task specification (the `_shared` folder is skipped by the registry build and the codegen).
|
|
8
|
+
*/
|
|
9
|
+
export interface VTCSharedCommunityPresentationDefinitions {
|
|
10
|
+
[k: string]: unknown | undefined;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The definitions this shared schema publishes, hoisted to one declaration each.
|
|
15
|
+
* See "../../../_shared/components.js".
|
|
16
|
+
*/
|
|
17
|
+
export type { CommunityBranding, JoinDiscovery, RequestedAttribute, RequestedAttributes } from "../../../_shared/components.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/_shared/0.1/relationship-lifecycle.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Shared types for vtc/relationships/{suspend,restore}: an edge's resolved state after a lifecycle event. Not itself a Trust Task specification (the `_shared` folder is skipped by the registry build and the codegen).
|
|
8
|
+
*/
|
|
9
|
+
export interface VTCSharedRelationshipLifecycleDefinitions {
|
|
10
|
+
[k: string]: unknown | undefined;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The definitions this shared schema publishes, hoisted to one declaration each.
|
|
15
|
+
* See "../../../_shared/components.js".
|
|
16
|
+
*/
|
|
17
|
+
export type { InForce, LifecycleReason } from "../../../_shared/components.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/_shared/0.1/schema-registry.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Shared types for the vtc/schemas/* and vtc/schemas/accepts/* families: a community's credential-type registry (the types it issues or accepts, each optionally bound to a JSON Schema) and its Accepts criteria (named DCQL queries a ceremony runs over presented credentials). Defined once so register, list and show compare value for value. `VettingRequirements` and `Duration` are copied member for member from vtc/join-requests/manifest/0.2, which publishes an Accepts criterion's vetting to applicants; the manifest's own copies are local `$defs` of that task and re-pinning them here is an editorial follow-up. Not itself a Trust Task specification (the `_shared` folder is skipped by the registry build and the codegen).
|
|
8
|
+
*/
|
|
9
|
+
export interface VTCSharedSchemaRegistryDefinitions {
|
|
10
|
+
[k: string]: unknown | undefined;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The definitions this shared schema publishes, hoisted to one declaration each.
|
|
15
|
+
* See "../../../_shared/components.js".
|
|
16
|
+
*/
|
|
17
|
+
export type { AcceptsCriterion, AcceptsCriterionId, CredentialSchema, CredentialTypeUri, CriterionDescription, DcqlQuery, DtgType, Duration, SchemaDescription, SchemaEntry, SchemaKind, SchemaSummary, VettingRequirements } from "../../../_shared/components.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/_shared/0.1/vetting-auto-grant.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Shared types for vtc/vetting/auto-grant/*: the configuration of the community's automatic vetter-grant sweep and the outcome of its last run. Not itself a Trust Task specification (the `_shared` folder is skipped by the registry build and the codegen).
|
|
8
|
+
*/
|
|
9
|
+
export interface VTCSharedAutomaticVetterGrantDefinitions {
|
|
10
|
+
[k: string]: unknown | undefined;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The definitions this shared schema publishes, hoisted to one declaration each.
|
|
15
|
+
* See "../../../_shared/components.js".
|
|
16
|
+
*/
|
|
17
|
+
export type { AutoGrantStatus, AutoGrantSweep, GrantValiditySeconds, SweepMinutes } from "../../../_shared/components.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/_shared/0.1/website-transfer.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Shared types for the vtc/website/upload/*, vtc/website/deploy and vtc/website/files/show tasks: how bytes of a community's website move as Trust Task documents. Chunking reuses, by reference from each task, the node-neutral chunked-transfer vocabulary of vta/_shared/0.1/backup-transfer (ChunkManifest, ChunkIndex, ChunkData, ExpectedSha256, ExpectedSizeBytes, ExpiresAt), so a producer that implements backup/put-chunk implements these chunks the same way. Not itself a Trust Task specification (the `_shared` folder is skipped by the registry build and the codegen).
|
|
8
|
+
*/
|
|
9
|
+
export interface VTCSharedWebsiteTransferDefinitions {
|
|
10
|
+
[k: string]: unknown | undefined;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The definitions this shared schema publishes, hoisted to one declaration each.
|
|
15
|
+
* See "../../../_shared/components.js".
|
|
16
|
+
*/
|
|
17
|
+
export type { FileData, UploadId, UploadTarget, WebsiteEtag, WebsitePath } from "../../../_shared/components.js";
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/community/branding/show/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { CommunityBranding, Ext } from "../../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* An empty request: the community has one such setting. The outer document members are owned by the framework — SPEC §6.3.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTCCommunityBrandingShowPayload {
|
|
13
|
+
ext?: Ext;
|
|
14
|
+
}
|
|
15
|
+
export interface VTCCommunityBrandingShowResponsePayload {
|
|
16
|
+
branding: CommunityBranding;
|
|
17
|
+
ext?: Ext;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
21
|
+
export type { CommunityBranding, Ext };
|
|
22
|
+
|
|
23
|
+
/** Trust Task type URI. */
|
|
24
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/community/branding/show/0.1" as const;
|
|
25
|
+
|
|
26
|
+
/** Stable alias for this specification's request payload shape. */
|
|
27
|
+
export type Payload = VTCCommunityBrandingShowPayload;
|
|
28
|
+
|
|
29
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
30
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/community/branding/show/0.1#response" as const;
|
|
31
|
+
|
|
32
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
33
|
+
export type Response = VTCCommunityBrandingShowResponsePayload;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* This specification's payload schema, as a value.
|
|
37
|
+
*
|
|
38
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
39
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
40
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
41
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
42
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
43
|
+
*/
|
|
44
|
+
export const PAYLOAD_SCHEMA = {
|
|
45
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
46
|
+
"$id": "https://trusttasks.org/spec/vtc/community/branding/show/0.1",
|
|
47
|
+
"title": "VTC Community — Branding — Show — payload",
|
|
48
|
+
"description": "An empty request: the community has one such setting. The outer document members are owned by the framework — SPEC §6.3.",
|
|
49
|
+
"type": "object",
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"properties": {
|
|
52
|
+
"ext": {
|
|
53
|
+
"$ref": "#/$defs/Ext"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"$defs": {
|
|
57
|
+
"Response": {
|
|
58
|
+
"$anchor": "response",
|
|
59
|
+
"title": "VTC Community — Branding — Show — response payload",
|
|
60
|
+
"type": "object",
|
|
61
|
+
"additionalProperties": false,
|
|
62
|
+
"required": [
|
|
63
|
+
"branding"
|
|
64
|
+
],
|
|
65
|
+
"properties": {
|
|
66
|
+
"branding": {
|
|
67
|
+
"$ref": "#/$defs/CommunityBranding"
|
|
68
|
+
},
|
|
69
|
+
"ext": {
|
|
70
|
+
"$ref": "#/$defs/Ext"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"Ext": {
|
|
75
|
+
"title": "Ext",
|
|
76
|
+
"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.",
|
|
77
|
+
"type": "object",
|
|
78
|
+
"minProperties": 1,
|
|
79
|
+
"additionalProperties": true,
|
|
80
|
+
"propertyNames": {
|
|
81
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"CommunityBranding": {
|
|
85
|
+
"title": "CommunityBranding",
|
|
86
|
+
"type": "object",
|
|
87
|
+
"additionalProperties": false,
|
|
88
|
+
"description": "OPTIONAL. How the community asks to be shown to a prospective applicant: a name, an accent colour and a logo. Presentation only, self-asserted and unverified — `communityDid` identifies the community, never `branding`. Not part of any criterion, so not covered by a `requirementsDigest`. Every member is optional.",
|
|
89
|
+
"properties": {
|
|
90
|
+
"displayName": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"minLength": 1,
|
|
93
|
+
"maxLength": 128,
|
|
94
|
+
"description": "The community's name as it asks to be shown."
|
|
95
|
+
},
|
|
96
|
+
"accentColor": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"pattern": "^#[0-9a-fA-F]{6}$",
|
|
99
|
+
"description": "An sRGB colour as `#rrggbb`, compared case-insensitively. A community SHOULD write it in lower case."
|
|
100
|
+
},
|
|
101
|
+
"logoUrl": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"format": "uri",
|
|
104
|
+
"pattern": "^https://",
|
|
105
|
+
"maxLength": 2048,
|
|
106
|
+
"description": "An https URL of the community's logo. Fetched by the client, so an untrusted image from wherever it points."
|
|
107
|
+
},
|
|
108
|
+
"ext": {
|
|
109
|
+
"$ref": "#/$defs/Ext"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
} as const;
|
|
115
|
+
|
|
116
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
117
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
118
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
119
|
+
"$ref": "#/$defs/Response",
|
|
120
|
+
"$defs": {
|
|
121
|
+
"Response": {
|
|
122
|
+
"$anchor": "response",
|
|
123
|
+
"title": "VTC Community — Branding — Show — response payload",
|
|
124
|
+
"type": "object",
|
|
125
|
+
"additionalProperties": false,
|
|
126
|
+
"required": [
|
|
127
|
+
"branding"
|
|
128
|
+
],
|
|
129
|
+
"properties": {
|
|
130
|
+
"branding": {
|
|
131
|
+
"$ref": "#/$defs/CommunityBranding"
|
|
132
|
+
},
|
|
133
|
+
"ext": {
|
|
134
|
+
"$ref": "#/$defs/Ext"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"Ext": {
|
|
139
|
+
"title": "Ext",
|
|
140
|
+
"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.",
|
|
141
|
+
"type": "object",
|
|
142
|
+
"minProperties": 1,
|
|
143
|
+
"additionalProperties": true,
|
|
144
|
+
"propertyNames": {
|
|
145
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"CommunityBranding": {
|
|
149
|
+
"title": "CommunityBranding",
|
|
150
|
+
"type": "object",
|
|
151
|
+
"additionalProperties": false,
|
|
152
|
+
"description": "OPTIONAL. How the community asks to be shown to a prospective applicant: a name, an accent colour and a logo. Presentation only, self-asserted and unverified — `communityDid` identifies the community, never `branding`. Not part of any criterion, so not covered by a `requirementsDigest`. Every member is optional.",
|
|
153
|
+
"properties": {
|
|
154
|
+
"displayName": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"minLength": 1,
|
|
157
|
+
"maxLength": 128,
|
|
158
|
+
"description": "The community's name as it asks to be shown."
|
|
159
|
+
},
|
|
160
|
+
"accentColor": {
|
|
161
|
+
"type": "string",
|
|
162
|
+
"pattern": "^#[0-9a-fA-F]{6}$",
|
|
163
|
+
"description": "An sRGB colour as `#rrggbb`, compared case-insensitively. A community SHOULD write it in lower case."
|
|
164
|
+
},
|
|
165
|
+
"logoUrl": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"format": "uri",
|
|
168
|
+
"pattern": "^https://",
|
|
169
|
+
"maxLength": 2048,
|
|
170
|
+
"description": "An https URL of the community's logo. Fetched by the client, so an untrusted image from wherever it points."
|
|
171
|
+
},
|
|
172
|
+
"ext": {
|
|
173
|
+
"$ref": "#/$defs/Ext"
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
} as const;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
182
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
183
|
+
* per-specification and cannot be derived from the document alone, and
|
|
184
|
+
* item 2 needs the schema this carries.
|
|
185
|
+
*/
|
|
186
|
+
export const SPEC = {
|
|
187
|
+
typeUri: TYPE_URI,
|
|
188
|
+
isBearer: false,
|
|
189
|
+
isProofRequired: false,
|
|
190
|
+
isRecipientRequired: true,
|
|
191
|
+
isIssuedAtRequired: false,
|
|
192
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
193
|
+
} as const;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
197
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
198
|
+
* parties (§7.3 item 5).
|
|
199
|
+
*/
|
|
200
|
+
export const RESPONSE_SPEC = {
|
|
201
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
202
|
+
isBearer: false,
|
|
203
|
+
isProofRequired: false,
|
|
204
|
+
isRecipientRequired: true,
|
|
205
|
+
isIssuedAtRequired: false,
|
|
206
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
207
|
+
} as const;
|