@openvtc/trust-tasks 0.26.23 → 0.26.25
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 +52 -0
- package/dist/_shared/components.d.ts +41 -1
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/rooms/keys/act/0.6/payload.d.ts +546 -0
- package/dist/rooms/keys/act/0.6/payload.d.ts.map +1 -0
- package/dist/rooms/keys/act/0.6/payload.js +305 -0
- package/dist/rooms/keys/act/0.6/payload.js.map +1 -0
- package/dist/vta/pcs/voter/read/0.1/payload.d.ts +489 -0
- package/dist/vta/pcs/voter/read/0.1/payload.d.ts.map +1 -0
- package/dist/vta/pcs/voter/read/0.1/payload.js +271 -0
- package/dist/vta/pcs/voter/read/0.1/payload.js.map +1 -0
- package/dist/vta/pcs/voter/register/0.1/payload.d.ts +233 -5
- package/dist/vta/pcs/voter/register/0.1/payload.d.ts.map +1 -1
- package/dist/vta/pcs/voter/register/0.1/payload.js +117 -2
- package/dist/vta/pcs/voter/register/0.1/payload.js.map +1 -1
- package/dist/vtc/_shared/0.1/community-room.d.ts +1 -1
- package/dist/vtc/_shared/0.1/community-room.d.ts.map +1 -1
- package/dist/vtc/groups/bindings/add/0.1/payload.d.ts +4 -4
- package/dist/vtc/groups/bindings/add/0.1/payload.js +2 -2
- package/dist/vtc/groups/bindings/add/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/bindings/list/0.1/payload.d.ts +4 -4
- package/dist/vtc/groups/bindings/list/0.1/payload.js +2 -2
- package/dist/vtc/groups/bindings/list/0.1/payload.js.map +1 -1
- package/dist/vtc/rooms/offers/list/0.3/payload.d.ts +1058 -0
- package/dist/vtc/rooms/offers/list/0.3/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/offers/list/0.3/payload.js +614 -0
- package/dist/vtc/rooms/offers/list/0.3/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +41 -1
- package/src/index.ts +3 -0
- package/src/rooms/keys/act/0.6/payload.ts +380 -0
- package/src/vta/pcs/voter/read/0.1/payload.ts +347 -0
- package/src/vta/pcs/voter/register/0.1/payload.ts +148 -3
- package/src/vtc/_shared/0.1/community-room.ts +1 -1
- package/src/vtc/groups/bindings/add/0.1/payload.ts +2 -2
- package/src/vtc/groups/bindings/list/0.1/payload.ts +2 -2
- package/src/vtc/rooms/offers/list/0.3/payload.ts +663 -0
|
@@ -9098,6 +9098,46 @@ export interface RejectedKey {
|
|
|
9098
9098
|
*/
|
|
9099
9099
|
reason: string;
|
|
9100
9100
|
}
|
|
9101
|
+
/**
|
|
9102
|
+
* What vtc/rooms/offers/list/0.3 returns in `renewals`: a renewal of an admission the member already holds, as the member it is addressed to sees it. `label` and `description` are the room's as they stand when it is read.
|
|
9103
|
+
*/
|
|
9104
|
+
export interface Renewal {
|
|
9105
|
+
roomId: string;
|
|
9106
|
+
/**
|
|
9107
|
+
* The room's host: this community.
|
|
9108
|
+
*/
|
|
9109
|
+
host: string;
|
|
9110
|
+
label: RoomLabel;
|
|
9111
|
+
/**
|
|
9112
|
+
* Absent when the room has none.
|
|
9113
|
+
*/
|
|
9114
|
+
description?: RoomDescription;
|
|
9115
|
+
visibility: Visibility;
|
|
9116
|
+
actions: MemberActions;
|
|
9117
|
+
/**
|
|
9118
|
+
* When the renewed authority expires.
|
|
9119
|
+
*/
|
|
9120
|
+
validUntil: string;
|
|
9121
|
+
/**
|
|
9122
|
+
* When the authority it replaces expires: the renewal is listed until then, or until a later renewal or the member's removal supersedes it.
|
|
9123
|
+
*/
|
|
9124
|
+
renews: string;
|
|
9125
|
+
issuedAt: string;
|
|
9126
|
+
credentials: RenewalCredentials;
|
|
9127
|
+
}
|
|
9128
|
+
/**
|
|
9129
|
+
* The two credentials a renewal replaces, serialized as rooms/owner/{issue-membership,issue-authority} return them: a membership and an authority granting the same actions until the renewal's `validUntil`. No invitation: the member is already admitted, and a renewal never opens a second way in. The member's surface stores each with the member's key holder **in place of** the one it renews, never beside it.
|
|
9130
|
+
*/
|
|
9131
|
+
export interface RenewalCredentials {
|
|
9132
|
+
/**
|
|
9133
|
+
* The renewed Verifiable Membership Credential.
|
|
9134
|
+
*/
|
|
9135
|
+
membership: string;
|
|
9136
|
+
/**
|
|
9137
|
+
* The renewed Verifiable Authority Credential granting `actions` until `validUntil`.
|
|
9138
|
+
*/
|
|
9139
|
+
authority: string;
|
|
9140
|
+
}
|
|
9101
9141
|
/**
|
|
9102
9142
|
* One repository as the VTC records it.
|
|
9103
9143
|
*/
|
|
@@ -9572,7 +9612,7 @@ export interface RollbackResult {
|
|
|
9572
9612
|
ext?: Ext;
|
|
9573
9613
|
}
|
|
9574
9614
|
/**
|
|
9575
|
-
* Links a room the community owns to the group: joining the group offers the member admission to the room with `actions`, valid for `validFor
|
|
9615
|
+
* Links a room the community owns to the group: joining the group offers the member admission to the room with `actions`, valid for `validFor`, renewed while they stay in the group (collected with vtc/rooms/offers/list at 0.3 or later); leaving removes them unless another source still covers them.
|
|
9576
9616
|
*/
|
|
9577
9617
|
export interface RoomBindingSpec {
|
|
9578
9618
|
kind: "room";
|
package/src/index.ts
CHANGED
|
@@ -462,6 +462,7 @@ export * as RoomsKeysAct_v0_2 from "./rooms/keys/act/0.2/payload.js";
|
|
|
462
462
|
export * as RoomsKeysAct_v0_3 from "./rooms/keys/act/0.3/payload.js";
|
|
463
463
|
export * as RoomsKeysAct_v0_4 from "./rooms/keys/act/0.4/payload.js";
|
|
464
464
|
export * as RoomsKeysAct_v0_5 from "./rooms/keys/act/0.5/payload.js";
|
|
465
|
+
export * as RoomsKeysAct_v0_6 from "./rooms/keys/act/0.6/payload.js";
|
|
465
466
|
export * as RoomsKeysBackfill_v0_1 from "./rooms/keys/backfill/0.1/payload.js";
|
|
466
467
|
export * as RoomsKeysBrowse_v0_1 from "./rooms/keys/browse/0.1/payload.js";
|
|
467
468
|
export * as RoomsKeysChain_v0_1 from "./rooms/keys/chain/0.1/payload.js";
|
|
@@ -689,6 +690,7 @@ export * as VtaPcsVerifyAttestation_v0_1 from "./vta/pcs/verify-attestation/0.1/
|
|
|
689
690
|
export * as VtaPcsVetterShow_v0_1 from "./vta/pcs/vetter/show/0.1/payload.js";
|
|
690
691
|
export * as VtaPcsVote_v0_1 from "./vta/pcs/vote/0.1/payload.js";
|
|
691
692
|
export * as VtaPcsVoterAccept_v0_1 from "./vta/pcs/voter/accept/0.1/payload.js";
|
|
693
|
+
export * as VtaPcsVoterRead_v0_1 from "./vta/pcs/voter/read/0.1/payload.js";
|
|
692
694
|
export * as VtaPcsVoterReceipt_v0_1 from "./vta/pcs/voter/receipt/0.1/payload.js";
|
|
693
695
|
export * as VtaPcsVoterRegister_v0_1 from "./vta/pcs/voter/register/0.1/payload.js";
|
|
694
696
|
export * as VtaRestoreStatus_v0_1 from "./vta/restore/status/0.1/payload.js";
|
|
@@ -963,6 +965,7 @@ export * as VtcRoomsMembershipsList_v0_1 from "./vtc/rooms/memberships/list/0.1/
|
|
|
963
965
|
export * as VtcRoomsOffersAccept_v0_1 from "./vtc/rooms/offers/accept/0.1/payload.js";
|
|
964
966
|
export * as VtcRoomsOffersList_v0_1 from "./vtc/rooms/offers/list/0.1/payload.js";
|
|
965
967
|
export * as VtcRoomsOffersList_v0_2 from "./vtc/rooms/offers/list/0.2/payload.js";
|
|
968
|
+
export * as VtcRoomsOffersList_v0_3 from "./vtc/rooms/offers/list/0.3/payload.js";
|
|
966
969
|
export * as VtcRoomsStorageAssign_v0_1 from "./vtc/rooms/storage/assign/0.1/payload.js";
|
|
967
970
|
export * as VtcRoomsStorageMigrate_v0_1 from "./vtc/rooms/storage/migrate/0.1/payload.js";
|
|
968
971
|
export * as VtcRoomsUsage_v0_1 from "./vtc/rooms/usage/0.1/payload.js";
|
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/keys/act/0.6/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A member's own client asks the member's key holder to complete one host-bound room request — or one of the two requests by which a member takes up a community's offer of admission to a room — as the member: the member's own authority narrowed to the one action the request's type needs, the member as issuer, and the member's signature. The outer document members are owned by the framework — SPEC §6.3.
|
|
11
|
+
*/
|
|
12
|
+
export interface RoomsKeysActPayload {
|
|
13
|
+
document: UnsignedRoomRequest;
|
|
14
|
+
/**
|
|
15
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
16
|
+
*/
|
|
17
|
+
ext?: Ext;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The room request to complete, as the client will send it, minus its presentation and its proof.
|
|
21
|
+
*/
|
|
22
|
+
export interface UnsignedRoomRequest {
|
|
23
|
+
/**
|
|
24
|
+
* The request's identifier, set by the client. The host keys duplicate-execution protection on it.
|
|
25
|
+
*/
|
|
26
|
+
id: string;
|
|
27
|
+
/**
|
|
28
|
+
* The room request's Type URI: a rooms/* request, or one of the community types: vtc/rooms/offers/{list,accept} or vtc/rooms/memberships/list. Only the types in this task's table are completed; any other is `typeNotActable`.
|
|
29
|
+
*/
|
|
30
|
+
type: string;
|
|
31
|
+
/**
|
|
32
|
+
* The member to act as, and this task's subject (subjectPath /document/issuer). REQUIRED for a type that names no room (rooms/blobs/chunk/0.1, rooms/blobs/upload/{commit,abort}/0.2), where it is the member whose request opened the transfer; REQUIRED for the community types (vtc/rooms/offers/list/0.1, 0.2 and 0.3, vtc/rooms/offers/accept/0.1, vtc/rooms/memberships/list/0.1), where it is the DID the community addressed its offers to; REQUIRED where the caller may act as more than one member of the room; optional where it may act as exactly one. A rule over two members this schema does not express: the recipient refuses an absent issuer it needs with principalAmbiguous. Never the client's own identifier.
|
|
33
|
+
*/
|
|
34
|
+
issuer?: string;
|
|
35
|
+
/**
|
|
36
|
+
* The room's host, or for the community types the community that made the offers: the party the completed document is for. Covered by the member's proof.
|
|
37
|
+
*/
|
|
38
|
+
recipient: string;
|
|
39
|
+
issuedAt: string;
|
|
40
|
+
expiresAt?: string;
|
|
41
|
+
threadId?: string;
|
|
42
|
+
/**
|
|
43
|
+
* The request's payload, as the named type's schema defines it but without `presentation`: the recipient inserts the member's own, narrowed to the table's action, where the type takes one, and refuses a payload that already carries one. For vtc/rooms/offers/accept/0.1 a `keyPackage`, where present, MUST be one the recipient minted with rooms/keys/key-package at 0.1 or 0.2 (Recipient item 10).
|
|
44
|
+
*/
|
|
45
|
+
payload: {};
|
|
46
|
+
ext?: Ext;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Success response to rooms/keys/act. Type https://trusttasks.org/spec/rooms/keys/act/0.6#response. The request, completed as the member, for the caller to send to its recipient unaltered.
|
|
50
|
+
*/
|
|
51
|
+
export interface RoomsKeysActResponsePayload {
|
|
52
|
+
/**
|
|
53
|
+
* The member the recipient signed as: the completed document's `issuer`.
|
|
54
|
+
*/
|
|
55
|
+
principal: string;
|
|
56
|
+
/**
|
|
57
|
+
* The supplied document with `issuer` set to the member, `payload.presentation` inserted where the type takes one, and the member's Data Integrity `proof` (`proofPurpose: authentication`). Every other member is unchanged.
|
|
58
|
+
*/
|
|
59
|
+
document: {};
|
|
60
|
+
/**
|
|
61
|
+
* When the inserted presentation's leaf lapses. Absent when the type takes no presentation.
|
|
62
|
+
*/
|
|
63
|
+
expiresAt?: string;
|
|
64
|
+
ext?: Ext;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
68
|
+
export type { Ext };
|
|
69
|
+
|
|
70
|
+
/** Trust Task type URI. */
|
|
71
|
+
export const TYPE_URI = "https://trusttasks.org/spec/rooms/keys/act/0.6" as const;
|
|
72
|
+
|
|
73
|
+
/** Stable alias for this specification's request payload shape. */
|
|
74
|
+
export type Payload = RoomsKeysActPayload;
|
|
75
|
+
|
|
76
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
77
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/keys/act/0.6#response" as const;
|
|
78
|
+
|
|
79
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
80
|
+
export type Response = RoomsKeysActResponsePayload;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* This specification's payload schema, as a value.
|
|
84
|
+
*
|
|
85
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
86
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
87
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
88
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
89
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
90
|
+
*/
|
|
91
|
+
export const PAYLOAD_SCHEMA = {
|
|
92
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
93
|
+
"$id": "https://trusttasks.org/spec/rooms/keys/act/0.6",
|
|
94
|
+
"title": "Rooms Keys Act — payload",
|
|
95
|
+
"description": "A member's own client asks the member's key holder to complete one host-bound room request — or one of the two requests by which a member takes up a community's offer of admission to a room — as the member: the member's own authority narrowed to the one action the request's type needs, the member as issuer, and the member's signature. The outer document members are owned by the framework — SPEC §6.3.",
|
|
96
|
+
"type": "object",
|
|
97
|
+
"additionalProperties": false,
|
|
98
|
+
"required": [
|
|
99
|
+
"document"
|
|
100
|
+
],
|
|
101
|
+
"properties": {
|
|
102
|
+
"document": {
|
|
103
|
+
"$ref": "#/$defs/UnsignedRoomRequest",
|
|
104
|
+
"description": "The room request to complete, as the client will send it, minus its presentation and its proof."
|
|
105
|
+
},
|
|
106
|
+
"ext": {
|
|
107
|
+
"$ref": "#/$defs/Ext",
|
|
108
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"$defs": {
|
|
112
|
+
"UnsignedRoomRequest": {
|
|
113
|
+
"$anchor": "unsigned-room-request",
|
|
114
|
+
"title": "Unsigned room request",
|
|
115
|
+
"description": "A Trust Task document of a type in the rooms/keys/act table, built by the member's client: no proof, and no presentation in its payload. The recipient validates the payload against the named type's own schema; this one fixes only the envelope.",
|
|
116
|
+
"type": "object",
|
|
117
|
+
"additionalProperties": false,
|
|
118
|
+
"required": [
|
|
119
|
+
"id",
|
|
120
|
+
"type",
|
|
121
|
+
"recipient",
|
|
122
|
+
"issuedAt",
|
|
123
|
+
"payload"
|
|
124
|
+
],
|
|
125
|
+
"properties": {
|
|
126
|
+
"id": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"minLength": 1,
|
|
129
|
+
"maxLength": 512,
|
|
130
|
+
"description": "The request's identifier, set by the client. The host keys duplicate-execution protection on it."
|
|
131
|
+
},
|
|
132
|
+
"type": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"pattern": "^https://trusttasks\\.org/spec/(rooms|vtc/rooms/(offers|memberships))/",
|
|
135
|
+
"maxLength": 2048,
|
|
136
|
+
"description": "The room request's Type URI: a rooms/* request, or one of the community types: vtc/rooms/offers/{list,accept} or vtc/rooms/memberships/list. Only the types in this task's table are completed; any other is `typeNotActable`."
|
|
137
|
+
},
|
|
138
|
+
"issuer": {
|
|
139
|
+
"type": "string",
|
|
140
|
+
"pattern": "^did:",
|
|
141
|
+
"maxLength": 2048,
|
|
142
|
+
"description": "The member to act as, and this task's subject (subjectPath /document/issuer). REQUIRED for a type that names no room (rooms/blobs/chunk/0.1, rooms/blobs/upload/{commit,abort}/0.2), where it is the member whose request opened the transfer; REQUIRED for the community types (vtc/rooms/offers/list/0.1, 0.2 and 0.3, vtc/rooms/offers/accept/0.1, vtc/rooms/memberships/list/0.1), where it is the DID the community addressed its offers to; REQUIRED where the caller may act as more than one member of the room; optional where it may act as exactly one. A rule over two members this schema does not express: the recipient refuses an absent issuer it needs with principalAmbiguous. Never the client's own identifier."
|
|
143
|
+
},
|
|
144
|
+
"recipient": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"pattern": "^did:",
|
|
147
|
+
"maxLength": 2048,
|
|
148
|
+
"description": "The room's host, or for the community types the community that made the offers: the party the completed document is for. Covered by the member's proof."
|
|
149
|
+
},
|
|
150
|
+
"issuedAt": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"format": "date-time"
|
|
153
|
+
},
|
|
154
|
+
"expiresAt": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"format": "date-time"
|
|
157
|
+
},
|
|
158
|
+
"threadId": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"minLength": 1,
|
|
161
|
+
"maxLength": 512
|
|
162
|
+
},
|
|
163
|
+
"payload": {
|
|
164
|
+
"type": "object",
|
|
165
|
+
"description": "The request's payload, as the named type's schema defines it but without `presentation`: the recipient inserts the member's own, narrowed to the table's action, where the type takes one, and refuses a payload that already carries one. For vtc/rooms/offers/accept/0.1 a `keyPackage`, where present, MUST be one the recipient minted with rooms/keys/key-package at 0.1 or 0.2 (Recipient item 10)."
|
|
166
|
+
},
|
|
167
|
+
"ext": {
|
|
168
|
+
"$ref": "#/$defs/Ext"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"not": {
|
|
172
|
+
"required": [
|
|
173
|
+
"proof"
|
|
174
|
+
]
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"Response": {
|
|
178
|
+
"$anchor": "response",
|
|
179
|
+
"title": "Rooms Keys Act — response payload",
|
|
180
|
+
"description": "Success response to rooms/keys/act. Type https://trusttasks.org/spec/rooms/keys/act/0.6#response. The request, completed as the member, for the caller to send to its recipient unaltered.",
|
|
181
|
+
"type": "object",
|
|
182
|
+
"additionalProperties": false,
|
|
183
|
+
"required": [
|
|
184
|
+
"principal",
|
|
185
|
+
"document"
|
|
186
|
+
],
|
|
187
|
+
"properties": {
|
|
188
|
+
"principal": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"pattern": "^did:",
|
|
191
|
+
"maxLength": 2048,
|
|
192
|
+
"description": "The member the recipient signed as: the completed document's `issuer`."
|
|
193
|
+
},
|
|
194
|
+
"document": {
|
|
195
|
+
"type": "object",
|
|
196
|
+
"required": [
|
|
197
|
+
"id",
|
|
198
|
+
"type",
|
|
199
|
+
"issuer",
|
|
200
|
+
"recipient",
|
|
201
|
+
"issuedAt",
|
|
202
|
+
"payload",
|
|
203
|
+
"proof"
|
|
204
|
+
],
|
|
205
|
+
"description": "The supplied document with `issuer` set to the member, `payload.presentation` inserted where the type takes one, and the member's Data Integrity `proof` (`proofPurpose: authentication`). Every other member is unchanged."
|
|
206
|
+
},
|
|
207
|
+
"expiresAt": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"format": "date-time",
|
|
210
|
+
"description": "When the inserted presentation's leaf lapses. Absent when the type takes no presentation."
|
|
211
|
+
},
|
|
212
|
+
"ext": {
|
|
213
|
+
"$ref": "#/$defs/Ext"
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"Ext": {
|
|
218
|
+
"title": "Ext",
|
|
219
|
+
"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.",
|
|
220
|
+
"type": "object",
|
|
221
|
+
"minProperties": 1,
|
|
222
|
+
"additionalProperties": true,
|
|
223
|
+
"propertyNames": {
|
|
224
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
} as const;
|
|
229
|
+
|
|
230
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
231
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
232
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
233
|
+
"$ref": "#/$defs/Response",
|
|
234
|
+
"$defs": {
|
|
235
|
+
"UnsignedRoomRequest": {
|
|
236
|
+
"$anchor": "unsigned-room-request",
|
|
237
|
+
"title": "Unsigned room request",
|
|
238
|
+
"description": "A Trust Task document of a type in the rooms/keys/act table, built by the member's client: no proof, and no presentation in its payload. The recipient validates the payload against the named type's own schema; this one fixes only the envelope.",
|
|
239
|
+
"type": "object",
|
|
240
|
+
"additionalProperties": false,
|
|
241
|
+
"required": [
|
|
242
|
+
"id",
|
|
243
|
+
"type",
|
|
244
|
+
"recipient",
|
|
245
|
+
"issuedAt",
|
|
246
|
+
"payload"
|
|
247
|
+
],
|
|
248
|
+
"properties": {
|
|
249
|
+
"id": {
|
|
250
|
+
"type": "string",
|
|
251
|
+
"minLength": 1,
|
|
252
|
+
"maxLength": 512,
|
|
253
|
+
"description": "The request's identifier, set by the client. The host keys duplicate-execution protection on it."
|
|
254
|
+
},
|
|
255
|
+
"type": {
|
|
256
|
+
"type": "string",
|
|
257
|
+
"pattern": "^https://trusttasks\\.org/spec/(rooms|vtc/rooms/(offers|memberships))/",
|
|
258
|
+
"maxLength": 2048,
|
|
259
|
+
"description": "The room request's Type URI: a rooms/* request, or one of the community types: vtc/rooms/offers/{list,accept} or vtc/rooms/memberships/list. Only the types in this task's table are completed; any other is `typeNotActable`."
|
|
260
|
+
},
|
|
261
|
+
"issuer": {
|
|
262
|
+
"type": "string",
|
|
263
|
+
"pattern": "^did:",
|
|
264
|
+
"maxLength": 2048,
|
|
265
|
+
"description": "The member to act as, and this task's subject (subjectPath /document/issuer). REQUIRED for a type that names no room (rooms/blobs/chunk/0.1, rooms/blobs/upload/{commit,abort}/0.2), where it is the member whose request opened the transfer; REQUIRED for the community types (vtc/rooms/offers/list/0.1, 0.2 and 0.3, vtc/rooms/offers/accept/0.1, vtc/rooms/memberships/list/0.1), where it is the DID the community addressed its offers to; REQUIRED where the caller may act as more than one member of the room; optional where it may act as exactly one. A rule over two members this schema does not express: the recipient refuses an absent issuer it needs with principalAmbiguous. Never the client's own identifier."
|
|
266
|
+
},
|
|
267
|
+
"recipient": {
|
|
268
|
+
"type": "string",
|
|
269
|
+
"pattern": "^did:",
|
|
270
|
+
"maxLength": 2048,
|
|
271
|
+
"description": "The room's host, or for the community types the community that made the offers: the party the completed document is for. Covered by the member's proof."
|
|
272
|
+
},
|
|
273
|
+
"issuedAt": {
|
|
274
|
+
"type": "string",
|
|
275
|
+
"format": "date-time"
|
|
276
|
+
},
|
|
277
|
+
"expiresAt": {
|
|
278
|
+
"type": "string",
|
|
279
|
+
"format": "date-time"
|
|
280
|
+
},
|
|
281
|
+
"threadId": {
|
|
282
|
+
"type": "string",
|
|
283
|
+
"minLength": 1,
|
|
284
|
+
"maxLength": 512
|
|
285
|
+
},
|
|
286
|
+
"payload": {
|
|
287
|
+
"type": "object",
|
|
288
|
+
"description": "The request's payload, as the named type's schema defines it but without `presentation`: the recipient inserts the member's own, narrowed to the table's action, where the type takes one, and refuses a payload that already carries one. For vtc/rooms/offers/accept/0.1 a `keyPackage`, where present, MUST be one the recipient minted with rooms/keys/key-package at 0.1 or 0.2 (Recipient item 10)."
|
|
289
|
+
},
|
|
290
|
+
"ext": {
|
|
291
|
+
"$ref": "#/$defs/Ext"
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
"not": {
|
|
295
|
+
"required": [
|
|
296
|
+
"proof"
|
|
297
|
+
]
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"Response": {
|
|
301
|
+
"$anchor": "response",
|
|
302
|
+
"title": "Rooms Keys Act — response payload",
|
|
303
|
+
"description": "Success response to rooms/keys/act. Type https://trusttasks.org/spec/rooms/keys/act/0.6#response. The request, completed as the member, for the caller to send to its recipient unaltered.",
|
|
304
|
+
"type": "object",
|
|
305
|
+
"additionalProperties": false,
|
|
306
|
+
"required": [
|
|
307
|
+
"principal",
|
|
308
|
+
"document"
|
|
309
|
+
],
|
|
310
|
+
"properties": {
|
|
311
|
+
"principal": {
|
|
312
|
+
"type": "string",
|
|
313
|
+
"pattern": "^did:",
|
|
314
|
+
"maxLength": 2048,
|
|
315
|
+
"description": "The member the recipient signed as: the completed document's `issuer`."
|
|
316
|
+
},
|
|
317
|
+
"document": {
|
|
318
|
+
"type": "object",
|
|
319
|
+
"required": [
|
|
320
|
+
"id",
|
|
321
|
+
"type",
|
|
322
|
+
"issuer",
|
|
323
|
+
"recipient",
|
|
324
|
+
"issuedAt",
|
|
325
|
+
"payload",
|
|
326
|
+
"proof"
|
|
327
|
+
],
|
|
328
|
+
"description": "The supplied document with `issuer` set to the member, `payload.presentation` inserted where the type takes one, and the member's Data Integrity `proof` (`proofPurpose: authentication`). Every other member is unchanged."
|
|
329
|
+
},
|
|
330
|
+
"expiresAt": {
|
|
331
|
+
"type": "string",
|
|
332
|
+
"format": "date-time",
|
|
333
|
+
"description": "When the inserted presentation's leaf lapses. Absent when the type takes no presentation."
|
|
334
|
+
},
|
|
335
|
+
"ext": {
|
|
336
|
+
"$ref": "#/$defs/Ext"
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
"Ext": {
|
|
341
|
+
"title": "Ext",
|
|
342
|
+
"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.",
|
|
343
|
+
"type": "object",
|
|
344
|
+
"minProperties": 1,
|
|
345
|
+
"additionalProperties": true,
|
|
346
|
+
"propertyNames": {
|
|
347
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
} as const;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
355
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
356
|
+
* per-specification and cannot be derived from the document alone, and
|
|
357
|
+
* item 2 needs the schema this carries.
|
|
358
|
+
*/
|
|
359
|
+
export const SPEC = {
|
|
360
|
+
typeUri: TYPE_URI,
|
|
361
|
+
isBearer: false,
|
|
362
|
+
isProofRequired: true,
|
|
363
|
+
isRecipientRequired: true,
|
|
364
|
+
isIssuedAtRequired: true,
|
|
365
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
366
|
+
} as const;
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
370
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
371
|
+
* parties (§7.3 item 5).
|
|
372
|
+
*/
|
|
373
|
+
export const RESPONSE_SPEC = {
|
|
374
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
375
|
+
isBearer: false,
|
|
376
|
+
isProofRequired: true,
|
|
377
|
+
isRecipientRequired: true,
|
|
378
|
+
isIssuedAtRequired: true,
|
|
379
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
380
|
+
} as const;
|