@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,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/roles/_shared/0.1/role.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The administrative role vocabulary of a Verifiable Trust Community, as records. Not itself a Trust Task specification. Capability references reuse acl/_shared/0.2's `CapabilityRef`, so a capability means the same thing on a role as on the AclEntry it bounds.
|
|
8
|
+
*/
|
|
9
|
+
export interface RoleDefinitionSharedDefinitionForTheVtcRolesSpecFamily {
|
|
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 { RoleDefinition, RoleName } from "../../../../_shared/components.js";
|
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/roles/define/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Capability_AclV0_2 as Capability, CapabilityRef, Ext, ResourceQualifier, RoleDefinition, RoleName } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Create a custom administrative role at a VTC, or replace an existing custom role. Built-in roles are not definable. The outer document members are owned by the framework — SPEC §6.3.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTCRolesDefinePayload {
|
|
13
|
+
/**
|
|
14
|
+
* Name of the custom role. MUST NOT be a built-in role name.
|
|
15
|
+
*/
|
|
16
|
+
name: RoleName;
|
|
17
|
+
/**
|
|
18
|
+
* Optional human-readable description of the role.
|
|
19
|
+
*/
|
|
20
|
+
description?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The role's capability ceiling, stated in full (it replaces any previous ceiling wholesale). Every capability MUST be in the VTC's registry, MUST NOT be one the registry classes as additive, and MUST be held — at a qualifier at least as wide — by the administrators whose authority defines the role. An empty array defines a role that admits no capability.
|
|
23
|
+
*/
|
|
24
|
+
ceiling: CapabilityRef[];
|
|
25
|
+
/**
|
|
26
|
+
* The role's approve ceiling, stated in full. Every capability MUST be in the registry and within what the defining administrators may themselves approve. An empty array defines a role that approves nothing.
|
|
27
|
+
*/
|
|
28
|
+
approveScope: CapabilityRef[];
|
|
29
|
+
/**
|
|
30
|
+
* `true` to replace an existing custom role of this name; `false` or absent to create one. A create against an existing name is refused with `exists`, and a replace against a missing one with `notFound`, so neither intent can be mistaken for the other.
|
|
31
|
+
*/
|
|
32
|
+
replaces?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Optional human-readable rationale, recorded with the change and shown to approvers.
|
|
35
|
+
*/
|
|
36
|
+
reason?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
39
|
+
*/
|
|
40
|
+
ext?: Ext;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The success response to a vtc/roles/define/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/roles/define/0.1#response.
|
|
44
|
+
*/
|
|
45
|
+
export interface VTCRolesDefineResponsePayload {
|
|
46
|
+
/**
|
|
47
|
+
* The role record the VTC now holds, with `builtIn: false` and its provenance.
|
|
48
|
+
*/
|
|
49
|
+
role: RoleDefinition;
|
|
50
|
+
/**
|
|
51
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
52
|
+
*/
|
|
53
|
+
ext?: Ext;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
57
|
+
export type { Capability, CapabilityRef, Ext, ResourceQualifier, RoleDefinition, RoleName };
|
|
58
|
+
|
|
59
|
+
/** Trust Task type URI. */
|
|
60
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/roles/define/0.1" as const;
|
|
61
|
+
|
|
62
|
+
/** Stable alias for this specification's request payload shape. */
|
|
63
|
+
export type Payload = VTCRolesDefinePayload;
|
|
64
|
+
|
|
65
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
66
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/roles/define/0.1#response" as const;
|
|
67
|
+
|
|
68
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
69
|
+
export type Response = VTCRolesDefineResponsePayload;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* This specification's payload schema, as a value.
|
|
73
|
+
*
|
|
74
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
75
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
76
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
77
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
78
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
79
|
+
*/
|
|
80
|
+
export const PAYLOAD_SCHEMA = {
|
|
81
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
82
|
+
"$id": "https://trusttasks.org/spec/vtc/roles/define/0.1",
|
|
83
|
+
"title": "VTC Roles — Define — payload",
|
|
84
|
+
"description": "Create a custom administrative role at a VTC, or replace an existing custom role. Built-in roles are not definable. The outer document members are owned by the framework — SPEC §6.3.",
|
|
85
|
+
"type": "object",
|
|
86
|
+
"additionalProperties": false,
|
|
87
|
+
"required": [
|
|
88
|
+
"name",
|
|
89
|
+
"ceiling",
|
|
90
|
+
"approveScope"
|
|
91
|
+
],
|
|
92
|
+
"properties": {
|
|
93
|
+
"name": {
|
|
94
|
+
"$ref": "#/$defs/RoleName",
|
|
95
|
+
"description": "Name of the custom role. MUST NOT be a built-in role name."
|
|
96
|
+
},
|
|
97
|
+
"description": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"maxLength": 512,
|
|
100
|
+
"description": "Optional human-readable description of the role."
|
|
101
|
+
},
|
|
102
|
+
"ceiling": {
|
|
103
|
+
"type": "array",
|
|
104
|
+
"items": {
|
|
105
|
+
"$ref": "#/$defs/CapabilityRef"
|
|
106
|
+
},
|
|
107
|
+
"description": "The role's capability ceiling, stated in full (it replaces any previous ceiling wholesale). Every capability MUST be in the VTC's registry, MUST NOT be one the registry classes as additive, and MUST be held — at a qualifier at least as wide — by the administrators whose authority defines the role. An empty array defines a role that admits no capability."
|
|
108
|
+
},
|
|
109
|
+
"approveScope": {
|
|
110
|
+
"type": "array",
|
|
111
|
+
"items": {
|
|
112
|
+
"$ref": "#/$defs/CapabilityRef"
|
|
113
|
+
},
|
|
114
|
+
"description": "The role's approve ceiling, stated in full. Every capability MUST be in the registry and within what the defining administrators may themselves approve. An empty array defines a role that approves nothing."
|
|
115
|
+
},
|
|
116
|
+
"replaces": {
|
|
117
|
+
"type": "boolean",
|
|
118
|
+
"description": "`true` to replace an existing custom role of this name; `false` or absent to create one. A create against an existing name is refused with `exists`, and a replace against a missing one with `notFound`, so neither intent can be mistaken for the other."
|
|
119
|
+
},
|
|
120
|
+
"reason": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"maxLength": 1024,
|
|
123
|
+
"description": "Optional human-readable rationale, recorded with the change and shown to approvers."
|
|
124
|
+
},
|
|
125
|
+
"ext": {
|
|
126
|
+
"$ref": "#/$defs/Ext",
|
|
127
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"$defs": {
|
|
131
|
+
"Response": {
|
|
132
|
+
"$anchor": "response",
|
|
133
|
+
"title": "VTC Roles — Define — response payload",
|
|
134
|
+
"description": "The success response to a vtc/roles/define/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/roles/define/0.1#response.",
|
|
135
|
+
"type": "object",
|
|
136
|
+
"additionalProperties": false,
|
|
137
|
+
"required": [
|
|
138
|
+
"role"
|
|
139
|
+
],
|
|
140
|
+
"properties": {
|
|
141
|
+
"role": {
|
|
142
|
+
"$ref": "#/$defs/RoleDefinition",
|
|
143
|
+
"description": "The role record the VTC now holds, with `builtIn: false` and its provenance."
|
|
144
|
+
},
|
|
145
|
+
"ext": {
|
|
146
|
+
"$ref": "#/$defs/Ext",
|
|
147
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"Ext": {
|
|
152
|
+
"title": "Ext",
|
|
153
|
+
"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.",
|
|
154
|
+
"type": "object",
|
|
155
|
+
"minProperties": 1,
|
|
156
|
+
"additionalProperties": true,
|
|
157
|
+
"propertyNames": {
|
|
158
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"RoleDefinition": {
|
|
162
|
+
"title": "RoleDefinition",
|
|
163
|
+
"description": "One administrative role of a VTC: a name, the CEILING of capabilities an entry holding the role may hold, and the approve ceiling of capabilities it may approve.\n\nA ROLE IS A CEILING, NOT A GRANT. It states the most an entry with this role could be allowed; the entry's own `capabilities` say what it does hold, and may be narrower. An entry's effective capabilities are this whole `ceiling` where the entry states `capabilities: {scope: ceiling}`, nothing where it states `none`, and this `ceiling` ∩ its listed grants (plus any additive grant) where it states `listed`. Holding the role confers nothing an entry has not been granted. Likewise `approveScope` bounds what an entry may approve: the entry's `approveCapabilities` select from it (`ceiling` = all of it, `listed` = an intersection, absent or `none` = nothing), and the entry's `approve` scope must not be none for any of it to apply.\n\nNO WILDCARDS. A ceiling lists its capabilities explicitly, even where it is meant to be \"everything\"; a role whose ceiling is empty holds no capability, and one whose approve ceiling is empty approves none. Built-in roles whose intent is the whole registry enumerate it, and their records grow when the registry grows — by release, never by policy.\n\nBUILT-IN ROLES (`builtIn: true`) are fixed by the VTC implementation and MUST NOT be changed or deleted through vtc/roles/define or vtc/roles/delete. The built-in set, with the ceilings a VTC is expected to ship (descriptive; the authoritative ceiling is the record the VTC returns):\n- `community-admin` — ceiling: every `vtc.*` capability and `git.ns.admin` unqualified; approve ceiling: every capability. With its full ceiling it is the community's unrestricted administrator.\n- `moderator` — ceiling: `vtc.members.manage`, `vtc.join.decide`, `vtc.invitations.manage`; approve ceiling: the same.\n- `vetting-lead` — ceiling: `vtc.vetting.manage` (an entry may qualify it by criterion); approve ceiling: `vtc.vetting.manage`, so vetting leads approve vetter grants and other vetting leads at their qualifier.\n- `repo-manager` — ceiling: `git.repo.manage` and `git.ns.admin` (held qualified by namespace or repository); approve ceiling: the same, at the same qualifier.\n- `credential-officer` — ceiling: `vtc.credentials.issue`, `vtc.credentials.revoke`; approve ceiling: the same.\n- `auditor` — ceiling: `vtc.audit.read`; approve ceiling: none.\n- `approver` — ceiling: none (an entry holding it states `act: {scope: none}`); approve ceiling: every capability, narrowed by the entry's `approveCapabilities` — the least-privilege approver.\n\nCUSTOM ROLES (`builtIn: false`) are created, changed and deleted by a community through vtc/roles/define and vtc/roles/delete. A VTC implementing this family takes those changes only through an N-of-M approval among its administrators, never through policy (Rego or otherwise) — authority-defining records are host-enforced, and policy may only refuse. That is a description of the VTC's model, not a requirement this schema can carry. An entry holds at most one administrative role; a combination (repo manager AND vetting lead) is expressed as a custom role.",
|
|
164
|
+
"type": "object",
|
|
165
|
+
"additionalProperties": false,
|
|
166
|
+
"required": [
|
|
167
|
+
"name",
|
|
168
|
+
"builtIn",
|
|
169
|
+
"ceiling",
|
|
170
|
+
"approveScope"
|
|
171
|
+
],
|
|
172
|
+
"properties": {
|
|
173
|
+
"name": {
|
|
174
|
+
"$ref": "#/$defs/RoleName"
|
|
175
|
+
},
|
|
176
|
+
"builtIn": {
|
|
177
|
+
"type": "boolean",
|
|
178
|
+
"description": "`true` for a role fixed by the VTC implementation, which cannot be changed or deleted; `false` for a community-defined custom role."
|
|
179
|
+
},
|
|
180
|
+
"description": {
|
|
181
|
+
"type": "string",
|
|
182
|
+
"maxLength": 512,
|
|
183
|
+
"description": "Optional human-readable description. Confers nothing."
|
|
184
|
+
},
|
|
185
|
+
"ceiling": {
|
|
186
|
+
"type": "array",
|
|
187
|
+
"items": {
|
|
188
|
+
"$ref": "#/$defs/CapabilityRef"
|
|
189
|
+
},
|
|
190
|
+
"description": "The capabilities an entry holding this role MAY hold, each optionally qualified by a resource. An entry may hold a capability at a qualifier inside the ceiling's (a ceiling of `git.repo.manage` unqualified admits `git.repo.manage @ git-ns:github.com/acme`), never outside it. EMPTY means the role admits no capability. A capability the VTC classes as additive never appears in a ceiling — an additive capability is by definition one no role implies."
|
|
191
|
+
},
|
|
192
|
+
"approveScope": {
|
|
193
|
+
"type": "array",
|
|
194
|
+
"items": {
|
|
195
|
+
"$ref": "#/$defs/CapabilityRef"
|
|
196
|
+
},
|
|
197
|
+
"description": "The capabilities an entry holding this role MAY approve an action needing — the role's approve ceiling, independent of `ceiling`. An entry approves all of it with `approveCapabilities: {scope: ceiling}`, an intersection with `listed`, and nothing when `approveCapabilities` is absent or `none`; the entry's `approve` scope must be other than none for any of it to apply. EMPTY means the role approves nothing."
|
|
198
|
+
},
|
|
199
|
+
"createdAt": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"format": "date-time"
|
|
202
|
+
},
|
|
203
|
+
"createdBy": {
|
|
204
|
+
"type": "string",
|
|
205
|
+
"minLength": 1,
|
|
206
|
+
"maxLength": 2048,
|
|
207
|
+
"description": "VID of the administrator whose request created the role (for a custom role created by approval, the requester). Absent on a built-in role."
|
|
208
|
+
},
|
|
209
|
+
"updatedAt": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"format": "date-time"
|
|
212
|
+
},
|
|
213
|
+
"updatedBy": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"minLength": 1,
|
|
216
|
+
"maxLength": 2048,
|
|
217
|
+
"description": "VID of the administrator whose request last replaced the role. Absent on a built-in role and on a custom role never replaced."
|
|
218
|
+
},
|
|
219
|
+
"ext": {
|
|
220
|
+
"$ref": "#/$defs/Ext",
|
|
221
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1. An extension member MUST NOT be interpreted as widening a ceiling."
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"RoleName": {
|
|
226
|
+
"title": "RoleName",
|
|
227
|
+
"description": "A role identifier: lowercase, hyphen-separated, at most 64 characters. Compared by exact string equality. It is the value an AclEntry 0.2 carries in `role`.",
|
|
228
|
+
"type": "string",
|
|
229
|
+
"pattern": "^[a-z][a-z0-9-]{0,63}$"
|
|
230
|
+
},
|
|
231
|
+
"CapabilityRef": {
|
|
232
|
+
"title": "CapabilityRef",
|
|
233
|
+
"description": "A capability, optionally qualified by a resource. Used where a capability is named but not granted — a role's ceiling, a role's approve ceiling, an entry's approvable capabilities. An unqualified reference covers every resource of the capability's kind.",
|
|
234
|
+
"type": "object",
|
|
235
|
+
"additionalProperties": false,
|
|
236
|
+
"required": [
|
|
237
|
+
"capability"
|
|
238
|
+
],
|
|
239
|
+
"properties": {
|
|
240
|
+
"capability": {
|
|
241
|
+
"$ref": "#/$defs/Capability"
|
|
242
|
+
},
|
|
243
|
+
"resource": {
|
|
244
|
+
"$ref": "#/$defs/ResourceQualifier",
|
|
245
|
+
"description": "Optional qualifier. Absent covers every resource of the capability's kind."
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"ResourceQualifier": {
|
|
250
|
+
"title": "ResourceQualifier",
|
|
251
|
+
"description": "Opaque qualifier naming the part of the maintainer's resources a capability applies to (e.g. `git-ns:github.com/acme`, `git-repo:github.com/acme/r#4211`, `policy:join`). Its grammar and containment rule are the maintainer's: a qualified capability covers the named resource and the resources inside it. A qualifier MUST NOT be read as widening the entry's act scope.",
|
|
252
|
+
"type": "string",
|
|
253
|
+
"minLength": 1,
|
|
254
|
+
"maxLength": 512
|
|
255
|
+
},
|
|
256
|
+
"Capability": {
|
|
257
|
+
"title": "Capability",
|
|
258
|
+
"description": "Opaque identifier of one administrative power in the maintainer's capability registry — lowercase dot-separated segments (e.g. `keys.sign`, `vtc.roles.assign`, `git.repo.manage`). A consumer MUST NOT treat a capability it does not recognise as granted.",
|
|
259
|
+
"type": "string",
|
|
260
|
+
"minLength": 1,
|
|
261
|
+
"maxLength": 128,
|
|
262
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)*$"
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
} as const;
|
|
266
|
+
|
|
267
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
268
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
269
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
270
|
+
"$ref": "#/$defs/Response",
|
|
271
|
+
"$defs": {
|
|
272
|
+
"Response": {
|
|
273
|
+
"$anchor": "response",
|
|
274
|
+
"title": "VTC Roles — Define — response payload",
|
|
275
|
+
"description": "The success response to a vtc/roles/define/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/roles/define/0.1#response.",
|
|
276
|
+
"type": "object",
|
|
277
|
+
"additionalProperties": false,
|
|
278
|
+
"required": [
|
|
279
|
+
"role"
|
|
280
|
+
],
|
|
281
|
+
"properties": {
|
|
282
|
+
"role": {
|
|
283
|
+
"$ref": "#/$defs/RoleDefinition",
|
|
284
|
+
"description": "The role record the VTC now holds, with `builtIn: false` and its provenance."
|
|
285
|
+
},
|
|
286
|
+
"ext": {
|
|
287
|
+
"$ref": "#/$defs/Ext",
|
|
288
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"Ext": {
|
|
293
|
+
"title": "Ext",
|
|
294
|
+
"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.",
|
|
295
|
+
"type": "object",
|
|
296
|
+
"minProperties": 1,
|
|
297
|
+
"additionalProperties": true,
|
|
298
|
+
"propertyNames": {
|
|
299
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"RoleDefinition": {
|
|
303
|
+
"title": "RoleDefinition",
|
|
304
|
+
"description": "One administrative role of a VTC: a name, the CEILING of capabilities an entry holding the role may hold, and the approve ceiling of capabilities it may approve.\n\nA ROLE IS A CEILING, NOT A GRANT. It states the most an entry with this role could be allowed; the entry's own `capabilities` say what it does hold, and may be narrower. An entry's effective capabilities are this whole `ceiling` where the entry states `capabilities: {scope: ceiling}`, nothing where it states `none`, and this `ceiling` ∩ its listed grants (plus any additive grant) where it states `listed`. Holding the role confers nothing an entry has not been granted. Likewise `approveScope` bounds what an entry may approve: the entry's `approveCapabilities` select from it (`ceiling` = all of it, `listed` = an intersection, absent or `none` = nothing), and the entry's `approve` scope must not be none for any of it to apply.\n\nNO WILDCARDS. A ceiling lists its capabilities explicitly, even where it is meant to be \"everything\"; a role whose ceiling is empty holds no capability, and one whose approve ceiling is empty approves none. Built-in roles whose intent is the whole registry enumerate it, and their records grow when the registry grows — by release, never by policy.\n\nBUILT-IN ROLES (`builtIn: true`) are fixed by the VTC implementation and MUST NOT be changed or deleted through vtc/roles/define or vtc/roles/delete. The built-in set, with the ceilings a VTC is expected to ship (descriptive; the authoritative ceiling is the record the VTC returns):\n- `community-admin` — ceiling: every `vtc.*` capability and `git.ns.admin` unqualified; approve ceiling: every capability. With its full ceiling it is the community's unrestricted administrator.\n- `moderator` — ceiling: `vtc.members.manage`, `vtc.join.decide`, `vtc.invitations.manage`; approve ceiling: the same.\n- `vetting-lead` — ceiling: `vtc.vetting.manage` (an entry may qualify it by criterion); approve ceiling: `vtc.vetting.manage`, so vetting leads approve vetter grants and other vetting leads at their qualifier.\n- `repo-manager` — ceiling: `git.repo.manage` and `git.ns.admin` (held qualified by namespace or repository); approve ceiling: the same, at the same qualifier.\n- `credential-officer` — ceiling: `vtc.credentials.issue`, `vtc.credentials.revoke`; approve ceiling: the same.\n- `auditor` — ceiling: `vtc.audit.read`; approve ceiling: none.\n- `approver` — ceiling: none (an entry holding it states `act: {scope: none}`); approve ceiling: every capability, narrowed by the entry's `approveCapabilities` — the least-privilege approver.\n\nCUSTOM ROLES (`builtIn: false`) are created, changed and deleted by a community through vtc/roles/define and vtc/roles/delete. A VTC implementing this family takes those changes only through an N-of-M approval among its administrators, never through policy (Rego or otherwise) — authority-defining records are host-enforced, and policy may only refuse. That is a description of the VTC's model, not a requirement this schema can carry. An entry holds at most one administrative role; a combination (repo manager AND vetting lead) is expressed as a custom role.",
|
|
305
|
+
"type": "object",
|
|
306
|
+
"additionalProperties": false,
|
|
307
|
+
"required": [
|
|
308
|
+
"name",
|
|
309
|
+
"builtIn",
|
|
310
|
+
"ceiling",
|
|
311
|
+
"approveScope"
|
|
312
|
+
],
|
|
313
|
+
"properties": {
|
|
314
|
+
"name": {
|
|
315
|
+
"$ref": "#/$defs/RoleName"
|
|
316
|
+
},
|
|
317
|
+
"builtIn": {
|
|
318
|
+
"type": "boolean",
|
|
319
|
+
"description": "`true` for a role fixed by the VTC implementation, which cannot be changed or deleted; `false` for a community-defined custom role."
|
|
320
|
+
},
|
|
321
|
+
"description": {
|
|
322
|
+
"type": "string",
|
|
323
|
+
"maxLength": 512,
|
|
324
|
+
"description": "Optional human-readable description. Confers nothing."
|
|
325
|
+
},
|
|
326
|
+
"ceiling": {
|
|
327
|
+
"type": "array",
|
|
328
|
+
"items": {
|
|
329
|
+
"$ref": "#/$defs/CapabilityRef"
|
|
330
|
+
},
|
|
331
|
+
"description": "The capabilities an entry holding this role MAY hold, each optionally qualified by a resource. An entry may hold a capability at a qualifier inside the ceiling's (a ceiling of `git.repo.manage` unqualified admits `git.repo.manage @ git-ns:github.com/acme`), never outside it. EMPTY means the role admits no capability. A capability the VTC classes as additive never appears in a ceiling — an additive capability is by definition one no role implies."
|
|
332
|
+
},
|
|
333
|
+
"approveScope": {
|
|
334
|
+
"type": "array",
|
|
335
|
+
"items": {
|
|
336
|
+
"$ref": "#/$defs/CapabilityRef"
|
|
337
|
+
},
|
|
338
|
+
"description": "The capabilities an entry holding this role MAY approve an action needing — the role's approve ceiling, independent of `ceiling`. An entry approves all of it with `approveCapabilities: {scope: ceiling}`, an intersection with `listed`, and nothing when `approveCapabilities` is absent or `none`; the entry's `approve` scope must be other than none for any of it to apply. EMPTY means the role approves nothing."
|
|
339
|
+
},
|
|
340
|
+
"createdAt": {
|
|
341
|
+
"type": "string",
|
|
342
|
+
"format": "date-time"
|
|
343
|
+
},
|
|
344
|
+
"createdBy": {
|
|
345
|
+
"type": "string",
|
|
346
|
+
"minLength": 1,
|
|
347
|
+
"maxLength": 2048,
|
|
348
|
+
"description": "VID of the administrator whose request created the role (for a custom role created by approval, the requester). Absent on a built-in role."
|
|
349
|
+
},
|
|
350
|
+
"updatedAt": {
|
|
351
|
+
"type": "string",
|
|
352
|
+
"format": "date-time"
|
|
353
|
+
},
|
|
354
|
+
"updatedBy": {
|
|
355
|
+
"type": "string",
|
|
356
|
+
"minLength": 1,
|
|
357
|
+
"maxLength": 2048,
|
|
358
|
+
"description": "VID of the administrator whose request last replaced the role. Absent on a built-in role and on a custom role never replaced."
|
|
359
|
+
},
|
|
360
|
+
"ext": {
|
|
361
|
+
"$ref": "#/$defs/Ext",
|
|
362
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1. An extension member MUST NOT be interpreted as widening a ceiling."
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
"RoleName": {
|
|
367
|
+
"title": "RoleName",
|
|
368
|
+
"description": "A role identifier: lowercase, hyphen-separated, at most 64 characters. Compared by exact string equality. It is the value an AclEntry 0.2 carries in `role`.",
|
|
369
|
+
"type": "string",
|
|
370
|
+
"pattern": "^[a-z][a-z0-9-]{0,63}$"
|
|
371
|
+
},
|
|
372
|
+
"CapabilityRef": {
|
|
373
|
+
"title": "CapabilityRef",
|
|
374
|
+
"description": "A capability, optionally qualified by a resource. Used where a capability is named but not granted — a role's ceiling, a role's approve ceiling, an entry's approvable capabilities. An unqualified reference covers every resource of the capability's kind.",
|
|
375
|
+
"type": "object",
|
|
376
|
+
"additionalProperties": false,
|
|
377
|
+
"required": [
|
|
378
|
+
"capability"
|
|
379
|
+
],
|
|
380
|
+
"properties": {
|
|
381
|
+
"capability": {
|
|
382
|
+
"$ref": "#/$defs/Capability"
|
|
383
|
+
},
|
|
384
|
+
"resource": {
|
|
385
|
+
"$ref": "#/$defs/ResourceQualifier",
|
|
386
|
+
"description": "Optional qualifier. Absent covers every resource of the capability's kind."
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
"ResourceQualifier": {
|
|
391
|
+
"title": "ResourceQualifier",
|
|
392
|
+
"description": "Opaque qualifier naming the part of the maintainer's resources a capability applies to (e.g. `git-ns:github.com/acme`, `git-repo:github.com/acme/r#4211`, `policy:join`). Its grammar and containment rule are the maintainer's: a qualified capability covers the named resource and the resources inside it. A qualifier MUST NOT be read as widening the entry's act scope.",
|
|
393
|
+
"type": "string",
|
|
394
|
+
"minLength": 1,
|
|
395
|
+
"maxLength": 512
|
|
396
|
+
},
|
|
397
|
+
"Capability": {
|
|
398
|
+
"title": "Capability",
|
|
399
|
+
"description": "Opaque identifier of one administrative power in the maintainer's capability registry — lowercase dot-separated segments (e.g. `keys.sign`, `vtc.roles.assign`, `git.repo.manage`). A consumer MUST NOT treat a capability it does not recognise as granted.",
|
|
400
|
+
"type": "string",
|
|
401
|
+
"minLength": 1,
|
|
402
|
+
"maxLength": 128,
|
|
403
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)*$"
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
} as const;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
410
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
411
|
+
* per-specification and cannot be derived from the document alone, and
|
|
412
|
+
* item 2 needs the schema this carries.
|
|
413
|
+
*/
|
|
414
|
+
export const SPEC = {
|
|
415
|
+
typeUri: TYPE_URI,
|
|
416
|
+
isBearer: false,
|
|
417
|
+
isProofRequired: true,
|
|
418
|
+
isRecipientRequired: true,
|
|
419
|
+
isIssuedAtRequired: true,
|
|
420
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
421
|
+
} as const;
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
425
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
426
|
+
* parties (§7.3 item 5).
|
|
427
|
+
*/
|
|
428
|
+
export const RESPONSE_SPEC = {
|
|
429
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
430
|
+
isBearer: false,
|
|
431
|
+
isProofRequired: true,
|
|
432
|
+
isRecipientRequired: true,
|
|
433
|
+
isIssuedAtRequired: true,
|
|
434
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
435
|
+
} as const;
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/roles/delete/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext, RoleName } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Delete a custom administrative role that no ACL entry holds. Built-in roles are not deletable. The outer document members are owned by the framework — SPEC §6.3.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTCRolesDeletePayload {
|
|
13
|
+
/**
|
|
14
|
+
* Name of the custom role to delete.
|
|
15
|
+
*/
|
|
16
|
+
name: RoleName;
|
|
17
|
+
/**
|
|
18
|
+
* Optional human-readable rationale, recorded with the deletion and shown to approvers.
|
|
19
|
+
*/
|
|
20
|
+
reason?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
23
|
+
*/
|
|
24
|
+
ext?: Ext;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The success response to a vtc/roles/delete/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/roles/delete/0.1#response.
|
|
28
|
+
*/
|
|
29
|
+
export interface VTCRolesDeleteResponsePayload {
|
|
30
|
+
/**
|
|
31
|
+
* The name of the role that was deleted.
|
|
32
|
+
*/
|
|
33
|
+
deleted: RoleName;
|
|
34
|
+
/**
|
|
35
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
36
|
+
*/
|
|
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 { Ext, RoleName };
|
|
42
|
+
|
|
43
|
+
/** Trust Task type URI. */
|
|
44
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/roles/delete/0.1" as const;
|
|
45
|
+
|
|
46
|
+
/** Stable alias for this specification's request payload shape. */
|
|
47
|
+
export type Payload = VTCRolesDeletePayload;
|
|
48
|
+
|
|
49
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
50
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/roles/delete/0.1#response" as const;
|
|
51
|
+
|
|
52
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
53
|
+
export type Response = VTCRolesDeleteResponsePayload;
|
|
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/roles/delete/0.1",
|
|
67
|
+
"title": "VTC Roles — Delete — payload",
|
|
68
|
+
"description": "Delete a custom administrative role that no ACL entry holds. Built-in roles are not deletable. The outer document members are owned by the framework — SPEC §6.3.",
|
|
69
|
+
"type": "object",
|
|
70
|
+
"additionalProperties": false,
|
|
71
|
+
"required": [
|
|
72
|
+
"name"
|
|
73
|
+
],
|
|
74
|
+
"properties": {
|
|
75
|
+
"name": {
|
|
76
|
+
"$ref": "#/$defs/RoleName",
|
|
77
|
+
"description": "Name of the custom role to delete."
|
|
78
|
+
},
|
|
79
|
+
"reason": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"maxLength": 1024,
|
|
82
|
+
"description": "Optional human-readable rationale, recorded with the deletion and shown to approvers."
|
|
83
|
+
},
|
|
84
|
+
"ext": {
|
|
85
|
+
"$ref": "#/$defs/Ext",
|
|
86
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"$defs": {
|
|
90
|
+
"Response": {
|
|
91
|
+
"$anchor": "response",
|
|
92
|
+
"title": "VTC Roles — Delete — response payload",
|
|
93
|
+
"description": "The success response to a vtc/roles/delete/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/roles/delete/0.1#response.",
|
|
94
|
+
"type": "object",
|
|
95
|
+
"additionalProperties": false,
|
|
96
|
+
"required": [
|
|
97
|
+
"deleted"
|
|
98
|
+
],
|
|
99
|
+
"properties": {
|
|
100
|
+
"deleted": {
|
|
101
|
+
"$ref": "#/$defs/RoleName",
|
|
102
|
+
"description": "The name of the role that was deleted."
|
|
103
|
+
},
|
|
104
|
+
"ext": {
|
|
105
|
+
"$ref": "#/$defs/Ext",
|
|
106
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"Ext": {
|
|
111
|
+
"title": "Ext",
|
|
112
|
+
"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.",
|
|
113
|
+
"type": "object",
|
|
114
|
+
"minProperties": 1,
|
|
115
|
+
"additionalProperties": true,
|
|
116
|
+
"propertyNames": {
|
|
117
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"RoleName": {
|
|
121
|
+
"title": "RoleName",
|
|
122
|
+
"description": "A role identifier: lowercase, hyphen-separated, at most 64 characters. Compared by exact string equality. It is the value an AclEntry 0.2 carries in `role`.",
|
|
123
|
+
"type": "string",
|
|
124
|
+
"pattern": "^[a-z][a-z0-9-]{0,63}$"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
} as const;
|
|
128
|
+
|
|
129
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
130
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
131
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
132
|
+
"$ref": "#/$defs/Response",
|
|
133
|
+
"$defs": {
|
|
134
|
+
"Response": {
|
|
135
|
+
"$anchor": "response",
|
|
136
|
+
"title": "VTC Roles — Delete — response payload",
|
|
137
|
+
"description": "The success response to a vtc/roles/delete/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/roles/delete/0.1#response.",
|
|
138
|
+
"type": "object",
|
|
139
|
+
"additionalProperties": false,
|
|
140
|
+
"required": [
|
|
141
|
+
"deleted"
|
|
142
|
+
],
|
|
143
|
+
"properties": {
|
|
144
|
+
"deleted": {
|
|
145
|
+
"$ref": "#/$defs/RoleName",
|
|
146
|
+
"description": "The name of the role that was deleted."
|
|
147
|
+
},
|
|
148
|
+
"ext": {
|
|
149
|
+
"$ref": "#/$defs/Ext",
|
|
150
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"Ext": {
|
|
155
|
+
"title": "Ext",
|
|
156
|
+
"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.",
|
|
157
|
+
"type": "object",
|
|
158
|
+
"minProperties": 1,
|
|
159
|
+
"additionalProperties": true,
|
|
160
|
+
"propertyNames": {
|
|
161
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"RoleName": {
|
|
165
|
+
"title": "RoleName",
|
|
166
|
+
"description": "A role identifier: lowercase, hyphen-separated, at most 64 characters. Compared by exact string equality. It is the value an AclEntry 0.2 carries in `role`.",
|
|
167
|
+
"type": "string",
|
|
168
|
+
"pattern": "^[a-z][a-z0-9-]{0,63}$"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
} as const;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
175
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
176
|
+
* per-specification and cannot be derived from the document alone, and
|
|
177
|
+
* item 2 needs the schema this carries.
|
|
178
|
+
*/
|
|
179
|
+
export const SPEC = {
|
|
180
|
+
typeUri: TYPE_URI,
|
|
181
|
+
isBearer: false,
|
|
182
|
+
isProofRequired: true,
|
|
183
|
+
isRecipientRequired: true,
|
|
184
|
+
isIssuedAtRequired: true,
|
|
185
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
186
|
+
} as const;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
190
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
191
|
+
* parties (§7.3 item 5).
|
|
192
|
+
*/
|
|
193
|
+
export const RESPONSE_SPEC = {
|
|
194
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
195
|
+
isBearer: false,
|
|
196
|
+
isProofRequired: true,
|
|
197
|
+
isRecipientRequired: true,
|
|
198
|
+
isIssuedAtRequired: true,
|
|
199
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
200
|
+
} as const;
|