@openvtc/trust-tasks 0.26.9 → 0.26.11
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 +155 -0
- package/dist/_shared/components.d.ts +43 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/rooms/keys/act/0.2/payload.d.ts +546 -0
- package/dist/rooms/keys/act/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/keys/act/0.2/payload.js +305 -0
- package/dist/rooms/keys/act/0.2/payload.js.map +1 -0
- package/dist/rooms/keys/file-key/0.2/payload.d.ts +306 -0
- package/dist/rooms/keys/file-key/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/keys/file-key/0.2/payload.js +167 -0
- package/dist/rooms/keys/file-key/0.2/payload.js.map +1 -0
- package/dist/rooms/keys/open/0.2/payload.d.ts +323 -0
- package/dist/rooms/keys/open/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/keys/open/0.2/payload.js +171 -0
- package/dist/rooms/keys/open/0.2/payload.js.map +1 -0
- package/dist/vtc/_shared/0.1/admission.d.ts +16 -0
- package/dist/vtc/_shared/0.1/admission.d.ts.map +1 -0
- package/dist/vtc/_shared/0.1/admission.js +6 -0
- package/dist/vtc/_shared/0.1/admission.js.map +1 -0
- package/dist/vtc/members/admit/0.1/payload.d.ts +481 -0
- package/dist/vtc/members/admit/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/members/admit/0.1/payload.js +281 -0
- package/dist/vtc/members/admit/0.1/payload.js.map +1 -0
- package/dist/vtc/members/make-membership/0.1/payload.d.ts +447 -0
- package/dist/vtc/members/make-membership/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/members/make-membership/0.1/payload.js +267 -0
- package/dist/vtc/members/make-membership/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +43 -0
- package/src/index.ts +6 -0
- package/src/rooms/keys/act/0.2/payload.ts +380 -0
- package/src/rooms/keys/file-key/0.2/payload.ts +224 -0
- package/src/rooms/keys/open/0.2/payload.ts +237 -0
- package/src/vtc/_shared/0.1/admission.ts +17 -0
- package/src/vtc/members/admit/0.1/payload.ts +326 -0
- package/src/vtc/members/make-membership/0.1/payload.ts +304 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/rooms/keys/open/0.2/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAyDH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,iDAA0D,CAAC;AAKnF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,0DAAmE,CAAC;AAKrG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,iDAAiD;IACxD,OAAO,EAAE,2BAA2B;IACpC,aAAa,EAAE,+KAA+K;IAC9L,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,QAAQ;QACR,KAAK;QACL,SAAS;QACT,QAAQ;KACT;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,aAAa,EAAE,8KAA8K;SAC9L;QACD,KAAK,EAAE;YACL,MAAM,EAAE,QAAQ;YAChB,WAAW,EAAE,GAAG;YAChB,aAAa,EAAE,mCAAmC;SACnD;QACD,SAAS,EAAE;YACT,MAAM,EAAE,SAAS;YACjB,SAAS,EAAE,CAAC;YACZ,aAAa,EAAE,gHAAgH;SAChI;QACD,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,sBAAsB,EAAE,KAAK;YAC7B,UAAU,EAAE;gBACV,YAAY;gBACZ,OAAO;gBACP,OAAO;aACR;YACD,aAAa,EAAE,oDAAoD;Y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;aACZ;YACD,YAAY,EAAE;gBACZ,WAAW,EAAE;oBACX,MAAM,EAAE,QAAQ;oBAChB,aAAa,EAAE,iFAAiF;iBACjG;gBACD,KAAK,EAAE;oBACL,MAAM,EAAE,aAAa;iBACtB;aACF;SACF;QACD,KAAK,EAAE;YACL,OAAO,EAAE,KAAK;YACd,aAAa,EAAE,uKAAuK;YACtL,MAAM,EAAE,QAAQ;YAChB,eAAe,EAAE,CAAC;YAClB,sBAAsB,EAAE,IAAI;YAC5B,eAAe,EAAE;gBACf,SAAS,EAAE,mCAAmC;aAC/C;SACF;KACF;CACO,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,cAAc;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/_shared/0.1/admission.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Shared types for direct admission: vtc/members/admit (an administrator admits a DID without a join request) and vtc/members/make-membership (an administrator gives an existing access-control entry with no member record the membership a completed join would have given it). Both answer with the same record of the membership admitted, so it lives here. Not itself a Trust Task specification (the `_shared` folder is skipped by the registry build and the codegen).
|
|
7
|
+
*/
|
|
8
|
+
export interface VTCSharedDirectAdmissionDefinitions {
|
|
9
|
+
[k: string]: unknown | undefined;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The definitions this shared schema publishes, hoisted to one declaration each.
|
|
13
|
+
* See "../../../_shared/components.js".
|
|
14
|
+
*/
|
|
15
|
+
export type { AdmittedMembership, Approval } from "../../../_shared/components.js";
|
|
16
|
+
//# sourceMappingURL=admission.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admission.d.ts","sourceRoot":"","sources":["../../../../src/vtc/_shared/0.1/admission.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AAED;;;GAGG;AACH,YAAY,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admission.js","sourceRoot":"","sources":["../../../../src/vtc/_shared/0.1/admission.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,481 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/members/admit/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { AdmittedMembership, Approval, Ext } from "../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* Success response to vtc/members/admit/0.1: the membership as admitted, with the credentials issued for it. Type https://trusttasks.org/spec/vtc/members/admit/0.1#response — carried directly, or on the request's threadId when a referred operation executes after its approval.
|
|
8
|
+
*/
|
|
9
|
+
export type VTCMembersAdmitResponsePayload = AdmittedMembership;
|
|
10
|
+
/**
|
|
11
|
+
* An administrator admits a DID as a member of the community without a join request, at a community role it names.
|
|
12
|
+
*/
|
|
13
|
+
export interface VTCMembersAdmitPayload {
|
|
14
|
+
/**
|
|
15
|
+
* The DID to admit. It holds no access-control entry at the community, or only one of the `application` community role (a non-member holding resource grants), and no live membership.
|
|
16
|
+
*/
|
|
17
|
+
subject: string;
|
|
18
|
+
/**
|
|
19
|
+
* The community role the membership will hold, in the community's wire form (`member`, `moderator`, `issuer`, `custom:<name>`). Required, so that what an approver is shown is what was asked for. Never `admin`, never `application`, and never a role whose authority would confer authority-conferring capabilities; a role other than `member` is subject to the role-assignment rules of Conformance item 3.
|
|
20
|
+
*/
|
|
21
|
+
role: string;
|
|
22
|
+
/**
|
|
23
|
+
* A human-readable label for the new access-control entry, as `acl/grant` carries one. Confers nothing. Not blank.
|
|
24
|
+
*/
|
|
25
|
+
label?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Why, for the community's audit trail and for the administrators asked to approve it if the admission is referred. Never published to the subject or beyond the community.
|
|
28
|
+
*/
|
|
29
|
+
reason?: string;
|
|
30
|
+
ext?: Ext;
|
|
31
|
+
}
|
|
32
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
33
|
+
export type { AdmittedMembership, Approval, Ext };
|
|
34
|
+
/** Trust Task type URI. */
|
|
35
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/members/admit/0.1";
|
|
36
|
+
/** Stable alias for this specification's request payload shape. */
|
|
37
|
+
export type Payload = VTCMembersAdmitPayload;
|
|
38
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
39
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vtc/members/admit/0.1#response";
|
|
40
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
41
|
+
export type Response = VTCMembersAdmitResponsePayload;
|
|
42
|
+
/**
|
|
43
|
+
* This specification's payload schema, as a value.
|
|
44
|
+
*
|
|
45
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
46
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
47
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
48
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
49
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
50
|
+
*/
|
|
51
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
52
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
53
|
+
readonly $id: "https://trusttasks.org/spec/vtc/members/admit/0.1";
|
|
54
|
+
readonly title: "VTC Members Admit — payload";
|
|
55
|
+
readonly description: "An administrator admits a DID as a member of the community without a join request, at a community role it names.";
|
|
56
|
+
readonly type: "object";
|
|
57
|
+
readonly additionalProperties: false;
|
|
58
|
+
readonly required: readonly ["subject", "role"];
|
|
59
|
+
readonly properties: {
|
|
60
|
+
readonly subject: {
|
|
61
|
+
readonly type: "string";
|
|
62
|
+
readonly pattern: "^did:";
|
|
63
|
+
readonly maxLength: 2048;
|
|
64
|
+
readonly description: "The DID to admit. It holds no access-control entry at the community, or only one of the `application` community role (a non-member holding resource grants), and no live membership.";
|
|
65
|
+
};
|
|
66
|
+
readonly role: {
|
|
67
|
+
readonly type: "string";
|
|
68
|
+
readonly minLength: 1;
|
|
69
|
+
readonly maxLength: 128;
|
|
70
|
+
readonly description: "The community role the membership will hold, in the community's wire form (`member`, `moderator`, `issuer`, `custom:<name>`). Required, so that what an approver is shown is what was asked for. Never `admin`, never `application`, and never a role whose authority would confer authority-conferring capabilities; a role other than `member` is subject to the role-assignment rules of Conformance item 3.";
|
|
71
|
+
};
|
|
72
|
+
readonly label: {
|
|
73
|
+
readonly type: "string";
|
|
74
|
+
readonly minLength: 1;
|
|
75
|
+
readonly maxLength: 256;
|
|
76
|
+
readonly pattern: "\\S";
|
|
77
|
+
readonly description: "A human-readable label for the new access-control entry, as `acl/grant` carries one. Confers nothing. Not blank.";
|
|
78
|
+
};
|
|
79
|
+
readonly reason: {
|
|
80
|
+
readonly type: "string";
|
|
81
|
+
readonly maxLength: 1024;
|
|
82
|
+
readonly description: "Why, for the community's audit trail and for the administrators asked to approve it if the admission is referred. Never published to the subject or beyond the community.";
|
|
83
|
+
};
|
|
84
|
+
readonly ext: {
|
|
85
|
+
readonly $ref: "#/$defs/Ext";
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
readonly $defs: {
|
|
89
|
+
readonly Response: {
|
|
90
|
+
readonly $anchor: "response";
|
|
91
|
+
readonly title: "VTC Members Admit — response payload";
|
|
92
|
+
readonly description: "Success response to vtc/members/admit/0.1: the membership as admitted, with the credentials issued for it. Type https://trusttasks.org/spec/vtc/members/admit/0.1#response — carried directly, or on the request's threadId when a referred operation executes after its approval.";
|
|
93
|
+
readonly $ref: "#/$defs/AdmittedMembership";
|
|
94
|
+
readonly unevaluatedProperties: false;
|
|
95
|
+
};
|
|
96
|
+
readonly AdmittedMembership: {
|
|
97
|
+
readonly title: "AdmittedMembership";
|
|
98
|
+
readonly description: "A membership admitted directly, with the credentials issued for it — the success payload of vtc/members/admit and vtc/members/make-membership.";
|
|
99
|
+
readonly type: "object";
|
|
100
|
+
readonly additionalProperties: false;
|
|
101
|
+
readonly required: readonly ["subject", "role", "status", "returning", "approval", "statusListIndex", "vmc", "roleVac"];
|
|
102
|
+
readonly properties: {
|
|
103
|
+
readonly subject: {
|
|
104
|
+
readonly type: "string";
|
|
105
|
+
readonly pattern: "^did:";
|
|
106
|
+
readonly maxLength: 2048;
|
|
107
|
+
readonly description: "The DID admitted.";
|
|
108
|
+
};
|
|
109
|
+
readonly role: {
|
|
110
|
+
readonly type: "string";
|
|
111
|
+
readonly minLength: 1;
|
|
112
|
+
readonly maxLength: 128;
|
|
113
|
+
readonly description: "The community role the membership holds: for vtc/members/admit the one requested, for vtc/members/make-membership the role the entry already held.";
|
|
114
|
+
};
|
|
115
|
+
readonly label: {
|
|
116
|
+
readonly type: "string";
|
|
117
|
+
readonly minLength: 1;
|
|
118
|
+
readonly maxLength: 256;
|
|
119
|
+
readonly description: "The new entry's label, when vtc/members/admit was given one. Absent for vtc/members/make-membership, which writes no entry.";
|
|
120
|
+
};
|
|
121
|
+
readonly status: {
|
|
122
|
+
readonly type: "string";
|
|
123
|
+
readonly enum: readonly ["admitted"];
|
|
124
|
+
readonly description: "Always `admitted`: a refusal is a trust-task-error, and a referred admission is answered with trust-task-next-step until it executes.";
|
|
125
|
+
};
|
|
126
|
+
readonly returning: {
|
|
127
|
+
readonly type: "boolean";
|
|
128
|
+
readonly description: "True when vtc/members/admit re-admitted a former member (a removed member record, no entry), as a rejoin would re-admit them. Always false for vtc/members/make-membership, which refuses a removed record.";
|
|
129
|
+
};
|
|
130
|
+
readonly approval: {
|
|
131
|
+
readonly $ref: "#/$defs/Approval";
|
|
132
|
+
};
|
|
133
|
+
readonly statusListIndex: {
|
|
134
|
+
readonly type: "integer";
|
|
135
|
+
readonly minimum: 0;
|
|
136
|
+
readonly description: "The membership's slot on the community's revocation status list, which the VMC's credentialStatus names.";
|
|
137
|
+
};
|
|
138
|
+
readonly vmc: {
|
|
139
|
+
readonly type: "object";
|
|
140
|
+
readonly description: "The Verifiable Membership Credential issued for the admission, delivered inline as vtc/join-requests/decide delivers it.";
|
|
141
|
+
};
|
|
142
|
+
readonly roleVac: {
|
|
143
|
+
readonly type: "object";
|
|
144
|
+
readonly description: "The role credential issued for the admission: a Verifiable Authority Credential issued by the community whose `credentialSubject.authority` is `{ scope: <community DID>, actions: [\"role:<name>\"] }`, the shape vtc/join-requests/decide returns.";
|
|
145
|
+
};
|
|
146
|
+
readonly ext: {
|
|
147
|
+
readonly $ref: "#/$defs/Ext";
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
readonly Approval: {
|
|
152
|
+
readonly title: "Approval";
|
|
153
|
+
readonly type: "string";
|
|
154
|
+
readonly enum: readonly ["policyAllowed", "approved", "waived"];
|
|
155
|
+
readonly description: "How the admission came to execute. `policyAllowed`: the community's policy admitted it at once. `approved`: the policy referred it, the community parked it, and another administrator approved it. `waived`: the policy referred it, and the community's single-administrator mode waived the approval on the requester's own re-authentication bound to the operation.";
|
|
156
|
+
};
|
|
157
|
+
readonly Ext: {
|
|
158
|
+
readonly title: "Ext";
|
|
159
|
+
readonly 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.";
|
|
160
|
+
readonly type: "object";
|
|
161
|
+
readonly minProperties: 1;
|
|
162
|
+
readonly additionalProperties: true;
|
|
163
|
+
readonly propertyNames: {
|
|
164
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
170
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
171
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
172
|
+
readonly $ref: "#/$defs/Response";
|
|
173
|
+
readonly $defs: {
|
|
174
|
+
readonly Response: {
|
|
175
|
+
readonly $anchor: "response";
|
|
176
|
+
readonly title: "VTC Members Admit — response payload";
|
|
177
|
+
readonly description: "Success response to vtc/members/admit/0.1: the membership as admitted, with the credentials issued for it. Type https://trusttasks.org/spec/vtc/members/admit/0.1#response — carried directly, or on the request's threadId when a referred operation executes after its approval.";
|
|
178
|
+
readonly $ref: "#/$defs/AdmittedMembership";
|
|
179
|
+
readonly unevaluatedProperties: false;
|
|
180
|
+
};
|
|
181
|
+
readonly AdmittedMembership: {
|
|
182
|
+
readonly title: "AdmittedMembership";
|
|
183
|
+
readonly description: "A membership admitted directly, with the credentials issued for it — the success payload of vtc/members/admit and vtc/members/make-membership.";
|
|
184
|
+
readonly type: "object";
|
|
185
|
+
readonly additionalProperties: false;
|
|
186
|
+
readonly required: readonly ["subject", "role", "status", "returning", "approval", "statusListIndex", "vmc", "roleVac"];
|
|
187
|
+
readonly properties: {
|
|
188
|
+
readonly subject: {
|
|
189
|
+
readonly type: "string";
|
|
190
|
+
readonly pattern: "^did:";
|
|
191
|
+
readonly maxLength: 2048;
|
|
192
|
+
readonly description: "The DID admitted.";
|
|
193
|
+
};
|
|
194
|
+
readonly role: {
|
|
195
|
+
readonly type: "string";
|
|
196
|
+
readonly minLength: 1;
|
|
197
|
+
readonly maxLength: 128;
|
|
198
|
+
readonly description: "The community role the membership holds: for vtc/members/admit the one requested, for vtc/members/make-membership the role the entry already held.";
|
|
199
|
+
};
|
|
200
|
+
readonly label: {
|
|
201
|
+
readonly type: "string";
|
|
202
|
+
readonly minLength: 1;
|
|
203
|
+
readonly maxLength: 256;
|
|
204
|
+
readonly description: "The new entry's label, when vtc/members/admit was given one. Absent for vtc/members/make-membership, which writes no entry.";
|
|
205
|
+
};
|
|
206
|
+
readonly status: {
|
|
207
|
+
readonly type: "string";
|
|
208
|
+
readonly enum: readonly ["admitted"];
|
|
209
|
+
readonly description: "Always `admitted`: a refusal is a trust-task-error, and a referred admission is answered with trust-task-next-step until it executes.";
|
|
210
|
+
};
|
|
211
|
+
readonly returning: {
|
|
212
|
+
readonly type: "boolean";
|
|
213
|
+
readonly description: "True when vtc/members/admit re-admitted a former member (a removed member record, no entry), as a rejoin would re-admit them. Always false for vtc/members/make-membership, which refuses a removed record.";
|
|
214
|
+
};
|
|
215
|
+
readonly approval: {
|
|
216
|
+
readonly $ref: "#/$defs/Approval";
|
|
217
|
+
};
|
|
218
|
+
readonly statusListIndex: {
|
|
219
|
+
readonly type: "integer";
|
|
220
|
+
readonly minimum: 0;
|
|
221
|
+
readonly description: "The membership's slot on the community's revocation status list, which the VMC's credentialStatus names.";
|
|
222
|
+
};
|
|
223
|
+
readonly vmc: {
|
|
224
|
+
readonly type: "object";
|
|
225
|
+
readonly description: "The Verifiable Membership Credential issued for the admission, delivered inline as vtc/join-requests/decide delivers it.";
|
|
226
|
+
};
|
|
227
|
+
readonly roleVac: {
|
|
228
|
+
readonly type: "object";
|
|
229
|
+
readonly description: "The role credential issued for the admission: a Verifiable Authority Credential issued by the community whose `credentialSubject.authority` is `{ scope: <community DID>, actions: [\"role:<name>\"] }`, the shape vtc/join-requests/decide returns.";
|
|
230
|
+
};
|
|
231
|
+
readonly ext: {
|
|
232
|
+
readonly $ref: "#/$defs/Ext";
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
readonly Approval: {
|
|
237
|
+
readonly title: "Approval";
|
|
238
|
+
readonly type: "string";
|
|
239
|
+
readonly enum: readonly ["policyAllowed", "approved", "waived"];
|
|
240
|
+
readonly description: "How the admission came to execute. `policyAllowed`: the community's policy admitted it at once. `approved`: the policy referred it, the community parked it, and another administrator approved it. `waived`: the policy referred it, and the community's single-administrator mode waived the approval on the requester's own re-authentication bound to the operation.";
|
|
241
|
+
};
|
|
242
|
+
readonly Ext: {
|
|
243
|
+
readonly title: "Ext";
|
|
244
|
+
readonly 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.";
|
|
245
|
+
readonly type: "object";
|
|
246
|
+
readonly minProperties: 1;
|
|
247
|
+
readonly additionalProperties: true;
|
|
248
|
+
readonly propertyNames: {
|
|
249
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
256
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
257
|
+
* per-specification and cannot be derived from the document alone, and
|
|
258
|
+
* item 2 needs the schema this carries.
|
|
259
|
+
*/
|
|
260
|
+
export declare const SPEC: {
|
|
261
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/members/admit/0.1";
|
|
262
|
+
readonly isBearer: false;
|
|
263
|
+
readonly isProofRequired: true;
|
|
264
|
+
readonly isRecipientRequired: true;
|
|
265
|
+
readonly isIssuedAtRequired: true;
|
|
266
|
+
readonly payloadSchema: {
|
|
267
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
268
|
+
readonly $id: "https://trusttasks.org/spec/vtc/members/admit/0.1";
|
|
269
|
+
readonly title: "VTC Members Admit — payload";
|
|
270
|
+
readonly description: "An administrator admits a DID as a member of the community without a join request, at a community role it names.";
|
|
271
|
+
readonly type: "object";
|
|
272
|
+
readonly additionalProperties: false;
|
|
273
|
+
readonly required: readonly ["subject", "role"];
|
|
274
|
+
readonly properties: {
|
|
275
|
+
readonly subject: {
|
|
276
|
+
readonly type: "string";
|
|
277
|
+
readonly pattern: "^did:";
|
|
278
|
+
readonly maxLength: 2048;
|
|
279
|
+
readonly description: "The DID to admit. It holds no access-control entry at the community, or only one of the `application` community role (a non-member holding resource grants), and no live membership.";
|
|
280
|
+
};
|
|
281
|
+
readonly role: {
|
|
282
|
+
readonly type: "string";
|
|
283
|
+
readonly minLength: 1;
|
|
284
|
+
readonly maxLength: 128;
|
|
285
|
+
readonly description: "The community role the membership will hold, in the community's wire form (`member`, `moderator`, `issuer`, `custom:<name>`). Required, so that what an approver is shown is what was asked for. Never `admin`, never `application`, and never a role whose authority would confer authority-conferring capabilities; a role other than `member` is subject to the role-assignment rules of Conformance item 3.";
|
|
286
|
+
};
|
|
287
|
+
readonly label: {
|
|
288
|
+
readonly type: "string";
|
|
289
|
+
readonly minLength: 1;
|
|
290
|
+
readonly maxLength: 256;
|
|
291
|
+
readonly pattern: "\\S";
|
|
292
|
+
readonly description: "A human-readable label for the new access-control entry, as `acl/grant` carries one. Confers nothing. Not blank.";
|
|
293
|
+
};
|
|
294
|
+
readonly reason: {
|
|
295
|
+
readonly type: "string";
|
|
296
|
+
readonly maxLength: 1024;
|
|
297
|
+
readonly description: "Why, for the community's audit trail and for the administrators asked to approve it if the admission is referred. Never published to the subject or beyond the community.";
|
|
298
|
+
};
|
|
299
|
+
readonly ext: {
|
|
300
|
+
readonly $ref: "#/$defs/Ext";
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
readonly $defs: {
|
|
304
|
+
readonly Response: {
|
|
305
|
+
readonly $anchor: "response";
|
|
306
|
+
readonly title: "VTC Members Admit — response payload";
|
|
307
|
+
readonly description: "Success response to vtc/members/admit/0.1: the membership as admitted, with the credentials issued for it. Type https://trusttasks.org/spec/vtc/members/admit/0.1#response — carried directly, or on the request's threadId when a referred operation executes after its approval.";
|
|
308
|
+
readonly $ref: "#/$defs/AdmittedMembership";
|
|
309
|
+
readonly unevaluatedProperties: false;
|
|
310
|
+
};
|
|
311
|
+
readonly AdmittedMembership: {
|
|
312
|
+
readonly title: "AdmittedMembership";
|
|
313
|
+
readonly description: "A membership admitted directly, with the credentials issued for it — the success payload of vtc/members/admit and vtc/members/make-membership.";
|
|
314
|
+
readonly type: "object";
|
|
315
|
+
readonly additionalProperties: false;
|
|
316
|
+
readonly required: readonly ["subject", "role", "status", "returning", "approval", "statusListIndex", "vmc", "roleVac"];
|
|
317
|
+
readonly properties: {
|
|
318
|
+
readonly subject: {
|
|
319
|
+
readonly type: "string";
|
|
320
|
+
readonly pattern: "^did:";
|
|
321
|
+
readonly maxLength: 2048;
|
|
322
|
+
readonly description: "The DID admitted.";
|
|
323
|
+
};
|
|
324
|
+
readonly role: {
|
|
325
|
+
readonly type: "string";
|
|
326
|
+
readonly minLength: 1;
|
|
327
|
+
readonly maxLength: 128;
|
|
328
|
+
readonly description: "The community role the membership holds: for vtc/members/admit the one requested, for vtc/members/make-membership the role the entry already held.";
|
|
329
|
+
};
|
|
330
|
+
readonly label: {
|
|
331
|
+
readonly type: "string";
|
|
332
|
+
readonly minLength: 1;
|
|
333
|
+
readonly maxLength: 256;
|
|
334
|
+
readonly description: "The new entry's label, when vtc/members/admit was given one. Absent for vtc/members/make-membership, which writes no entry.";
|
|
335
|
+
};
|
|
336
|
+
readonly status: {
|
|
337
|
+
readonly type: "string";
|
|
338
|
+
readonly enum: readonly ["admitted"];
|
|
339
|
+
readonly description: "Always `admitted`: a refusal is a trust-task-error, and a referred admission is answered with trust-task-next-step until it executes.";
|
|
340
|
+
};
|
|
341
|
+
readonly returning: {
|
|
342
|
+
readonly type: "boolean";
|
|
343
|
+
readonly description: "True when vtc/members/admit re-admitted a former member (a removed member record, no entry), as a rejoin would re-admit them. Always false for vtc/members/make-membership, which refuses a removed record.";
|
|
344
|
+
};
|
|
345
|
+
readonly approval: {
|
|
346
|
+
readonly $ref: "#/$defs/Approval";
|
|
347
|
+
};
|
|
348
|
+
readonly statusListIndex: {
|
|
349
|
+
readonly type: "integer";
|
|
350
|
+
readonly minimum: 0;
|
|
351
|
+
readonly description: "The membership's slot on the community's revocation status list, which the VMC's credentialStatus names.";
|
|
352
|
+
};
|
|
353
|
+
readonly vmc: {
|
|
354
|
+
readonly type: "object";
|
|
355
|
+
readonly description: "The Verifiable Membership Credential issued for the admission, delivered inline as vtc/join-requests/decide delivers it.";
|
|
356
|
+
};
|
|
357
|
+
readonly roleVac: {
|
|
358
|
+
readonly type: "object";
|
|
359
|
+
readonly description: "The role credential issued for the admission: a Verifiable Authority Credential issued by the community whose `credentialSubject.authority` is `{ scope: <community DID>, actions: [\"role:<name>\"] }`, the shape vtc/join-requests/decide returns.";
|
|
360
|
+
};
|
|
361
|
+
readonly ext: {
|
|
362
|
+
readonly $ref: "#/$defs/Ext";
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
readonly Approval: {
|
|
367
|
+
readonly title: "Approval";
|
|
368
|
+
readonly type: "string";
|
|
369
|
+
readonly enum: readonly ["policyAllowed", "approved", "waived"];
|
|
370
|
+
readonly description: "How the admission came to execute. `policyAllowed`: the community's policy admitted it at once. `approved`: the policy referred it, the community parked it, and another administrator approved it. `waived`: the policy referred it, and the community's single-administrator mode waived the approval on the requester's own re-authentication bound to the operation.";
|
|
371
|
+
};
|
|
372
|
+
readonly Ext: {
|
|
373
|
+
readonly title: "Ext";
|
|
374
|
+
readonly 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.";
|
|
375
|
+
readonly type: "object";
|
|
376
|
+
readonly minProperties: 1;
|
|
377
|
+
readonly additionalProperties: true;
|
|
378
|
+
readonly propertyNames: {
|
|
379
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
};
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
/**
|
|
386
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
387
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
388
|
+
* parties (§7.3 item 5).
|
|
389
|
+
*/
|
|
390
|
+
export declare const RESPONSE_SPEC: {
|
|
391
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/members/admit/0.1#response";
|
|
392
|
+
readonly isBearer: false;
|
|
393
|
+
readonly isProofRequired: true;
|
|
394
|
+
readonly isRecipientRequired: true;
|
|
395
|
+
readonly isIssuedAtRequired: true;
|
|
396
|
+
readonly payloadSchema: {
|
|
397
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
398
|
+
readonly $ref: "#/$defs/Response";
|
|
399
|
+
readonly $defs: {
|
|
400
|
+
readonly Response: {
|
|
401
|
+
readonly $anchor: "response";
|
|
402
|
+
readonly title: "VTC Members Admit — response payload";
|
|
403
|
+
readonly description: "Success response to vtc/members/admit/0.1: the membership as admitted, with the credentials issued for it. Type https://trusttasks.org/spec/vtc/members/admit/0.1#response — carried directly, or on the request's threadId when a referred operation executes after its approval.";
|
|
404
|
+
readonly $ref: "#/$defs/AdmittedMembership";
|
|
405
|
+
readonly unevaluatedProperties: false;
|
|
406
|
+
};
|
|
407
|
+
readonly AdmittedMembership: {
|
|
408
|
+
readonly title: "AdmittedMembership";
|
|
409
|
+
readonly description: "A membership admitted directly, with the credentials issued for it — the success payload of vtc/members/admit and vtc/members/make-membership.";
|
|
410
|
+
readonly type: "object";
|
|
411
|
+
readonly additionalProperties: false;
|
|
412
|
+
readonly required: readonly ["subject", "role", "status", "returning", "approval", "statusListIndex", "vmc", "roleVac"];
|
|
413
|
+
readonly properties: {
|
|
414
|
+
readonly subject: {
|
|
415
|
+
readonly type: "string";
|
|
416
|
+
readonly pattern: "^did:";
|
|
417
|
+
readonly maxLength: 2048;
|
|
418
|
+
readonly description: "The DID admitted.";
|
|
419
|
+
};
|
|
420
|
+
readonly role: {
|
|
421
|
+
readonly type: "string";
|
|
422
|
+
readonly minLength: 1;
|
|
423
|
+
readonly maxLength: 128;
|
|
424
|
+
readonly description: "The community role the membership holds: for vtc/members/admit the one requested, for vtc/members/make-membership the role the entry already held.";
|
|
425
|
+
};
|
|
426
|
+
readonly label: {
|
|
427
|
+
readonly type: "string";
|
|
428
|
+
readonly minLength: 1;
|
|
429
|
+
readonly maxLength: 256;
|
|
430
|
+
readonly description: "The new entry's label, when vtc/members/admit was given one. Absent for vtc/members/make-membership, which writes no entry.";
|
|
431
|
+
};
|
|
432
|
+
readonly status: {
|
|
433
|
+
readonly type: "string";
|
|
434
|
+
readonly enum: readonly ["admitted"];
|
|
435
|
+
readonly description: "Always `admitted`: a refusal is a trust-task-error, and a referred admission is answered with trust-task-next-step until it executes.";
|
|
436
|
+
};
|
|
437
|
+
readonly returning: {
|
|
438
|
+
readonly type: "boolean";
|
|
439
|
+
readonly description: "True when vtc/members/admit re-admitted a former member (a removed member record, no entry), as a rejoin would re-admit them. Always false for vtc/members/make-membership, which refuses a removed record.";
|
|
440
|
+
};
|
|
441
|
+
readonly approval: {
|
|
442
|
+
readonly $ref: "#/$defs/Approval";
|
|
443
|
+
};
|
|
444
|
+
readonly statusListIndex: {
|
|
445
|
+
readonly type: "integer";
|
|
446
|
+
readonly minimum: 0;
|
|
447
|
+
readonly description: "The membership's slot on the community's revocation status list, which the VMC's credentialStatus names.";
|
|
448
|
+
};
|
|
449
|
+
readonly vmc: {
|
|
450
|
+
readonly type: "object";
|
|
451
|
+
readonly description: "The Verifiable Membership Credential issued for the admission, delivered inline as vtc/join-requests/decide delivers it.";
|
|
452
|
+
};
|
|
453
|
+
readonly roleVac: {
|
|
454
|
+
readonly type: "object";
|
|
455
|
+
readonly description: "The role credential issued for the admission: a Verifiable Authority Credential issued by the community whose `credentialSubject.authority` is `{ scope: <community DID>, actions: [\"role:<name>\"] }`, the shape vtc/join-requests/decide returns.";
|
|
456
|
+
};
|
|
457
|
+
readonly ext: {
|
|
458
|
+
readonly $ref: "#/$defs/Ext";
|
|
459
|
+
};
|
|
460
|
+
};
|
|
461
|
+
};
|
|
462
|
+
readonly Approval: {
|
|
463
|
+
readonly title: "Approval";
|
|
464
|
+
readonly type: "string";
|
|
465
|
+
readonly enum: readonly ["policyAllowed", "approved", "waived"];
|
|
466
|
+
readonly description: "How the admission came to execute. `policyAllowed`: the community's policy admitted it at once. `approved`: the policy referred it, the community parked it, and another administrator approved it. `waived`: the policy referred it, and the community's single-administrator mode waived the approval on the requester's own re-authentication bound to the operation.";
|
|
467
|
+
};
|
|
468
|
+
readonly Ext: {
|
|
469
|
+
readonly title: "Ext";
|
|
470
|
+
readonly 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.";
|
|
471
|
+
readonly type: "object";
|
|
472
|
+
readonly minProperties: 1;
|
|
473
|
+
readonly additionalProperties: true;
|
|
474
|
+
readonly propertyNames: {
|
|
475
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
476
|
+
};
|
|
477
|
+
};
|
|
478
|
+
};
|
|
479
|
+
};
|
|
480
|
+
};
|
|
481
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/vtc/members/admit/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAG3F;;GAEG;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