@openvtc/trust-tasks 0.28.25 → 0.28.26
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 +84 -0
- package/dist/_extends.d.ts.map +1 -1
- package/dist/_extends.js +9 -0
- package/dist/_extends.js.map +1 -1
- package/dist/_shared/components.d.ts +117 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/acl/_shared/0.3/acl-entry.d.ts +24 -0
- package/dist/acl/_shared/0.3/acl-entry.d.ts.map +1 -0
- package/dist/acl/_shared/0.3/acl-entry.js +6 -0
- package/dist/acl/_shared/0.3/acl-entry.js.map +1 -0
- package/dist/acl/change-role/0.1/payload.d.ts +4 -4
- package/dist/acl/change-role/0.1/payload.js +1 -1
- package/dist/acl/change-role/0.2/payload.d.ts +14 -2
- package/dist/acl/change-role/0.2/payload.d.ts.map +1 -1
- package/dist/acl/change-role/0.2/payload.js +1 -1
- package/dist/acl/change-role/0.2/payload.js.map +1 -1
- package/dist/acl/change-role/0.3/payload.d.ts +1925 -0
- package/dist/acl/change-role/0.3/payload.d.ts.map +1 -0
- package/dist/acl/change-role/0.3/payload.js +1109 -0
- package/dist/acl/change-role/0.3/payload.js.map +1 -0
- package/dist/acl/grant/0.1/payload.d.ts +4 -4
- package/dist/acl/grant/0.1/payload.js +1 -1
- package/dist/acl/grant/0.2/payload.d.ts +14 -2
- package/dist/acl/grant/0.2/payload.d.ts.map +1 -1
- package/dist/acl/grant/0.2/payload.js +1 -1
- package/dist/acl/grant/0.2/payload.js.map +1 -1
- package/dist/acl/grant/0.3/payload.d.ts +1895 -0
- package/dist/acl/grant/0.3/payload.d.ts.map +1 -0
- package/dist/acl/grant/0.3/payload.js +1096 -0
- package/dist/acl/grant/0.3/payload.js.map +1 -0
- package/dist/acl/list/0.1/payload.d.ts +4 -4
- package/dist/acl/list/0.1/payload.js +1 -1
- package/dist/acl/list/0.2/payload.d.ts +4 -4
- package/dist/acl/list/0.2/payload.js +1 -1
- package/dist/acl/list/0.3/payload.d.ts +14 -2
- package/dist/acl/list/0.3/payload.d.ts.map +1 -1
- package/dist/acl/list/0.3/payload.js +1 -1
- package/dist/acl/list/0.3/payload.js.map +1 -1
- package/dist/acl/list/0.4/payload.d.ts +2079 -0
- package/dist/acl/list/0.4/payload.d.ts.map +1 -0
- package/dist/acl/list/0.4/payload.js +1185 -0
- package/dist/acl/list/0.4/payload.js.map +1 -0
- package/dist/acl/revoke/0.1/payload.d.ts +4 -4
- package/dist/acl/revoke/0.1/payload.js +1 -1
- package/dist/acl/revoke/0.2/payload.d.ts +14 -2
- package/dist/acl/revoke/0.2/payload.d.ts.map +1 -1
- package/dist/acl/revoke/0.2/payload.js +1 -1
- package/dist/acl/revoke/0.2/payload.js.map +1 -1
- package/dist/acl/revoke/0.3/payload.d.ts +2090 -0
- package/dist/acl/revoke/0.3/payload.d.ts.map +1 -0
- package/dist/acl/revoke/0.3/payload.js +1206 -0
- package/dist/acl/revoke/0.3/payload.js.map +1 -0
- package/dist/acl/show/0.1/payload.d.ts +4 -4
- package/dist/acl/show/0.1/payload.js +1 -1
- package/dist/acl/show/0.2/payload.d.ts +14 -2
- package/dist/acl/show/0.2/payload.d.ts.map +1 -1
- package/dist/acl/show/0.2/payload.js +1 -1
- package/dist/acl/show/0.2/payload.js.map +1 -1
- package/dist/acl/show/0.3/payload.d.ts +1935 -0
- package/dist/acl/show/0.3/payload.d.ts.map +1 -0
- package/dist/acl/show/0.3/payload.js +1122 -0
- package/dist/acl/show/0.3/payload.js.map +1 -0
- package/dist/acl/update/0.1/payload.d.ts +4 -4
- package/dist/acl/update/0.1/payload.js +1 -1
- package/dist/acl/update/0.2/payload.d.ts +14 -2
- package/dist/acl/update/0.2/payload.d.ts.map +1 -1
- package/dist/acl/update/0.2/payload.js +1 -1
- package/dist/acl/update/0.2/payload.js.map +1 -1
- package/dist/acl/update/0.3/payload.d.ts +2042 -0
- package/dist/acl/update/0.3/payload.d.ts.map +1 -0
- package/dist/acl/update/0.3/payload.js +1163 -0
- package/dist/acl/update/0.3/payload.js.map +1 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +48 -0
- package/dist/index.js.map +1 -1
- package/dist/rooms/_shared/0.2/room.d.ts +1 -1
- package/dist/rooms/_shared/0.2/room.d.ts.map +1 -1
- package/dist/rooms/keys/file-key/0.1/payload.d.ts +4 -4
- package/dist/rooms/keys/file-key/0.1/payload.js +1 -1
- package/dist/rooms/keys/file-key/0.2/payload.d.ts +14 -2
- package/dist/rooms/keys/file-key/0.2/payload.d.ts.map +1 -1
- package/dist/rooms/keys/file-key/0.2/payload.js +1 -1
- package/dist/rooms/keys/file-key/0.2/payload.js.map +1 -1
- package/dist/rooms/keys/file-key/0.3/payload.d.ts +396 -0
- package/dist/rooms/keys/file-key/0.3/payload.d.ts.map +1 -0
- package/dist/rooms/keys/file-key/0.3/payload.js +223 -0
- package/dist/rooms/keys/file-key/0.3/payload.js.map +1 -0
- package/dist/rooms/keys/open/0.1/payload.d.ts +4 -4
- package/dist/rooms/keys/open/0.1/payload.js +1 -1
- package/dist/rooms/keys/open/0.2/payload.d.ts +14 -2
- package/dist/rooms/keys/open/0.2/payload.d.ts.map +1 -1
- package/dist/rooms/keys/open/0.2/payload.js +1 -1
- package/dist/rooms/keys/open/0.2/payload.js.map +1 -1
- package/dist/rooms/keys/open/0.3/payload.d.ts +413 -0
- package/dist/rooms/keys/open/0.3/payload.d.ts.map +1 -0
- package/dist/rooms/keys/open/0.3/payload.js +227 -0
- package/dist/rooms/keys/open/0.3/payload.js.map +1 -0
- package/dist/rooms/keys/read/0.1/payload.d.ts +4 -4
- package/dist/rooms/keys/read/0.1/payload.js +1 -1
- package/dist/rooms/keys/read/0.2/payload.d.ts +14 -2
- package/dist/rooms/keys/read/0.2/payload.d.ts.map +1 -1
- package/dist/rooms/keys/read/0.2/payload.js +1 -1
- package/dist/rooms/keys/read/0.2/payload.js.map +1 -1
- package/dist/rooms/keys/read/0.3/payload.d.ts +1363 -0
- package/dist/rooms/keys/read/0.3/payload.d.ts.map +1 -0
- package/dist/rooms/keys/read/0.3/payload.js +731 -0
- package/dist/rooms/keys/read/0.3/payload.js.map +1 -0
- package/dist/rooms/owner/issue-authority/0.2/payload.d.ts +13 -2
- package/dist/rooms/owner/issue-authority/0.2/payload.d.ts.map +1 -1
- package/dist/rooms/owner/issue-authority/0.2/payload.js +1 -1
- package/dist/rooms/owner/issue-authority/0.2/payload.js.map +1 -1
- package/dist/rooms/owner/issue-authority/0.3/payload.d.ts +557 -0
- package/dist/rooms/owner/issue-authority/0.3/payload.d.ts.map +1 -0
- package/dist/rooms/owner/issue-authority/0.3/payload.js +322 -0
- package/dist/rooms/owner/issue-authority/0.3/payload.js.map +1 -0
- package/dist/rooms/records/get/0.1/payload.d.ts +4 -4
- package/dist/rooms/records/get/0.1/payload.js +1 -1
- package/dist/rooms/records/get/0.2/payload.d.ts +4 -4
- package/dist/rooms/records/get/0.2/payload.js +1 -1
- package/dist/rooms/records/get/0.3/payload.d.ts +13 -2
- package/dist/rooms/records/get/0.3/payload.d.ts.map +1 -1
- package/dist/rooms/records/get/0.3/payload.js +1 -1
- package/dist/rooms/records/get/0.3/payload.js.map +1 -1
- package/dist/rooms/records/get/0.4/payload.d.ts +1140 -0
- package/dist/rooms/records/get/0.4/payload.d.ts.map +1 -0
- package/dist/rooms/records/get/0.4/payload.js +613 -0
- package/dist/rooms/records/get/0.4/payload.js.map +1 -0
- package/dist/vault/sign-trust-task/0.2/payload.d.ts +5 -5
- package/dist/vault/sign-trust-task/0.2/payload.js +2 -2
- package/dist/vta/_shared/0.1/memory-record.d.ts +1 -1
- package/dist/vta/_shared/0.1/memory-record.d.ts.map +1 -1
- package/dist/vta/memory/delete/0.1/payload.d.ts +4 -4
- package/dist/vta/memory/delete/0.1/payload.js +1 -1
- package/dist/vta/memory/delete/0.2/payload.d.ts +14 -2
- package/dist/vta/memory/delete/0.2/payload.d.ts.map +1 -1
- package/dist/vta/memory/delete/0.2/payload.js +1 -1
- package/dist/vta/memory/delete/0.2/payload.js.map +1 -1
- package/dist/vta/memory/delete/0.3/payload.d.ts +491 -0
- package/dist/vta/memory/delete/0.3/payload.d.ts.map +1 -0
- package/dist/vta/memory/delete/0.3/payload.js +266 -0
- package/dist/vta/memory/delete/0.3/payload.js.map +1 -0
- package/dist/vta/memory/get/0.1/payload.d.ts +14 -2
- package/dist/vta/memory/get/0.1/payload.d.ts.map +1 -1
- package/dist/vta/memory/get/0.1/payload.js +1 -1
- package/dist/vta/memory/get/0.1/payload.js.map +1 -1
- package/dist/vta/memory/get/0.2/payload.d.ts +722 -0
- package/dist/vta/memory/get/0.2/payload.d.ts.map +1 -0
- package/dist/vta/memory/get/0.2/payload.js +391 -0
- package/dist/vta/memory/get/0.2/payload.js.map +1 -0
- package/dist/vta/memory/list/0.1/payload.d.ts +4 -4
- package/dist/vta/memory/list/0.1/payload.js +1 -1
- package/dist/vta/memory/list/0.2/payload.d.ts +14 -2
- package/dist/vta/memory/list/0.2/payload.d.ts.map +1 -1
- package/dist/vta/memory/list/0.2/payload.js +1 -1
- package/dist/vta/memory/list/0.2/payload.js.map +1 -1
- package/dist/vta/memory/list/0.3/payload.d.ts +769 -0
- package/dist/vta/memory/list/0.3/payload.d.ts.map +1 -0
- package/dist/vta/memory/list/0.3/payload.js +405 -0
- package/dist/vta/memory/list/0.3/payload.js.map +1 -0
- package/dist/vta/memory/put/0.1/payload.d.ts +4 -4
- package/dist/vta/memory/put/0.1/payload.js +1 -1
- package/dist/vta/memory/put/0.2/payload.d.ts +14 -2
- package/dist/vta/memory/put/0.2/payload.d.ts.map +1 -1
- package/dist/vta/memory/put/0.2/payload.js +1 -1
- package/dist/vta/memory/put/0.2/payload.js.map +1 -1
- package/dist/vta/memory/put/0.3/payload.d.ts +566 -0
- package/dist/vta/memory/put/0.3/payload.d.ts.map +1 -0
- package/dist/vta/memory/put/0.3/payload.js +306 -0
- package/dist/vta/memory/put/0.3/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_extends.ts +9 -0
- package/src/_shared/components.ts +117 -0
- package/src/acl/_shared/0.3/acl-entry.ts +25 -0
- package/src/acl/change-role/0.1/payload.ts +5 -5
- package/src/acl/change-role/0.2/payload.ts +15 -3
- package/src/acl/change-role/0.3/payload.ts +1167 -0
- package/src/acl/grant/0.1/payload.ts +5 -5
- package/src/acl/grant/0.2/payload.ts +15 -3
- package/src/acl/grant/0.3/payload.ts +1146 -0
- package/src/acl/list/0.1/payload.ts +5 -5
- package/src/acl/list/0.2/payload.ts +5 -5
- package/src/acl/list/0.3/payload.ts +15 -3
- package/src/acl/list/0.4/payload.ts +1267 -0
- package/src/acl/revoke/0.1/payload.ts +5 -5
- package/src/acl/revoke/0.2/payload.ts +15 -3
- package/src/acl/revoke/0.3/payload.ts +1278 -0
- package/src/acl/show/0.1/payload.ts +5 -5
- package/src/acl/show/0.2/payload.ts +15 -3
- package/src/acl/show/0.3/payload.ts +1172 -0
- package/src/acl/update/0.1/payload.ts +5 -5
- package/src/acl/update/0.2/payload.ts +15 -3
- package/src/acl/update/0.3/payload.ts +1258 -0
- package/src/index.ts +48 -0
- package/src/rooms/_shared/0.2/room.ts +1 -1
- package/src/rooms/keys/file-key/0.1/payload.ts +5 -5
- package/src/rooms/keys/file-key/0.2/payload.ts +15 -3
- package/src/rooms/keys/file-key/0.3/payload.ts +286 -0
- package/src/rooms/keys/open/0.1/payload.ts +5 -5
- package/src/rooms/keys/open/0.2/payload.ts +15 -3
- package/src/rooms/keys/open/0.3/payload.ts +299 -0
- package/src/rooms/keys/read/0.1/payload.ts +5 -5
- package/src/rooms/keys/read/0.2/payload.ts +15 -3
- package/src/rooms/keys/read/0.3/payload.ts +901 -0
- package/src/rooms/owner/issue-authority/0.2/payload.ts +14 -3
- package/src/rooms/owner/issue-authority/0.3/payload.ts +388 -0
- package/src/rooms/records/get/0.1/payload.ts +5 -5
- package/src/rooms/records/get/0.2/payload.ts +5 -5
- package/src/rooms/records/get/0.3/payload.ts +14 -3
- package/src/rooms/records/get/0.4/payload.ts +730 -0
- package/src/vault/sign-trust-task/0.2/payload.ts +3 -3
- package/src/vta/_shared/0.1/memory-record.ts +1 -1
- package/src/vta/memory/delete/0.1/payload.ts +5 -5
- package/src/vta/memory/delete/0.2/payload.ts +15 -3
- package/src/vta/memory/delete/0.3/payload.ts +334 -0
- package/src/vta/memory/get/0.1/payload.ts +15 -3
- package/src/vta/memory/get/0.2/payload.ts +460 -0
- package/src/vta/memory/list/0.1/payload.ts +5 -5
- package/src/vta/memory/list/0.2/payload.ts +15 -3
- package/src/vta/memory/list/0.3/payload.ts +491 -0
- package/src/vta/memory/put/0.1/payload.ts +5 -5
- package/src/vta/memory/put/0.2/payload.ts +15 -3
- package/src/vta/memory/put/0.3/payload.ts +379 -0
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/keys/open/0.3/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext, Purpose_AclV0_3 as Purpose, Purpose_AclV0_31, Purpose_AclV0_32, RecordPurpose } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* An agent asks the party holding its principal's room keys to open one sealed record. The key never crosses to the agent: this is a decryption oracle, not a key-release call.
|
|
11
|
+
*/
|
|
12
|
+
export interface RoomsKeysOpenPayload {
|
|
13
|
+
/**
|
|
14
|
+
* The room the record belongs to. Part of the record's associated data, so a caller naming the wrong room gets an authentication failure rather than someone else's plaintext.
|
|
15
|
+
*/
|
|
16
|
+
roomId: string;
|
|
17
|
+
/**
|
|
18
|
+
* The record's key within the room.
|
|
19
|
+
*/
|
|
20
|
+
key: string;
|
|
21
|
+
/**
|
|
22
|
+
* The record's version. Bound into the associated data, so a record served at a different version does not open.
|
|
23
|
+
*/
|
|
24
|
+
version: number;
|
|
25
|
+
/**
|
|
26
|
+
* The sealed record exactly as the host returned it.
|
|
27
|
+
*/
|
|
28
|
+
sealed: {
|
|
29
|
+
/**
|
|
30
|
+
* base64url.
|
|
31
|
+
*/
|
|
32
|
+
ciphertext: string;
|
|
33
|
+
/**
|
|
34
|
+
* base64url.
|
|
35
|
+
*/
|
|
36
|
+
nonce: string;
|
|
37
|
+
/**
|
|
38
|
+
* The epoch it was sealed under. The oracle refuses an epoch it holds no key for rather than guessing.
|
|
39
|
+
*/
|
|
40
|
+
epoch: number;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
44
|
+
*/
|
|
45
|
+
ext?: Ext;
|
|
46
|
+
/**
|
|
47
|
+
* OPTIONAL. The one purpose the caller will use the content this request discloses for (VTI-ACL-103), as `RecordPurpose` defines it. A purpose not granted is refused with `purposeNotGranted`. May be omitted where exactly one purpose is granted, or `any`.
|
|
48
|
+
*/
|
|
49
|
+
purpose?: RecordPurpose;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Success response to rooms/keys/open. Type https://trusttasks.org/spec/rooms/keys/open/0.2#response.
|
|
53
|
+
*/
|
|
54
|
+
export interface RoomsKeysOpenResponsePayload {
|
|
55
|
+
/**
|
|
56
|
+
* The opened record, base64url. The only thing that crosses back — never the key.
|
|
57
|
+
*/
|
|
58
|
+
plaintext: string;
|
|
59
|
+
ext?: Ext;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
63
|
+
export type { Ext, Purpose, Purpose_AclV0_31, Purpose_AclV0_32, RecordPurpose };
|
|
64
|
+
|
|
65
|
+
/** Trust Task type URI. */
|
|
66
|
+
export const TYPE_URI = "https://trusttasks.org/spec/rooms/keys/open/0.3" as const;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The earlier version of this specification that this one declares it
|
|
70
|
+
* extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
|
|
71
|
+
* `null`. Only the direct declaration — follow the chain with
|
|
72
|
+
* `extendsChain` / `readForSpec`.
|
|
73
|
+
*/
|
|
74
|
+
export const EXTENDS: string | null = "0.2";
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Why this version is deprecated, or `null` while it is current. A
|
|
78
|
+
* superseded or retired version is still supported, and is withdrawn from
|
|
79
|
+
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
80
|
+
* Versions").
|
|
81
|
+
*/
|
|
82
|
+
export const DEPRECATION: string | null = null;
|
|
83
|
+
|
|
84
|
+
/** Stable alias for this specification's request payload shape. */
|
|
85
|
+
export type Payload = RoomsKeysOpenPayload;
|
|
86
|
+
|
|
87
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
88
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/keys/open/0.3#response" as const;
|
|
89
|
+
|
|
90
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
91
|
+
export type Response = RoomsKeysOpenResponsePayload;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* This specification's payload schema, as a value.
|
|
95
|
+
*
|
|
96
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
97
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
98
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
99
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
100
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
101
|
+
*/
|
|
102
|
+
export const PAYLOAD_SCHEMA = {
|
|
103
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
104
|
+
"$id": "https://trusttasks.org/spec/rooms/keys/open/0.3",
|
|
105
|
+
"title": "Rooms Keys Open — payload",
|
|
106
|
+
"description": "An agent asks the party holding its principal's room keys to open one sealed record. The key never crosses to the agent: this is a decryption oracle, not a key-release call.",
|
|
107
|
+
"type": "object",
|
|
108
|
+
"additionalProperties": false,
|
|
109
|
+
"required": [
|
|
110
|
+
"roomId",
|
|
111
|
+
"key",
|
|
112
|
+
"version",
|
|
113
|
+
"sealed"
|
|
114
|
+
],
|
|
115
|
+
"properties": {
|
|
116
|
+
"roomId": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"description": "The room the record belongs to. Part of the record's associated data, so a caller naming the wrong room gets an authentication failure rather than someone else's plaintext."
|
|
119
|
+
},
|
|
120
|
+
"key": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"maxLength": 512,
|
|
123
|
+
"description": "The record's key within the room."
|
|
124
|
+
},
|
|
125
|
+
"version": {
|
|
126
|
+
"type": "integer",
|
|
127
|
+
"minimum": 1,
|
|
128
|
+
"description": "The record's version. Bound into the associated data, so a record served at a different version does not open."
|
|
129
|
+
},
|
|
130
|
+
"sealed": {
|
|
131
|
+
"type": "object",
|
|
132
|
+
"additionalProperties": false,
|
|
133
|
+
"required": [
|
|
134
|
+
"ciphertext",
|
|
135
|
+
"nonce",
|
|
136
|
+
"epoch"
|
|
137
|
+
],
|
|
138
|
+
"description": "The sealed record exactly as the host returned it.",
|
|
139
|
+
"properties": {
|
|
140
|
+
"ciphertext": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"description": "base64url."
|
|
143
|
+
},
|
|
144
|
+
"nonce": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"description": "base64url."
|
|
147
|
+
},
|
|
148
|
+
"epoch": {
|
|
149
|
+
"type": "integer",
|
|
150
|
+
"minimum": 1,
|
|
151
|
+
"description": "The epoch it was sealed under. The oracle refuses an epoch it holds no key for rather than guessing."
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"ext": {
|
|
156
|
+
"$ref": "#/$defs/Ext",
|
|
157
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
158
|
+
},
|
|
159
|
+
"purpose": {
|
|
160
|
+
"$ref": "#/$defs/RecordPurpose",
|
|
161
|
+
"description": "OPTIONAL. The one purpose the caller will use the content this request discloses for (VTI-ACL-103), as `RecordPurpose` defines it. A purpose not granted is refused with `purposeNotGranted`. May be omitted where exactly one purpose is granted, or `any`."
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"$defs": {
|
|
165
|
+
"Response": {
|
|
166
|
+
"$anchor": "response",
|
|
167
|
+
"title": "Rooms Keys Open — response payload",
|
|
168
|
+
"description": "Success response to rooms/keys/open. Type https://trusttasks.org/spec/rooms/keys/open/0.2#response.",
|
|
169
|
+
"type": "object",
|
|
170
|
+
"additionalProperties": false,
|
|
171
|
+
"required": [
|
|
172
|
+
"plaintext"
|
|
173
|
+
],
|
|
174
|
+
"properties": {
|
|
175
|
+
"plaintext": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"description": "The opened record, base64url. The only thing that crosses back — never the key."
|
|
178
|
+
},
|
|
179
|
+
"ext": {
|
|
180
|
+
"$ref": "#/$defs/Ext"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"Ext": {
|
|
185
|
+
"title": "Ext",
|
|
186
|
+
"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.",
|
|
187
|
+
"type": "object",
|
|
188
|
+
"minProperties": 1,
|
|
189
|
+
"additionalProperties": true,
|
|
190
|
+
"propertyNames": {
|
|
191
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"RecordPurpose": {
|
|
195
|
+
"title": "RecordPurpose",
|
|
196
|
+
"description": "The one purpose for which a caller will use room content a request discloses (VTI-ACL-103): a name registered in the VTI specification's purpose registry (`personalisation`, `taskExecution`, `analytics`, `modelTraining`) or an absolute IRI. Granted only as the caller's authority grants it — `any` grants every purpose but `modelTraining` — refused otherwise (`purposeNotGranted`), and recorded with the read. Distinct from `PermittedUse`, which is what a record's author permits and is a statement, not a grant.",
|
|
197
|
+
"$ref": "#/$defs/Purpose"
|
|
198
|
+
},
|
|
199
|
+
"Purpose": {
|
|
200
|
+
"title": "Purpose",
|
|
201
|
+
"description": "What content is used for: a lowerCamelCase name registered in the VTI specification's purpose registry (Appendix H) — `personalisation`, `taskExecution`, `analytics`, `modelTraining` at the time of writing — or an absolute IRI naming a purpose defined elsewhere, such as a purpose of the W3C Data Privacy Vocabulary (`https://w3id.org/dpv#ServicePersonalisation`). Compared by exact string equality: a consumer MUST NOT treat a purpose it does not recognise as equal to any other, and grants only a request naming exactly a listed purpose (VTI-ACL-109). A registered name is never an IRI, because it contains no `:`.",
|
|
202
|
+
"type": "string",
|
|
203
|
+
"maxLength": 2048,
|
|
204
|
+
"anyOf": [
|
|
205
|
+
{
|
|
206
|
+
"pattern": "^[a-z][a-zA-Z0-9]{0,63}$"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"pattern": "^[a-zA-Z][a-zA-Z0-9+.-]*:[^\\s]+$"
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
} as const;
|
|
215
|
+
|
|
216
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
217
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
218
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
219
|
+
"$ref": "#/$defs/Response",
|
|
220
|
+
"$defs": {
|
|
221
|
+
"Response": {
|
|
222
|
+
"$anchor": "response",
|
|
223
|
+
"title": "Rooms Keys Open — response payload",
|
|
224
|
+
"description": "Success response to rooms/keys/open. Type https://trusttasks.org/spec/rooms/keys/open/0.2#response.",
|
|
225
|
+
"type": "object",
|
|
226
|
+
"additionalProperties": false,
|
|
227
|
+
"required": [
|
|
228
|
+
"plaintext"
|
|
229
|
+
],
|
|
230
|
+
"properties": {
|
|
231
|
+
"plaintext": {
|
|
232
|
+
"type": "string",
|
|
233
|
+
"description": "The opened record, base64url. The only thing that crosses back — never the key."
|
|
234
|
+
},
|
|
235
|
+
"ext": {
|
|
236
|
+
"$ref": "#/$defs/Ext"
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"Ext": {
|
|
241
|
+
"title": "Ext",
|
|
242
|
+
"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.",
|
|
243
|
+
"type": "object",
|
|
244
|
+
"minProperties": 1,
|
|
245
|
+
"additionalProperties": true,
|
|
246
|
+
"propertyNames": {
|
|
247
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"RecordPurpose": {
|
|
251
|
+
"title": "RecordPurpose",
|
|
252
|
+
"description": "The one purpose for which a caller will use room content a request discloses (VTI-ACL-103): a name registered in the VTI specification's purpose registry (`personalisation`, `taskExecution`, `analytics`, `modelTraining`) or an absolute IRI. Granted only as the caller's authority grants it — `any` grants every purpose but `modelTraining` — refused otherwise (`purposeNotGranted`), and recorded with the read. Distinct from `PermittedUse`, which is what a record's author permits and is a statement, not a grant.",
|
|
253
|
+
"$ref": "#/$defs/Purpose"
|
|
254
|
+
},
|
|
255
|
+
"Purpose": {
|
|
256
|
+
"title": "Purpose",
|
|
257
|
+
"description": "What content is used for: a lowerCamelCase name registered in the VTI specification's purpose registry (Appendix H) — `personalisation`, `taskExecution`, `analytics`, `modelTraining` at the time of writing — or an absolute IRI naming a purpose defined elsewhere, such as a purpose of the W3C Data Privacy Vocabulary (`https://w3id.org/dpv#ServicePersonalisation`). Compared by exact string equality: a consumer MUST NOT treat a purpose it does not recognise as equal to any other, and grants only a request naming exactly a listed purpose (VTI-ACL-109). A registered name is never an IRI, because it contains no `:`.",
|
|
258
|
+
"type": "string",
|
|
259
|
+
"maxLength": 2048,
|
|
260
|
+
"anyOf": [
|
|
261
|
+
{
|
|
262
|
+
"pattern": "^[a-z][a-zA-Z0-9]{0,63}$"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"pattern": "^[a-zA-Z][a-zA-Z0-9+.-]*:[^\\s]+$"
|
|
266
|
+
}
|
|
267
|
+
]
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
} as const;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
274
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
275
|
+
* per-specification and cannot be derived from the document alone, and
|
|
276
|
+
* item 2 needs the schema this carries.
|
|
277
|
+
*/
|
|
278
|
+
export const SPEC = {
|
|
279
|
+
typeUri: TYPE_URI,
|
|
280
|
+
isBearer: false,
|
|
281
|
+
isProofRequired: true,
|
|
282
|
+
isRecipientRequired: true,
|
|
283
|
+
isIssuedAtRequired: true,
|
|
284
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
285
|
+
} as const;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
289
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
290
|
+
* parties (§7.3 item 5).
|
|
291
|
+
*/
|
|
292
|
+
export const RESPONSE_SPEC = {
|
|
293
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
294
|
+
isBearer: false,
|
|
295
|
+
isProofRequired: true,
|
|
296
|
+
isRecipientRequired: true,
|
|
297
|
+
isIssuedAtRequired: true,
|
|
298
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
299
|
+
} as const;
|
|
@@ -9,7 +9,7 @@ import type { DataCommitment, DigestMultibase, Ext, HeadVersion, ReadVerificatio
|
|
|
9
9
|
/**
|
|
10
10
|
* TODO: what the request payload of rooms/keys/read carries. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
11
11
|
*
|
|
12
|
-
* @deprecated superseded by rooms/keys/read/0.
|
|
12
|
+
* @deprecated superseded by rooms/keys/read/0.3
|
|
13
13
|
*/
|
|
14
14
|
export interface RoomsKeysReadPayload {
|
|
15
15
|
/**
|
|
@@ -32,7 +32,7 @@ export interface RoomsKeysReadPayload {
|
|
|
32
32
|
/**
|
|
33
33
|
* Success response to rooms/keys/read. Type https://trusttasks.org/spec/rooms/keys/read/0.1#response.
|
|
34
34
|
*
|
|
35
|
-
* @deprecated superseded by rooms/keys/read/0.
|
|
35
|
+
* @deprecated superseded by rooms/keys/read/0.3
|
|
36
36
|
*/
|
|
37
37
|
export interface RoomsKeysReadResponsePayload {
|
|
38
38
|
roomId: string;
|
|
@@ -87,12 +87,12 @@ export const EXTENDS: string | null = null;
|
|
|
87
87
|
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
88
88
|
* Versions").
|
|
89
89
|
*/
|
|
90
|
-
export const DEPRECATION: string | null = "superseded by rooms/keys/read/0.
|
|
90
|
+
export const DEPRECATION: string | null = "superseded by rooms/keys/read/0.3";
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* Stable alias for this specification's request payload shape.
|
|
94
94
|
*
|
|
95
|
-
* @deprecated superseded by rooms/keys/read/0.
|
|
95
|
+
* @deprecated superseded by rooms/keys/read/0.3
|
|
96
96
|
*/
|
|
97
97
|
export type Payload = RoomsKeysReadPayload;
|
|
98
98
|
|
|
@@ -102,7 +102,7 @@ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/keys/read/0.
|
|
|
102
102
|
/**
|
|
103
103
|
* Stable alias for this specification's success-response payload shape.
|
|
104
104
|
*
|
|
105
|
-
* @deprecated superseded by rooms/keys/read/0.
|
|
105
|
+
* @deprecated superseded by rooms/keys/read/0.3
|
|
106
106
|
*/
|
|
107
107
|
export type Response = RoomsKeysReadResponsePayload;
|
|
108
108
|
|
|
@@ -8,6 +8,8 @@ import type { DataCommitment, DigestMultibase, Ext, HeadVersion, ReadVerificatio
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* What a member asks of their own key holder: one record of a room (`key`), or up to 32 (`keys`), read from the named host, checked and opened. Exactly one of `key` and `keys` is present. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
11
|
+
*
|
|
12
|
+
* @deprecated superseded by rooms/keys/read/0.3
|
|
11
13
|
*/
|
|
12
14
|
export interface RoomsKeysReadPayload {
|
|
13
15
|
/**
|
|
@@ -36,6 +38,8 @@ export interface RoomsKeysReadPayload {
|
|
|
36
38
|
}
|
|
37
39
|
/**
|
|
38
40
|
* Success response to rooms/keys/read. Type https://trusttasks.org/spec/rooms/keys/read/0.2#response. For a request naming `key`, the record and its verdict, as in 0.1, with `createdAt` and `createdBy`. For a request naming `keys`, `results`: one entry per key, each its own success or error.
|
|
41
|
+
*
|
|
42
|
+
* @deprecated superseded by rooms/keys/read/0.3
|
|
39
43
|
*/
|
|
40
44
|
export interface RoomsKeysReadResponsePayload {
|
|
41
45
|
roomId: string;
|
|
@@ -173,15 +177,23 @@ export const EXTENDS: string | null = null;
|
|
|
173
177
|
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
174
178
|
* Versions").
|
|
175
179
|
*/
|
|
176
|
-
export const DEPRECATION: string | null =
|
|
180
|
+
export const DEPRECATION: string | null = "superseded by rooms/keys/read/0.3";
|
|
177
181
|
|
|
178
|
-
/**
|
|
182
|
+
/**
|
|
183
|
+
* Stable alias for this specification's request payload shape.
|
|
184
|
+
*
|
|
185
|
+
* @deprecated superseded by rooms/keys/read/0.3
|
|
186
|
+
*/
|
|
179
187
|
export type Payload = RoomsKeysReadPayload;
|
|
180
188
|
|
|
181
189
|
/** Trust Task response type URI (request type URI + "#response"). */
|
|
182
190
|
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/keys/read/0.2#response" as const;
|
|
183
191
|
|
|
184
|
-
/**
|
|
192
|
+
/**
|
|
193
|
+
* Stable alias for this specification's success-response payload shape.
|
|
194
|
+
*
|
|
195
|
+
* @deprecated superseded by rooms/keys/read/0.3
|
|
196
|
+
*/
|
|
185
197
|
export type Response = RoomsKeysReadResponsePayload;
|
|
186
198
|
|
|
187
199
|
/**
|