@openvtc/trust-tasks 0.23.0 → 0.23.2
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 +70 -0
- package/dist/_shared/components.d.ts +102 -1
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/vtc/admin/actions/_shared/0.1/action.d.ts +1 -1
- package/dist/vtc/admin/actions/_shared/0.1/action.d.ts.map +1 -1
- package/dist/vtc/admin/actions/_shared/0.2/action.d.ts +26 -0
- package/dist/vtc/admin/actions/_shared/0.2/action.d.ts.map +1 -0
- package/dist/vtc/admin/actions/_shared/0.2/action.js +6 -0
- package/dist/vtc/admin/actions/_shared/0.2/action.js.map +1 -0
- package/dist/vtc/admin/actions/acknowledge/0.1/payload.d.ts +1 -1
- package/dist/vtc/admin/actions/acknowledge/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/admin/actions/acknowledge/0.2/payload.d.ts +1052 -0
- package/dist/vtc/admin/actions/acknowledge/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/admin/actions/acknowledge/0.2/payload.js +666 -0
- package/dist/vtc/admin/actions/acknowledge/0.2/payload.js.map +1 -0
- package/dist/vtc/admin/actions/cancel/0.1/payload.d.ts +1 -1
- package/dist/vtc/admin/actions/cancel/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/admin/actions/cancel/0.2/payload.d.ts +1066 -0
- package/dist/vtc/admin/actions/cancel/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/admin/actions/cancel/0.2/payload.js +671 -0
- package/dist/vtc/admin/actions/cancel/0.2/payload.js.map +1 -0
- package/dist/vtc/admin/actions/list/0.1/payload.d.ts +1 -1
- package/dist/vtc/admin/actions/list/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/admin/actions/list/0.2/payload.d.ts +1240 -0
- package/dist/vtc/admin/actions/list/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/admin/actions/list/0.2/payload.js +756 -0
- package/dist/vtc/admin/actions/list/0.2/payload.js.map +1 -0
- package/dist/vtc/admin/actions/show/0.1/payload.d.ts +1 -1
- package/dist/vtc/admin/actions/show/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/admin/actions/show/0.2/payload.d.ts +1052 -0
- package/dist/vtc/admin/actions/show/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/admin/actions/show/0.2/payload.js +666 -0
- package/dist/vtc/admin/actions/show/0.2/payload.js.map +1 -0
- package/dist/vtc/admin/events/_shared/0.1/topic.d.ts +27 -0
- package/dist/vtc/admin/events/_shared/0.1/topic.d.ts.map +1 -0
- package/dist/vtc/admin/events/_shared/0.1/topic.js +6 -0
- package/dist/vtc/admin/events/_shared/0.1/topic.js.map +1 -0
- package/dist/vtc/admin/events/event/0.1/payload.d.ts +172 -0
- package/dist/vtc/admin/events/event/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/admin/events/event/0.1/payload.js +99 -0
- package/dist/vtc/admin/events/event/0.1/payload.js.map +1 -0
- package/dist/vtc/admin/events/subscribe/0.1/payload.d.ts +409 -0
- package/dist/vtc/admin/events/subscribe/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/admin/events/subscribe/0.1/payload.js +230 -0
- package/dist/vtc/admin/events/subscribe/0.1/payload.js.map +1 -0
- package/dist/vtc/members/authority-reduction-pending-notice/0.1/payload.d.ts +236 -0
- package/dist/vtc/members/authority-reduction-pending-notice/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/members/authority-reduction-pending-notice/0.1/payload.js +122 -0
- package/dist/vtc/members/authority-reduction-pending-notice/0.1/payload.js.map +1 -0
- package/dist/vtc/operator/offline-write/0.1/payload.d.ts +167 -0
- package/dist/vtc/operator/offline-write/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/operator/offline-write/0.1/payload.js +96 -0
- package/dist/vtc/operator/offline-write/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +110 -1
- package/src/index.ts +10 -0
- package/src/vtc/admin/actions/_shared/0.1/action.ts +1 -1
- package/src/vtc/admin/actions/_shared/0.2/action.ts +27 -0
- package/src/vtc/admin/actions/acknowledge/0.1/payload.ts +1 -1
- package/src/vtc/admin/actions/acknowledge/0.2/payload.ts +701 -0
- package/src/vtc/admin/actions/cancel/0.1/payload.ts +1 -1
- package/src/vtc/admin/actions/cancel/0.2/payload.ts +710 -0
- package/src/vtc/admin/actions/list/0.1/payload.ts +1 -1
- package/src/vtc/admin/actions/list/0.2/payload.ts +825 -0
- package/src/vtc/admin/actions/show/0.1/payload.ts +1 -1
- package/src/vtc/admin/actions/show/0.2/payload.ts +701 -0
- package/src/vtc/admin/events/_shared/0.1/topic.ts +28 -0
- package/src/vtc/admin/events/event/0.1/payload.ts +133 -0
- package/src/vtc/admin/events/subscribe/0.1/payload.ts +302 -0
- package/src/vtc/members/authority-reduction-pending-notice/0.1/payload.ts +176 -0
- package/src/vtc/operator/offline-write/0.1/payload.ts +133 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/operator/offline-write/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A RECORD TYPE, not a request. It describes one change to a Verifiable Trust Community's access control made by an operator with access to the community's host, through an offline command run against the community's store (`vtc admin emergency-bootstrap` and its siblings) rather than through any Trust Task. No party sends a document of this type to another and no consumer executes one: its Type URI exists so that an `acknowledge` action (vtc/admin/actions/_shared/0.2) can name what happened in `typeUri`, and so that the community's audit trail can reference it. When an action names it, the action's `payload` is this record. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTCOperatorOfflineWriteRecord {
|
|
13
|
+
/**
|
|
14
|
+
* Which offline command made the change. `aclAdd` — an access control entry was written. `aclRemove` — an access control entry was removed. `adminInvite` — an administrator invitation was minted. `createDidKeyAdmin` — a new `did:key` was minted on the host and made an administrator. `enrolApprover` — an approver was enrolled for a subject. `emergencyBootstrap` — the break-glass recovery that installs an administrator when none can act. A closed set: a new offline command is a new version, so that a renderer never shows an administrator a change it cannot name.
|
|
15
|
+
*/
|
|
16
|
+
command: "aclAdd" | "aclRemove" | "adminInvite" | "createDidKeyAdmin" | "enrolApprover" | "emergencyBootstrap";
|
|
17
|
+
/**
|
|
18
|
+
* The DIDs whose access the command changed — the subject of an entry added or removed, the administrator installed or invited, the subject an approver was enrolled for and the approver — in the order the command reports them. Never empty: an offline write that changed nobody's access is not one administrators need to acknowledge.
|
|
19
|
+
*
|
|
20
|
+
* @minItems 1
|
|
21
|
+
* @maxItems 64
|
|
22
|
+
*/
|
|
23
|
+
dids: [string, ...string[]];
|
|
24
|
+
/**
|
|
25
|
+
* The host the command ran on, as the community knows it (its hostname, or the deployment's name for the instance). Identifies where an operator held access, not who the operator was; attribution to a person, where the community has one, is the action's `requester`.
|
|
26
|
+
*/
|
|
27
|
+
host: string;
|
|
28
|
+
/**
|
|
29
|
+
* When the command wrote the change to the community's store, as recorded on the host. Not when the community noticed it, which is the action's `createdAt`.
|
|
30
|
+
*/
|
|
31
|
+
at: string;
|
|
32
|
+
ext?: Ext;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
36
|
+
export type { Ext };
|
|
37
|
+
|
|
38
|
+
/** Trust Task type URI. */
|
|
39
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/operator/offline-write/0.1" as const;
|
|
40
|
+
|
|
41
|
+
/** Stable alias for this specification's request payload shape. */
|
|
42
|
+
export type Payload = VTCOperatorOfflineWriteRecord;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* This specification's payload schema, as a value.
|
|
46
|
+
*
|
|
47
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
48
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
49
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
50
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
51
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
52
|
+
*/
|
|
53
|
+
export const PAYLOAD_SCHEMA = {
|
|
54
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
55
|
+
"$id": "https://trusttasks.org/spec/vtc/operator/offline-write/0.1",
|
|
56
|
+
"title": "VTC Operator Offline Write — record",
|
|
57
|
+
"description": "A RECORD TYPE, not a request. It describes one change to a Verifiable Trust Community's access control made by an operator with access to the community's host, through an offline command run against the community's store (`vtc admin emergency-bootstrap` and its siblings) rather than through any Trust Task. No party sends a document of this type to another and no consumer executes one: its Type URI exists so that an `acknowledge` action (vtc/admin/actions/_shared/0.2) can name what happened in `typeUri`, and so that the community's audit trail can reference it. When an action names it, the action's `payload` is this record. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
|
|
58
|
+
"type": "object",
|
|
59
|
+
"additionalProperties": false,
|
|
60
|
+
"required": [
|
|
61
|
+
"command",
|
|
62
|
+
"dids",
|
|
63
|
+
"host",
|
|
64
|
+
"at"
|
|
65
|
+
],
|
|
66
|
+
"properties": {
|
|
67
|
+
"command": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"enum": [
|
|
70
|
+
"aclAdd",
|
|
71
|
+
"aclRemove",
|
|
72
|
+
"adminInvite",
|
|
73
|
+
"createDidKeyAdmin",
|
|
74
|
+
"enrolApprover",
|
|
75
|
+
"emergencyBootstrap"
|
|
76
|
+
],
|
|
77
|
+
"description": "Which offline command made the change. `aclAdd` — an access control entry was written. `aclRemove` — an access control entry was removed. `adminInvite` — an administrator invitation was minted. `createDidKeyAdmin` — a new `did:key` was minted on the host and made an administrator. `enrolApprover` — an approver was enrolled for a subject. `emergencyBootstrap` — the break-glass recovery that installs an administrator when none can act. A closed set: a new offline command is a new version, so that a renderer never shows an administrator a change it cannot name."
|
|
78
|
+
},
|
|
79
|
+
"dids": {
|
|
80
|
+
"type": "array",
|
|
81
|
+
"minItems": 1,
|
|
82
|
+
"maxItems": 64,
|
|
83
|
+
"uniqueItems": true,
|
|
84
|
+
"items": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"minLength": 1,
|
|
87
|
+
"maxLength": 2048
|
|
88
|
+
},
|
|
89
|
+
"description": "The DIDs whose access the command changed — the subject of an entry added or removed, the administrator installed or invited, the subject an approver was enrolled for and the approver — in the order the command reports them. Never empty: an offline write that changed nobody's access is not one administrators need to acknowledge."
|
|
90
|
+
},
|
|
91
|
+
"host": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"minLength": 1,
|
|
94
|
+
"maxLength": 253,
|
|
95
|
+
"description": "The host the command ran on, as the community knows it (its hostname, or the deployment's name for the instance). Identifies where an operator held access, not who the operator was; attribution to a person, where the community has one, is the action's `requester`."
|
|
96
|
+
},
|
|
97
|
+
"at": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"format": "date-time",
|
|
100
|
+
"description": "When the command wrote the change to the community's store, as recorded on the host. Not when the community noticed it, which is the action's `createdAt`."
|
|
101
|
+
},
|
|
102
|
+
"ext": {
|
|
103
|
+
"$ref": "#/$defs/Ext"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"$defs": {
|
|
107
|
+
"Ext": {
|
|
108
|
+
"title": "Ext",
|
|
109
|
+
"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.",
|
|
110
|
+
"type": "object",
|
|
111
|
+
"minProperties": 1,
|
|
112
|
+
"additionalProperties": true,
|
|
113
|
+
"propertyNames": {
|
|
114
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
} as const;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
122
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
123
|
+
* per-specification and cannot be derived from the document alone, and
|
|
124
|
+
* item 2 needs the schema this carries.
|
|
125
|
+
*/
|
|
126
|
+
export const SPEC = {
|
|
127
|
+
typeUri: TYPE_URI,
|
|
128
|
+
isBearer: false,
|
|
129
|
+
isProofRequired: false,
|
|
130
|
+
isRecipientRequired: false,
|
|
131
|
+
isIssuedAtRequired: false,
|
|
132
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
133
|
+
} as const;
|