@openvtc/trust-tasks 0.22.5 → 0.22.7
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 +80 -0
- package/dist/_shared/components.d.ts +434 -1
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/acl/_shared/0.1/acl-entry.d.ts +1 -1
- package/dist/acl/_shared/0.1/acl-entry.d.ts.map +1 -1
- package/dist/acl/_shared/0.2/acl-entry.d.ts +22 -0
- package/dist/acl/_shared/0.2/acl-entry.d.ts.map +1 -0
- package/dist/acl/_shared/0.2/acl-entry.js +6 -0
- package/dist/acl/_shared/0.2/acl-entry.js.map +1 -0
- package/dist/acl/change-role/0.1/payload.d.ts +1 -1
- package/dist/acl/change-role/0.1/payload.d.ts.map +1 -1
- package/dist/acl/change-role/0.2/payload.d.ts +1679 -0
- package/dist/acl/change-role/0.2/payload.d.ts.map +1 -0
- package/dist/acl/change-role/0.2/payload.js +955 -0
- package/dist/acl/change-role/0.2/payload.js.map +1 -0
- package/dist/acl/grant/0.1/payload.d.ts +1 -1
- package/dist/acl/grant/0.1/payload.d.ts.map +1 -1
- package/dist/acl/grant/0.2/payload.d.ts +1649 -0
- package/dist/acl/grant/0.2/payload.d.ts.map +1 -0
- package/dist/acl/grant/0.2/payload.js +942 -0
- package/dist/acl/grant/0.2/payload.js.map +1 -0
- package/dist/acl/list/0.1/payload.d.ts +1 -1
- package/dist/acl/list/0.1/payload.d.ts.map +1 -1
- package/dist/acl/list/0.2/payload.d.ts +1853 -0
- package/dist/acl/list/0.2/payload.d.ts.map +1 -0
- package/dist/acl/list/0.2/payload.js +1041 -0
- package/dist/acl/list/0.2/payload.js.map +1 -0
- package/dist/acl/revoke/0.1/payload.d.ts +1 -1
- package/dist/acl/revoke/0.1/payload.d.ts.map +1 -1
- package/dist/acl/revoke/0.2/payload.d.ts +1844 -0
- package/dist/acl/revoke/0.2/payload.d.ts.map +1 -0
- package/dist/acl/revoke/0.2/payload.js +1052 -0
- package/dist/acl/revoke/0.2/payload.js.map +1 -0
- package/dist/acl/show/0.1/payload.d.ts +1 -1
- package/dist/acl/show/0.1/payload.d.ts.map +1 -1
- package/dist/acl/show/0.2/payload.d.ts +1689 -0
- package/dist/acl/show/0.2/payload.d.ts.map +1 -0
- package/dist/acl/show/0.2/payload.js +968 -0
- package/dist/acl/show/0.2/payload.js.map +1 -0
- package/dist/acl/swap-key/0.1/payload.d.ts +1 -1
- package/dist/acl/swap-key/0.1/payload.d.ts.map +1 -1
- package/dist/acl/update/0.1/payload.d.ts +1 -1
- package/dist/acl/update/0.1/payload.d.ts.map +1 -1
- package/dist/acl/update/0.2/payload.d.ts +1784 -0
- package/dist/acl/update/0.2/payload.d.ts.map +1 -0
- package/dist/acl/update/0.2/payload.js +1005 -0
- package/dist/acl/update/0.2/payload.js.map +1 -0
- package/dist/auth/signing-key/authorize/0.1/payload.d.ts +199 -0
- package/dist/auth/signing-key/authorize/0.1/payload.d.ts.map +1 -0
- package/dist/auth/signing-key/authorize/0.1/payload.js +108 -0
- package/dist/auth/signing-key/authorize/0.1/payload.js.map +1 -0
- package/dist/auth/signing-key/enroll/0.2/payload.d.ts +569 -0
- package/dist/auth/signing-key/enroll/0.2/payload.d.ts.map +1 -0
- package/dist/auth/signing-key/enroll/0.2/payload.js +315 -0
- package/dist/auth/signing-key/enroll/0.2/payload.js.map +1 -0
- package/dist/auth/step-up/approve-request/0.4/payload.d.ts +672 -0
- package/dist/auth/step-up/approve-request/0.4/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approve-request/0.4/payload.js +373 -0
- package/dist/auth/step-up/approve-request/0.4/payload.js.map +1 -0
- package/dist/auth/step-up/approve-response/0.6/payload.d.ts +974 -0
- package/dist/auth/step-up/approve-response/0.6/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approve-response/0.6/payload.js +552 -0
- package/dist/auth/step-up/approve-response/0.6/payload.js.map +1 -0
- package/dist/auth/step-up/approver/_shared/0.1/approver.d.ts +16 -0
- package/dist/auth/step-up/approver/_shared/0.1/approver.d.ts.map +1 -0
- package/dist/auth/step-up/approver/_shared/0.1/approver.js +6 -0
- package/dist/auth/step-up/approver/_shared/0.1/approver.js.map +1 -0
- package/dist/auth/step-up/approver/attest/0.1/payload.d.ts +174 -0
- package/dist/auth/step-up/approver/attest/0.1/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approver/attest/0.1/payload.js +97 -0
- package/dist/auth/step-up/approver/attest/0.1/payload.js.map +1 -0
- package/dist/auth/step-up/approver/enroll/0.1/payload.d.ts +503 -0
- package/dist/auth/step-up/approver/enroll/0.1/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approver/enroll/0.1/payload.js +285 -0
- package/dist/auth/step-up/approver/enroll/0.1/payload.js.map +1 -0
- package/dist/auth/step-up/approver/invite/0.1/payload.d.ts +375 -0
- package/dist/auth/step-up/approver/invite/0.1/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approver/invite/0.1/payload.js +200 -0
- package/dist/auth/step-up/approver/invite/0.1/payload.js.map +1 -0
- package/dist/auth/step-up/approver/list/0.1/payload.d.ts +477 -0
- package/dist/auth/step-up/approver/list/0.1/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approver/list/0.1/payload.js +272 -0
- package/dist/auth/step-up/approver/list/0.1/payload.js.map +1 -0
- package/dist/auth/step-up/approver/redeem/finish/0.1/payload.d.ts +512 -0
- package/dist/auth/step-up/approver/redeem/finish/0.1/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approver/redeem/finish/0.1/payload.js +290 -0
- package/dist/auth/step-up/approver/redeem/finish/0.1/payload.js.map +1 -0
- package/dist/auth/step-up/approver/redeem/start/0.1/payload.d.ts +343 -0
- package/dist/auth/step-up/approver/redeem/start/0.1/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approver/redeem/start/0.1/payload.js +187 -0
- package/dist/auth/step-up/approver/redeem/start/0.1/payload.js.map +1 -0
- package/dist/auth/step-up/approver/revoke/0.1/payload.d.ts +534 -0
- package/dist/auth/step-up/approver/revoke/0.1/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approver/revoke/0.1/payload.js +301 -0
- package/dist/auth/step-up/approver/revoke/0.1/payload.js.map +1 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -1
- package/dist/task-consent/decision/0.2/payload.d.ts +775 -0
- package/dist/task-consent/decision/0.2/payload.d.ts.map +1 -0
- package/dist/task-consent/decision/0.2/payload.js +450 -0
- package/dist/task-consent/decision/0.2/payload.js.map +1 -0
- package/dist/vtc/admin/actions/_shared/0.1/action.d.ts +24 -0
- package/dist/vtc/admin/actions/_shared/0.1/action.d.ts.map +1 -0
- package/dist/vtc/admin/actions/_shared/0.1/action.js +6 -0
- package/dist/vtc/admin/actions/_shared/0.1/action.js.map +1 -0
- package/dist/vtc/admin/actions/acknowledge/0.1/payload.d.ts +1012 -0
- package/dist/vtc/admin/actions/acknowledge/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/admin/actions/acknowledge/0.1/payload.js +636 -0
- package/dist/vtc/admin/actions/acknowledge/0.1/payload.js.map +1 -0
- package/dist/vtc/admin/actions/cancel/0.1/payload.d.ts +1026 -0
- package/dist/vtc/admin/actions/cancel/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/admin/actions/cancel/0.1/payload.js +641 -0
- package/dist/vtc/admin/actions/cancel/0.1/payload.js.map +1 -0
- package/dist/vtc/admin/actions/list/0.1/payload.d.ts +1200 -0
- package/dist/vtc/admin/actions/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/admin/actions/list/0.1/payload.js +726 -0
- package/dist/vtc/admin/actions/list/0.1/payload.js.map +1 -0
- package/dist/vtc/admin/actions/show/0.1/payload.d.ts +1012 -0
- package/dist/vtc/admin/actions/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/admin/actions/show/0.1/payload.js +636 -0
- package/dist/vtc/admin/actions/show/0.1/payload.js.map +1 -0
- package/dist/vtc/install/claim/finish/0.3/payload.d.ts +379 -0
- package/dist/vtc/install/claim/finish/0.3/payload.d.ts.map +1 -0
- package/dist/vtc/install/claim/finish/0.3/payload.js +205 -0
- package/dist/vtc/install/claim/finish/0.3/payload.js.map +1 -0
- package/dist/vtc/install/claim/start/0.3/payload.d.ts +368 -0
- package/dist/vtc/install/claim/start/0.3/payload.d.ts.map +1 -0
- package/dist/vtc/install/claim/start/0.3/payload.js +201 -0
- package/dist/vtc/install/claim/start/0.3/payload.js.map +1 -0
- package/dist/vtc/members/authority-reduced-notice/0.1/payload.d.ts +208 -0
- package/dist/vtc/members/authority-reduced-notice/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/members/authority-reduced-notice/0.1/payload.js +112 -0
- package/dist/vtc/members/authority-reduced-notice/0.1/payload.js.map +1 -0
- package/dist/vtc/roles/_shared/0.1/role.d.ts +16 -0
- package/dist/vtc/roles/_shared/0.1/role.d.ts.map +1 -0
- package/dist/vtc/roles/_shared/0.1/role.js +6 -0
- package/dist/vtc/roles/_shared/0.1/role.js.map +1 -0
- package/dist/vtc/roles/define/0.1/payload.d.ts +703 -0
- package/dist/vtc/roles/define/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/roles/define/0.1/payload.js +371 -0
- package/dist/vtc/roles/define/0.1/payload.js.map +1 -0
- package/dist/vtc/roles/delete/0.1/payload.d.ts +281 -0
- package/dist/vtc/roles/delete/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/roles/delete/0.1/payload.js +152 -0
- package/dist/vtc/roles/delete/0.1/payload.js.map +1 -0
- package/dist/vtc/roles/list/0.1/payload.d.ts +639 -0
- package/dist/vtc/roles/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/roles/list/0.1/payload.js +345 -0
- package/dist/vtc/roles/list/0.1/payload.js.map +1 -0
- package/dist/vtc/roles/show/0.1/payload.d.ts +651 -0
- package/dist/vtc/roles/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/roles/show/0.1/payload.js +351 -0
- package/dist/vtc/roles/show/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +440 -1
- package/src/acl/_shared/0.1/acl-entry.ts +1 -1
- package/src/acl/_shared/0.2/acl-entry.ts +23 -0
- package/src/acl/change-role/0.1/payload.ts +1 -1
- package/src/acl/change-role/0.2/payload.ts +1011 -0
- package/src/acl/grant/0.1/payload.ts +1 -1
- package/src/acl/grant/0.2/payload.ts +990 -0
- package/src/acl/list/0.1/payload.ts +1 -1
- package/src/acl/list/0.2/payload.ts +1125 -0
- package/src/acl/revoke/0.1/payload.ts +1 -1
- package/src/acl/revoke/0.2/payload.ts +1122 -0
- package/src/acl/show/0.1/payload.ts +1 -1
- package/src/acl/show/0.2/payload.ts +1016 -0
- package/src/acl/swap-key/0.1/payload.ts +1 -1
- package/src/acl/update/0.1/payload.ts +1 -1
- package/src/acl/update/0.2/payload.ts +1094 -0
- package/src/auth/signing-key/authorize/0.1/payload.ts +141 -0
- package/src/auth/signing-key/enroll/0.2/payload.ts +365 -0
- package/src/auth/step-up/approve-request/0.4/payload.ts +461 -0
- package/src/auth/step-up/approve-response/0.6/payload.ts +648 -0
- package/src/auth/step-up/approver/_shared/0.1/approver.ts +17 -0
- package/src/auth/step-up/approver/attest/0.1/payload.ts +135 -0
- package/src/auth/step-up/approver/enroll/0.1/payload.ts +329 -0
- package/src/auth/step-up/approver/invite/0.1/payload.ts +258 -0
- package/src/auth/step-up/approver/list/0.1/payload.ts +318 -0
- package/src/auth/step-up/approver/redeem/finish/0.1/payload.ts +337 -0
- package/src/auth/step-up/approver/redeem/start/0.1/payload.ts +241 -0
- package/src/auth/step-up/approver/revoke/0.1/payload.ts +352 -0
- package/src/index.ts +33 -0
- package/src/task-consent/decision/0.2/payload.ts +537 -0
- package/src/vtc/admin/actions/_shared/0.1/action.ts +25 -0
- package/src/vtc/admin/actions/acknowledge/0.1/payload.ts +671 -0
- package/src/vtc/admin/actions/cancel/0.1/payload.ts +680 -0
- package/src/vtc/admin/actions/list/0.1/payload.ts +795 -0
- package/src/vtc/admin/actions/show/0.1/payload.ts +671 -0
- package/src/vtc/install/claim/finish/0.3/payload.ts +253 -0
- package/src/vtc/install/claim/start/0.3/payload.ts +256 -0
- package/src/vtc/members/authority-reduced-notice/0.1/payload.ts +162 -0
- package/src/vtc/roles/_shared/0.1/role.ts +17 -0
- package/src/vtc/roles/define/0.1/payload.ts +435 -0
- package/src/vtc/roles/delete/0.1/payload.ts +200 -0
- package/src/vtc/roles/list/0.1/payload.ts +389 -0
- package/src/vtc/roles/show/0.1/payload.ts +399 -0
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/install/claim/finish/0.3/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { ApproverDid, ApproverLabel, AttestStatement, Ext } from "../../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Complete first-administrator enrolment under a DID the founder already controls: the document is signed by the DID the install token names, verified against its live document, and carries the founder's step-up approver's enrolment statement over the claim's challenge. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTCInstallClaimFinishPayload {
|
|
13
|
+
/**
|
|
14
|
+
* From claim/start 0.3, echoed verbatim. Also the `boundTo` of the statement.
|
|
15
|
+
*/
|
|
16
|
+
claimId: string;
|
|
17
|
+
/**
|
|
18
|
+
* The founder's step-up approver. MUST equal the statement's issuer.
|
|
19
|
+
*/
|
|
20
|
+
approverDid: ApproverDid;
|
|
21
|
+
label?: ApproverLabel;
|
|
22
|
+
/**
|
|
23
|
+
* The approver's complete, signed auth/step-up/approver/attest/0.1 document with `purpose: enrol`, `boundTo` equal to `claimId`, over the start's `challenge`. Verified as received.
|
|
24
|
+
*/
|
|
25
|
+
statement: AttestStatement;
|
|
26
|
+
ext?: Ext;
|
|
27
|
+
}
|
|
28
|
+
export interface VTCInstallClaimFinishResponsePayload {
|
|
29
|
+
/**
|
|
30
|
+
* The founder's DID — the DID the install token named and the claim was signed by — which vtc/admin/bootstrap writes as the first administrator.
|
|
31
|
+
*/
|
|
32
|
+
adminDid: string;
|
|
33
|
+
/**
|
|
34
|
+
* EdDSA JWT (aud=vtc-install-session, 5min TTL) consumed by vtc/admin/bootstrap. The approver binding takes effect when it is consumed.
|
|
35
|
+
*/
|
|
36
|
+
setupSessionToken: string;
|
|
37
|
+
ext?: Ext;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
41
|
+
export type { ApproverDid, ApproverLabel, AttestStatement, Ext };
|
|
42
|
+
|
|
43
|
+
/** Trust Task type URI. */
|
|
44
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/install/claim/finish/0.3" as const;
|
|
45
|
+
|
|
46
|
+
/** Stable alias for this specification's request payload shape. */
|
|
47
|
+
export type Payload = VTCInstallClaimFinishPayload;
|
|
48
|
+
|
|
49
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
50
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/install/claim/finish/0.3#response" as const;
|
|
51
|
+
|
|
52
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
53
|
+
export type Response = VTCInstallClaimFinishResponsePayload;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* This specification's payload schema, as a value.
|
|
57
|
+
*
|
|
58
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
59
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
60
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
61
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
62
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
63
|
+
*/
|
|
64
|
+
export const PAYLOAD_SCHEMA = {
|
|
65
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
66
|
+
"$id": "https://trusttasks.org/spec/vtc/install/claim/finish/0.3",
|
|
67
|
+
"title": "VTC Install Claim Finish — payload",
|
|
68
|
+
"description": "Complete first-administrator enrolment under a DID the founder already controls: the document is signed by the DID the install token names, verified against its live document, and carries the founder's step-up approver's enrolment statement over the claim's challenge. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
|
|
69
|
+
"type": "object",
|
|
70
|
+
"additionalProperties": false,
|
|
71
|
+
"required": [
|
|
72
|
+
"claimId",
|
|
73
|
+
"approverDid",
|
|
74
|
+
"statement"
|
|
75
|
+
],
|
|
76
|
+
"properties": {
|
|
77
|
+
"claimId": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"minLength": 1,
|
|
80
|
+
"maxLength": 256,
|
|
81
|
+
"description": "From claim/start 0.3, echoed verbatim. Also the `boundTo` of the statement."
|
|
82
|
+
},
|
|
83
|
+
"approverDid": {
|
|
84
|
+
"$ref": "#/$defs/ApproverDid",
|
|
85
|
+
"description": "The founder's step-up approver. MUST equal the statement's issuer."
|
|
86
|
+
},
|
|
87
|
+
"label": {
|
|
88
|
+
"$ref": "#/$defs/ApproverLabel"
|
|
89
|
+
},
|
|
90
|
+
"statement": {
|
|
91
|
+
"$ref": "#/$defs/AttestStatement",
|
|
92
|
+
"description": "The approver's complete, signed auth/step-up/approver/attest/0.1 document with `purpose: enrol`, `boundTo` equal to `claimId`, over the start's `challenge`. Verified as received."
|
|
93
|
+
},
|
|
94
|
+
"ext": {
|
|
95
|
+
"$ref": "#/$defs/Ext"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"$defs": {
|
|
99
|
+
"Response": {
|
|
100
|
+
"$anchor": "response",
|
|
101
|
+
"title": "VTC Install Claim Finish — response payload",
|
|
102
|
+
"type": "object",
|
|
103
|
+
"additionalProperties": false,
|
|
104
|
+
"required": [
|
|
105
|
+
"adminDid",
|
|
106
|
+
"setupSessionToken"
|
|
107
|
+
],
|
|
108
|
+
"properties": {
|
|
109
|
+
"adminDid": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"pattern": "^did:",
|
|
112
|
+
"minLength": 5,
|
|
113
|
+
"maxLength": 2048,
|
|
114
|
+
"description": "The founder's DID — the DID the install token named and the claim was signed by — which vtc/admin/bootstrap writes as the first administrator."
|
|
115
|
+
},
|
|
116
|
+
"setupSessionToken": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"minLength": 1,
|
|
119
|
+
"description": "EdDSA JWT (aud=vtc-install-session, 5min TTL) consumed by vtc/admin/bootstrap. The approver binding takes effect when it is consumed."
|
|
120
|
+
},
|
|
121
|
+
"ext": {
|
|
122
|
+
"$ref": "#/$defs/Ext"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"Ext": {
|
|
127
|
+
"title": "Ext",
|
|
128
|
+
"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.",
|
|
129
|
+
"type": "object",
|
|
130
|
+
"minProperties": 1,
|
|
131
|
+
"additionalProperties": true,
|
|
132
|
+
"propertyNames": {
|
|
133
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"AttestStatement": {
|
|
137
|
+
"title": "AttestStatement",
|
|
138
|
+
"type": "object",
|
|
139
|
+
"minProperties": 1,
|
|
140
|
+
"description": "A complete, signed auth/step-up/approver/attest/0.1 Trust Task document — envelope, payload and proof — issued by the approver. Deliberately an open object here rather than a typed one: the consumer verifies it as a document in its own right (envelope, proof and payload against that specification's schemas), and verifies its proof over the members exactly as received, which a binding that narrowed it to a typed struct and re-serialised it could silently break."
|
|
141
|
+
},
|
|
142
|
+
"ApproverLabel": {
|
|
143
|
+
"title": "ApproverLabel",
|
|
144
|
+
"type": "string",
|
|
145
|
+
"minLength": 1,
|
|
146
|
+
"maxLength": 64,
|
|
147
|
+
"description": "A human-readable name for where the approver lives — e.g. `Browser plugin — work laptop`. Chosen by the subject (or suggested by an inviter), untrusted, and attributed to its author wherever it is rendered. Absent rather than invented when none was chosen."
|
|
148
|
+
},
|
|
149
|
+
"ApproverDid": {
|
|
150
|
+
"title": "ApproverDid",
|
|
151
|
+
"type": "string",
|
|
152
|
+
"minLength": 16,
|
|
153
|
+
"maxLength": 128,
|
|
154
|
+
"pattern": "^did:key:z6Mk[1-9A-HJ-NP-Za-km-z]+$",
|
|
155
|
+
"description": "A step-up approver, as an Ed25519 `did:key` (`z6Mk…`). `did:key` only, because its document is a function of the key and resolves with no network, so verifying an approver's statement never depends on a fetch, and a key whose DID document could be rewritten after enrolment would not be the key that was enrolled. Distinct from the subject's DID, from every verification method in the subject's DID document, and from every key the subject can sign operations with at the relying party."
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
} as const;
|
|
159
|
+
|
|
160
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
161
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
162
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
163
|
+
"$ref": "#/$defs/Response",
|
|
164
|
+
"$defs": {
|
|
165
|
+
"Response": {
|
|
166
|
+
"$anchor": "response",
|
|
167
|
+
"title": "VTC Install Claim Finish — response payload",
|
|
168
|
+
"type": "object",
|
|
169
|
+
"additionalProperties": false,
|
|
170
|
+
"required": [
|
|
171
|
+
"adminDid",
|
|
172
|
+
"setupSessionToken"
|
|
173
|
+
],
|
|
174
|
+
"properties": {
|
|
175
|
+
"adminDid": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"pattern": "^did:",
|
|
178
|
+
"minLength": 5,
|
|
179
|
+
"maxLength": 2048,
|
|
180
|
+
"description": "The founder's DID — the DID the install token named and the claim was signed by — which vtc/admin/bootstrap writes as the first administrator."
|
|
181
|
+
},
|
|
182
|
+
"setupSessionToken": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"minLength": 1,
|
|
185
|
+
"description": "EdDSA JWT (aud=vtc-install-session, 5min TTL) consumed by vtc/admin/bootstrap. The approver binding takes effect when it is consumed."
|
|
186
|
+
},
|
|
187
|
+
"ext": {
|
|
188
|
+
"$ref": "#/$defs/Ext"
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"Ext": {
|
|
193
|
+
"title": "Ext",
|
|
194
|
+
"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.",
|
|
195
|
+
"type": "object",
|
|
196
|
+
"minProperties": 1,
|
|
197
|
+
"additionalProperties": true,
|
|
198
|
+
"propertyNames": {
|
|
199
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"AttestStatement": {
|
|
203
|
+
"title": "AttestStatement",
|
|
204
|
+
"type": "object",
|
|
205
|
+
"minProperties": 1,
|
|
206
|
+
"description": "A complete, signed auth/step-up/approver/attest/0.1 Trust Task document — envelope, payload and proof — issued by the approver. Deliberately an open object here rather than a typed one: the consumer verifies it as a document in its own right (envelope, proof and payload against that specification's schemas), and verifies its proof over the members exactly as received, which a binding that narrowed it to a typed struct and re-serialised it could silently break."
|
|
207
|
+
},
|
|
208
|
+
"ApproverLabel": {
|
|
209
|
+
"title": "ApproverLabel",
|
|
210
|
+
"type": "string",
|
|
211
|
+
"minLength": 1,
|
|
212
|
+
"maxLength": 64,
|
|
213
|
+
"description": "A human-readable name for where the approver lives — e.g. `Browser plugin — work laptop`. Chosen by the subject (or suggested by an inviter), untrusted, and attributed to its author wherever it is rendered. Absent rather than invented when none was chosen."
|
|
214
|
+
},
|
|
215
|
+
"ApproverDid": {
|
|
216
|
+
"title": "ApproverDid",
|
|
217
|
+
"type": "string",
|
|
218
|
+
"minLength": 16,
|
|
219
|
+
"maxLength": 128,
|
|
220
|
+
"pattern": "^did:key:z6Mk[1-9A-HJ-NP-Za-km-z]+$",
|
|
221
|
+
"description": "A step-up approver, as an Ed25519 `did:key` (`z6Mk…`). `did:key` only, because its document is a function of the key and resolves with no network, so verifying an approver's statement never depends on a fetch, and a key whose DID document could be rewritten after enrolment would not be the key that was enrolled. Distinct from the subject's DID, from every verification method in the subject's DID document, and from every key the subject can sign operations with at the relying party."
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
} as const;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
228
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
229
|
+
* per-specification and cannot be derived from the document alone, and
|
|
230
|
+
* item 2 needs the schema this carries.
|
|
231
|
+
*/
|
|
232
|
+
export const SPEC = {
|
|
233
|
+
typeUri: TYPE_URI,
|
|
234
|
+
isBearer: false,
|
|
235
|
+
isProofRequired: true,
|
|
236
|
+
isRecipientRequired: true,
|
|
237
|
+
isIssuedAtRequired: true,
|
|
238
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
239
|
+
} as const;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
243
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
244
|
+
* parties (§7.3 item 5).
|
|
245
|
+
*/
|
|
246
|
+
export const RESPONSE_SPEC = {
|
|
247
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
248
|
+
isBearer: false,
|
|
249
|
+
isProofRequired: true,
|
|
250
|
+
isRecipientRequired: true,
|
|
251
|
+
isIssuedAtRequired: true,
|
|
252
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
253
|
+
} as const;
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/install/claim/start/0.3/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Begin claiming a fresh community under a DID the founder already controls: exchange the install token and its claim code for a challenge the founder's step-up approver will sign. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTCInstallClaimStartPayload {
|
|
13
|
+
/**
|
|
14
|
+
* The EdDSA-signed install JWT (aud=vtc-install) printed by vtc setup. In 0.3 it names the founder's DID.
|
|
15
|
+
*/
|
|
16
|
+
token: string;
|
|
17
|
+
/**
|
|
18
|
+
* The claim code the operator received out of band, through a different channel from the install URL. Required in 0.3. Compared with its stored hash; never logged.
|
|
19
|
+
*/
|
|
20
|
+
claimCode: string;
|
|
21
|
+
ext?: Ext;
|
|
22
|
+
}
|
|
23
|
+
export interface VTCInstallClaimStartResponsePayload {
|
|
24
|
+
/**
|
|
25
|
+
* Opaque, single-use handle for this claim. Echoed in claim/finish, and the `boundTo` of the approver's enrolment statement.
|
|
26
|
+
*/
|
|
27
|
+
claimId: string;
|
|
28
|
+
/**
|
|
29
|
+
* The DID the install token names — the DID that must sign claim/finish and that becomes the first administrator. Returned so the installer need not decode the token.
|
|
30
|
+
*/
|
|
31
|
+
adminDid: string;
|
|
32
|
+
/**
|
|
33
|
+
* A fresh challenge (≥128 bits) the founder's step-up approver signs over in its auth/step-up/approver/attest/0.1 statement with `purpose: enrol`.
|
|
34
|
+
*/
|
|
35
|
+
challenge: string;
|
|
36
|
+
/**
|
|
37
|
+
* The community's DID, which the statement names as its `audience` and `recipient`, and to which claim/finish is addressed.
|
|
38
|
+
*/
|
|
39
|
+
audience: string;
|
|
40
|
+
/**
|
|
41
|
+
* When this claim ceremony lapses (not the install token).
|
|
42
|
+
*/
|
|
43
|
+
expiresAt: string;
|
|
44
|
+
ext?: Ext;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
48
|
+
export type { Ext };
|
|
49
|
+
|
|
50
|
+
/** Trust Task type URI. */
|
|
51
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/install/claim/start/0.3" as const;
|
|
52
|
+
|
|
53
|
+
/** Stable alias for this specification's request payload shape. */
|
|
54
|
+
export type Payload = VTCInstallClaimStartPayload;
|
|
55
|
+
|
|
56
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
57
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/install/claim/start/0.3#response" as const;
|
|
58
|
+
|
|
59
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
60
|
+
export type Response = VTCInstallClaimStartResponsePayload;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* This specification's payload schema, as a value.
|
|
64
|
+
*
|
|
65
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
66
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
67
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
68
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
69
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
70
|
+
*/
|
|
71
|
+
export const PAYLOAD_SCHEMA = {
|
|
72
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
73
|
+
"$id": "https://trusttasks.org/spec/vtc/install/claim/start/0.3",
|
|
74
|
+
"title": "VTC Install Claim Start — payload",
|
|
75
|
+
"description": "Begin claiming a fresh community under a DID the founder already controls: exchange the install token and its claim code for a challenge the founder's step-up approver will sign. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
|
|
76
|
+
"type": "object",
|
|
77
|
+
"additionalProperties": false,
|
|
78
|
+
"required": [
|
|
79
|
+
"token",
|
|
80
|
+
"claimCode"
|
|
81
|
+
],
|
|
82
|
+
"properties": {
|
|
83
|
+
"token": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"minLength": 16,
|
|
86
|
+
"maxLength": 4096,
|
|
87
|
+
"description": "The EdDSA-signed install JWT (aud=vtc-install) printed by vtc setup. In 0.3 it names the founder's DID."
|
|
88
|
+
},
|
|
89
|
+
"claimCode": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"minLength": 1,
|
|
92
|
+
"maxLength": 64,
|
|
93
|
+
"description": "The claim code the operator received out of band, through a different channel from the install URL. Required in 0.3. Compared with its stored hash; never logged."
|
|
94
|
+
},
|
|
95
|
+
"ext": {
|
|
96
|
+
"$ref": "#/$defs/Ext"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"$defs": {
|
|
100
|
+
"Response": {
|
|
101
|
+
"$anchor": "response",
|
|
102
|
+
"title": "VTC Install Claim Start — response payload",
|
|
103
|
+
"type": "object",
|
|
104
|
+
"additionalProperties": false,
|
|
105
|
+
"required": [
|
|
106
|
+
"claimId",
|
|
107
|
+
"adminDid",
|
|
108
|
+
"challenge",
|
|
109
|
+
"audience",
|
|
110
|
+
"expiresAt"
|
|
111
|
+
],
|
|
112
|
+
"properties": {
|
|
113
|
+
"claimId": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"minLength": 1,
|
|
116
|
+
"maxLength": 256,
|
|
117
|
+
"description": "Opaque, single-use handle for this claim. Echoed in claim/finish, and the `boundTo` of the approver's enrolment statement."
|
|
118
|
+
},
|
|
119
|
+
"adminDid": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"pattern": "^did:",
|
|
122
|
+
"minLength": 5,
|
|
123
|
+
"maxLength": 2048,
|
|
124
|
+
"description": "The DID the install token names — the DID that must sign claim/finish and that becomes the first administrator. Returned so the installer need not decode the token."
|
|
125
|
+
},
|
|
126
|
+
"challenge": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"minLength": 16,
|
|
129
|
+
"maxLength": 512,
|
|
130
|
+
"description": "A fresh challenge (≥128 bits) the founder's step-up approver signs over in its auth/step-up/approver/attest/0.1 statement with `purpose: enrol`."
|
|
131
|
+
},
|
|
132
|
+
"audience": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"pattern": "^did:",
|
|
135
|
+
"minLength": 5,
|
|
136
|
+
"maxLength": 2048,
|
|
137
|
+
"description": "The community's DID, which the statement names as its `audience` and `recipient`, and to which claim/finish is addressed."
|
|
138
|
+
},
|
|
139
|
+
"expiresAt": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"format": "date-time",
|
|
142
|
+
"description": "When this claim ceremony lapses (not the install token)."
|
|
143
|
+
},
|
|
144
|
+
"ext": {
|
|
145
|
+
"$ref": "#/$defs/Ext"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"Ext": {
|
|
150
|
+
"title": "Ext",
|
|
151
|
+
"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.",
|
|
152
|
+
"type": "object",
|
|
153
|
+
"minProperties": 1,
|
|
154
|
+
"additionalProperties": true,
|
|
155
|
+
"propertyNames": {
|
|
156
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
} as const;
|
|
161
|
+
|
|
162
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
163
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
164
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
165
|
+
"$ref": "#/$defs/Response",
|
|
166
|
+
"$defs": {
|
|
167
|
+
"Response": {
|
|
168
|
+
"$anchor": "response",
|
|
169
|
+
"title": "VTC Install Claim Start — response payload",
|
|
170
|
+
"type": "object",
|
|
171
|
+
"additionalProperties": false,
|
|
172
|
+
"required": [
|
|
173
|
+
"claimId",
|
|
174
|
+
"adminDid",
|
|
175
|
+
"challenge",
|
|
176
|
+
"audience",
|
|
177
|
+
"expiresAt"
|
|
178
|
+
],
|
|
179
|
+
"properties": {
|
|
180
|
+
"claimId": {
|
|
181
|
+
"type": "string",
|
|
182
|
+
"minLength": 1,
|
|
183
|
+
"maxLength": 256,
|
|
184
|
+
"description": "Opaque, single-use handle for this claim. Echoed in claim/finish, and the `boundTo` of the approver's enrolment statement."
|
|
185
|
+
},
|
|
186
|
+
"adminDid": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"pattern": "^did:",
|
|
189
|
+
"minLength": 5,
|
|
190
|
+
"maxLength": 2048,
|
|
191
|
+
"description": "The DID the install token names — the DID that must sign claim/finish and that becomes the first administrator. Returned so the installer need not decode the token."
|
|
192
|
+
},
|
|
193
|
+
"challenge": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"minLength": 16,
|
|
196
|
+
"maxLength": 512,
|
|
197
|
+
"description": "A fresh challenge (≥128 bits) the founder's step-up approver signs over in its auth/step-up/approver/attest/0.1 statement with `purpose: enrol`."
|
|
198
|
+
},
|
|
199
|
+
"audience": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"pattern": "^did:",
|
|
202
|
+
"minLength": 5,
|
|
203
|
+
"maxLength": 2048,
|
|
204
|
+
"description": "The community's DID, which the statement names as its `audience` and `recipient`, and to which claim/finish is addressed."
|
|
205
|
+
},
|
|
206
|
+
"expiresAt": {
|
|
207
|
+
"type": "string",
|
|
208
|
+
"format": "date-time",
|
|
209
|
+
"description": "When this claim ceremony lapses (not the install token)."
|
|
210
|
+
},
|
|
211
|
+
"ext": {
|
|
212
|
+
"$ref": "#/$defs/Ext"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"Ext": {
|
|
217
|
+
"title": "Ext",
|
|
218
|
+
"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.",
|
|
219
|
+
"type": "object",
|
|
220
|
+
"minProperties": 1,
|
|
221
|
+
"additionalProperties": true,
|
|
222
|
+
"propertyNames": {
|
|
223
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
} as const;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
231
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
232
|
+
* per-specification and cannot be derived from the document alone, and
|
|
233
|
+
* item 2 needs the schema this carries.
|
|
234
|
+
*/
|
|
235
|
+
export const SPEC = {
|
|
236
|
+
typeUri: TYPE_URI,
|
|
237
|
+
isBearer: false,
|
|
238
|
+
isProofRequired: false,
|
|
239
|
+
isRecipientRequired: true,
|
|
240
|
+
isIssuedAtRequired: true,
|
|
241
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
242
|
+
} as const;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
246
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
247
|
+
* parties (§7.3 item 5).
|
|
248
|
+
*/
|
|
249
|
+
export const RESPONSE_SPEC = {
|
|
250
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
251
|
+
isBearer: false,
|
|
252
|
+
isProofRequired: false,
|
|
253
|
+
isRecipientRequired: true,
|
|
254
|
+
isIssuedAtRequired: true,
|
|
255
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
256
|
+
} as const;
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/members/authority-reduced-notice/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A community tells a subject that an administrator reduced their administrative authority — revoked their entry, demoted their role, or narrowed what it allows — on whose authority, when, why, and whether anyone else agreed. Unsolicited: the subject did not ask. The removal of a member is vtc/members/removal-notice; this is the reduction of authority, which may leave the subject a member.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTCMembersAuthorityReducedNoticePayload {
|
|
13
|
+
/**
|
|
14
|
+
* The subject whose authority was reduced — the notice's recipient. Carried in the payload as well as the envelope so that a forwarded notice still names its subject.
|
|
15
|
+
*/
|
|
16
|
+
did: string;
|
|
17
|
+
/**
|
|
18
|
+
* What happened. `revoked`: the subject's access control entry was removed. `demoted`: its role was changed to one with a lower ceiling. `narrowed`: its role stayed and what it allows was reduced.
|
|
19
|
+
*/
|
|
20
|
+
code: "revoked" | "demoted" | "narrowed";
|
|
21
|
+
/**
|
|
22
|
+
* The role the subject held before the change.
|
|
23
|
+
*/
|
|
24
|
+
previousRole: string;
|
|
25
|
+
/**
|
|
26
|
+
* The role the subject holds after the change. Absent exactly when `code` is `revoked`.
|
|
27
|
+
*/
|
|
28
|
+
resultingRole?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Whether a party other than the deciding administrator and the subject agreed. `consented`: the reduction ran on the consent of at least one other administrator. `unopposed`: nobody other than the decider and the subject held the authority to consent, so the decider's own re-authentication was the only gate. The distinction is the subject's evidence that a reduction no third party reviewed happened.
|
|
31
|
+
*/
|
|
32
|
+
agreement: "consented" | "unopposed";
|
|
33
|
+
/**
|
|
34
|
+
* The deciding administrator's stated reason, verbatim. Absent when none was given; absent and empty are different claims.
|
|
35
|
+
*/
|
|
36
|
+
reason?: string;
|
|
37
|
+
/**
|
|
38
|
+
* When the reduction took effect — not when the notice was sent.
|
|
39
|
+
*/
|
|
40
|
+
decidedAt: string;
|
|
41
|
+
/**
|
|
42
|
+
* DID of the administrator who decided. The community itself is the document's issuer.
|
|
43
|
+
*/
|
|
44
|
+
decidedBy: string;
|
|
45
|
+
ext?: Ext;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
49
|
+
export type { Ext };
|
|
50
|
+
|
|
51
|
+
/** Trust Task type URI. */
|
|
52
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/members/authority-reduced-notice/0.1" as const;
|
|
53
|
+
|
|
54
|
+
/** Stable alias for this specification's request payload shape. */
|
|
55
|
+
export type Payload = VTCMembersAuthorityReducedNoticePayload;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* This specification's payload schema, as a value.
|
|
59
|
+
*
|
|
60
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
61
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
62
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
63
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
64
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
65
|
+
*/
|
|
66
|
+
export const PAYLOAD_SCHEMA = {
|
|
67
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
68
|
+
"$id": "https://trusttasks.org/spec/vtc/members/authority-reduced-notice/0.1",
|
|
69
|
+
"title": "VTC Members Authority-Reduced Notice — payload",
|
|
70
|
+
"description": "A community tells a subject that an administrator reduced their administrative authority — revoked their entry, demoted their role, or narrowed what it allows — on whose authority, when, why, and whether anyone else agreed. Unsolicited: the subject did not ask. The removal of a member is vtc/members/removal-notice; this is the reduction of authority, which may leave the subject a member.",
|
|
71
|
+
"type": "object",
|
|
72
|
+
"additionalProperties": false,
|
|
73
|
+
"required": [
|
|
74
|
+
"did",
|
|
75
|
+
"code",
|
|
76
|
+
"previousRole",
|
|
77
|
+
"decidedAt",
|
|
78
|
+
"decidedBy",
|
|
79
|
+
"agreement"
|
|
80
|
+
],
|
|
81
|
+
"properties": {
|
|
82
|
+
"did": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"minLength": 1,
|
|
85
|
+
"description": "The subject whose authority was reduced — the notice's recipient. Carried in the payload as well as the envelope so that a forwarded notice still names its subject."
|
|
86
|
+
},
|
|
87
|
+
"code": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"enum": [
|
|
90
|
+
"revoked",
|
|
91
|
+
"demoted",
|
|
92
|
+
"narrowed"
|
|
93
|
+
],
|
|
94
|
+
"description": "What happened. `revoked`: the subject's access control entry was removed. `demoted`: its role was changed to one with a lower ceiling. `narrowed`: its role stayed and what it allows was reduced."
|
|
95
|
+
},
|
|
96
|
+
"previousRole": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"minLength": 1,
|
|
99
|
+
"maxLength": 128,
|
|
100
|
+
"description": "The role the subject held before the change."
|
|
101
|
+
},
|
|
102
|
+
"resultingRole": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"minLength": 1,
|
|
105
|
+
"maxLength": 128,
|
|
106
|
+
"description": "The role the subject holds after the change. Absent exactly when `code` is `revoked`."
|
|
107
|
+
},
|
|
108
|
+
"agreement": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"enum": [
|
|
111
|
+
"consented",
|
|
112
|
+
"unopposed"
|
|
113
|
+
],
|
|
114
|
+
"description": "Whether a party other than the deciding administrator and the subject agreed. `consented`: the reduction ran on the consent of at least one other administrator. `unopposed`: nobody other than the decider and the subject held the authority to consent, so the decider's own re-authentication was the only gate. The distinction is the subject's evidence that a reduction no third party reviewed happened."
|
|
115
|
+
},
|
|
116
|
+
"reason": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"maxLength": 1024,
|
|
119
|
+
"description": "The deciding administrator's stated reason, verbatim. Absent when none was given; absent and empty are different claims."
|
|
120
|
+
},
|
|
121
|
+
"decidedAt": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"format": "date-time",
|
|
124
|
+
"description": "When the reduction took effect — not when the notice was sent."
|
|
125
|
+
},
|
|
126
|
+
"decidedBy": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"minLength": 1,
|
|
129
|
+
"description": "DID of the administrator who decided. The community itself is the document's issuer."
|
|
130
|
+
},
|
|
131
|
+
"ext": {
|
|
132
|
+
"$ref": "#/$defs/Ext"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"$defs": {
|
|
136
|
+
"Ext": {
|
|
137
|
+
"title": "Ext",
|
|
138
|
+
"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.",
|
|
139
|
+
"type": "object",
|
|
140
|
+
"minProperties": 1,
|
|
141
|
+
"additionalProperties": true,
|
|
142
|
+
"propertyNames": {
|
|
143
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
} as const;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
151
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
152
|
+
* per-specification and cannot be derived from the document alone, and
|
|
153
|
+
* item 2 needs the schema this carries.
|
|
154
|
+
*/
|
|
155
|
+
export const SPEC = {
|
|
156
|
+
typeUri: TYPE_URI,
|
|
157
|
+
isBearer: false,
|
|
158
|
+
isProofRequired: true,
|
|
159
|
+
isRecipientRequired: true,
|
|
160
|
+
isIssuedAtRequired: true,
|
|
161
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
162
|
+
} as const;
|