@openvtc/trust-tasks 0.26.14 → 0.26.15
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 +392 -1
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/dist/rooms/_shared/0.1/personal-label.d.ts +16 -0
- package/dist/rooms/_shared/0.1/personal-label.d.ts.map +1 -0
- package/dist/rooms/_shared/0.1/personal-label.js +6 -0
- package/dist/rooms/_shared/0.1/personal-label.js.map +1 -0
- 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/blobs/get/0.1/payload.d.ts +4 -4
- package/dist/rooms/blobs/get/0.1/payload.js +2 -2
- package/dist/rooms/blobs/get/0.1/payload.js.map +1 -1
- package/dist/rooms/blobs/get/0.2/payload.d.ts +4 -4
- package/dist/rooms/blobs/get/0.2/payload.js +2 -2
- package/dist/rooms/blobs/get/0.2/payload.js.map +1 -1
- package/dist/rooms/blobs/upload/begin/0.1/payload.d.ts +4 -4
- package/dist/rooms/blobs/upload/begin/0.1/payload.js +2 -2
- package/dist/rooms/blobs/upload/begin/0.1/payload.js.map +1 -1
- package/dist/rooms/blobs/upload/begin/0.2/payload.d.ts +4 -4
- package/dist/rooms/blobs/upload/begin/0.2/payload.js +2 -2
- package/dist/rooms/blobs/upload/begin/0.2/payload.js.map +1 -1
- package/dist/rooms/epoch/chain/0.1/payload.d.ts +4 -4
- package/dist/rooms/epoch/chain/0.1/payload.js +2 -2
- package/dist/rooms/epoch/chain/0.1/payload.js.map +1 -1
- package/dist/rooms/epoch/commits/0.1/payload.d.ts +4 -4
- package/dist/rooms/epoch/commits/0.1/payload.js +2 -2
- package/dist/rooms/epoch/commits/0.1/payload.js.map +1 -1
- package/dist/rooms/epoch/mint/0.1/payload.d.ts +4 -4
- package/dist/rooms/epoch/mint/0.1/payload.js +2 -2
- package/dist/rooms/epoch/mint/0.1/payload.js.map +1 -1
- package/dist/rooms/epoch/prune/0.1/payload.d.ts +4 -4
- package/dist/rooms/epoch/prune/0.1/payload.js +2 -2
- package/dist/rooms/epoch/prune/0.1/payload.js.map +1 -1
- package/dist/rooms/info/0.1/payload.d.ts +4 -4
- package/dist/rooms/info/0.1/payload.js +2 -2
- package/dist/rooms/info/0.1/payload.js.map +1 -1
- package/dist/rooms/keys/label/0.1/payload.d.ts +757 -0
- package/dist/rooms/keys/label/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/label/0.1/payload.js +388 -0
- package/dist/rooms/keys/label/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/list/0.2/payload.d.ts +667 -0
- package/dist/rooms/keys/list/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/keys/list/0.2/payload.js +350 -0
- package/dist/rooms/keys/list/0.2/payload.js.map +1 -0
- package/dist/rooms/keys/present/0.2/payload.d.ts +4 -4
- package/dist/rooms/keys/present/0.2/payload.js +2 -2
- package/dist/rooms/keys/present/0.2/payload.js.map +1 -1
- package/dist/rooms/keys/profile/read/0.1/payload.d.ts +1652 -0
- package/dist/rooms/keys/profile/read/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/profile/read/0.1/payload.js +649 -0
- package/dist/rooms/keys/profile/read/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/profile/write/0.1/payload.d.ts +583 -0
- package/dist/rooms/keys/profile/write/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/profile/write/0.1/payload.js +319 -0
- package/dist/rooms/keys/profile/write/0.1/payload.js.map +1 -0
- package/dist/rooms/owner/claim/0.1/payload.d.ts +4 -4
- package/dist/rooms/owner/claim/0.1/payload.js +2 -2
- package/dist/rooms/owner/claim/0.1/payload.js.map +1 -1
- package/dist/rooms/owner/group/remove/0.2/payload.d.ts +600 -0
- package/dist/rooms/owner/group/remove/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/owner/group/remove/0.2/payload.js +310 -0
- package/dist/rooms/owner/group/remove/0.2/payload.js.map +1 -0
- package/dist/rooms/owner/revoke/0.1/payload.d.ts +1481 -0
- package/dist/rooms/owner/revoke/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/revoke/0.1/payload.js +811 -0
- package/dist/rooms/owner/revoke/0.1/payload.js.map +1 -0
- package/dist/rooms/owner/transfer/0.1/payload.d.ts +4 -4
- package/dist/rooms/owner/transfer/0.1/payload.js +2 -2
- package/dist/rooms/owner/transfer/0.1/payload.js.map +1 -1
- package/dist/rooms/records/curate/0.1/payload.d.ts +4 -4
- package/dist/rooms/records/curate/0.1/payload.js +2 -2
- package/dist/rooms/records/curate/0.1/payload.js.map +1 -1
- package/dist/rooms/records/get/0.1/payload.d.ts +4 -4
- package/dist/rooms/records/get/0.1/payload.js +2 -2
- package/dist/rooms/records/get/0.1/payload.js.map +1 -1
- package/dist/rooms/records/get/0.2/payload.d.ts +4 -4
- package/dist/rooms/records/get/0.2/payload.js +2 -2
- package/dist/rooms/records/get/0.2/payload.js.map +1 -1
- package/dist/rooms/records/list/0.1/payload.d.ts +4 -4
- package/dist/rooms/records/list/0.1/payload.js +2 -2
- package/dist/rooms/records/list/0.1/payload.js.map +1 -1
- package/dist/rooms/records/list/0.2/payload.d.ts +4 -4
- package/dist/rooms/records/list/0.2/payload.js +2 -2
- package/dist/rooms/records/list/0.2/payload.js.map +1 -1
- package/dist/rooms/records/put/0.1/payload.d.ts +4 -4
- package/dist/rooms/records/put/0.1/payload.js +2 -2
- package/dist/rooms/records/put/0.1/payload.js.map +1 -1
- package/dist/rooms/records/put/0.2/payload.d.ts +4 -4
- package/dist/rooms/records/put/0.2/payload.js +2 -2
- package/dist/rooms/records/put/0.2/payload.js.map +1 -1
- package/dist/rooms/revocations/get/0.1/payload.d.ts +905 -0
- package/dist/rooms/revocations/get/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/revocations/get/0.1/payload.js +512 -0
- package/dist/rooms/revocations/get/0.1/payload.js.map +1 -0
- package/dist/rooms/revocations/put/0.1/payload.d.ts +1021 -0
- package/dist/rooms/revocations/put/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/revocations/put/0.1/payload.js +583 -0
- package/dist/rooms/revocations/put/0.1/payload.js.map +1 -0
- package/dist/rooms/usage/0.1/payload.d.ts +4 -4
- package/dist/rooms/usage/0.1/payload.js +2 -2
- package/dist/rooms/usage/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/rooms/community/create/0.1/payload.d.ts +4 -4
- package/dist/vtc/rooms/community/create/0.1/payload.js +2 -2
- package/dist/vtc/rooms/community/create/0.1/payload.js.map +1 -1
- package/dist/vtc/rooms/community/create/0.2/payload.d.ts +989 -0
- package/dist/vtc/rooms/community/create/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/community/create/0.2/payload.js +559 -0
- package/dist/vtc/rooms/community/create/0.2/payload.js.map +1 -0
- package/dist/vtc/rooms/community/create/0.3/payload.d.ts +1013 -0
- package/dist/vtc/rooms/community/create/0.3/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/community/create/0.3/payload.js +577 -0
- package/dist/vtc/rooms/community/create/0.3/payload.js.map +1 -0
- package/dist/vtc/rooms/community/get/0.1/payload.d.ts +4 -4
- package/dist/vtc/rooms/community/get/0.1/payload.js +2 -2
- package/dist/vtc/rooms/community/get/0.1/payload.js.map +1 -1
- package/dist/vtc/rooms/community/get/0.2/payload.d.ts +887 -0
- package/dist/vtc/rooms/community/get/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/community/get/0.2/payload.js +517 -0
- package/dist/vtc/rooms/community/get/0.2/payload.js.map +1 -0
- package/dist/vtc/rooms/community/list/0.1/payload.d.ts +4 -4
- package/dist/vtc/rooms/community/list/0.1/payload.js +2 -2
- package/dist/vtc/rooms/community/list/0.1/payload.js.map +1 -1
- package/dist/vtc/rooms/community/list/0.2/payload.d.ts +960 -0
- package/dist/vtc/rooms/community/list/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/community/list/0.2/payload.js +544 -0
- package/dist/vtc/rooms/community/list/0.2/payload.js.map +1 -0
- package/dist/vtc/rooms/community/members/remove/0.2/payload.d.ts +681 -0
- package/dist/vtc/rooms/community/members/remove/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/community/members/remove/0.2/payload.js +393 -0
- package/dist/vtc/rooms/community/members/remove/0.2/payload.js.map +1 -0
- package/dist/vtc/rooms/community/update/0.1/payload.d.ts +1013 -0
- package/dist/vtc/rooms/community/update/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/community/update/0.1/payload.js +573 -0
- package/dist/vtc/rooms/community/update/0.1/payload.js.map +1 -0
- package/dist/vtc/rooms/community/update/0.2/payload.d.ts +1037 -0
- package/dist/vtc/rooms/community/update/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/community/update/0.2/payload.js +593 -0
- package/dist/vtc/rooms/community/update/0.2/payload.js.map +1 -0
- package/dist/vtc/rooms/offers/list/0.1/payload.d.ts +4 -4
- package/dist/vtc/rooms/offers/list/0.1/payload.js +2 -2
- package/dist/vtc/rooms/offers/list/0.1/payload.js.map +1 -1
- package/dist/vtc/rooms/offers/list/0.2/payload.d.ts +736 -0
- package/dist/vtc/rooms/offers/list/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/offers/list/0.2/payload.js +430 -0
- package/dist/vtc/rooms/offers/list/0.2/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +426 -1
- package/src/index.ts +17 -0
- package/src/rooms/_shared/0.1/personal-label.ts +17 -0
- package/src/rooms/_shared/0.1/room.ts +1 -1
- package/src/rooms/blobs/get/0.1/payload.ts +2 -2
- package/src/rooms/blobs/get/0.2/payload.ts +2 -2
- package/src/rooms/blobs/upload/begin/0.1/payload.ts +2 -2
- package/src/rooms/blobs/upload/begin/0.2/payload.ts +2 -2
- package/src/rooms/epoch/chain/0.1/payload.ts +2 -2
- package/src/rooms/epoch/commits/0.1/payload.ts +2 -2
- package/src/rooms/epoch/mint/0.1/payload.ts +2 -2
- package/src/rooms/epoch/prune/0.1/payload.ts +2 -2
- package/src/rooms/info/0.1/payload.ts +2 -2
- package/src/rooms/keys/label/0.1/payload.ts +474 -0
- package/src/rooms/keys/list/0.2/payload.ts +412 -0
- package/src/rooms/keys/present/0.2/payload.ts +2 -2
- package/src/rooms/keys/profile/read/0.1/payload.ts +1617 -0
- package/src/rooms/keys/profile/write/0.1/payload.ts +388 -0
- package/src/rooms/owner/claim/0.1/payload.ts +2 -2
- package/src/rooms/owner/group/remove/0.2/payload.ts +415 -0
- package/src/rooms/owner/revoke/0.1/payload.ts +954 -0
- package/src/rooms/owner/transfer/0.1/payload.ts +2 -2
- package/src/rooms/records/curate/0.1/payload.ts +2 -2
- package/src/rooms/records/get/0.1/payload.ts +2 -2
- package/src/rooms/records/get/0.2/payload.ts +2 -2
- package/src/rooms/records/list/0.1/payload.ts +2 -2
- package/src/rooms/records/list/0.2/payload.ts +2 -2
- package/src/rooms/records/put/0.1/payload.ts +2 -2
- package/src/rooms/records/put/0.2/payload.ts +2 -2
- package/src/rooms/revocations/get/0.1/payload.ts +562 -0
- package/src/rooms/revocations/put/0.1/payload.ts +637 -0
- package/src/rooms/usage/0.1/payload.ts +2 -2
- package/src/vtc/_shared/0.1/community-room.ts +1 -1
- package/src/vtc/rooms/community/create/0.1/payload.ts +2 -2
- package/src/vtc/rooms/community/create/0.2/payload.ts +613 -0
- package/src/vtc/rooms/community/create/0.3/payload.ts +635 -0
- package/src/vtc/rooms/community/get/0.1/payload.ts +2 -2
- package/src/vtc/rooms/community/get/0.2/payload.ts +549 -0
- package/src/vtc/rooms/community/list/0.1/payload.ts +2 -2
- package/src/vtc/rooms/community/list/0.2/payload.ts +591 -0
- package/src/vtc/rooms/community/members/remove/0.2/payload.ts +439 -0
- package/src/vtc/rooms/community/update/0.1/payload.ts +629 -0
- package/src/vtc/rooms/community/update/0.2/payload.ts +653 -0
- package/src/vtc/rooms/offers/list/0.1/payload.ts +2 -2
- package/src/vtc/rooms/offers/list/0.2/payload.ts +473 -0
|
@@ -233,7 +233,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
233
233
|
"type": "string",
|
|
234
234
|
"minLength": 1,
|
|
235
235
|
"maxLength": 128,
|
|
236
|
-
"description": "A name for the room, chosen by an administrator: shown to administrators and to the members a room is offered to. Not part of the room's identity and
|
|
236
|
+
"description": "A name for the room, chosen by an administrator: shown to administrators and to the members a room is offered to. Not part of the room's identity and never in anything a room's host can read. From `vtc/rooms/community/create` 0.3 and `vtc/rooms/community/update` 0.2 the community also writes it, through its own VTA, as the `name` of the room's own profile (`RoomProfile` in rooms/_shared), sealed inside the room for its members; earlier versions keep it out of the room altogether. MUST NOT carry personal data."
|
|
237
237
|
},
|
|
238
238
|
"Visibility": {
|
|
239
239
|
"title": "Visibility",
|
|
@@ -406,7 +406,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
406
406
|
"type": "string",
|
|
407
407
|
"minLength": 1,
|
|
408
408
|
"maxLength": 128,
|
|
409
|
-
"description": "A name for the room, chosen by an administrator: shown to administrators and to the members a room is offered to. Not part of the room's identity and
|
|
409
|
+
"description": "A name for the room, chosen by an administrator: shown to administrators and to the members a room is offered to. Not part of the room's identity and never in anything a room's host can read. From `vtc/rooms/community/create` 0.3 and `vtc/rooms/community/update` 0.2 the community also writes it, through its own VTA, as the `name` of the room's own profile (`RoomProfile` in rooms/_shared), sealed inside the room for its members; earlier versions keep it out of the room altogether. MUST NOT carry personal data."
|
|
410
410
|
},
|
|
411
411
|
"Visibility": {
|
|
412
412
|
"title": "Visibility",
|
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/rooms/offers/list/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext, MemberAction, MemberActions, OfferCredentials, OfferV2, RoomDescription, RoomLabel, Visibility } from "../../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export interface VTCRoomsOffersListPayload {
|
|
10
|
+
/**
|
|
11
|
+
* Opaque continuation token from a previous page's `nextCursor`.
|
|
12
|
+
*/
|
|
13
|
+
cursor?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Page size. The community chooses when absent (50 in the reference implementation).
|
|
16
|
+
*/
|
|
17
|
+
limit?: number;
|
|
18
|
+
ext?: Ext;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Success response to vtc/rooms/offers/list. Type https://trusttasks.org/spec/vtc/rooms/offers/list/0.2#response. The offers addressed to the caller, and no one else's.
|
|
22
|
+
*/
|
|
23
|
+
export interface VTCRoomsOffersListResponsePayload {
|
|
24
|
+
/**
|
|
25
|
+
* @maxItems 100
|
|
26
|
+
*/
|
|
27
|
+
items: OfferV2[];
|
|
28
|
+
/**
|
|
29
|
+
* Present when more remain; pass it as `cursor`.
|
|
30
|
+
*/
|
|
31
|
+
nextCursor?: string;
|
|
32
|
+
ext?: Ext;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
36
|
+
export type { Ext, MemberAction, MemberActions, OfferCredentials, OfferV2, RoomDescription, RoomLabel, Visibility };
|
|
37
|
+
|
|
38
|
+
/** Trust Task type URI. */
|
|
39
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/rooms/offers/list/0.2" as const;
|
|
40
|
+
|
|
41
|
+
/** Stable alias for this specification's request payload shape. */
|
|
42
|
+
export type Payload = VTCRoomsOffersListPayload;
|
|
43
|
+
|
|
44
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
45
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/rooms/offers/list/0.2#response" as const;
|
|
46
|
+
|
|
47
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
48
|
+
export type Response = VTCRoomsOffersListResponsePayload;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* This specification's payload schema, as a value.
|
|
52
|
+
*
|
|
53
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
54
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
55
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
56
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
57
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
58
|
+
*/
|
|
59
|
+
export const PAYLOAD_SCHEMA = {
|
|
60
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
61
|
+
"$id": "https://trusttasks.org/spec/vtc/rooms/offers/list/0.2",
|
|
62
|
+
"title": "VTC Rooms Offers List — payload",
|
|
63
|
+
"type": "object",
|
|
64
|
+
"additionalProperties": false,
|
|
65
|
+
"properties": {
|
|
66
|
+
"cursor": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"minLength": 1,
|
|
69
|
+
"maxLength": 1024,
|
|
70
|
+
"description": "Opaque continuation token from a previous page's `nextCursor`."
|
|
71
|
+
},
|
|
72
|
+
"limit": {
|
|
73
|
+
"type": "integer",
|
|
74
|
+
"minimum": 1,
|
|
75
|
+
"maximum": 100,
|
|
76
|
+
"description": "Page size. The community chooses when absent (50 in the reference implementation)."
|
|
77
|
+
},
|
|
78
|
+
"ext": {
|
|
79
|
+
"$ref": "#/$defs/Ext"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"$defs": {
|
|
83
|
+
"Response": {
|
|
84
|
+
"$anchor": "response",
|
|
85
|
+
"title": "VTC Rooms Offers List — response payload",
|
|
86
|
+
"description": "Success response to vtc/rooms/offers/list. Type https://trusttasks.org/spec/vtc/rooms/offers/list/0.2#response. The offers addressed to the caller, and no one else's.",
|
|
87
|
+
"type": "object",
|
|
88
|
+
"additionalProperties": false,
|
|
89
|
+
"required": [
|
|
90
|
+
"items"
|
|
91
|
+
],
|
|
92
|
+
"properties": {
|
|
93
|
+
"items": {
|
|
94
|
+
"type": "array",
|
|
95
|
+
"maxItems": 100,
|
|
96
|
+
"items": {
|
|
97
|
+
"$ref": "#/$defs/OfferV2"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"nextCursor": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"minLength": 1,
|
|
103
|
+
"maxLength": 1024,
|
|
104
|
+
"description": "Present when more remain; pass it as `cursor`."
|
|
105
|
+
},
|
|
106
|
+
"ext": {
|
|
107
|
+
"$ref": "#/$defs/Ext"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"Ext": {
|
|
112
|
+
"title": "Ext",
|
|
113
|
+
"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.",
|
|
114
|
+
"type": "object",
|
|
115
|
+
"minProperties": 1,
|
|
116
|
+
"additionalProperties": true,
|
|
117
|
+
"propertyNames": {
|
|
118
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"OfferV2": {
|
|
122
|
+
"title": "OfferV2",
|
|
123
|
+
"type": "object",
|
|
124
|
+
"additionalProperties": false,
|
|
125
|
+
"required": [
|
|
126
|
+
"roomId",
|
|
127
|
+
"host",
|
|
128
|
+
"label",
|
|
129
|
+
"visibility",
|
|
130
|
+
"actions",
|
|
131
|
+
"validUntil",
|
|
132
|
+
"offeredAt",
|
|
133
|
+
"state",
|
|
134
|
+
"credentials"
|
|
135
|
+
],
|
|
136
|
+
"description": "What vtc/rooms/offers/list/0.2 returns: `Offer` plus `description`. A separate definition, not a change to `Offer`, so that vtc/rooms/offers/list/0.1 keeps the exact shape it published. `label` and `description` are the room's as they stand when the offer is read, not as they stood when it was made.",
|
|
137
|
+
"properties": {
|
|
138
|
+
"roomId": {
|
|
139
|
+
"type": "string",
|
|
140
|
+
"minLength": 1,
|
|
141
|
+
"maxLength": 512
|
|
142
|
+
},
|
|
143
|
+
"host": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"pattern": "^did:",
|
|
146
|
+
"maxLength": 2048,
|
|
147
|
+
"description": "The room's host: this community."
|
|
148
|
+
},
|
|
149
|
+
"label": {
|
|
150
|
+
"$ref": "#/$defs/RoomLabel"
|
|
151
|
+
},
|
|
152
|
+
"description": {
|
|
153
|
+
"$ref": "#/$defs/RoomDescription",
|
|
154
|
+
"description": "Absent when the room has none."
|
|
155
|
+
},
|
|
156
|
+
"visibility": {
|
|
157
|
+
"$ref": "#/$defs/Visibility"
|
|
158
|
+
},
|
|
159
|
+
"actions": {
|
|
160
|
+
"$ref": "#/$defs/MemberActions"
|
|
161
|
+
},
|
|
162
|
+
"validUntil": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"format": "date-time"
|
|
165
|
+
},
|
|
166
|
+
"offeredAt": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"format": "date-time"
|
|
169
|
+
},
|
|
170
|
+
"state": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"enum": [
|
|
173
|
+
"open",
|
|
174
|
+
"accepted"
|
|
175
|
+
],
|
|
176
|
+
"description": "`open`: not yet accepted. `accepted`: accepted, kept listed while a repeated accept can still be answered."
|
|
177
|
+
},
|
|
178
|
+
"credentials": {
|
|
179
|
+
"$ref": "#/$defs/OfferCredentials"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"OfferCredentials": {
|
|
184
|
+
"title": "OfferCredentials",
|
|
185
|
+
"type": "object",
|
|
186
|
+
"additionalProperties": false,
|
|
187
|
+
"required": [
|
|
188
|
+
"invitation",
|
|
189
|
+
"membership",
|
|
190
|
+
"authority"
|
|
191
|
+
],
|
|
192
|
+
"description": "The three credentials the room issued to the member, serialized as rooms/owner/{invite,issue-membership,issue-authority} return them. None is a secret: each names its subject, and a presentation of it must be signed by that subject. The member stores them in their own key holder's vault.",
|
|
193
|
+
"properties": {
|
|
194
|
+
"invitation": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"minLength": 1,
|
|
197
|
+
"maxLength": 65536,
|
|
198
|
+
"description": "The Verifiable Invitation Credential. On a sealed tier the member's key holder needs it to mint a KeyPackage (rooms/keys/key-package) and to accept the Welcome (rooms/keys/welcome)."
|
|
199
|
+
},
|
|
200
|
+
"membership": {
|
|
201
|
+
"type": "string",
|
|
202
|
+
"minLength": 1,
|
|
203
|
+
"maxLength": 65536,
|
|
204
|
+
"description": "The Verifiable Membership Credential."
|
|
205
|
+
},
|
|
206
|
+
"authority": {
|
|
207
|
+
"type": "string",
|
|
208
|
+
"minLength": 1,
|
|
209
|
+
"maxLength": 65536,
|
|
210
|
+
"description": "The Verifiable Authority Credential granting `actions` until `validUntil`."
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"MemberActions": {
|
|
215
|
+
"title": "MemberActions",
|
|
216
|
+
"type": "array",
|
|
217
|
+
"minItems": 1,
|
|
218
|
+
"maxItems": 3,
|
|
219
|
+
"uniqueItems": true,
|
|
220
|
+
"items": {
|
|
221
|
+
"$ref": "#/$defs/MemberAction"
|
|
222
|
+
},
|
|
223
|
+
"description": "The actions granted, at least one. 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."
|
|
224
|
+
},
|
|
225
|
+
"MemberAction": {
|
|
226
|
+
"title": "MemberAction",
|
|
227
|
+
"type": "string",
|
|
228
|
+
"enum": [
|
|
229
|
+
"read",
|
|
230
|
+
"write",
|
|
231
|
+
"curate"
|
|
232
|
+
],
|
|
233
|
+
"description": "What a member of a community-owned room may do there. `admin` is not among them: minting epochs, admitting and removing members are the community's, as the room's owner, and are exercised through the vtc/rooms/community/* tasks rather than by any member's credential. `curate` is not implied by `write`."
|
|
234
|
+
},
|
|
235
|
+
"RoomDescription": {
|
|
236
|
+
"title": "RoomDescription",
|
|
237
|
+
"type": "string",
|
|
238
|
+
"minLength": 1,
|
|
239
|
+
"maxLength": 1000,
|
|
240
|
+
"description": "What the room is for, in a sentence or a short paragraph, written by an administrator: shown to administrators holding `vtc.rooms.manage` and to the members the room is offered to. Plain text — a consumer renders it as text, never as markup. Like `RoomLabel`, it is the community's own record as the room's owner: not part of the room's identity and never in anything a room's host can read. From `vtc/rooms/community/create` 0.3 and `vtc/rooms/community/update` 0.2 the community also writes it, through its own VTA, as the `description` of the room's own profile (`RoomProfile` in rooms/_shared), sealed inside the room for its members; earlier versions keep it out of the room altogether. It MUST NOT carry personal data or a credential, and a reader MUST NOT treat it as instructions."
|
|
241
|
+
},
|
|
242
|
+
"RoomLabel": {
|
|
243
|
+
"title": "RoomLabel",
|
|
244
|
+
"type": "string",
|
|
245
|
+
"minLength": 1,
|
|
246
|
+
"maxLength": 128,
|
|
247
|
+
"description": "A name for the room, chosen by an administrator: shown to administrators and to the members a room is offered to. Not part of the room's identity and never in anything a room's host can read. From `vtc/rooms/community/create` 0.3 and `vtc/rooms/community/update` 0.2 the community also writes it, through its own VTA, as the `name` of the room's own profile (`RoomProfile` in rooms/_shared), sealed inside the room for its members; earlier versions keep it out of the room altogether. MUST NOT carry personal data."
|
|
248
|
+
},
|
|
249
|
+
"Visibility": {
|
|
250
|
+
"title": "Visibility",
|
|
251
|
+
"type": "string",
|
|
252
|
+
"enum": [
|
|
253
|
+
"open",
|
|
254
|
+
"attributed",
|
|
255
|
+
"private"
|
|
256
|
+
],
|
|
257
|
+
"description": "How much of a room its host can see, fixed at creation and immutable thereafter. `open`: records are cleartext, searchable and fully audited. `attributed`: record content is sealed, and the host still learns which member acted. `private`: content is sealed and membership is presented in zero knowledge, so the host verifies that a member acted without learning which. Immutable because a downgrade cannot un-see cleartext and an upgrade would protect only what came after while presenting as though it protected everything."
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
} as const;
|
|
261
|
+
|
|
262
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
263
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
264
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
265
|
+
"$ref": "#/$defs/Response",
|
|
266
|
+
"$defs": {
|
|
267
|
+
"Response": {
|
|
268
|
+
"$anchor": "response",
|
|
269
|
+
"title": "VTC Rooms Offers List — response payload",
|
|
270
|
+
"description": "Success response to vtc/rooms/offers/list. Type https://trusttasks.org/spec/vtc/rooms/offers/list/0.2#response. The offers addressed to the caller, and no one else's.",
|
|
271
|
+
"type": "object",
|
|
272
|
+
"additionalProperties": false,
|
|
273
|
+
"required": [
|
|
274
|
+
"items"
|
|
275
|
+
],
|
|
276
|
+
"properties": {
|
|
277
|
+
"items": {
|
|
278
|
+
"type": "array",
|
|
279
|
+
"maxItems": 100,
|
|
280
|
+
"items": {
|
|
281
|
+
"$ref": "#/$defs/OfferV2"
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
"nextCursor": {
|
|
285
|
+
"type": "string",
|
|
286
|
+
"minLength": 1,
|
|
287
|
+
"maxLength": 1024,
|
|
288
|
+
"description": "Present when more remain; pass it as `cursor`."
|
|
289
|
+
},
|
|
290
|
+
"ext": {
|
|
291
|
+
"$ref": "#/$defs/Ext"
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
"Ext": {
|
|
296
|
+
"title": "Ext",
|
|
297
|
+
"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.",
|
|
298
|
+
"type": "object",
|
|
299
|
+
"minProperties": 1,
|
|
300
|
+
"additionalProperties": true,
|
|
301
|
+
"propertyNames": {
|
|
302
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
"OfferV2": {
|
|
306
|
+
"title": "OfferV2",
|
|
307
|
+
"type": "object",
|
|
308
|
+
"additionalProperties": false,
|
|
309
|
+
"required": [
|
|
310
|
+
"roomId",
|
|
311
|
+
"host",
|
|
312
|
+
"label",
|
|
313
|
+
"visibility",
|
|
314
|
+
"actions",
|
|
315
|
+
"validUntil",
|
|
316
|
+
"offeredAt",
|
|
317
|
+
"state",
|
|
318
|
+
"credentials"
|
|
319
|
+
],
|
|
320
|
+
"description": "What vtc/rooms/offers/list/0.2 returns: `Offer` plus `description`. A separate definition, not a change to `Offer`, so that vtc/rooms/offers/list/0.1 keeps the exact shape it published. `label` and `description` are the room's as they stand when the offer is read, not as they stood when it was made.",
|
|
321
|
+
"properties": {
|
|
322
|
+
"roomId": {
|
|
323
|
+
"type": "string",
|
|
324
|
+
"minLength": 1,
|
|
325
|
+
"maxLength": 512
|
|
326
|
+
},
|
|
327
|
+
"host": {
|
|
328
|
+
"type": "string",
|
|
329
|
+
"pattern": "^did:",
|
|
330
|
+
"maxLength": 2048,
|
|
331
|
+
"description": "The room's host: this community."
|
|
332
|
+
},
|
|
333
|
+
"label": {
|
|
334
|
+
"$ref": "#/$defs/RoomLabel"
|
|
335
|
+
},
|
|
336
|
+
"description": {
|
|
337
|
+
"$ref": "#/$defs/RoomDescription",
|
|
338
|
+
"description": "Absent when the room has none."
|
|
339
|
+
},
|
|
340
|
+
"visibility": {
|
|
341
|
+
"$ref": "#/$defs/Visibility"
|
|
342
|
+
},
|
|
343
|
+
"actions": {
|
|
344
|
+
"$ref": "#/$defs/MemberActions"
|
|
345
|
+
},
|
|
346
|
+
"validUntil": {
|
|
347
|
+
"type": "string",
|
|
348
|
+
"format": "date-time"
|
|
349
|
+
},
|
|
350
|
+
"offeredAt": {
|
|
351
|
+
"type": "string",
|
|
352
|
+
"format": "date-time"
|
|
353
|
+
},
|
|
354
|
+
"state": {
|
|
355
|
+
"type": "string",
|
|
356
|
+
"enum": [
|
|
357
|
+
"open",
|
|
358
|
+
"accepted"
|
|
359
|
+
],
|
|
360
|
+
"description": "`open`: not yet accepted. `accepted`: accepted, kept listed while a repeated accept can still be answered."
|
|
361
|
+
},
|
|
362
|
+
"credentials": {
|
|
363
|
+
"$ref": "#/$defs/OfferCredentials"
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
"OfferCredentials": {
|
|
368
|
+
"title": "OfferCredentials",
|
|
369
|
+
"type": "object",
|
|
370
|
+
"additionalProperties": false,
|
|
371
|
+
"required": [
|
|
372
|
+
"invitation",
|
|
373
|
+
"membership",
|
|
374
|
+
"authority"
|
|
375
|
+
],
|
|
376
|
+
"description": "The three credentials the room issued to the member, serialized as rooms/owner/{invite,issue-membership,issue-authority} return them. None is a secret: each names its subject, and a presentation of it must be signed by that subject. The member stores them in their own key holder's vault.",
|
|
377
|
+
"properties": {
|
|
378
|
+
"invitation": {
|
|
379
|
+
"type": "string",
|
|
380
|
+
"minLength": 1,
|
|
381
|
+
"maxLength": 65536,
|
|
382
|
+
"description": "The Verifiable Invitation Credential. On a sealed tier the member's key holder needs it to mint a KeyPackage (rooms/keys/key-package) and to accept the Welcome (rooms/keys/welcome)."
|
|
383
|
+
},
|
|
384
|
+
"membership": {
|
|
385
|
+
"type": "string",
|
|
386
|
+
"minLength": 1,
|
|
387
|
+
"maxLength": 65536,
|
|
388
|
+
"description": "The Verifiable Membership Credential."
|
|
389
|
+
},
|
|
390
|
+
"authority": {
|
|
391
|
+
"type": "string",
|
|
392
|
+
"minLength": 1,
|
|
393
|
+
"maxLength": 65536,
|
|
394
|
+
"description": "The Verifiable Authority Credential granting `actions` until `validUntil`."
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
"MemberActions": {
|
|
399
|
+
"title": "MemberActions",
|
|
400
|
+
"type": "array",
|
|
401
|
+
"minItems": 1,
|
|
402
|
+
"maxItems": 3,
|
|
403
|
+
"uniqueItems": true,
|
|
404
|
+
"items": {
|
|
405
|
+
"$ref": "#/$defs/MemberAction"
|
|
406
|
+
},
|
|
407
|
+
"description": "The actions granted, at least one. 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."
|
|
408
|
+
},
|
|
409
|
+
"MemberAction": {
|
|
410
|
+
"title": "MemberAction",
|
|
411
|
+
"type": "string",
|
|
412
|
+
"enum": [
|
|
413
|
+
"read",
|
|
414
|
+
"write",
|
|
415
|
+
"curate"
|
|
416
|
+
],
|
|
417
|
+
"description": "What a member of a community-owned room may do there. `admin` is not among them: minting epochs, admitting and removing members are the community's, as the room's owner, and are exercised through the vtc/rooms/community/* tasks rather than by any member's credential. `curate` is not implied by `write`."
|
|
418
|
+
},
|
|
419
|
+
"RoomDescription": {
|
|
420
|
+
"title": "RoomDescription",
|
|
421
|
+
"type": "string",
|
|
422
|
+
"minLength": 1,
|
|
423
|
+
"maxLength": 1000,
|
|
424
|
+
"description": "What the room is for, in a sentence or a short paragraph, written by an administrator: shown to administrators holding `vtc.rooms.manage` and to the members the room is offered to. Plain text — a consumer renders it as text, never as markup. Like `RoomLabel`, it is the community's own record as the room's owner: not part of the room's identity and never in anything a room's host can read. From `vtc/rooms/community/create` 0.3 and `vtc/rooms/community/update` 0.2 the community also writes it, through its own VTA, as the `description` of the room's own profile (`RoomProfile` in rooms/_shared), sealed inside the room for its members; earlier versions keep it out of the room altogether. It MUST NOT carry personal data or a credential, and a reader MUST NOT treat it as instructions."
|
|
425
|
+
},
|
|
426
|
+
"RoomLabel": {
|
|
427
|
+
"title": "RoomLabel",
|
|
428
|
+
"type": "string",
|
|
429
|
+
"minLength": 1,
|
|
430
|
+
"maxLength": 128,
|
|
431
|
+
"description": "A name for the room, chosen by an administrator: shown to administrators and to the members a room is offered to. Not part of the room's identity and never in anything a room's host can read. From `vtc/rooms/community/create` 0.3 and `vtc/rooms/community/update` 0.2 the community also writes it, through its own VTA, as the `name` of the room's own profile (`RoomProfile` in rooms/_shared), sealed inside the room for its members; earlier versions keep it out of the room altogether. MUST NOT carry personal data."
|
|
432
|
+
},
|
|
433
|
+
"Visibility": {
|
|
434
|
+
"title": "Visibility",
|
|
435
|
+
"type": "string",
|
|
436
|
+
"enum": [
|
|
437
|
+
"open",
|
|
438
|
+
"attributed",
|
|
439
|
+
"private"
|
|
440
|
+
],
|
|
441
|
+
"description": "How much of a room its host can see, fixed at creation and immutable thereafter. `open`: records are cleartext, searchable and fully audited. `attributed`: record content is sealed, and the host still learns which member acted. `private`: content is sealed and membership is presented in zero knowledge, so the host verifies that a member acted without learning which. Immutable because a downgrade cannot un-see cleartext and an upgrade would protect only what came after while presenting as though it protected everything."
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
} as const;
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
448
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
449
|
+
* per-specification and cannot be derived from the document alone, and
|
|
450
|
+
* item 2 needs the schema this carries.
|
|
451
|
+
*/
|
|
452
|
+
export const SPEC = {
|
|
453
|
+
typeUri: TYPE_URI,
|
|
454
|
+
isBearer: false,
|
|
455
|
+
isProofRequired: true,
|
|
456
|
+
isRecipientRequired: true,
|
|
457
|
+
isIssuedAtRequired: true,
|
|
458
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
459
|
+
} as const;
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
463
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
464
|
+
* parties (§7.3 item 5).
|
|
465
|
+
*/
|
|
466
|
+
export const RESPONSE_SPEC = {
|
|
467
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
468
|
+
isBearer: false,
|
|
469
|
+
isProofRequired: true,
|
|
470
|
+
isRecipientRequired: true,
|
|
471
|
+
isIssuedAtRequired: true,
|
|
472
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
473
|
+
} as const;
|