@openvtc/trust-tasks 0.17.6 → 0.17.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 +114 -0
- package/dist/_shared/components.d.ts +4 -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/_shared/0.1/room.d.ts +1 -1
- package/dist/rooms/_shared/0.1/room.d.ts.map +1 -1
- package/dist/rooms/create/0.1/payload.d.ts +42 -2
- package/dist/rooms/create/0.1/payload.d.ts.map +1 -1
- package/dist/rooms/create/0.1/payload.js +24 -0
- package/dist/rooms/create/0.1/payload.js.map +1 -1
- package/dist/rooms/keys/chain/0.1/payload.d.ts +382 -0
- package/dist/rooms/keys/chain/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/chain/0.1/payload.js +213 -0
- package/dist/rooms/keys/chain/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/list/0.1/payload.d.ts +314 -0
- package/dist/rooms/keys/list/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/list/0.1/payload.js +175 -0
- package/dist/rooms/keys/list/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/seal/0.1/payload.d.ts +352 -0
- package/dist/rooms/keys/seal/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/seal/0.1/payload.js +199 -0
- package/dist/rooms/keys/seal/0.1/payload.js.map +1 -0
- package/dist/rooms/owner/invite/0.1/payload.d.ts +291 -0
- package/dist/rooms/owner/invite/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/invite/0.1/payload.js +158 -0
- package/dist/rooms/owner/invite/0.1/payload.js.map +1 -0
- package/dist/rooms/owner/issue-authority/0.1/payload.d.ts +315 -0
- package/dist/rooms/owner/issue-authority/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/issue-authority/0.1/payload.js +173 -0
- package/dist/rooms/owner/issue-authority/0.1/payload.js.map +1 -0
- package/dist/rooms/owner/issue-membership/0.1/payload.d.ts +291 -0
- package/dist/rooms/owner/issue-membership/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/issue-membership/0.1/payload.js +158 -0
- package/dist/rooms/owner/issue-membership/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +4 -0
- package/src/index.ts +6 -0
- package/src/rooms/_shared/0.1/room.ts +1 -1
- package/src/rooms/create/0.1/payload.ts +30 -2
- package/src/rooms/keys/chain/0.1/payload.ts +262 -0
- package/src/rooms/keys/list/0.1/payload.ts +222 -0
- package/src/rooms/keys/seal/0.1/payload.ts +246 -0
- package/src/rooms/owner/invite/0.1/payload.ts +212 -0
- package/src/rooms/owner/issue-authority/0.1/payload.ts +233 -0
- package/src/rooms/owner/issue-membership/0.1/payload.ts +212 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/rooms/owner/invite/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA6CH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,oDAA6D,CAAC;AAKtF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,6DAAsE,CAAC;AAKxG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,oDAAoD;IAC3D,OAAO,EAAE,8BAA8B;IACvC,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,QAAQ;QACR,cAAc;QACd,SAAS;KACV;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,aAAa,EAAE,0IAA0I;SAC1J;QACD,cAAc,EAAE;YACd,MAAM,EAAE,QAAQ;YAChB,WAAW,EAAE,GAAG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U,EAAE;gBACV,YAAY;gBACZ,cAAc;aACf;YACD,YAAY,EAAE;gBACZ,YAAY,EAAE;oBACZ,MAAM,EAAE,QAAQ;oBAChB,aAAa,EAAE,0DAA0D;iBAC1E;gBACD,cAAc,EAAE;oBACd,MAAM,EAAE,QAAQ;oBAChB,aAAa,EAAE,2JAA2J;iBAC3K;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,315 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/owner/issue-authority/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
6
|
+
export interface RoomsOwnerIssueAuthorityPayload {
|
|
7
|
+
/**
|
|
8
|
+
* The room whose identity issues this credential. The recipient MUST hold a signing key for it — it is signing AS the room, not as itself.
|
|
9
|
+
*/
|
|
10
|
+
roomId: string;
|
|
11
|
+
/**
|
|
12
|
+
* Which held key signs. Named explicitly rather than looked up from `roomId`, because nothing maps a DID to a key it was minted with and inventing that mapping would add a lifecycle to get wrong. A key that is not the room's produces a credential that fails to verify against the room's DID document — loud, and at the first use rather than later.
|
|
13
|
+
*/
|
|
14
|
+
signingKeyId: string;
|
|
15
|
+
/**
|
|
16
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
17
|
+
*/
|
|
18
|
+
ext?: Ext;
|
|
19
|
+
/**
|
|
20
|
+
* The party this grants to. A chain ROOT: the room is the governing party, so this is the grant everything else descends from. A holder narrows their own grant with attenuation instead, which needs no issuer.
|
|
21
|
+
*/
|
|
22
|
+
subject: string;
|
|
23
|
+
/**
|
|
24
|
+
* What the subject may do. MUST NOT be empty — an empty list confers nothing rather than everything, and a schema that allowed it would make the more dangerous reading available to a careless consumer. `curate` is not implied by `write`: pinning, deprecating and retracting are judgements over shared knowledge, not writes.
|
|
25
|
+
*
|
|
26
|
+
* @minItems 1
|
|
27
|
+
*/
|
|
28
|
+
actions: ["read" | "write" | "curate" | "admin", ...("read" | "write" | "curate" | "admin")[]];
|
|
29
|
+
/**
|
|
30
|
+
* When the grant lapses. Changing what a party may do reissues this one small credential and leaves the membership edge alone, which is why the two are separate credentials.
|
|
31
|
+
*/
|
|
32
|
+
validUntil?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Success response to rooms/owner/issue-authority. Type https://trusttasks.org/spec/rooms/owner/issue-authority/0.1#response. The signed VAC, a chain root at the room's scope.
|
|
36
|
+
*/
|
|
37
|
+
export interface RoomsOwnerIssueAuthorityResponsePayload {
|
|
38
|
+
/**
|
|
39
|
+
* The signed Verifiable Authority Credential, serialised.
|
|
40
|
+
*/
|
|
41
|
+
credential: string;
|
|
42
|
+
/**
|
|
43
|
+
* Its `id`.
|
|
44
|
+
*/
|
|
45
|
+
credentialId: string;
|
|
46
|
+
ext?: Ext;
|
|
47
|
+
}
|
|
48
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
49
|
+
export type { Ext };
|
|
50
|
+
/** Trust Task type URI. */
|
|
51
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/owner/issue-authority/0.1";
|
|
52
|
+
/** Stable alias for this specification's request payload shape. */
|
|
53
|
+
export type Payload = RoomsOwnerIssueAuthorityPayload;
|
|
54
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
55
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/rooms/owner/issue-authority/0.1#response";
|
|
56
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
57
|
+
export type Response = RoomsOwnerIssueAuthorityResponsePayload;
|
|
58
|
+
/**
|
|
59
|
+
* This specification's payload schema, as a value.
|
|
60
|
+
*
|
|
61
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
62
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
63
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
64
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
65
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
66
|
+
*/
|
|
67
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
68
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
69
|
+
readonly $id: "https://trusttasks.org/spec/rooms/owner/issue-authority/0.1";
|
|
70
|
+
readonly title: "Rooms Owner Issue Authority — payload";
|
|
71
|
+
readonly type: "object";
|
|
72
|
+
readonly additionalProperties: false;
|
|
73
|
+
readonly required: readonly ["roomId", "signingKeyId", "subject", "actions"];
|
|
74
|
+
readonly properties: {
|
|
75
|
+
readonly roomId: {
|
|
76
|
+
readonly type: "string";
|
|
77
|
+
readonly description: "The room whose identity issues this credential. The recipient MUST hold a signing key for it — it is signing AS the room, not as itself.";
|
|
78
|
+
};
|
|
79
|
+
readonly signingKeyId: {
|
|
80
|
+
readonly type: "string";
|
|
81
|
+
readonly maxLength: 256;
|
|
82
|
+
readonly description: "Which held key signs. Named explicitly rather than looked up from `roomId`, because nothing maps a DID to a key it was minted with and inventing that mapping would add a lifecycle to get wrong. A key that is not the room's produces a credential that fails to verify against the room's DID document — loud, and at the first use rather than later.";
|
|
83
|
+
};
|
|
84
|
+
readonly ext: {
|
|
85
|
+
readonly $ref: "#/$defs/Ext";
|
|
86
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
87
|
+
};
|
|
88
|
+
readonly subject: {
|
|
89
|
+
readonly type: "string";
|
|
90
|
+
readonly description: "The party this grants to. A chain ROOT: the room is the governing party, so this is the grant everything else descends from. A holder narrows their own grant with attenuation instead, which needs no issuer.";
|
|
91
|
+
};
|
|
92
|
+
readonly actions: {
|
|
93
|
+
readonly type: "array";
|
|
94
|
+
readonly minItems: 1;
|
|
95
|
+
readonly items: {
|
|
96
|
+
readonly type: "string";
|
|
97
|
+
readonly enum: readonly ["read", "write", "curate", "admin"];
|
|
98
|
+
};
|
|
99
|
+
readonly description: "What the subject may do. MUST NOT be empty — an empty list confers nothing rather than everything, and a schema that allowed it would make the more dangerous reading available to a careless consumer. `curate` is not implied by `write`: pinning, deprecating and retracting are judgements over shared knowledge, not writes.";
|
|
100
|
+
};
|
|
101
|
+
readonly validUntil: {
|
|
102
|
+
readonly type: "string";
|
|
103
|
+
readonly format: "date-time";
|
|
104
|
+
readonly description: "When the grant lapses. Changing what a party may do reissues this one small credential and leaves the membership edge alone, which is why the two are separate credentials.";
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
readonly $defs: {
|
|
108
|
+
readonly Response: {
|
|
109
|
+
readonly $anchor: "response";
|
|
110
|
+
readonly title: "Rooms Owner Issue Authority — response payload";
|
|
111
|
+
readonly description: "Success response to rooms/owner/issue-authority. Type https://trusttasks.org/spec/rooms/owner/issue-authority/0.1#response. The signed VAC, a chain root at the room's scope.";
|
|
112
|
+
readonly type: "object";
|
|
113
|
+
readonly additionalProperties: false;
|
|
114
|
+
readonly required: readonly ["credential", "credentialId"];
|
|
115
|
+
readonly properties: {
|
|
116
|
+
readonly credential: {
|
|
117
|
+
readonly type: "string";
|
|
118
|
+
readonly description: "The signed Verifiable Authority Credential, serialised.";
|
|
119
|
+
};
|
|
120
|
+
readonly credentialId: {
|
|
121
|
+
readonly type: "string";
|
|
122
|
+
readonly description: "Its `id`.";
|
|
123
|
+
};
|
|
124
|
+
readonly ext: {
|
|
125
|
+
readonly $ref: "#/$defs/Ext";
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
readonly Ext: {
|
|
130
|
+
readonly title: "Ext";
|
|
131
|
+
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.";
|
|
132
|
+
readonly type: "object";
|
|
133
|
+
readonly minProperties: 1;
|
|
134
|
+
readonly additionalProperties: true;
|
|
135
|
+
readonly propertyNames: {
|
|
136
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
142
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
143
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
144
|
+
readonly $ref: "#/$defs/Response";
|
|
145
|
+
readonly $defs: {
|
|
146
|
+
readonly Response: {
|
|
147
|
+
readonly $anchor: "response";
|
|
148
|
+
readonly title: "Rooms Owner Issue Authority — response payload";
|
|
149
|
+
readonly description: "Success response to rooms/owner/issue-authority. Type https://trusttasks.org/spec/rooms/owner/issue-authority/0.1#response. The signed VAC, a chain root at the room's scope.";
|
|
150
|
+
readonly type: "object";
|
|
151
|
+
readonly additionalProperties: false;
|
|
152
|
+
readonly required: readonly ["credential", "credentialId"];
|
|
153
|
+
readonly properties: {
|
|
154
|
+
readonly credential: {
|
|
155
|
+
readonly type: "string";
|
|
156
|
+
readonly description: "The signed Verifiable Authority Credential, serialised.";
|
|
157
|
+
};
|
|
158
|
+
readonly credentialId: {
|
|
159
|
+
readonly type: "string";
|
|
160
|
+
readonly description: "Its `id`.";
|
|
161
|
+
};
|
|
162
|
+
readonly ext: {
|
|
163
|
+
readonly $ref: "#/$defs/Ext";
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
readonly Ext: {
|
|
168
|
+
readonly title: "Ext";
|
|
169
|
+
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.";
|
|
170
|
+
readonly type: "object";
|
|
171
|
+
readonly minProperties: 1;
|
|
172
|
+
readonly additionalProperties: true;
|
|
173
|
+
readonly propertyNames: {
|
|
174
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
181
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
182
|
+
* per-specification and cannot be derived from the document alone, and
|
|
183
|
+
* item 2 needs the schema this carries.
|
|
184
|
+
*/
|
|
185
|
+
export declare const SPEC: {
|
|
186
|
+
readonly typeUri: "https://trusttasks.org/spec/rooms/owner/issue-authority/0.1";
|
|
187
|
+
readonly isBearer: false;
|
|
188
|
+
readonly isProofRequired: true;
|
|
189
|
+
readonly isRecipientRequired: true;
|
|
190
|
+
readonly isIssuedAtRequired: true;
|
|
191
|
+
readonly payloadSchema: {
|
|
192
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
193
|
+
readonly $id: "https://trusttasks.org/spec/rooms/owner/issue-authority/0.1";
|
|
194
|
+
readonly title: "Rooms Owner Issue Authority — payload";
|
|
195
|
+
readonly type: "object";
|
|
196
|
+
readonly additionalProperties: false;
|
|
197
|
+
readonly required: readonly ["roomId", "signingKeyId", "subject", "actions"];
|
|
198
|
+
readonly properties: {
|
|
199
|
+
readonly roomId: {
|
|
200
|
+
readonly type: "string";
|
|
201
|
+
readonly description: "The room whose identity issues this credential. The recipient MUST hold a signing key for it — it is signing AS the room, not as itself.";
|
|
202
|
+
};
|
|
203
|
+
readonly signingKeyId: {
|
|
204
|
+
readonly type: "string";
|
|
205
|
+
readonly maxLength: 256;
|
|
206
|
+
readonly description: "Which held key signs. Named explicitly rather than looked up from `roomId`, because nothing maps a DID to a key it was minted with and inventing that mapping would add a lifecycle to get wrong. A key that is not the room's produces a credential that fails to verify against the room's DID document — loud, and at the first use rather than later.";
|
|
207
|
+
};
|
|
208
|
+
readonly ext: {
|
|
209
|
+
readonly $ref: "#/$defs/Ext";
|
|
210
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
211
|
+
};
|
|
212
|
+
readonly subject: {
|
|
213
|
+
readonly type: "string";
|
|
214
|
+
readonly description: "The party this grants to. A chain ROOT: the room is the governing party, so this is the grant everything else descends from. A holder narrows their own grant with attenuation instead, which needs no issuer.";
|
|
215
|
+
};
|
|
216
|
+
readonly actions: {
|
|
217
|
+
readonly type: "array";
|
|
218
|
+
readonly minItems: 1;
|
|
219
|
+
readonly items: {
|
|
220
|
+
readonly type: "string";
|
|
221
|
+
readonly enum: readonly ["read", "write", "curate", "admin"];
|
|
222
|
+
};
|
|
223
|
+
readonly description: "What the subject may do. MUST NOT be empty — an empty list confers nothing rather than everything, and a schema that allowed it would make the more dangerous reading available to a careless consumer. `curate` is not implied by `write`: pinning, deprecating and retracting are judgements over shared knowledge, not writes.";
|
|
224
|
+
};
|
|
225
|
+
readonly validUntil: {
|
|
226
|
+
readonly type: "string";
|
|
227
|
+
readonly format: "date-time";
|
|
228
|
+
readonly description: "When the grant lapses. Changing what a party may do reissues this one small credential and leaves the membership edge alone, which is why the two are separate credentials.";
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
readonly $defs: {
|
|
232
|
+
readonly Response: {
|
|
233
|
+
readonly $anchor: "response";
|
|
234
|
+
readonly title: "Rooms Owner Issue Authority — response payload";
|
|
235
|
+
readonly description: "Success response to rooms/owner/issue-authority. Type https://trusttasks.org/spec/rooms/owner/issue-authority/0.1#response. The signed VAC, a chain root at the room's scope.";
|
|
236
|
+
readonly type: "object";
|
|
237
|
+
readonly additionalProperties: false;
|
|
238
|
+
readonly required: readonly ["credential", "credentialId"];
|
|
239
|
+
readonly properties: {
|
|
240
|
+
readonly credential: {
|
|
241
|
+
readonly type: "string";
|
|
242
|
+
readonly description: "The signed Verifiable Authority Credential, serialised.";
|
|
243
|
+
};
|
|
244
|
+
readonly credentialId: {
|
|
245
|
+
readonly type: "string";
|
|
246
|
+
readonly description: "Its `id`.";
|
|
247
|
+
};
|
|
248
|
+
readonly ext: {
|
|
249
|
+
readonly $ref: "#/$defs/Ext";
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
readonly Ext: {
|
|
254
|
+
readonly title: "Ext";
|
|
255
|
+
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.";
|
|
256
|
+
readonly type: "object";
|
|
257
|
+
readonly minProperties: 1;
|
|
258
|
+
readonly additionalProperties: true;
|
|
259
|
+
readonly propertyNames: {
|
|
260
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
268
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
269
|
+
* parties (§7.3 item 5).
|
|
270
|
+
*/
|
|
271
|
+
export declare const RESPONSE_SPEC: {
|
|
272
|
+
readonly typeUri: "https://trusttasks.org/spec/rooms/owner/issue-authority/0.1#response";
|
|
273
|
+
readonly isBearer: false;
|
|
274
|
+
readonly isProofRequired: true;
|
|
275
|
+
readonly isRecipientRequired: true;
|
|
276
|
+
readonly isIssuedAtRequired: true;
|
|
277
|
+
readonly payloadSchema: {
|
|
278
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
279
|
+
readonly $ref: "#/$defs/Response";
|
|
280
|
+
readonly $defs: {
|
|
281
|
+
readonly Response: {
|
|
282
|
+
readonly $anchor: "response";
|
|
283
|
+
readonly title: "Rooms Owner Issue Authority — response payload";
|
|
284
|
+
readonly description: "Success response to rooms/owner/issue-authority. Type https://trusttasks.org/spec/rooms/owner/issue-authority/0.1#response. The signed VAC, a chain root at the room's scope.";
|
|
285
|
+
readonly type: "object";
|
|
286
|
+
readonly additionalProperties: false;
|
|
287
|
+
readonly required: readonly ["credential", "credentialId"];
|
|
288
|
+
readonly properties: {
|
|
289
|
+
readonly credential: {
|
|
290
|
+
readonly type: "string";
|
|
291
|
+
readonly description: "The signed Verifiable Authority Credential, serialised.";
|
|
292
|
+
};
|
|
293
|
+
readonly credentialId: {
|
|
294
|
+
readonly type: "string";
|
|
295
|
+
readonly description: "Its `id`.";
|
|
296
|
+
};
|
|
297
|
+
readonly ext: {
|
|
298
|
+
readonly $ref: "#/$defs/Ext";
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
readonly Ext: {
|
|
303
|
+
readonly title: "Ext";
|
|
304
|
+
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.";
|
|
305
|
+
readonly type: "object";
|
|
306
|
+
readonly minProperties: 1;
|
|
307
|
+
readonly additionalProperties: true;
|
|
308
|
+
readonly propertyNames: {
|
|
309
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/rooms/owner/issue-authority/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAG7D,MAAM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;IACV;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,OAAO,EAAE,CAAC,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,EAAE,GAAG,CAAC,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;IAC/F;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AACD;;GAEG;AACH,MAAM,WAAW,uCAAuC;IACtD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,GAAG,EAAE,CAAC;AAEpB,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,6DAAsE,CAAC;AAE/F,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,+BAA+B,CAAC;AAEtD,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,sEAA+E,CAAC;AAEjH,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,uCAAuC,CAAC;AAE/D;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsFjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuC1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/owner/issue-authority/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/rooms/owner/issue-authority/0.1";
|
|
7
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
8
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/owner/issue-authority/0.1#response";
|
|
9
|
+
/**
|
|
10
|
+
* This specification's payload schema, as a value.
|
|
11
|
+
*
|
|
12
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
13
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
14
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
15
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
16
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
17
|
+
*/
|
|
18
|
+
export const PAYLOAD_SCHEMA = {
|
|
19
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
20
|
+
"$id": "https://trusttasks.org/spec/rooms/owner/issue-authority/0.1",
|
|
21
|
+
"title": "Rooms Owner Issue Authority — payload",
|
|
22
|
+
"type": "object",
|
|
23
|
+
"additionalProperties": false,
|
|
24
|
+
"required": [
|
|
25
|
+
"roomId",
|
|
26
|
+
"signingKeyId",
|
|
27
|
+
"subject",
|
|
28
|
+
"actions"
|
|
29
|
+
],
|
|
30
|
+
"properties": {
|
|
31
|
+
"roomId": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "The room whose identity issues this credential. The recipient MUST hold a signing key for it — it is signing AS the room, not as itself."
|
|
34
|
+
},
|
|
35
|
+
"signingKeyId": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"maxLength": 256,
|
|
38
|
+
"description": "Which held key signs. Named explicitly rather than looked up from `roomId`, because nothing maps a DID to a key it was minted with and inventing that mapping would add a lifecycle to get wrong. A key that is not the room's produces a credential that fails to verify against the room's DID document — loud, and at the first use rather than later."
|
|
39
|
+
},
|
|
40
|
+
"ext": {
|
|
41
|
+
"$ref": "#/$defs/Ext",
|
|
42
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
43
|
+
},
|
|
44
|
+
"subject": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"description": "The party this grants to. A chain ROOT: the room is the governing party, so this is the grant everything else descends from. A holder narrows their own grant with attenuation instead, which needs no issuer."
|
|
47
|
+
},
|
|
48
|
+
"actions": {
|
|
49
|
+
"type": "array",
|
|
50
|
+
"minItems": 1,
|
|
51
|
+
"items": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"enum": [
|
|
54
|
+
"read",
|
|
55
|
+
"write",
|
|
56
|
+
"curate",
|
|
57
|
+
"admin"
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"description": "What the subject may do. MUST NOT be empty — an empty list confers nothing rather than everything, and a schema that allowed it would make the more dangerous reading available to a careless consumer. `curate` is not implied by `write`: pinning, deprecating and retracting are judgements over shared knowledge, not writes."
|
|
61
|
+
},
|
|
62
|
+
"validUntil": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"format": "date-time",
|
|
65
|
+
"description": "When the grant lapses. Changing what a party may do reissues this one small credential and leaves the membership edge alone, which is why the two are separate credentials."
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"$defs": {
|
|
69
|
+
"Response": {
|
|
70
|
+
"$anchor": "response",
|
|
71
|
+
"title": "Rooms Owner Issue Authority — response payload",
|
|
72
|
+
"description": "Success response to rooms/owner/issue-authority. Type https://trusttasks.org/spec/rooms/owner/issue-authority/0.1#response. The signed VAC, a chain root at the room's scope.",
|
|
73
|
+
"type": "object",
|
|
74
|
+
"additionalProperties": false,
|
|
75
|
+
"required": [
|
|
76
|
+
"credential",
|
|
77
|
+
"credentialId"
|
|
78
|
+
],
|
|
79
|
+
"properties": {
|
|
80
|
+
"credential": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"description": "The signed Verifiable Authority Credential, serialised."
|
|
83
|
+
},
|
|
84
|
+
"credentialId": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"description": "Its `id`."
|
|
87
|
+
},
|
|
88
|
+
"ext": {
|
|
89
|
+
"$ref": "#/$defs/Ext"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"Ext": {
|
|
94
|
+
"title": "Ext",
|
|
95
|
+
"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.",
|
|
96
|
+
"type": "object",
|
|
97
|
+
"minProperties": 1,
|
|
98
|
+
"additionalProperties": true,
|
|
99
|
+
"propertyNames": {
|
|
100
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
106
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
107
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
108
|
+
"$ref": "#/$defs/Response",
|
|
109
|
+
"$defs": {
|
|
110
|
+
"Response": {
|
|
111
|
+
"$anchor": "response",
|
|
112
|
+
"title": "Rooms Owner Issue Authority — response payload",
|
|
113
|
+
"description": "Success response to rooms/owner/issue-authority. Type https://trusttasks.org/spec/rooms/owner/issue-authority/0.1#response. The signed VAC, a chain root at the room's scope.",
|
|
114
|
+
"type": "object",
|
|
115
|
+
"additionalProperties": false,
|
|
116
|
+
"required": [
|
|
117
|
+
"credential",
|
|
118
|
+
"credentialId"
|
|
119
|
+
],
|
|
120
|
+
"properties": {
|
|
121
|
+
"credential": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"description": "The signed Verifiable Authority Credential, serialised."
|
|
124
|
+
},
|
|
125
|
+
"credentialId": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"description": "Its `id`."
|
|
128
|
+
},
|
|
129
|
+
"ext": {
|
|
130
|
+
"$ref": "#/$defs/Ext"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"Ext": {
|
|
135
|
+
"title": "Ext",
|
|
136
|
+
"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.",
|
|
137
|
+
"type": "object",
|
|
138
|
+
"minProperties": 1,
|
|
139
|
+
"additionalProperties": true,
|
|
140
|
+
"propertyNames": {
|
|
141
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
148
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
149
|
+
* per-specification and cannot be derived from the document alone, and
|
|
150
|
+
* item 2 needs the schema this carries.
|
|
151
|
+
*/
|
|
152
|
+
export const SPEC = {
|
|
153
|
+
typeUri: TYPE_URI,
|
|
154
|
+
isBearer: false,
|
|
155
|
+
isProofRequired: true,
|
|
156
|
+
isRecipientRequired: true,
|
|
157
|
+
isIssuedAtRequired: true,
|
|
158
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
162
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
163
|
+
* parties (§7.3 item 5).
|
|
164
|
+
*/
|
|
165
|
+
export const RESPONSE_SPEC = {
|
|
166
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
167
|
+
isBearer: false,
|
|
168
|
+
isProofRequired: true,
|
|
169
|
+
isRecipientRequired: true,
|
|
170
|
+
isIssuedAtRequired: true,
|
|
171
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
172
|
+
};
|
|
173
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/rooms/owner/issue-authority/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmDH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,6DAAsE,CAAC;AAK/F,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,sEAA+E,CAAC;AAKjH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,6DAA6D;IACpE,OAAO,EAAE,uCAAuC;IAChD,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,QAAQ;QACR,cAAc;QACd,SAAS;QACT,SAAS;KACV;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,aAAa,EAAE,0IAA0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