@openvtc/trust-tasks 0.28.18 → 0.28.19
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 +32 -0
- package/dist/_shared/components.d.ts +228 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +75 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +75 -0
- package/dist/index.js.map +1 -1
- package/dist/vtc/badges/_shared/0.1/badge.d.ts +22 -0
- package/dist/vtc/badges/_shared/0.1/badge.d.ts.map +1 -0
- package/dist/vtc/badges/_shared/0.1/badge.js +6 -0
- package/dist/vtc/badges/_shared/0.1/badge.js.map +1 -0
- package/dist/vtc/badges/awards/list/0.1/payload.d.ts +1228 -0
- package/dist/vtc/badges/awards/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/awards/list/0.1/payload.js +699 -0
- package/dist/vtc/badges/awards/list/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/awards/offer/0.1/payload.d.ts +793 -0
- package/dist/vtc/badges/awards/offer/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/awards/offer/0.1/payload.js +461 -0
- package/dist/vtc/badges/awards/offer/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/awards/revoke/0.1/payload.d.ts +605 -0
- package/dist/vtc/badges/awards/revoke/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/awards/revoke/0.1/payload.js +351 -0
- package/dist/vtc/badges/awards/revoke/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/awards/withdraw/0.1/payload.d.ts +605 -0
- package/dist/vtc/badges/awards/withdraw/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/awards/withdraw/0.1/payload.js +351 -0
- package/dist/vtc/badges/awards/withdraw/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/create/0.1/payload.d.ts +1829 -0
- package/dist/vtc/badges/create/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/create/0.1/payload.js +1051 -0
- package/dist/vtc/badges/create/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/holders/list/0.1/payload.d.ts +984 -0
- package/dist/vtc/badges/holders/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/holders/list/0.1/payload.js +555 -0
- package/dist/vtc/badges/holders/list/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/images/get/0.1/payload.d.ts +454 -0
- package/dist/vtc/badges/images/get/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/images/get/0.1/payload.js +266 -0
- package/dist/vtc/badges/images/get/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/images/upload/0.1/payload.d.ts +455 -0
- package/dist/vtc/badges/images/upload/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/images/upload/0.1/payload.js +276 -0
- package/dist/vtc/badges/images/upload/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/kudos/give/0.1/payload.d.ts +613 -0
- package/dist/vtc/badges/kudos/give/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/kudos/give/0.1/payload.js +353 -0
- package/dist/vtc/badges/kudos/give/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/kudos/list/0.1/payload.d.ts +1766 -0
- package/dist/vtc/badges/kudos/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/kudos/list/0.1/payload.js +995 -0
- package/dist/vtc/badges/kudos/list/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/list/0.1/payload.d.ts +1096 -0
- package/dist/vtc/badges/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/list/0.1/payload.js +617 -0
- package/dist/vtc/badges/list/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/mine/accept/0.1/payload.d.ts +1376 -0
- package/dist/vtc/badges/mine/accept/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/mine/accept/0.1/payload.js +799 -0
- package/dist/vtc/badges/mine/accept/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/mine/arrange/0.1/payload.d.ts +1217 -0
- package/dist/vtc/badges/mine/arrange/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/mine/arrange/0.1/payload.js +698 -0
- package/dist/vtc/badges/mine/arrange/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/mine/decline/0.1/payload.d.ts +589 -0
- package/dist/vtc/badges/mine/decline/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/mine/decline/0.1/payload.js +344 -0
- package/dist/vtc/badges/mine/decline/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/mine/hide/0.1/payload.d.ts +1093 -0
- package/dist/vtc/badges/mine/hide/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/mine/hide/0.1/payload.js +630 -0
- package/dist/vtc/badges/mine/hide/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/mine/list/0.1/payload.d.ts +1897 -0
- package/dist/vtc/badges/mine/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/mine/list/0.1/payload.js +1087 -0
- package/dist/vtc/badges/mine/list/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/mine/show/0.1/payload.d.ts +1093 -0
- package/dist/vtc/badges/mine/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/mine/show/0.1/payload.js +630 -0
- package/dist/vtc/badges/mine/show/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/promote/0.1/payload.d.ts +1757 -0
- package/dist/vtc/badges/promote/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/promote/0.1/payload.js +1018 -0
- package/dist/vtc/badges/promote/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/retire/0.1/payload.d.ts +904 -0
- package/dist/vtc/badges/retire/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/retire/0.1/payload.js +524 -0
- package/dist/vtc/badges/retire/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/settings/show/0.1/payload.d.ts +731 -0
- package/dist/vtc/badges/settings/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/settings/show/0.1/payload.js +421 -0
- package/dist/vtc/badges/settings/show/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/settings/update/0.1/payload.d.ts +775 -0
- package/dist/vtc/badges/settings/update/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/settings/update/0.1/payload.js +444 -0
- package/dist/vtc/badges/settings/update/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/show/0.1/payload.d.ts +1056 -0
- package/dist/vtc/badges/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/show/0.1/payload.js +613 -0
- package/dist/vtc/badges/show/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/update/0.1/payload.d.ts +1033 -0
- package/dist/vtc/badges/update/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/update/0.1/payload.js +588 -0
- package/dist/vtc/badges/update/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/wall/show/0.1/payload.d.ts +1099 -0
- package/dist/vtc/badges/wall/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/wall/show/0.1/payload.js +634 -0
- package/dist/vtc/badges/wall/show/0.1/payload.js.map +1 -0
- package/dist/vtc/groups/create/0.1/payload.d.ts +42 -2
- package/dist/vtc/groups/create/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/create/0.1/payload.js +20 -0
- package/dist/vtc/groups/create/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/list/0.1/payload.d.ts +42 -2
- package/dist/vtc/groups/list/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/list/0.1/payload.js +20 -0
- package/dist/vtc/groups/list/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/list/0.2/payload.d.ts +42 -2
- package/dist/vtc/groups/list/0.2/payload.d.ts.map +1 -1
- package/dist/vtc/groups/list/0.2/payload.js +20 -0
- package/dist/vtc/groups/list/0.2/payload.js.map +1 -1
- package/dist/vtc/groups/show/0.1/payload.d.ts +42 -2
- package/dist/vtc/groups/show/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/show/0.1/payload.js +20 -0
- package/dist/vtc/groups/show/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/update/0.1/payload.d.ts +42 -2
- package/dist/vtc/groups/update/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/update/0.1/payload.js +20 -0
- package/dist/vtc/groups/update/0.1/payload.js.map +1 -1
- package/package.json +1 -1
- package/src/_shared/components.ts +228 -0
- package/src/index.ts +75 -0
- package/src/vtc/badges/_shared/0.1/badge.ts +23 -0
- package/src/vtc/badges/awards/list/0.1/payload.ts +768 -0
- package/src/vtc/badges/awards/offer/0.1/payload.ts +530 -0
- package/src/vtc/badges/awards/revoke/0.1/payload.ts +395 -0
- package/src/vtc/badges/awards/withdraw/0.1/payload.ts +395 -0
- package/src/vtc/badges/create/0.1/payload.ts +1137 -0
- package/src/vtc/badges/holders/list/0.1/payload.ts +628 -0
- package/src/vtc/badges/images/get/0.1/payload.ts +311 -0
- package/src/vtc/badges/images/upload/0.1/payload.ts +324 -0
- package/src/vtc/badges/kudos/give/0.1/payload.ts +401 -0
- package/src/vtc/badges/kudos/list/0.1/payload.ts +1080 -0
- package/src/vtc/badges/list/0.1/payload.ts +695 -0
- package/src/vtc/badges/mine/accept/0.1/payload.ts +840 -0
- package/src/vtc/badges/mine/arrange/0.1/payload.ts +768 -0
- package/src/vtc/badges/mine/decline/0.1/payload.ts +384 -0
- package/src/vtc/badges/mine/hide/0.1/payload.ts +670 -0
- package/src/vtc/badges/mine/list/0.1/payload.ts +1153 -0
- package/src/vtc/badges/mine/show/0.1/payload.ts +670 -0
- package/src/vtc/badges/promote/0.1/payload.ts +1088 -0
- package/src/vtc/badges/retire/0.1/payload.ts +565 -0
- package/src/vtc/badges/settings/show/0.1/payload.ts +457 -0
- package/src/vtc/badges/settings/update/0.1/payload.ts +490 -0
- package/src/vtc/badges/show/0.1/payload.ts +675 -0
- package/src/vtc/badges/update/0.1/payload.ts +656 -0
- package/src/vtc/badges/wall/show/0.1/payload.ts +684 -0
- package/src/vtc/groups/create/0.1/payload.ts +22 -2
- package/src/vtc/groups/list/0.1/payload.ts +22 -2
- package/src/vtc/groups/list/0.2/payload.ts +22 -2
- package/src/vtc/groups/show/0.1/payload.ts +22 -2
- package/src/vtc/groups/update/0.1/payload.ts +22 -2
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/badges/images/get/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { BadgeId, CardBlobRef, Ext } from "../../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* Read the bytes of a badge's picture, where the caller is an active member who may see the badge. The outer document members are owned by the framework — SPEC §6.3.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTCBadgesImagesGetPayload {
|
|
10
|
+
badgeId: BadgeId;
|
|
11
|
+
/**
|
|
12
|
+
* The picture the caller expects, from the `CardBlobRef` it was shown on the badge. Where the badge now holds another, the answer is `notFound`, so a reader never shows a picture under a badge it did not come from.
|
|
13
|
+
*/
|
|
14
|
+
sha256?: string;
|
|
15
|
+
ext?: Ext;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The success response to a vtc/badges/images/get/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/images/get/0.1#response.
|
|
19
|
+
*/
|
|
20
|
+
export interface VTCBadgesImagesGetResponsePayload {
|
|
21
|
+
/**
|
|
22
|
+
* The picture as stored, without `url` or `urlExpiresAt`.
|
|
23
|
+
*/
|
|
24
|
+
image: CardBlobRef;
|
|
25
|
+
/**
|
|
26
|
+
* The stored bytes, base64url without padding. Their SHA-256 is `image.sha256`.
|
|
27
|
+
*/
|
|
28
|
+
data: string;
|
|
29
|
+
ext?: Ext;
|
|
30
|
+
}
|
|
31
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
32
|
+
export type { BadgeId, CardBlobRef, Ext };
|
|
33
|
+
/** Trust Task type URI. */
|
|
34
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/badges/images/get/0.1";
|
|
35
|
+
/**
|
|
36
|
+
* The earlier version of this specification that this one declares it
|
|
37
|
+
* extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
|
|
38
|
+
* `null`. Only the direct declaration — follow the chain with
|
|
39
|
+
* `extendsChain` / `readForSpec`.
|
|
40
|
+
*/
|
|
41
|
+
export declare const EXTENDS: string | null;
|
|
42
|
+
/**
|
|
43
|
+
* Why this version is deprecated, or `null` while it is current. A
|
|
44
|
+
* superseded or retired version is still supported, and is withdrawn from
|
|
45
|
+
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
46
|
+
* Versions").
|
|
47
|
+
*/
|
|
48
|
+
export declare const DEPRECATION: string | null;
|
|
49
|
+
/** Stable alias for this specification's request payload shape. */
|
|
50
|
+
export type Payload = VTCBadgesImagesGetPayload;
|
|
51
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
52
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vtc/badges/images/get/0.1#response";
|
|
53
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
54
|
+
export type Response = VTCBadgesImagesGetResponsePayload;
|
|
55
|
+
/**
|
|
56
|
+
* This specification's payload schema, as a value.
|
|
57
|
+
*
|
|
58
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
59
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
60
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
61
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
62
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
63
|
+
*/
|
|
64
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
65
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
66
|
+
readonly $id: "https://trusttasks.org/spec/vtc/badges/images/get/0.1";
|
|
67
|
+
readonly title: "VTC Badges — Images — Get — payload";
|
|
68
|
+
readonly description: "Read the bytes of a badge's picture, where the caller is an active member who may see the badge. The outer document members are owned by the framework — SPEC §6.3.";
|
|
69
|
+
readonly type: "object";
|
|
70
|
+
readonly additionalProperties: false;
|
|
71
|
+
readonly required: readonly ["badgeId"];
|
|
72
|
+
readonly properties: {
|
|
73
|
+
readonly badgeId: {
|
|
74
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
75
|
+
};
|
|
76
|
+
readonly sha256: {
|
|
77
|
+
readonly type: "string";
|
|
78
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
79
|
+
readonly description: "The picture the caller expects, from the `CardBlobRef` it was shown on the badge. Where the badge now holds another, the answer is `notFound`, so a reader never shows a picture under a badge it did not come from.";
|
|
80
|
+
};
|
|
81
|
+
readonly ext: {
|
|
82
|
+
readonly $ref: "#/$defs/Ext";
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
readonly $defs: {
|
|
86
|
+
readonly Response: {
|
|
87
|
+
readonly $anchor: "response";
|
|
88
|
+
readonly title: "VTC Badges — Images — Get — response payload";
|
|
89
|
+
readonly description: "The success response to a vtc/badges/images/get/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/images/get/0.1#response.";
|
|
90
|
+
readonly type: "object";
|
|
91
|
+
readonly additionalProperties: false;
|
|
92
|
+
readonly required: readonly ["image", "data"];
|
|
93
|
+
readonly properties: {
|
|
94
|
+
readonly image: {
|
|
95
|
+
readonly $ref: "#/$defs/CardBlobRef";
|
|
96
|
+
readonly description: "The picture as stored, without `url` or `urlExpiresAt`.";
|
|
97
|
+
};
|
|
98
|
+
readonly data: {
|
|
99
|
+
readonly type: "string";
|
|
100
|
+
readonly minLength: 1;
|
|
101
|
+
readonly maxLength: 349526;
|
|
102
|
+
readonly pattern: "^[A-Za-z0-9_-]+$";
|
|
103
|
+
readonly description: "The stored bytes, base64url without padding. Their SHA-256 is `image.sha256`.";
|
|
104
|
+
};
|
|
105
|
+
readonly ext: {
|
|
106
|
+
readonly $ref: "#/$defs/Ext";
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
readonly Ext: {
|
|
111
|
+
readonly title: "Ext";
|
|
112
|
+
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.";
|
|
113
|
+
readonly type: "object";
|
|
114
|
+
readonly minProperties: 1;
|
|
115
|
+
readonly additionalProperties: true;
|
|
116
|
+
readonly propertyNames: {
|
|
117
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
readonly CardBlobRef: {
|
|
121
|
+
readonly title: "CardBlobRef";
|
|
122
|
+
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.";
|
|
123
|
+
readonly type: "object";
|
|
124
|
+
readonly additionalProperties: false;
|
|
125
|
+
readonly required: readonly ["sha256", "mediaType"];
|
|
126
|
+
readonly properties: {
|
|
127
|
+
readonly sha256: {
|
|
128
|
+
readonly type: "string";
|
|
129
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
130
|
+
readonly description: "Lowercase hex SHA-256 of the stored, re-encoded bytes.";
|
|
131
|
+
};
|
|
132
|
+
readonly mediaType: {
|
|
133
|
+
readonly type: "string";
|
|
134
|
+
readonly enum: readonly ["image/png", "image/jpeg", "image/webp", "image/avif"];
|
|
135
|
+
readonly description: "Media type of the stored bytes.";
|
|
136
|
+
};
|
|
137
|
+
readonly size: {
|
|
138
|
+
readonly type: "integer";
|
|
139
|
+
readonly minimum: 1;
|
|
140
|
+
readonly maximum: 262144;
|
|
141
|
+
readonly description: "Size in bytes of the stored bytes.";
|
|
142
|
+
};
|
|
143
|
+
readonly url: {
|
|
144
|
+
readonly type: "string";
|
|
145
|
+
readonly format: "uri";
|
|
146
|
+
readonly maxLength: 2048;
|
|
147
|
+
readonly description: "Projection only: a URL the viewer can fetch the image from until `urlExpiresAt`.";
|
|
148
|
+
};
|
|
149
|
+
readonly urlExpiresAt: {
|
|
150
|
+
readonly type: "string";
|
|
151
|
+
readonly format: "date-time";
|
|
152
|
+
readonly description: "Projection only: when `url` stops working.";
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
readonly BadgeId: {
|
|
157
|
+
readonly title: "BadgeId";
|
|
158
|
+
readonly description: "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).";
|
|
159
|
+
readonly type: "string";
|
|
160
|
+
readonly pattern: "^bdg_[A-Za-z0-9_-]{16,64}$";
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
165
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
166
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
167
|
+
readonly $ref: "#/$defs/Response";
|
|
168
|
+
readonly $defs: {
|
|
169
|
+
readonly Response: {
|
|
170
|
+
readonly $anchor: "response";
|
|
171
|
+
readonly title: "VTC Badges — Images — Get — response payload";
|
|
172
|
+
readonly description: "The success response to a vtc/badges/images/get/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/images/get/0.1#response.";
|
|
173
|
+
readonly type: "object";
|
|
174
|
+
readonly additionalProperties: false;
|
|
175
|
+
readonly required: readonly ["image", "data"];
|
|
176
|
+
readonly properties: {
|
|
177
|
+
readonly image: {
|
|
178
|
+
readonly $ref: "#/$defs/CardBlobRef";
|
|
179
|
+
readonly description: "The picture as stored, without `url` or `urlExpiresAt`.";
|
|
180
|
+
};
|
|
181
|
+
readonly data: {
|
|
182
|
+
readonly type: "string";
|
|
183
|
+
readonly minLength: 1;
|
|
184
|
+
readonly maxLength: 349526;
|
|
185
|
+
readonly pattern: "^[A-Za-z0-9_-]+$";
|
|
186
|
+
readonly description: "The stored bytes, base64url without padding. Their SHA-256 is `image.sha256`.";
|
|
187
|
+
};
|
|
188
|
+
readonly ext: {
|
|
189
|
+
readonly $ref: "#/$defs/Ext";
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
readonly Ext: {
|
|
194
|
+
readonly title: "Ext";
|
|
195
|
+
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.";
|
|
196
|
+
readonly type: "object";
|
|
197
|
+
readonly minProperties: 1;
|
|
198
|
+
readonly additionalProperties: true;
|
|
199
|
+
readonly propertyNames: {
|
|
200
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
readonly CardBlobRef: {
|
|
204
|
+
readonly title: "CardBlobRef";
|
|
205
|
+
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.";
|
|
206
|
+
readonly type: "object";
|
|
207
|
+
readonly additionalProperties: false;
|
|
208
|
+
readonly required: readonly ["sha256", "mediaType"];
|
|
209
|
+
readonly properties: {
|
|
210
|
+
readonly sha256: {
|
|
211
|
+
readonly type: "string";
|
|
212
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
213
|
+
readonly description: "Lowercase hex SHA-256 of the stored, re-encoded bytes.";
|
|
214
|
+
};
|
|
215
|
+
readonly mediaType: {
|
|
216
|
+
readonly type: "string";
|
|
217
|
+
readonly enum: readonly ["image/png", "image/jpeg", "image/webp", "image/avif"];
|
|
218
|
+
readonly description: "Media type of the stored bytes.";
|
|
219
|
+
};
|
|
220
|
+
readonly size: {
|
|
221
|
+
readonly type: "integer";
|
|
222
|
+
readonly minimum: 1;
|
|
223
|
+
readonly maximum: 262144;
|
|
224
|
+
readonly description: "Size in bytes of the stored bytes.";
|
|
225
|
+
};
|
|
226
|
+
readonly url: {
|
|
227
|
+
readonly type: "string";
|
|
228
|
+
readonly format: "uri";
|
|
229
|
+
readonly maxLength: 2048;
|
|
230
|
+
readonly description: "Projection only: a URL the viewer can fetch the image from until `urlExpiresAt`.";
|
|
231
|
+
};
|
|
232
|
+
readonly urlExpiresAt: {
|
|
233
|
+
readonly type: "string";
|
|
234
|
+
readonly format: "date-time";
|
|
235
|
+
readonly description: "Projection only: when `url` stops working.";
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
readonly BadgeId: {
|
|
240
|
+
readonly title: "BadgeId";
|
|
241
|
+
readonly description: "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).";
|
|
242
|
+
readonly type: "string";
|
|
243
|
+
readonly pattern: "^bdg_[A-Za-z0-9_-]{16,64}$";
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
/**
|
|
248
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
249
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
250
|
+
* per-specification and cannot be derived from the document alone, and
|
|
251
|
+
* item 2 needs the schema this carries.
|
|
252
|
+
*/
|
|
253
|
+
export declare const SPEC: {
|
|
254
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/badges/images/get/0.1";
|
|
255
|
+
readonly isBearer: false;
|
|
256
|
+
readonly isProofRequired: true;
|
|
257
|
+
readonly isRecipientRequired: true;
|
|
258
|
+
readonly isIssuedAtRequired: false;
|
|
259
|
+
readonly payloadSchema: {
|
|
260
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
261
|
+
readonly $id: "https://trusttasks.org/spec/vtc/badges/images/get/0.1";
|
|
262
|
+
readonly title: "VTC Badges — Images — Get — payload";
|
|
263
|
+
readonly description: "Read the bytes of a badge's picture, where the caller is an active member who may see the badge. The outer document members are owned by the framework — SPEC §6.3.";
|
|
264
|
+
readonly type: "object";
|
|
265
|
+
readonly additionalProperties: false;
|
|
266
|
+
readonly required: readonly ["badgeId"];
|
|
267
|
+
readonly properties: {
|
|
268
|
+
readonly badgeId: {
|
|
269
|
+
readonly $ref: "#/$defs/BadgeId";
|
|
270
|
+
};
|
|
271
|
+
readonly sha256: {
|
|
272
|
+
readonly type: "string";
|
|
273
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
274
|
+
readonly description: "The picture the caller expects, from the `CardBlobRef` it was shown on the badge. Where the badge now holds another, the answer is `notFound`, so a reader never shows a picture under a badge it did not come from.";
|
|
275
|
+
};
|
|
276
|
+
readonly ext: {
|
|
277
|
+
readonly $ref: "#/$defs/Ext";
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
readonly $defs: {
|
|
281
|
+
readonly Response: {
|
|
282
|
+
readonly $anchor: "response";
|
|
283
|
+
readonly title: "VTC Badges — Images — Get — response payload";
|
|
284
|
+
readonly description: "The success response to a vtc/badges/images/get/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/images/get/0.1#response.";
|
|
285
|
+
readonly type: "object";
|
|
286
|
+
readonly additionalProperties: false;
|
|
287
|
+
readonly required: readonly ["image", "data"];
|
|
288
|
+
readonly properties: {
|
|
289
|
+
readonly image: {
|
|
290
|
+
readonly $ref: "#/$defs/CardBlobRef";
|
|
291
|
+
readonly description: "The picture as stored, without `url` or `urlExpiresAt`.";
|
|
292
|
+
};
|
|
293
|
+
readonly data: {
|
|
294
|
+
readonly type: "string";
|
|
295
|
+
readonly minLength: 1;
|
|
296
|
+
readonly maxLength: 349526;
|
|
297
|
+
readonly pattern: "^[A-Za-z0-9_-]+$";
|
|
298
|
+
readonly description: "The stored bytes, base64url without padding. Their SHA-256 is `image.sha256`.";
|
|
299
|
+
};
|
|
300
|
+
readonly ext: {
|
|
301
|
+
readonly $ref: "#/$defs/Ext";
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
readonly Ext: {
|
|
306
|
+
readonly title: "Ext";
|
|
307
|
+
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.";
|
|
308
|
+
readonly type: "object";
|
|
309
|
+
readonly minProperties: 1;
|
|
310
|
+
readonly additionalProperties: true;
|
|
311
|
+
readonly propertyNames: {
|
|
312
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
readonly CardBlobRef: {
|
|
316
|
+
readonly title: "CardBlobRef";
|
|
317
|
+
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.";
|
|
318
|
+
readonly type: "object";
|
|
319
|
+
readonly additionalProperties: false;
|
|
320
|
+
readonly required: readonly ["sha256", "mediaType"];
|
|
321
|
+
readonly properties: {
|
|
322
|
+
readonly sha256: {
|
|
323
|
+
readonly type: "string";
|
|
324
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
325
|
+
readonly description: "Lowercase hex SHA-256 of the stored, re-encoded bytes.";
|
|
326
|
+
};
|
|
327
|
+
readonly mediaType: {
|
|
328
|
+
readonly type: "string";
|
|
329
|
+
readonly enum: readonly ["image/png", "image/jpeg", "image/webp", "image/avif"];
|
|
330
|
+
readonly description: "Media type of the stored bytes.";
|
|
331
|
+
};
|
|
332
|
+
readonly size: {
|
|
333
|
+
readonly type: "integer";
|
|
334
|
+
readonly minimum: 1;
|
|
335
|
+
readonly maximum: 262144;
|
|
336
|
+
readonly description: "Size in bytes of the stored bytes.";
|
|
337
|
+
};
|
|
338
|
+
readonly url: {
|
|
339
|
+
readonly type: "string";
|
|
340
|
+
readonly format: "uri";
|
|
341
|
+
readonly maxLength: 2048;
|
|
342
|
+
readonly description: "Projection only: a URL the viewer can fetch the image from until `urlExpiresAt`.";
|
|
343
|
+
};
|
|
344
|
+
readonly urlExpiresAt: {
|
|
345
|
+
readonly type: "string";
|
|
346
|
+
readonly format: "date-time";
|
|
347
|
+
readonly description: "Projection only: when `url` stops working.";
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
readonly BadgeId: {
|
|
352
|
+
readonly title: "BadgeId";
|
|
353
|
+
readonly description: "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).";
|
|
354
|
+
readonly type: "string";
|
|
355
|
+
readonly pattern: "^bdg_[A-Za-z0-9_-]{16,64}$";
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
};
|
|
360
|
+
/**
|
|
361
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
362
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
363
|
+
* parties (§7.3 item 5).
|
|
364
|
+
*/
|
|
365
|
+
export declare const RESPONSE_SPEC: {
|
|
366
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/badges/images/get/0.1#response";
|
|
367
|
+
readonly isBearer: false;
|
|
368
|
+
readonly isProofRequired: true;
|
|
369
|
+
readonly isRecipientRequired: true;
|
|
370
|
+
readonly isIssuedAtRequired: false;
|
|
371
|
+
readonly payloadSchema: {
|
|
372
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
373
|
+
readonly $ref: "#/$defs/Response";
|
|
374
|
+
readonly $defs: {
|
|
375
|
+
readonly Response: {
|
|
376
|
+
readonly $anchor: "response";
|
|
377
|
+
readonly title: "VTC Badges — Images — Get — response payload";
|
|
378
|
+
readonly description: "The success response to a vtc/badges/images/get/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/images/get/0.1#response.";
|
|
379
|
+
readonly type: "object";
|
|
380
|
+
readonly additionalProperties: false;
|
|
381
|
+
readonly required: readonly ["image", "data"];
|
|
382
|
+
readonly properties: {
|
|
383
|
+
readonly image: {
|
|
384
|
+
readonly $ref: "#/$defs/CardBlobRef";
|
|
385
|
+
readonly description: "The picture as stored, without `url` or `urlExpiresAt`.";
|
|
386
|
+
};
|
|
387
|
+
readonly data: {
|
|
388
|
+
readonly type: "string";
|
|
389
|
+
readonly minLength: 1;
|
|
390
|
+
readonly maxLength: 349526;
|
|
391
|
+
readonly pattern: "^[A-Za-z0-9_-]+$";
|
|
392
|
+
readonly description: "The stored bytes, base64url without padding. Their SHA-256 is `image.sha256`.";
|
|
393
|
+
};
|
|
394
|
+
readonly ext: {
|
|
395
|
+
readonly $ref: "#/$defs/Ext";
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
readonly Ext: {
|
|
400
|
+
readonly title: "Ext";
|
|
401
|
+
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.";
|
|
402
|
+
readonly type: "object";
|
|
403
|
+
readonly minProperties: 1;
|
|
404
|
+
readonly additionalProperties: true;
|
|
405
|
+
readonly propertyNames: {
|
|
406
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
|
+
readonly CardBlobRef: {
|
|
410
|
+
readonly title: "CardBlobRef";
|
|
411
|
+
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.";
|
|
412
|
+
readonly type: "object";
|
|
413
|
+
readonly additionalProperties: false;
|
|
414
|
+
readonly required: readonly ["sha256", "mediaType"];
|
|
415
|
+
readonly properties: {
|
|
416
|
+
readonly sha256: {
|
|
417
|
+
readonly type: "string";
|
|
418
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
419
|
+
readonly description: "Lowercase hex SHA-256 of the stored, re-encoded bytes.";
|
|
420
|
+
};
|
|
421
|
+
readonly mediaType: {
|
|
422
|
+
readonly type: "string";
|
|
423
|
+
readonly enum: readonly ["image/png", "image/jpeg", "image/webp", "image/avif"];
|
|
424
|
+
readonly description: "Media type of the stored bytes.";
|
|
425
|
+
};
|
|
426
|
+
readonly size: {
|
|
427
|
+
readonly type: "integer";
|
|
428
|
+
readonly minimum: 1;
|
|
429
|
+
readonly maximum: 262144;
|
|
430
|
+
readonly description: "Size in bytes of the stored bytes.";
|
|
431
|
+
};
|
|
432
|
+
readonly url: {
|
|
433
|
+
readonly type: "string";
|
|
434
|
+
readonly format: "uri";
|
|
435
|
+
readonly maxLength: 2048;
|
|
436
|
+
readonly description: "Projection only: a URL the viewer can fetch the image from until `urlExpiresAt`.";
|
|
437
|
+
};
|
|
438
|
+
readonly urlExpiresAt: {
|
|
439
|
+
readonly type: "string";
|
|
440
|
+
readonly format: "date-time";
|
|
441
|
+
readonly description: "Projection only: when `url` stops working.";
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
readonly BadgeId: {
|
|
446
|
+
readonly title: "BadgeId";
|
|
447
|
+
readonly description: "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).";
|
|
448
|
+
readonly type: "string";
|
|
449
|
+
readonly pattern: "^bdg_[A-Za-z0-9_-]{16,64}$";
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
};
|
|
453
|
+
};
|
|
454
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../../src/vtc/badges/images/get/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,sCAAsC,CAAC;AAGtF;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD;;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,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC;AAE1C,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,uDAAgE,CAAC;AAEzF;;;;;GAKG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,GAAG,IAAW,CAAC;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,GAAG,IAAW,CAAC;AAE/C,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,yBAAyB,CAAC;AAEhD,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,gEAAyE,CAAC;AAE3G,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,iCAAiC,CAAC;AAEzD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgHjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4F1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
|