@openvtc/trust-tasks 0.16.7 → 0.16.9
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 +144 -0
- package/dist/_shared/components.d.ts +2 -2
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/device/list/0.1/payload.d.ts +4 -4
- package/dist/device/list/0.1/payload.d.ts.map +1 -1
- package/dist/device/list/0.1/payload.js +6 -2
- package/dist/device/list/0.1/payload.js.map +1 -1
- package/dist/device/list/0.2/payload.d.ts +4 -4
- package/dist/device/list/0.2/payload.d.ts.map +1 -1
- package/dist/device/list/0.2/payload.js +6 -2
- package/dist/device/list/0.2/payload.js.map +1 -1
- package/dist/device/register/0.1/payload.d.ts +4 -4
- package/dist/device/register/0.1/payload.d.ts.map +1 -1
- package/dist/device/register/0.1/payload.js +6 -2
- package/dist/device/register/0.1/payload.js.map +1 -1
- package/dist/device/register/0.2/payload.d.ts +4 -4
- package/dist/device/register/0.2/payload.d.ts.map +1 -1
- package/dist/device/register/0.2/payload.js +6 -2
- package/dist/device/register/0.2/payload.js.map +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/rooms/keys/commit/0.1/payload.d.ts +266 -0
- package/dist/rooms/keys/commit/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/commit/0.1/payload.js +146 -0
- package/dist/rooms/keys/commit/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/key-package/0.1/payload.d.ts +272 -0
- package/dist/rooms/keys/key-package/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/key-package/0.1/payload.js +147 -0
- package/dist/rooms/keys/key-package/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/open/0.1/payload.d.ts +323 -0
- package/dist/rooms/keys/open/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/open/0.1/payload.js +171 -0
- package/dist/rooms/keys/open/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/present/0.1/payload.d.ts +306 -0
- package/dist/rooms/keys/present/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/present/0.1/payload.js +165 -0
- package/dist/rooms/keys/present/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/welcome/0.1/payload.d.ts +276 -0
- package/dist/rooms/keys/welcome/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/welcome/0.1/payload.js +148 -0
- package/dist/rooms/keys/welcome/0.1/payload.js.map +1 -0
- package/dist/rooms/records/curate/0.1/payload.d.ts +500 -0
- package/dist/rooms/records/curate/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/records/curate/0.1/payload.js +277 -0
- package/dist/rooms/records/curate/0.1/payload.js.map +1 -0
- package/dist/vta/backup/abort/1.0/payload.d.ts +262 -0
- package/dist/vta/backup/abort/1.0/payload.d.ts.map +1 -0
- package/dist/vta/backup/abort/1.0/payload.js +146 -0
- package/dist/vta/backup/abort/1.0/payload.js.map +1 -0
- package/dist/vta/backup/complete-export/1.0/payload.d.ts +262 -0
- package/dist/vta/backup/complete-export/1.0/payload.d.ts.map +1 -0
- package/dist/vta/backup/complete-export/1.0/payload.js +146 -0
- package/dist/vta/backup/complete-export/1.0/payload.js.map +1 -0
- package/dist/vta/backup/finalize-import/1.0/payload.d.ts +477 -0
- package/dist/vta/backup/finalize-import/1.0/payload.d.ts.map +1 -0
- package/dist/vta/backup/finalize-import/1.0/payload.js +249 -0
- package/dist/vta/backup/finalize-import/1.0/payload.js.map +1 -0
- package/dist/vta/backup/initiate-export/1.0/payload.d.ts +514 -0
- package/dist/vta/backup/initiate-export/1.0/payload.d.ts.map +1 -0
- package/dist/vta/backup/initiate-export/1.0/payload.js +267 -0
- package/dist/vta/backup/initiate-export/1.0/payload.js.map +1 -0
- package/dist/vta/backup/initiate-import/1.0/payload.d.ts +510 -0
- package/dist/vta/backup/initiate-import/1.0/payload.d.ts.map +1 -0
- package/dist/vta/backup/initiate-import/1.0/payload.js +266 -0
- package/dist/vta/backup/initiate-import/1.0/payload.js.map +1 -0
- package/dist/vta/management/reload-services/1.0/payload.d.ts +230 -0
- package/dist/vta/management/reload-services/1.0/payload.d.ts.map +1 -0
- package/dist/vta/management/reload-services/1.0/payload.js +130 -0
- package/dist/vta/management/reload-services/1.0/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +6 -2
- package/src/device/list/0.1/payload.ts +6 -2
- package/src/device/list/0.2/payload.ts +6 -2
- package/src/device/register/0.1/payload.ts +6 -2
- package/src/device/register/0.2/payload.ts +6 -2
- package/src/index.ts +12 -0
- package/src/rooms/keys/commit/0.1/payload.ts +195 -0
- package/src/rooms/keys/key-package/0.1/payload.ts +196 -0
- package/src/rooms/keys/open/0.1/payload.ts +237 -0
- package/src/rooms/keys/present/0.1/payload.ts +224 -0
- package/src/rooms/keys/welcome/0.1/payload.ts +201 -0
- package/src/rooms/records/curate/0.1/payload.ts +357 -0
- package/src/vta/backup/abort/1.0/payload.ts +191 -0
- package/src/vta/backup/complete-export/1.0/payload.ts +191 -0
- package/src/vta/backup/finalize-import/1.0/payload.ts +333 -0
- package/src/vta/backup/initiate-export/1.0/payload.ts +350 -0
- package/src/vta/backup/initiate-import/1.0/payload.ts +349 -0
- package/src/vta/management/reload-services/1.0/payload.ts +167 -0
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/keys/present/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* An agent asks the party holding its principal's room credentials to produce a presentation for one room operation. The credentials never cross to the agent; only the presentation does, and it is bound to the operation it was asked for.
|
|
8
|
+
*/
|
|
9
|
+
export interface RoomsKeysPresentPayload {
|
|
10
|
+
/**
|
|
11
|
+
* The room to present for.
|
|
12
|
+
*/
|
|
13
|
+
roomId: string;
|
|
14
|
+
/**
|
|
15
|
+
* The action the presentation must confer. Named here so the produced presentation can be scoped to it: a presentation minted for `read` should not be reusable for `write`, and a holder that mints one covering everything has handed the agent its own standing.
|
|
16
|
+
*/
|
|
17
|
+
action: "read" | "write" | "curate" | "admin";
|
|
18
|
+
/**
|
|
19
|
+
* The party the presentation is for, so it cannot be replayed elsewhere. A host's identifier, normally.
|
|
20
|
+
*/
|
|
21
|
+
audience?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Freshness value from the verifier, echoed into the presentation. Without one a captured presentation is replayable for as long as its credentials live.
|
|
24
|
+
*/
|
|
25
|
+
nonce?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
28
|
+
*/
|
|
29
|
+
ext?: Ext;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Success response to rooms/keys/present. Type https://trusttasks.org/spec/rooms/keys/present/0.1#response.
|
|
33
|
+
*/
|
|
34
|
+
export interface RoomsKeysPresentResponsePayload {
|
|
35
|
+
/**
|
|
36
|
+
* The presentation to send to the host: a membership credential, an authority chain, and — where the room withholds the subject — a same-subject binding.
|
|
37
|
+
*/
|
|
38
|
+
presentation: {
|
|
39
|
+
[k: string]: unknown | undefined;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* When the presentation stops being accepted, so a caller can avoid presenting a stale one.
|
|
43
|
+
*/
|
|
44
|
+
expiresAt?: string;
|
|
45
|
+
ext?: Ext;
|
|
46
|
+
}
|
|
47
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
48
|
+
export type { Ext };
|
|
49
|
+
/** Trust Task type URI. */
|
|
50
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/keys/present/0.1";
|
|
51
|
+
/** Stable alias for this specification's request payload shape. */
|
|
52
|
+
export type Payload = RoomsKeysPresentPayload;
|
|
53
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
54
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/rooms/keys/present/0.1#response";
|
|
55
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
56
|
+
export type Response = RoomsKeysPresentResponsePayload;
|
|
57
|
+
/**
|
|
58
|
+
* This specification's payload schema, as a value.
|
|
59
|
+
*
|
|
60
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
61
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
62
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
63
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
64
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
65
|
+
*/
|
|
66
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
67
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
68
|
+
readonly $id: "https://trusttasks.org/spec/rooms/keys/present/0.1";
|
|
69
|
+
readonly title: "Rooms Keys Present — payload";
|
|
70
|
+
readonly description: "An agent asks the party holding its principal's room credentials to produce a presentation for one room operation. The credentials never cross to the agent; only the presentation does, and it is bound to the operation it was asked for.";
|
|
71
|
+
readonly type: "object";
|
|
72
|
+
readonly additionalProperties: false;
|
|
73
|
+
readonly required: readonly ["roomId", "action"];
|
|
74
|
+
readonly properties: {
|
|
75
|
+
readonly roomId: {
|
|
76
|
+
readonly type: "string";
|
|
77
|
+
readonly description: "The room to present for.";
|
|
78
|
+
};
|
|
79
|
+
readonly action: {
|
|
80
|
+
readonly type: "string";
|
|
81
|
+
readonly enum: readonly ["read", "write", "curate", "admin"];
|
|
82
|
+
readonly description: "The action the presentation must confer. Named here so the produced presentation can be scoped to it: a presentation minted for `read` should not be reusable for `write`, and a holder that mints one covering everything has handed the agent its own standing.";
|
|
83
|
+
};
|
|
84
|
+
readonly audience: {
|
|
85
|
+
readonly type: "string";
|
|
86
|
+
readonly description: "The party the presentation is for, so it cannot be replayed elsewhere. A host's identifier, normally.";
|
|
87
|
+
};
|
|
88
|
+
readonly nonce: {
|
|
89
|
+
readonly type: "string";
|
|
90
|
+
readonly maxLength: 512;
|
|
91
|
+
readonly description: "Freshness value from the verifier, echoed into the presentation. Without one a captured presentation is replayable for as long as its credentials live.";
|
|
92
|
+
};
|
|
93
|
+
readonly ext: {
|
|
94
|
+
readonly $ref: "#/$defs/Ext";
|
|
95
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
readonly $defs: {
|
|
99
|
+
readonly Response: {
|
|
100
|
+
readonly $anchor: "response";
|
|
101
|
+
readonly title: "Rooms Keys Present — response payload";
|
|
102
|
+
readonly description: "Success response to rooms/keys/present. Type https://trusttasks.org/spec/rooms/keys/present/0.1#response.";
|
|
103
|
+
readonly type: "object";
|
|
104
|
+
readonly additionalProperties: false;
|
|
105
|
+
readonly required: readonly ["presentation"];
|
|
106
|
+
readonly properties: {
|
|
107
|
+
readonly presentation: {
|
|
108
|
+
readonly type: "object";
|
|
109
|
+
readonly additionalProperties: true;
|
|
110
|
+
readonly description: "The presentation to send to the host: a membership credential, an authority chain, and — where the room withholds the subject — a same-subject binding.";
|
|
111
|
+
};
|
|
112
|
+
readonly expiresAt: {
|
|
113
|
+
readonly type: "string";
|
|
114
|
+
readonly format: "date-time";
|
|
115
|
+
readonly description: "When the presentation stops being accepted, so a caller can avoid presenting a stale one.";
|
|
116
|
+
};
|
|
117
|
+
readonly ext: {
|
|
118
|
+
readonly $ref: "#/$defs/Ext";
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
readonly Ext: {
|
|
123
|
+
readonly title: "Ext";
|
|
124
|
+
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.";
|
|
125
|
+
readonly type: "object";
|
|
126
|
+
readonly minProperties: 1;
|
|
127
|
+
readonly additionalProperties: true;
|
|
128
|
+
readonly propertyNames: {
|
|
129
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
135
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
136
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
137
|
+
readonly $ref: "#/$defs/Response";
|
|
138
|
+
readonly $defs: {
|
|
139
|
+
readonly Response: {
|
|
140
|
+
readonly $anchor: "response";
|
|
141
|
+
readonly title: "Rooms Keys Present — response payload";
|
|
142
|
+
readonly description: "Success response to rooms/keys/present. Type https://trusttasks.org/spec/rooms/keys/present/0.1#response.";
|
|
143
|
+
readonly type: "object";
|
|
144
|
+
readonly additionalProperties: false;
|
|
145
|
+
readonly required: readonly ["presentation"];
|
|
146
|
+
readonly properties: {
|
|
147
|
+
readonly presentation: {
|
|
148
|
+
readonly type: "object";
|
|
149
|
+
readonly additionalProperties: true;
|
|
150
|
+
readonly description: "The presentation to send to the host: a membership credential, an authority chain, and — where the room withholds the subject — a same-subject binding.";
|
|
151
|
+
};
|
|
152
|
+
readonly expiresAt: {
|
|
153
|
+
readonly type: "string";
|
|
154
|
+
readonly format: "date-time";
|
|
155
|
+
readonly description: "When the presentation stops being accepted, so a caller can avoid presenting a stale one.";
|
|
156
|
+
};
|
|
157
|
+
readonly ext: {
|
|
158
|
+
readonly $ref: "#/$defs/Ext";
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
readonly Ext: {
|
|
163
|
+
readonly title: "Ext";
|
|
164
|
+
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.";
|
|
165
|
+
readonly type: "object";
|
|
166
|
+
readonly minProperties: 1;
|
|
167
|
+
readonly additionalProperties: true;
|
|
168
|
+
readonly propertyNames: {
|
|
169
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
176
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
177
|
+
* per-specification and cannot be derived from the document alone, and
|
|
178
|
+
* item 2 needs the schema this carries.
|
|
179
|
+
*/
|
|
180
|
+
export declare const SPEC: {
|
|
181
|
+
readonly typeUri: "https://trusttasks.org/spec/rooms/keys/present/0.1";
|
|
182
|
+
readonly isBearer: false;
|
|
183
|
+
readonly isProofRequired: true;
|
|
184
|
+
readonly isRecipientRequired: true;
|
|
185
|
+
readonly isIssuedAtRequired: true;
|
|
186
|
+
readonly payloadSchema: {
|
|
187
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
188
|
+
readonly $id: "https://trusttasks.org/spec/rooms/keys/present/0.1";
|
|
189
|
+
readonly title: "Rooms Keys Present — payload";
|
|
190
|
+
readonly description: "An agent asks the party holding its principal's room credentials to produce a presentation for one room operation. The credentials never cross to the agent; only the presentation does, and it is bound to the operation it was asked for.";
|
|
191
|
+
readonly type: "object";
|
|
192
|
+
readonly additionalProperties: false;
|
|
193
|
+
readonly required: readonly ["roomId", "action"];
|
|
194
|
+
readonly properties: {
|
|
195
|
+
readonly roomId: {
|
|
196
|
+
readonly type: "string";
|
|
197
|
+
readonly description: "The room to present for.";
|
|
198
|
+
};
|
|
199
|
+
readonly action: {
|
|
200
|
+
readonly type: "string";
|
|
201
|
+
readonly enum: readonly ["read", "write", "curate", "admin"];
|
|
202
|
+
readonly description: "The action the presentation must confer. Named here so the produced presentation can be scoped to it: a presentation minted for `read` should not be reusable for `write`, and a holder that mints one covering everything has handed the agent its own standing.";
|
|
203
|
+
};
|
|
204
|
+
readonly audience: {
|
|
205
|
+
readonly type: "string";
|
|
206
|
+
readonly description: "The party the presentation is for, so it cannot be replayed elsewhere. A host's identifier, normally.";
|
|
207
|
+
};
|
|
208
|
+
readonly nonce: {
|
|
209
|
+
readonly type: "string";
|
|
210
|
+
readonly maxLength: 512;
|
|
211
|
+
readonly description: "Freshness value from the verifier, echoed into the presentation. Without one a captured presentation is replayable for as long as its credentials live.";
|
|
212
|
+
};
|
|
213
|
+
readonly ext: {
|
|
214
|
+
readonly $ref: "#/$defs/Ext";
|
|
215
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
readonly $defs: {
|
|
219
|
+
readonly Response: {
|
|
220
|
+
readonly $anchor: "response";
|
|
221
|
+
readonly title: "Rooms Keys Present — response payload";
|
|
222
|
+
readonly description: "Success response to rooms/keys/present. Type https://trusttasks.org/spec/rooms/keys/present/0.1#response.";
|
|
223
|
+
readonly type: "object";
|
|
224
|
+
readonly additionalProperties: false;
|
|
225
|
+
readonly required: readonly ["presentation"];
|
|
226
|
+
readonly properties: {
|
|
227
|
+
readonly presentation: {
|
|
228
|
+
readonly type: "object";
|
|
229
|
+
readonly additionalProperties: true;
|
|
230
|
+
readonly description: "The presentation to send to the host: a membership credential, an authority chain, and — where the room withholds the subject — a same-subject binding.";
|
|
231
|
+
};
|
|
232
|
+
readonly expiresAt: {
|
|
233
|
+
readonly type: "string";
|
|
234
|
+
readonly format: "date-time";
|
|
235
|
+
readonly description: "When the presentation stops being accepted, so a caller can avoid presenting a stale one.";
|
|
236
|
+
};
|
|
237
|
+
readonly ext: {
|
|
238
|
+
readonly $ref: "#/$defs/Ext";
|
|
239
|
+
};
|
|
240
|
+
};
|
|
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
|
+
/**
|
|
256
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
257
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
258
|
+
* parties (§7.3 item 5).
|
|
259
|
+
*/
|
|
260
|
+
export declare const RESPONSE_SPEC: {
|
|
261
|
+
readonly typeUri: "https://trusttasks.org/spec/rooms/keys/present/0.1#response";
|
|
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 $ref: "#/$defs/Response";
|
|
269
|
+
readonly $defs: {
|
|
270
|
+
readonly Response: {
|
|
271
|
+
readonly $anchor: "response";
|
|
272
|
+
readonly title: "Rooms Keys Present — response payload";
|
|
273
|
+
readonly description: "Success response to rooms/keys/present. Type https://trusttasks.org/spec/rooms/keys/present/0.1#response.";
|
|
274
|
+
readonly type: "object";
|
|
275
|
+
readonly additionalProperties: false;
|
|
276
|
+
readonly required: readonly ["presentation"];
|
|
277
|
+
readonly properties: {
|
|
278
|
+
readonly presentation: {
|
|
279
|
+
readonly type: "object";
|
|
280
|
+
readonly additionalProperties: true;
|
|
281
|
+
readonly description: "The presentation to send to the host: a membership credential, an authority chain, and — where the room withholds the subject — a same-subject binding.";
|
|
282
|
+
};
|
|
283
|
+
readonly expiresAt: {
|
|
284
|
+
readonly type: "string";
|
|
285
|
+
readonly format: "date-time";
|
|
286
|
+
readonly description: "When the presentation stops being accepted, so a caller can avoid presenting a stale one.";
|
|
287
|
+
};
|
|
288
|
+
readonly ext: {
|
|
289
|
+
readonly $ref: "#/$defs/Ext";
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
readonly Ext: {
|
|
294
|
+
readonly title: "Ext";
|
|
295
|
+
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.";
|
|
296
|
+
readonly type: "object";
|
|
297
|
+
readonly minProperties: 1;
|
|
298
|
+
readonly additionalProperties: true;
|
|
299
|
+
readonly propertyNames: {
|
|
300
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/rooms/keys/present/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAG7D;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC9C;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,YAAY,EAAE;QACZ,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;KAClC,CAAC;IACF;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,GAAG,EAAE,CAAC;AAEpB,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,oDAA6D,CAAC;AAEtF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,uBAAuB,CAAC;AAE9C,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,6DAAsE,CAAC;AAExG,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,+BAA+B,CAAC;AAEvD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6EjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwC1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/keys/present/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/rooms/keys/present/0.1";
|
|
7
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
8
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/keys/present/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/keys/present/0.1",
|
|
21
|
+
"title": "Rooms Keys Present — payload",
|
|
22
|
+
"description": "An agent asks the party holding its principal's room credentials to produce a presentation for one room operation. The credentials never cross to the agent; only the presentation does, and it is bound to the operation it was asked for.",
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": [
|
|
26
|
+
"roomId",
|
|
27
|
+
"action"
|
|
28
|
+
],
|
|
29
|
+
"properties": {
|
|
30
|
+
"roomId": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "The room to present for."
|
|
33
|
+
},
|
|
34
|
+
"action": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"enum": [
|
|
37
|
+
"read",
|
|
38
|
+
"write",
|
|
39
|
+
"curate",
|
|
40
|
+
"admin"
|
|
41
|
+
],
|
|
42
|
+
"description": "The action the presentation must confer. Named here so the produced presentation can be scoped to it: a presentation minted for `read` should not be reusable for `write`, and a holder that mints one covering everything has handed the agent its own standing."
|
|
43
|
+
},
|
|
44
|
+
"audience": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"description": "The party the presentation is for, so it cannot be replayed elsewhere. A host's identifier, normally."
|
|
47
|
+
},
|
|
48
|
+
"nonce": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"maxLength": 512,
|
|
51
|
+
"description": "Freshness value from the verifier, echoed into the presentation. Without one a captured presentation is replayable for as long as its credentials live."
|
|
52
|
+
},
|
|
53
|
+
"ext": {
|
|
54
|
+
"$ref": "#/$defs/Ext",
|
|
55
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"$defs": {
|
|
59
|
+
"Response": {
|
|
60
|
+
"$anchor": "response",
|
|
61
|
+
"title": "Rooms Keys Present — response payload",
|
|
62
|
+
"description": "Success response to rooms/keys/present. Type https://trusttasks.org/spec/rooms/keys/present/0.1#response.",
|
|
63
|
+
"type": "object",
|
|
64
|
+
"additionalProperties": false,
|
|
65
|
+
"required": [
|
|
66
|
+
"presentation"
|
|
67
|
+
],
|
|
68
|
+
"properties": {
|
|
69
|
+
"presentation": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": true,
|
|
72
|
+
"description": "The presentation to send to the host: a membership credential, an authority chain, and — where the room withholds the subject — a same-subject binding."
|
|
73
|
+
},
|
|
74
|
+
"expiresAt": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"format": "date-time",
|
|
77
|
+
"description": "When the presentation stops being accepted, so a caller can avoid presenting a stale one."
|
|
78
|
+
},
|
|
79
|
+
"ext": {
|
|
80
|
+
"$ref": "#/$defs/Ext"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"Ext": {
|
|
85
|
+
"title": "Ext",
|
|
86
|
+
"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.",
|
|
87
|
+
"type": "object",
|
|
88
|
+
"minProperties": 1,
|
|
89
|
+
"additionalProperties": true,
|
|
90
|
+
"propertyNames": {
|
|
91
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
97
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
98
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
99
|
+
"$ref": "#/$defs/Response",
|
|
100
|
+
"$defs": {
|
|
101
|
+
"Response": {
|
|
102
|
+
"$anchor": "response",
|
|
103
|
+
"title": "Rooms Keys Present — response payload",
|
|
104
|
+
"description": "Success response to rooms/keys/present. Type https://trusttasks.org/spec/rooms/keys/present/0.1#response.",
|
|
105
|
+
"type": "object",
|
|
106
|
+
"additionalProperties": false,
|
|
107
|
+
"required": [
|
|
108
|
+
"presentation"
|
|
109
|
+
],
|
|
110
|
+
"properties": {
|
|
111
|
+
"presentation": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"additionalProperties": true,
|
|
114
|
+
"description": "The presentation to send to the host: a membership credential, an authority chain, and — where the room withholds the subject — a same-subject binding."
|
|
115
|
+
},
|
|
116
|
+
"expiresAt": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"format": "date-time",
|
|
119
|
+
"description": "When the presentation stops being accepted, so a caller can avoid presenting a stale one."
|
|
120
|
+
},
|
|
121
|
+
"ext": {
|
|
122
|
+
"$ref": "#/$defs/Ext"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"Ext": {
|
|
127
|
+
"title": "Ext",
|
|
128
|
+
"description": "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.",
|
|
129
|
+
"type": "object",
|
|
130
|
+
"minProperties": 1,
|
|
131
|
+
"additionalProperties": true,
|
|
132
|
+
"propertyNames": {
|
|
133
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
140
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
141
|
+
* per-specification and cannot be derived from the document alone, and
|
|
142
|
+
* item 2 needs the schema this carries.
|
|
143
|
+
*/
|
|
144
|
+
export const SPEC = {
|
|
145
|
+
typeUri: TYPE_URI,
|
|
146
|
+
isBearer: false,
|
|
147
|
+
isProofRequired: true,
|
|
148
|
+
isRecipientRequired: true,
|
|
149
|
+
isIssuedAtRequired: true,
|
|
150
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
154
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
155
|
+
* parties (§7.3 item 5).
|
|
156
|
+
*/
|
|
157
|
+
export const RESPONSE_SPEC = {
|
|
158
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
159
|
+
isBearer: false,
|
|
160
|
+
isProofRequired: true,
|
|
161
|
+
isRecipientRequired: true,
|
|
162
|
+
isIssuedAtRequired: true,
|
|
163
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
164
|
+
};
|
|
165
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/rooms/keys/present/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkDH,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,aAAa,EAAE,6OAA6O;IAC5P,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,QAAQ;QACR,QAAQ;KACT;IACD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