@openvtc/trust-tasks 0.26.18 → 0.26.20
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 +87 -0
- package/dist/_shared/components.d.ts +113 -1
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/rooms/owner/group/add/0.3/payload.d.ts +417 -0
- package/dist/rooms/owner/group/add/0.3/payload.d.ts.map +1 -0
- package/dist/rooms/owner/group/add/0.3/payload.js +218 -0
- package/dist/rooms/owner/group/add/0.3/payload.js.map +1 -0
- package/dist/rooms/owner/group/renew/0.2/payload.d.ts +299 -0
- package/dist/rooms/owner/group/renew/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/owner/group/renew/0.2/payload.js +163 -0
- package/dist/rooms/owner/group/renew/0.2/payload.js.map +1 -0
- package/dist/vtc/directory/_shared/0.1/directory-card.d.ts +1 -1
- package/dist/vtc/directory/_shared/0.1/directory-card.d.ts.map +1 -1
- package/dist/vtc/directory/_shared/0.1/disclosure-statement.d.ts +18 -0
- package/dist/vtc/directory/_shared/0.1/disclosure-statement.d.ts.map +1 -0
- package/dist/vtc/directory/_shared/0.1/disclosure-statement.js +6 -0
- package/dist/vtc/directory/_shared/0.1/disclosure-statement.js.map +1 -0
- package/dist/vtc/directory/card/assert/0.1/payload.d.ts +4 -4
- package/dist/vtc/directory/card/assert/0.1/payload.js +2 -2
- package/dist/vtc/directory/card/assert/0.1/payload.js.map +1 -1
- package/dist/vtc/directory/card/public/0.1/payload.d.ts +348 -0
- package/dist/vtc/directory/card/public/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/directory/card/public/0.1/payload.js +197 -0
- package/dist/vtc/directory/card/public/0.1/payload.js.map +1 -0
- package/dist/vtc/directory/card/publish/0.1/payload.d.ts +384 -0
- package/dist/vtc/directory/card/publish/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/directory/card/publish/0.1/payload.js +222 -0
- package/dist/vtc/directory/card/publish/0.1/payload.js.map +1 -0
- package/dist/vtc/directory/card/show/0.1/payload.d.ts +138 -6
- package/dist/vtc/directory/card/show/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/directory/card/show/0.1/payload.js +82 -2
- package/dist/vtc/directory/card/show/0.1/payload.js.map +1 -1
- package/dist/vtc/directory/card/update/0.1/payload.d.ts +138 -6
- package/dist/vtc/directory/card/update/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/directory/card/update/0.1/payload.js +82 -2
- package/dist/vtc/directory/card/update/0.1/payload.js.map +1 -1
- package/dist/vtc/directory/disclosure/0.1/payload.d.ts +951 -0
- package/dist/vtc/directory/disclosure/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/directory/disclosure/0.1/payload.js +613 -0
- package/dist/vtc/directory/disclosure/0.1/payload.js.map +1 -0
- package/dist/vtc/directory/entries/list/0.1/payload.d.ts +4 -4
- package/dist/vtc/directory/entries/list/0.1/payload.js +2 -2
- package/dist/vtc/directory/entries/list/0.1/payload.js.map +1 -1
- package/dist/vtc/directory/entries/show/0.1/payload.d.ts +4 -4
- package/dist/vtc/directory/entries/show/0.1/payload.js +2 -2
- package/dist/vtc/directory/entries/show/0.1/payload.js.map +1 -1
- package/dist/vtc/directory/images/get/0.1/payload.d.ts +484 -0
- package/dist/vtc/directory/images/get/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/directory/images/get/0.1/payload.js +273 -0
- package/dist/vtc/directory/images/get/0.1/payload.js.map +1 -0
- package/dist/vtc/directory/images/upload/0.1/payload.d.ts +441 -0
- package/dist/vtc/directory/images/upload/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/directory/images/upload/0.1/payload.js +262 -0
- package/dist/vtc/directory/images/upload/0.1/payload.js.map +1 -0
- package/dist/vtc/directory/introduction/0.1/payload.d.ts +2 -2
- package/dist/vtc/directory/introduction/0.1/payload.js +1 -1
- package/dist/vtc/directory/introduction/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/join/0.1/payload.d.ts +4 -4
- package/dist/vtc/groups/join/0.1/payload.js +2 -2
- package/dist/vtc/groups/join/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/members/add/0.1/payload.d.ts +4 -4
- package/dist/vtc/groups/members/add/0.1/payload.js +2 -2
- package/dist/vtc/groups/members/add/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/members/list/0.1/payload.d.ts +4 -4
- package/dist/vtc/groups/members/list/0.1/payload.js +2 -2
- package/dist/vtc/groups/members/list/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/requests/decide/0.1/payload.d.ts +4 -4
- package/dist/vtc/groups/requests/decide/0.1/payload.js +2 -2
- package/dist/vtc/groups/requests/decide/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/requests/list/0.1/payload.d.ts +4 -4
- package/dist/vtc/groups/requests/list/0.1/payload.js +2 -2
- package/dist/vtc/groups/requests/list/0.1/payload.js.map +1 -1
- package/dist/vtc/join-requests/manifest/0.4/payload.d.ts +2303 -0
- package/dist/vtc/join-requests/manifest/0.4/payload.d.ts.map +1 -0
- package/dist/vtc/join-requests/manifest/0.4/payload.js +1293 -0
- package/dist/vtc/join-requests/manifest/0.4/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +113 -1
- package/src/index.ts +9 -0
- package/src/rooms/owner/group/add/0.3/payload.ts +288 -0
- package/src/rooms/owner/group/renew/0.2/payload.ts +213 -0
- package/src/vtc/directory/_shared/0.1/directory-card.ts +1 -1
- package/src/vtc/directory/_shared/0.1/disclosure-statement.ts +19 -0
- package/src/vtc/directory/card/assert/0.1/payload.ts +2 -2
- package/src/vtc/directory/card/public/0.1/payload.ts +238 -0
- package/src/vtc/directory/card/publish/0.1/payload.ts +261 -0
- package/src/vtc/directory/card/show/0.1/payload.ts +84 -4
- package/src/vtc/directory/card/update/0.1/payload.ts +84 -4
- package/src/vtc/directory/disclosure/0.1/payload.ts +645 -0
- package/src/vtc/directory/entries/list/0.1/payload.ts +2 -2
- package/src/vtc/directory/entries/show/0.1/payload.ts +2 -2
- package/src/vtc/directory/images/get/0.1/payload.ts +320 -0
- package/src/vtc/directory/images/upload/0.1/payload.ts +308 -0
- package/src/vtc/directory/introduction/0.1/payload.ts +1 -1
- package/src/vtc/groups/join/0.1/payload.ts +2 -2
- package/src/vtc/groups/members/add/0.1/payload.ts +2 -2
- package/src/vtc/groups/members/list/0.1/payload.ts +2 -2
- package/src/vtc/groups/requests/decide/0.1/payload.ts +2 -2
- package/src/vtc/groups/requests/list/0.1/payload.ts +2 -2
- package/src/vtc/join-requests/manifest/0.4/payload.ts +1490 -0
|
@@ -0,0 +1,484 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/directory/images/get/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { CardBlobRef, EntryId, Ext, FieldKey } from "../../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* Read the bytes of an image on a directory entry, where the caller's projection of that entry shows it. The outer document members are owned by the framework — SPEC §6.3.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTCDirectoryImagesGetPayload {
|
|
10
|
+
entryId: EntryId;
|
|
11
|
+
/**
|
|
12
|
+
* The image field: `avatar` or a community field of type `image`.
|
|
13
|
+
*/
|
|
14
|
+
field: FieldKey;
|
|
15
|
+
/**
|
|
16
|
+
* The image the caller expects, from the `CardBlobRef` it was shown. Where the field now holds another, the answer is `notFound`, so a reader never shows a picture under a card it did not come from.
|
|
17
|
+
*/
|
|
18
|
+
sha256?: string;
|
|
19
|
+
ext?: Ext;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The success response to a vtc/directory/images/get/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/directory/images/get/0.1#response.
|
|
23
|
+
*/
|
|
24
|
+
export interface VTCDirectoryImagesGetResponsePayload {
|
|
25
|
+
/**
|
|
26
|
+
* The image as stored, without `url` or `urlExpiresAt`.
|
|
27
|
+
*/
|
|
28
|
+
image: CardBlobRef;
|
|
29
|
+
/**
|
|
30
|
+
* The stored bytes, base64url without padding. Their SHA-256 is `image.sha256`.
|
|
31
|
+
*/
|
|
32
|
+
data: string;
|
|
33
|
+
ext?: Ext;
|
|
34
|
+
}
|
|
35
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
36
|
+
export type { CardBlobRef, EntryId, Ext, FieldKey };
|
|
37
|
+
/** Trust Task type URI. */
|
|
38
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/directory/images/get/0.1";
|
|
39
|
+
/** Stable alias for this specification's request payload shape. */
|
|
40
|
+
export type Payload = VTCDirectoryImagesGetPayload;
|
|
41
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
42
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vtc/directory/images/get/0.1#response";
|
|
43
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
44
|
+
export type Response = VTCDirectoryImagesGetResponsePayload;
|
|
45
|
+
/**
|
|
46
|
+
* This specification's payload schema, as a value.
|
|
47
|
+
*
|
|
48
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
49
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
50
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
51
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
52
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
53
|
+
*/
|
|
54
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
55
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
56
|
+
readonly $id: "https://trusttasks.org/spec/vtc/directory/images/get/0.1";
|
|
57
|
+
readonly title: "VTC Directory — Images — Get — payload";
|
|
58
|
+
readonly description: "Read the bytes of an image on a directory entry, where the caller's projection of that entry shows it. The outer document members are owned by the framework — SPEC §6.3.";
|
|
59
|
+
readonly type: "object";
|
|
60
|
+
readonly additionalProperties: false;
|
|
61
|
+
readonly required: readonly ["entryId", "field"];
|
|
62
|
+
readonly properties: {
|
|
63
|
+
readonly entryId: {
|
|
64
|
+
readonly $ref: "#/$defs/EntryId";
|
|
65
|
+
};
|
|
66
|
+
readonly field: {
|
|
67
|
+
readonly $ref: "#/$defs/FieldKey";
|
|
68
|
+
readonly description: "The image field: `avatar` or a community field of type `image`.";
|
|
69
|
+
};
|
|
70
|
+
readonly sha256: {
|
|
71
|
+
readonly type: "string";
|
|
72
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
73
|
+
readonly description: "The image the caller expects, from the `CardBlobRef` it was shown. Where the field now holds another, the answer is `notFound`, so a reader never shows a picture under a card it did not come from.";
|
|
74
|
+
};
|
|
75
|
+
readonly ext: {
|
|
76
|
+
readonly $ref: "#/$defs/Ext";
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
readonly $defs: {
|
|
80
|
+
readonly Response: {
|
|
81
|
+
readonly $anchor: "response";
|
|
82
|
+
readonly title: "VTC Directory — Images — Get — response payload";
|
|
83
|
+
readonly description: "The success response to a vtc/directory/images/get/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/directory/images/get/0.1#response.";
|
|
84
|
+
readonly type: "object";
|
|
85
|
+
readonly additionalProperties: false;
|
|
86
|
+
readonly required: readonly ["image", "data"];
|
|
87
|
+
readonly properties: {
|
|
88
|
+
readonly image: {
|
|
89
|
+
readonly $ref: "#/$defs/CardBlobRef";
|
|
90
|
+
readonly description: "The image as stored, without `url` or `urlExpiresAt`.";
|
|
91
|
+
};
|
|
92
|
+
readonly data: {
|
|
93
|
+
readonly type: "string";
|
|
94
|
+
readonly minLength: 1;
|
|
95
|
+
readonly maxLength: 349526;
|
|
96
|
+
readonly pattern: "^[A-Za-z0-9_-]+$";
|
|
97
|
+
readonly description: "The stored bytes, base64url without padding. Their SHA-256 is `image.sha256`.";
|
|
98
|
+
};
|
|
99
|
+
readonly ext: {
|
|
100
|
+
readonly $ref: "#/$defs/Ext";
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
readonly Ext: {
|
|
105
|
+
readonly title: "Ext";
|
|
106
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
107
|
+
readonly type: "object";
|
|
108
|
+
readonly minProperties: 1;
|
|
109
|
+
readonly additionalProperties: true;
|
|
110
|
+
readonly propertyNames: {
|
|
111
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
readonly CardBlobRef: {
|
|
115
|
+
readonly title: "CardBlobRef";
|
|
116
|
+
readonly description: "A content-addressed image held in the community's blob store — an avatar or an `image` field. At most 256 KiB, images only, re-encoded by the community on upload (vtc/directory/images/upload: metadata stripped, dimensions capped) so its digest does not link the member across communities. A viewer reads the bytes with vtc/directory/images/get, which answers only where the same projection shows the value. `url` and `urlExpiresAt` MAY appear in a projection: a short-lived URL the community checks against the same projection, so a member-only image is never a public URL. A community that does not offer one leaves both out.";
|
|
117
|
+
readonly type: "object";
|
|
118
|
+
readonly additionalProperties: false;
|
|
119
|
+
readonly required: readonly ["sha256", "mediaType"];
|
|
120
|
+
readonly properties: {
|
|
121
|
+
readonly sha256: {
|
|
122
|
+
readonly type: "string";
|
|
123
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
124
|
+
readonly description: "Lowercase hex SHA-256 of the stored, re-encoded bytes.";
|
|
125
|
+
};
|
|
126
|
+
readonly mediaType: {
|
|
127
|
+
readonly type: "string";
|
|
128
|
+
readonly enum: readonly ["image/png", "image/jpeg", "image/webp", "image/avif"];
|
|
129
|
+
readonly description: "Media type of the stored bytes.";
|
|
130
|
+
};
|
|
131
|
+
readonly size: {
|
|
132
|
+
readonly type: "integer";
|
|
133
|
+
readonly minimum: 1;
|
|
134
|
+
readonly maximum: 262144;
|
|
135
|
+
readonly description: "Size in bytes of the stored bytes.";
|
|
136
|
+
};
|
|
137
|
+
readonly url: {
|
|
138
|
+
readonly type: "string";
|
|
139
|
+
readonly format: "uri";
|
|
140
|
+
readonly maxLength: 2048;
|
|
141
|
+
readonly description: "Projection only: a URL the viewer can fetch the image from until `urlExpiresAt`.";
|
|
142
|
+
};
|
|
143
|
+
readonly urlExpiresAt: {
|
|
144
|
+
readonly type: "string";
|
|
145
|
+
readonly format: "date-time";
|
|
146
|
+
readonly description: "Projection only: when `url` stops working.";
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
readonly FieldKey: {
|
|
151
|
+
readonly title: "FieldKey";
|
|
152
|
+
readonly description: "Identifier of a directory field. A key with no `.` is a BASE field, the same in every community: `displayName`, `nickname`, `avatar`, `pronouns`, `bio`, `links` (written by the member) and `role`, `joinedAt`, `did`, `personhood` (derived from the community's own records, never stored on a card). A community-defined field MUST use a reverse-DNS key (`org.example.employer`), so a base key never collides with one, and a key is never reused with a different meaning once defined.";
|
|
153
|
+
readonly type: "string";
|
|
154
|
+
readonly minLength: 1;
|
|
155
|
+
readonly maxLength: 128;
|
|
156
|
+
readonly pattern: "^([a-z][a-z0-9-]*\\.)*[a-z][a-zA-Z0-9]{0,63}$";
|
|
157
|
+
};
|
|
158
|
+
readonly EntryId: {
|
|
159
|
+
readonly title: "EntryId";
|
|
160
|
+
readonly description: "Opaque identifier of one directory entry: `dir_` followed by 16 to 64 base64url characters. Random, scoped to one community, and stable for the life of the membership — it survives a rotation of the member's DID, which is why groups, notes and cards are keyed by it. It MUST NOT be derived from, and MUST NOT reveal, any DID of the member, and the same person's entries in two communities MUST NOT share one. Compared by exact string equality.";
|
|
161
|
+
readonly type: "string";
|
|
162
|
+
readonly pattern: "^dir_[A-Za-z0-9_-]{16,64}$";
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
167
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
168
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
169
|
+
readonly $ref: "#/$defs/Response";
|
|
170
|
+
readonly $defs: {
|
|
171
|
+
readonly Response: {
|
|
172
|
+
readonly $anchor: "response";
|
|
173
|
+
readonly title: "VTC Directory — Images — Get — response payload";
|
|
174
|
+
readonly description: "The success response to a vtc/directory/images/get/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/directory/images/get/0.1#response.";
|
|
175
|
+
readonly type: "object";
|
|
176
|
+
readonly additionalProperties: false;
|
|
177
|
+
readonly required: readonly ["image", "data"];
|
|
178
|
+
readonly properties: {
|
|
179
|
+
readonly image: {
|
|
180
|
+
readonly $ref: "#/$defs/CardBlobRef";
|
|
181
|
+
readonly description: "The image as stored, without `url` or `urlExpiresAt`.";
|
|
182
|
+
};
|
|
183
|
+
readonly data: {
|
|
184
|
+
readonly type: "string";
|
|
185
|
+
readonly minLength: 1;
|
|
186
|
+
readonly maxLength: 349526;
|
|
187
|
+
readonly pattern: "^[A-Za-z0-9_-]+$";
|
|
188
|
+
readonly description: "The stored bytes, base64url without padding. Their SHA-256 is `image.sha256`.";
|
|
189
|
+
};
|
|
190
|
+
readonly ext: {
|
|
191
|
+
readonly $ref: "#/$defs/Ext";
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
readonly Ext: {
|
|
196
|
+
readonly title: "Ext";
|
|
197
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
198
|
+
readonly type: "object";
|
|
199
|
+
readonly minProperties: 1;
|
|
200
|
+
readonly additionalProperties: true;
|
|
201
|
+
readonly propertyNames: {
|
|
202
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
readonly CardBlobRef: {
|
|
206
|
+
readonly title: "CardBlobRef";
|
|
207
|
+
readonly description: "A content-addressed image held in the community's blob store — an avatar or an `image` field. At most 256 KiB, images only, re-encoded by the community on upload (vtc/directory/images/upload: metadata stripped, dimensions capped) so its digest does not link the member across communities. A viewer reads the bytes with vtc/directory/images/get, which answers only where the same projection shows the value. `url` and `urlExpiresAt` MAY appear in a projection: a short-lived URL the community checks against the same projection, so a member-only image is never a public URL. A community that does not offer one leaves both out.";
|
|
208
|
+
readonly type: "object";
|
|
209
|
+
readonly additionalProperties: false;
|
|
210
|
+
readonly required: readonly ["sha256", "mediaType"];
|
|
211
|
+
readonly properties: {
|
|
212
|
+
readonly sha256: {
|
|
213
|
+
readonly type: "string";
|
|
214
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
215
|
+
readonly description: "Lowercase hex SHA-256 of the stored, re-encoded bytes.";
|
|
216
|
+
};
|
|
217
|
+
readonly mediaType: {
|
|
218
|
+
readonly type: "string";
|
|
219
|
+
readonly enum: readonly ["image/png", "image/jpeg", "image/webp", "image/avif"];
|
|
220
|
+
readonly description: "Media type of the stored bytes.";
|
|
221
|
+
};
|
|
222
|
+
readonly size: {
|
|
223
|
+
readonly type: "integer";
|
|
224
|
+
readonly minimum: 1;
|
|
225
|
+
readonly maximum: 262144;
|
|
226
|
+
readonly description: "Size in bytes of the stored bytes.";
|
|
227
|
+
};
|
|
228
|
+
readonly url: {
|
|
229
|
+
readonly type: "string";
|
|
230
|
+
readonly format: "uri";
|
|
231
|
+
readonly maxLength: 2048;
|
|
232
|
+
readonly description: "Projection only: a URL the viewer can fetch the image from until `urlExpiresAt`.";
|
|
233
|
+
};
|
|
234
|
+
readonly urlExpiresAt: {
|
|
235
|
+
readonly type: "string";
|
|
236
|
+
readonly format: "date-time";
|
|
237
|
+
readonly description: "Projection only: when `url` stops working.";
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
readonly FieldKey: {
|
|
242
|
+
readonly title: "FieldKey";
|
|
243
|
+
readonly description: "Identifier of a directory field. A key with no `.` is a BASE field, the same in every community: `displayName`, `nickname`, `avatar`, `pronouns`, `bio`, `links` (written by the member) and `role`, `joinedAt`, `did`, `personhood` (derived from the community's own records, never stored on a card). A community-defined field MUST use a reverse-DNS key (`org.example.employer`), so a base key never collides with one, and a key is never reused with a different meaning once defined.";
|
|
244
|
+
readonly type: "string";
|
|
245
|
+
readonly minLength: 1;
|
|
246
|
+
readonly maxLength: 128;
|
|
247
|
+
readonly pattern: "^([a-z][a-z0-9-]*\\.)*[a-z][a-zA-Z0-9]{0,63}$";
|
|
248
|
+
};
|
|
249
|
+
readonly EntryId: {
|
|
250
|
+
readonly title: "EntryId";
|
|
251
|
+
readonly description: "Opaque identifier of one directory entry: `dir_` followed by 16 to 64 base64url characters. Random, scoped to one community, and stable for the life of the membership — it survives a rotation of the member's DID, which is why groups, notes and cards are keyed by it. It MUST NOT be derived from, and MUST NOT reveal, any DID of the member, and the same person's entries in two communities MUST NOT share one. Compared by exact string equality.";
|
|
252
|
+
readonly type: "string";
|
|
253
|
+
readonly pattern: "^dir_[A-Za-z0-9_-]{16,64}$";
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
/**
|
|
258
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
259
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
260
|
+
* per-specification and cannot be derived from the document alone, and
|
|
261
|
+
* item 2 needs the schema this carries.
|
|
262
|
+
*/
|
|
263
|
+
export declare const SPEC: {
|
|
264
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/directory/images/get/0.1";
|
|
265
|
+
readonly isBearer: false;
|
|
266
|
+
readonly isProofRequired: false;
|
|
267
|
+
readonly isRecipientRequired: true;
|
|
268
|
+
readonly isIssuedAtRequired: false;
|
|
269
|
+
readonly payloadSchema: {
|
|
270
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
271
|
+
readonly $id: "https://trusttasks.org/spec/vtc/directory/images/get/0.1";
|
|
272
|
+
readonly title: "VTC Directory — Images — Get — payload";
|
|
273
|
+
readonly description: "Read the bytes of an image on a directory entry, where the caller's projection of that entry shows it. The outer document members are owned by the framework — SPEC §6.3.";
|
|
274
|
+
readonly type: "object";
|
|
275
|
+
readonly additionalProperties: false;
|
|
276
|
+
readonly required: readonly ["entryId", "field"];
|
|
277
|
+
readonly properties: {
|
|
278
|
+
readonly entryId: {
|
|
279
|
+
readonly $ref: "#/$defs/EntryId";
|
|
280
|
+
};
|
|
281
|
+
readonly field: {
|
|
282
|
+
readonly $ref: "#/$defs/FieldKey";
|
|
283
|
+
readonly description: "The image field: `avatar` or a community field of type `image`.";
|
|
284
|
+
};
|
|
285
|
+
readonly sha256: {
|
|
286
|
+
readonly type: "string";
|
|
287
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
288
|
+
readonly description: "The image the caller expects, from the `CardBlobRef` it was shown. Where the field now holds another, the answer is `notFound`, so a reader never shows a picture under a card it did not come from.";
|
|
289
|
+
};
|
|
290
|
+
readonly ext: {
|
|
291
|
+
readonly $ref: "#/$defs/Ext";
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
readonly $defs: {
|
|
295
|
+
readonly Response: {
|
|
296
|
+
readonly $anchor: "response";
|
|
297
|
+
readonly title: "VTC Directory — Images — Get — response payload";
|
|
298
|
+
readonly description: "The success response to a vtc/directory/images/get/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/directory/images/get/0.1#response.";
|
|
299
|
+
readonly type: "object";
|
|
300
|
+
readonly additionalProperties: false;
|
|
301
|
+
readonly required: readonly ["image", "data"];
|
|
302
|
+
readonly properties: {
|
|
303
|
+
readonly image: {
|
|
304
|
+
readonly $ref: "#/$defs/CardBlobRef";
|
|
305
|
+
readonly description: "The image as stored, without `url` or `urlExpiresAt`.";
|
|
306
|
+
};
|
|
307
|
+
readonly data: {
|
|
308
|
+
readonly type: "string";
|
|
309
|
+
readonly minLength: 1;
|
|
310
|
+
readonly maxLength: 349526;
|
|
311
|
+
readonly pattern: "^[A-Za-z0-9_-]+$";
|
|
312
|
+
readonly description: "The stored bytes, base64url without padding. Their SHA-256 is `image.sha256`.";
|
|
313
|
+
};
|
|
314
|
+
readonly ext: {
|
|
315
|
+
readonly $ref: "#/$defs/Ext";
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
readonly Ext: {
|
|
320
|
+
readonly title: "Ext";
|
|
321
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
322
|
+
readonly type: "object";
|
|
323
|
+
readonly minProperties: 1;
|
|
324
|
+
readonly additionalProperties: true;
|
|
325
|
+
readonly propertyNames: {
|
|
326
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
readonly CardBlobRef: {
|
|
330
|
+
readonly title: "CardBlobRef";
|
|
331
|
+
readonly description: "A content-addressed image held in the community's blob store — an avatar or an `image` field. At most 256 KiB, images only, re-encoded by the community on upload (vtc/directory/images/upload: metadata stripped, dimensions capped) so its digest does not link the member across communities. A viewer reads the bytes with vtc/directory/images/get, which answers only where the same projection shows the value. `url` and `urlExpiresAt` MAY appear in a projection: a short-lived URL the community checks against the same projection, so a member-only image is never a public URL. A community that does not offer one leaves both out.";
|
|
332
|
+
readonly type: "object";
|
|
333
|
+
readonly additionalProperties: false;
|
|
334
|
+
readonly required: readonly ["sha256", "mediaType"];
|
|
335
|
+
readonly properties: {
|
|
336
|
+
readonly sha256: {
|
|
337
|
+
readonly type: "string";
|
|
338
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
339
|
+
readonly description: "Lowercase hex SHA-256 of the stored, re-encoded bytes.";
|
|
340
|
+
};
|
|
341
|
+
readonly mediaType: {
|
|
342
|
+
readonly type: "string";
|
|
343
|
+
readonly enum: readonly ["image/png", "image/jpeg", "image/webp", "image/avif"];
|
|
344
|
+
readonly description: "Media type of the stored bytes.";
|
|
345
|
+
};
|
|
346
|
+
readonly size: {
|
|
347
|
+
readonly type: "integer";
|
|
348
|
+
readonly minimum: 1;
|
|
349
|
+
readonly maximum: 262144;
|
|
350
|
+
readonly description: "Size in bytes of the stored bytes.";
|
|
351
|
+
};
|
|
352
|
+
readonly url: {
|
|
353
|
+
readonly type: "string";
|
|
354
|
+
readonly format: "uri";
|
|
355
|
+
readonly maxLength: 2048;
|
|
356
|
+
readonly description: "Projection only: a URL the viewer can fetch the image from until `urlExpiresAt`.";
|
|
357
|
+
};
|
|
358
|
+
readonly urlExpiresAt: {
|
|
359
|
+
readonly type: "string";
|
|
360
|
+
readonly format: "date-time";
|
|
361
|
+
readonly description: "Projection only: when `url` stops working.";
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
readonly FieldKey: {
|
|
366
|
+
readonly title: "FieldKey";
|
|
367
|
+
readonly description: "Identifier of a directory field. A key with no `.` is a BASE field, the same in every community: `displayName`, `nickname`, `avatar`, `pronouns`, `bio`, `links` (written by the member) and `role`, `joinedAt`, `did`, `personhood` (derived from the community's own records, never stored on a card). A community-defined field MUST use a reverse-DNS key (`org.example.employer`), so a base key never collides with one, and a key is never reused with a different meaning once defined.";
|
|
368
|
+
readonly type: "string";
|
|
369
|
+
readonly minLength: 1;
|
|
370
|
+
readonly maxLength: 128;
|
|
371
|
+
readonly pattern: "^([a-z][a-z0-9-]*\\.)*[a-z][a-zA-Z0-9]{0,63}$";
|
|
372
|
+
};
|
|
373
|
+
readonly EntryId: {
|
|
374
|
+
readonly title: "EntryId";
|
|
375
|
+
readonly description: "Opaque identifier of one directory entry: `dir_` followed by 16 to 64 base64url characters. Random, scoped to one community, and stable for the life of the membership — it survives a rotation of the member's DID, which is why groups, notes and cards are keyed by it. It MUST NOT be derived from, and MUST NOT reveal, any DID of the member, and the same person's entries in two communities MUST NOT share one. Compared by exact string equality.";
|
|
376
|
+
readonly type: "string";
|
|
377
|
+
readonly pattern: "^dir_[A-Za-z0-9_-]{16,64}$";
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
/**
|
|
383
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
384
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
385
|
+
* parties (§7.3 item 5).
|
|
386
|
+
*/
|
|
387
|
+
export declare const RESPONSE_SPEC: {
|
|
388
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/directory/images/get/0.1#response";
|
|
389
|
+
readonly isBearer: false;
|
|
390
|
+
readonly isProofRequired: false;
|
|
391
|
+
readonly isRecipientRequired: true;
|
|
392
|
+
readonly isIssuedAtRequired: false;
|
|
393
|
+
readonly payloadSchema: {
|
|
394
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
395
|
+
readonly $ref: "#/$defs/Response";
|
|
396
|
+
readonly $defs: {
|
|
397
|
+
readonly Response: {
|
|
398
|
+
readonly $anchor: "response";
|
|
399
|
+
readonly title: "VTC Directory — Images — Get — response payload";
|
|
400
|
+
readonly description: "The success response to a vtc/directory/images/get/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/directory/images/get/0.1#response.";
|
|
401
|
+
readonly type: "object";
|
|
402
|
+
readonly additionalProperties: false;
|
|
403
|
+
readonly required: readonly ["image", "data"];
|
|
404
|
+
readonly properties: {
|
|
405
|
+
readonly image: {
|
|
406
|
+
readonly $ref: "#/$defs/CardBlobRef";
|
|
407
|
+
readonly description: "The image as stored, without `url` or `urlExpiresAt`.";
|
|
408
|
+
};
|
|
409
|
+
readonly data: {
|
|
410
|
+
readonly type: "string";
|
|
411
|
+
readonly minLength: 1;
|
|
412
|
+
readonly maxLength: 349526;
|
|
413
|
+
readonly pattern: "^[A-Za-z0-9_-]+$";
|
|
414
|
+
readonly description: "The stored bytes, base64url without padding. Their SHA-256 is `image.sha256`.";
|
|
415
|
+
};
|
|
416
|
+
readonly ext: {
|
|
417
|
+
readonly $ref: "#/$defs/Ext";
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
readonly Ext: {
|
|
422
|
+
readonly title: "Ext";
|
|
423
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
424
|
+
readonly type: "object";
|
|
425
|
+
readonly minProperties: 1;
|
|
426
|
+
readonly additionalProperties: true;
|
|
427
|
+
readonly propertyNames: {
|
|
428
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
readonly CardBlobRef: {
|
|
432
|
+
readonly title: "CardBlobRef";
|
|
433
|
+
readonly description: "A content-addressed image held in the community's blob store — an avatar or an `image` field. At most 256 KiB, images only, re-encoded by the community on upload (vtc/directory/images/upload: metadata stripped, dimensions capped) so its digest does not link the member across communities. A viewer reads the bytes with vtc/directory/images/get, which answers only where the same projection shows the value. `url` and `urlExpiresAt` MAY appear in a projection: a short-lived URL the community checks against the same projection, so a member-only image is never a public URL. A community that does not offer one leaves both out.";
|
|
434
|
+
readonly type: "object";
|
|
435
|
+
readonly additionalProperties: false;
|
|
436
|
+
readonly required: readonly ["sha256", "mediaType"];
|
|
437
|
+
readonly properties: {
|
|
438
|
+
readonly sha256: {
|
|
439
|
+
readonly type: "string";
|
|
440
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
441
|
+
readonly description: "Lowercase hex SHA-256 of the stored, re-encoded bytes.";
|
|
442
|
+
};
|
|
443
|
+
readonly mediaType: {
|
|
444
|
+
readonly type: "string";
|
|
445
|
+
readonly enum: readonly ["image/png", "image/jpeg", "image/webp", "image/avif"];
|
|
446
|
+
readonly description: "Media type of the stored bytes.";
|
|
447
|
+
};
|
|
448
|
+
readonly size: {
|
|
449
|
+
readonly type: "integer";
|
|
450
|
+
readonly minimum: 1;
|
|
451
|
+
readonly maximum: 262144;
|
|
452
|
+
readonly description: "Size in bytes of the stored bytes.";
|
|
453
|
+
};
|
|
454
|
+
readonly url: {
|
|
455
|
+
readonly type: "string";
|
|
456
|
+
readonly format: "uri";
|
|
457
|
+
readonly maxLength: 2048;
|
|
458
|
+
readonly description: "Projection only: a URL the viewer can fetch the image from until `urlExpiresAt`.";
|
|
459
|
+
};
|
|
460
|
+
readonly urlExpiresAt: {
|
|
461
|
+
readonly type: "string";
|
|
462
|
+
readonly format: "date-time";
|
|
463
|
+
readonly description: "Projection only: when `url` stops working.";
|
|
464
|
+
};
|
|
465
|
+
};
|
|
466
|
+
};
|
|
467
|
+
readonly FieldKey: {
|
|
468
|
+
readonly title: "FieldKey";
|
|
469
|
+
readonly description: "Identifier of a directory field. A key with no `.` is a BASE field, the same in every community: `displayName`, `nickname`, `avatar`, `pronouns`, `bio`, `links` (written by the member) and `role`, `joinedAt`, `did`, `personhood` (derived from the community's own records, never stored on a card). A community-defined field MUST use a reverse-DNS key (`org.example.employer`), so a base key never collides with one, and a key is never reused with a different meaning once defined.";
|
|
470
|
+
readonly type: "string";
|
|
471
|
+
readonly minLength: 1;
|
|
472
|
+
readonly maxLength: 128;
|
|
473
|
+
readonly pattern: "^([a-z][a-z0-9-]*\\.)*[a-z][a-zA-Z0-9]{0,63}$";
|
|
474
|
+
};
|
|
475
|
+
readonly EntryId: {
|
|
476
|
+
readonly title: "EntryId";
|
|
477
|
+
readonly description: "Opaque identifier of one directory entry: `dir_` followed by 16 to 64 base64url characters. Random, scoped to one community, and stable for the life of the membership — it survives a rotation of the member's DID, which is why groups, notes and cards are keyed by it. It MUST NOT be derived from, and MUST NOT reveal, any DID of the member, and the same person's entries in two communities MUST NOT share one. Compared by exact string equality.";
|
|
478
|
+
readonly type: "string";
|
|
479
|
+
readonly pattern: "^dir_[A-Za-z0-9_-]{16,64}$";
|
|
480
|
+
};
|
|
481
|
+
};
|
|
482
|
+
};
|
|
483
|
+
};
|
|
484
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../../src/vtc/directory/images/get/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAGhG;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,QAAQ,CAAC;IAChB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACnD;;OAEG;IACH,KAAK,EAAE,WAAW,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;AAEpD,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,0DAAmE,CAAC;AAE5F,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,4BAA4B,CAAC;AAEnD,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,mEAA4E,CAAC;AAE9G,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,oCAAoC,CAAC;AAE5D;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6HjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoG1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
|