@openvtc/trust-tasks 0.28.19 → 0.28.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 +31 -0
- package/dist/_shared/components.d.ts +16 -1
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/vtc/badges/_shared/0.1/badge.d.ts +1 -1
- package/dist/vtc/badges/_shared/0.1/badge.d.ts.map +1 -1
- package/dist/vtc/badges/awards/list/0.1/payload.d.ts +118 -6
- package/dist/vtc/badges/awards/list/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/badges/awards/list/0.1/payload.js +64 -2
- package/dist/vtc/badges/awards/list/0.1/payload.js.map +1 -1
- package/dist/vtc/badges/awards/offer/0.1/payload.d.ts +118 -6
- package/dist/vtc/badges/awards/offer/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/badges/awards/offer/0.1/payload.js +64 -2
- package/dist/vtc/badges/awards/offer/0.1/payload.js.map +1 -1
- package/dist/vtc/badges/awards/revoke/0.1/payload.d.ts +118 -6
- package/dist/vtc/badges/awards/revoke/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/badges/awards/revoke/0.1/payload.js +64 -2
- package/dist/vtc/badges/awards/revoke/0.1/payload.js.map +1 -1
- package/dist/vtc/badges/awards/share/0.1/payload.d.ts +701 -0
- package/dist/vtc/badges/awards/share/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/awards/share/0.1/payload.js +406 -0
- package/dist/vtc/badges/awards/share/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/awards/unshare/0.1/payload.d.ts +701 -0
- package/dist/vtc/badges/awards/unshare/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/awards/unshare/0.1/payload.js +406 -0
- package/dist/vtc/badges/awards/unshare/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/awards/withdraw/0.1/payload.d.ts +118 -6
- package/dist/vtc/badges/awards/withdraw/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/badges/awards/withdraw/0.1/payload.js +64 -2
- package/dist/vtc/badges/awards/withdraw/0.1/payload.js.map +1 -1
- package/dist/vtc/badges/kudos/give/0.1/payload.d.ts +118 -6
- package/dist/vtc/badges/kudos/give/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/badges/kudos/give/0.1/payload.js +64 -2
- package/dist/vtc/badges/kudos/give/0.1/payload.js.map +1 -1
- package/dist/vtc/badges/kudos/list/0.1/payload.d.ts +118 -6
- package/dist/vtc/badges/kudos/list/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/badges/kudos/list/0.1/payload.js +64 -2
- package/dist/vtc/badges/kudos/list/0.1/payload.js.map +1 -1
- package/dist/vtc/badges/mine/accept/0.1/payload.d.ts +118 -6
- package/dist/vtc/badges/mine/accept/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/badges/mine/accept/0.1/payload.js +64 -2
- package/dist/vtc/badges/mine/accept/0.1/payload.js.map +1 -1
- package/dist/vtc/badges/mine/decline/0.1/payload.d.ts +118 -6
- package/dist/vtc/badges/mine/decline/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/badges/mine/decline/0.1/payload.js +64 -2
- package/dist/vtc/badges/mine/decline/0.1/payload.js.map +1 -1
- package/dist/vtc/badges/mine/list/0.1/payload.d.ts +118 -6
- package/dist/vtc/badges/mine/list/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/badges/mine/list/0.1/payload.js +64 -2
- package/dist/vtc/badges/mine/list/0.1/payload.js.map +1 -1
- package/package.json +1 -1
- package/src/_shared/components.ts +16 -1
- package/src/index.ts +6 -0
- package/src/vtc/badges/_shared/0.1/badge.ts +1 -1
- package/src/vtc/badges/awards/list/0.1/payload.ts +66 -4
- package/src/vtc/badges/awards/offer/0.1/payload.ts +66 -4
- package/src/vtc/badges/awards/revoke/0.1/payload.ts +66 -4
- package/src/vtc/badges/awards/share/0.1/payload.ts +446 -0
- package/src/vtc/badges/awards/unshare/0.1/payload.ts +446 -0
- package/src/vtc/badges/awards/withdraw/0.1/payload.ts +66 -4
- package/src/vtc/badges/kudos/give/0.1/payload.ts +66 -4
- package/src/vtc/badges/kudos/list/0.1/payload.ts +66 -4
- package/src/vtc/badges/mine/accept/0.1/payload.ts +66 -4
- package/src/vtc/badges/mine/decline/0.1/payload.ts +66 -4
- package/src/vtc/badges/mine/list/0.1/payload.ts +66 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../../src/vtc/badges/awards/unshare/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAGxJ;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,qCAAqC;IACpD;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;IACb,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,iBAAiB,EAAE,CAAC;AAE5G,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,2DAAoE,CAAC;AAE7F;;;;;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,MA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
+
* Source: specs/vtc/badges/awards/unshare/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/badges/awards/unshare/0.1";
|
|
7
|
+
/**
|
|
8
|
+
* The earlier version of this specification that this one declares it
|
|
9
|
+
* extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
|
|
10
|
+
* `null`. Only the direct declaration — follow the chain with
|
|
11
|
+
* `extendsChain` / `readForSpec`.
|
|
12
|
+
*/
|
|
13
|
+
export const EXTENDS = null;
|
|
14
|
+
/**
|
|
15
|
+
* Why this version is deprecated, or `null` while it is current. A
|
|
16
|
+
* superseded or retired version is still supported, and is withdrawn from
|
|
17
|
+
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
18
|
+
* Versions").
|
|
19
|
+
*/
|
|
20
|
+
export const DEPRECATION = null;
|
|
21
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
22
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/badges/awards/unshare/0.1#response";
|
|
23
|
+
/**
|
|
24
|
+
* This specification's payload schema, as a value.
|
|
25
|
+
*
|
|
26
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
27
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
28
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
29
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
30
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
31
|
+
*/
|
|
32
|
+
export const PAYLOAD_SCHEMA = {
|
|
33
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
34
|
+
"$id": "https://trusttasks.org/spec/vtc/badges/awards/unshare/0.1",
|
|
35
|
+
"title": "VTC Badges — Awards — Unshare — payload",
|
|
36
|
+
"description": "Stop showing an award outside the community: its public locations answer nothing from now on. The outer document members are owned by the framework — SPEC §6.3.",
|
|
37
|
+
"type": "object",
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"required": [
|
|
40
|
+
"awardId"
|
|
41
|
+
],
|
|
42
|
+
"properties": {
|
|
43
|
+
"awardId": {
|
|
44
|
+
"$ref": "#/$defs/AwardId",
|
|
45
|
+
"description": "An award of the signer's. One not shared is answered as it is."
|
|
46
|
+
},
|
|
47
|
+
"ext": {
|
|
48
|
+
"$ref": "#/$defs/Ext"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"$defs": {
|
|
52
|
+
"Response": {
|
|
53
|
+
"$anchor": "response",
|
|
54
|
+
"title": "VTC Badges — Awards — Unshare — response payload",
|
|
55
|
+
"description": "The success response to a vtc/badges/awards/unshare/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/awards/unshare/0.1#response.",
|
|
56
|
+
"type": "object",
|
|
57
|
+
"additionalProperties": false,
|
|
58
|
+
"required": [
|
|
59
|
+
"award"
|
|
60
|
+
],
|
|
61
|
+
"properties": {
|
|
62
|
+
"award": {
|
|
63
|
+
"$ref": "#/$defs/Award",
|
|
64
|
+
"description": "The award as it now stands, without `shared`."
|
|
65
|
+
},
|
|
66
|
+
"ext": {
|
|
67
|
+
"$ref": "#/$defs/Ext"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"Ext": {
|
|
72
|
+
"title": "Ext",
|
|
73
|
+
"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.",
|
|
74
|
+
"type": "object",
|
|
75
|
+
"minProperties": 1,
|
|
76
|
+
"additionalProperties": true,
|
|
77
|
+
"propertyNames": {
|
|
78
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"Award": {
|
|
82
|
+
"title": "Award",
|
|
83
|
+
"description": "One giving of a badge to one member. `givenBy` is the giver's directory entry, absent for an award a dynamic badge group's rule made. `note` is shown to the recipient, the giver, the badge's owners and administrators, never to other members. `credentialId` is present on an accepted award of a community badge: the badge credential that evidences it, renewed or re-issued as the badge's regime requires. `shared` is present on an accepted award of a badge its holders may show outside while its holder shares it (vtc/badges/awards/share).",
|
|
84
|
+
"type": "object",
|
|
85
|
+
"additionalProperties": false,
|
|
86
|
+
"required": [
|
|
87
|
+
"awardId",
|
|
88
|
+
"badgeId",
|
|
89
|
+
"entryId",
|
|
90
|
+
"state",
|
|
91
|
+
"offeredAt"
|
|
92
|
+
],
|
|
93
|
+
"properties": {
|
|
94
|
+
"awardId": {
|
|
95
|
+
"$ref": "#/$defs/AwardId"
|
|
96
|
+
},
|
|
97
|
+
"badgeId": {
|
|
98
|
+
"$ref": "#/$defs/BadgeId"
|
|
99
|
+
},
|
|
100
|
+
"entryId": {
|
|
101
|
+
"$ref": "#/$defs/EntryId",
|
|
102
|
+
"description": "The recipient."
|
|
103
|
+
},
|
|
104
|
+
"givenBy": {
|
|
105
|
+
"$ref": "#/$defs/EntryId"
|
|
106
|
+
},
|
|
107
|
+
"note": {
|
|
108
|
+
"$ref": "#/$defs/AwardNote"
|
|
109
|
+
},
|
|
110
|
+
"state": {
|
|
111
|
+
"$ref": "#/$defs/AwardState"
|
|
112
|
+
},
|
|
113
|
+
"offeredAt": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"format": "date-time"
|
|
116
|
+
},
|
|
117
|
+
"decidedAt": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"format": "date-time",
|
|
120
|
+
"description": "When the recipient accepted or declined, the giver withdrew, the offer expired, or the award was revoked."
|
|
121
|
+
},
|
|
122
|
+
"expiresAt": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"format": "date-time",
|
|
125
|
+
"description": "When an unanswered offer lapses, where the community expires offers."
|
|
126
|
+
},
|
|
127
|
+
"credentialId": {
|
|
128
|
+
"$ref": "#/$defs/GroupCredentialId"
|
|
129
|
+
},
|
|
130
|
+
"shared": {
|
|
131
|
+
"$ref": "#/$defs/AwardShare"
|
|
132
|
+
},
|
|
133
|
+
"ext": {
|
|
134
|
+
"$ref": "#/$defs/Ext"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"AwardShare": {
|
|
139
|
+
"title": "AwardShare",
|
|
140
|
+
"description": "Where an accepted award is shown outside the community, by its holder's choice (VTI-BDG-070): the public location that answers a verification of exactly what the credential says, the baked image where the community serves one, and since when. Present only while the holder shares the award; absent once they stop, the award is taken back, the badge is retired or the holder departs. The locations are unguessable and name no other holder (VTI-BDG-071).",
|
|
141
|
+
"type": "object",
|
|
142
|
+
"additionalProperties": false,
|
|
143
|
+
"required": [
|
|
144
|
+
"verificationUrl",
|
|
145
|
+
"since"
|
|
146
|
+
],
|
|
147
|
+
"properties": {
|
|
148
|
+
"verificationUrl": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"format": "uri",
|
|
151
|
+
"maxLength": 2048,
|
|
152
|
+
"description": "The public location that answers the credential and a verification of it."
|
|
153
|
+
},
|
|
154
|
+
"bakedImageUrl": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"format": "uri",
|
|
157
|
+
"maxLength": 2048,
|
|
158
|
+
"description": "The badge's picture with the credential baked into it, for a website or an email signature. Absent where the community serves no baked image."
|
|
159
|
+
},
|
|
160
|
+
"since": {
|
|
161
|
+
"type": "string",
|
|
162
|
+
"format": "date-time"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"AwardState": {
|
|
167
|
+
"title": "AwardState",
|
|
168
|
+
"description": "`offered`: waiting for the recipient. `accepted`: the recipient took it; for a community badge the credential was issued and the membership recorded. `declined`: the recipient declined; nothing was recorded in the group and nothing issued. `withdrawn`: the giver withdrew the offer before a decision. `expired`: the offer lapsed unanswered. `revoked`: taken back after acceptance (VTI-BDG-023).",
|
|
169
|
+
"type": "string",
|
|
170
|
+
"enum": [
|
|
171
|
+
"offered",
|
|
172
|
+
"accepted",
|
|
173
|
+
"declined",
|
|
174
|
+
"withdrawn",
|
|
175
|
+
"expired",
|
|
176
|
+
"revoked"
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
"AwardNote": {
|
|
180
|
+
"title": "AwardNote",
|
|
181
|
+
"type": "string",
|
|
182
|
+
"minLength": 1,
|
|
183
|
+
"maxLength": 500,
|
|
184
|
+
"description": "What the award is for, from the giver, shown to the recipient and written as the award's evidence narrative where the badge carries a credential. Plain text; erased with its author (VTI-BDG-090)."
|
|
185
|
+
},
|
|
186
|
+
"BadgeId": {
|
|
187
|
+
"title": "BadgeId",
|
|
188
|
+
"description": "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).",
|
|
189
|
+
"type": "string",
|
|
190
|
+
"pattern": "^bdg_[A-Za-z0-9_-]{16,64}$"
|
|
191
|
+
},
|
|
192
|
+
"AwardId": {
|
|
193
|
+
"title": "AwardId",
|
|
194
|
+
"description": "Opaque identifier of one giving of a badge to one member: `awd_` followed by 16 to 64 base64url characters. Random and unique within the community.",
|
|
195
|
+
"type": "string",
|
|
196
|
+
"pattern": "^awd_[A-Za-z0-9_-]{16,64}$"
|
|
197
|
+
},
|
|
198
|
+
"GroupCredentialId": {
|
|
199
|
+
"title": "GroupCredentialId",
|
|
200
|
+
"description": "Identifier (`id`) of a group membership credential issued to a member. Each renewal issues a new credential with a new identifier. Validity is the community's setting; a community SHOULD default to 30 days, renewed when 10 days remain.",
|
|
201
|
+
"type": "string",
|
|
202
|
+
"minLength": 1,
|
|
203
|
+
"maxLength": 512
|
|
204
|
+
},
|
|
205
|
+
"EntryId": {
|
|
206
|
+
"title": "EntryId",
|
|
207
|
+
"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.",
|
|
208
|
+
"type": "string",
|
|
209
|
+
"pattern": "^dir_[A-Za-z0-9_-]{16,64}$"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
214
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
215
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
216
|
+
"$ref": "#/$defs/Response",
|
|
217
|
+
"$defs": {
|
|
218
|
+
"Response": {
|
|
219
|
+
"$anchor": "response",
|
|
220
|
+
"title": "VTC Badges — Awards — Unshare — response payload",
|
|
221
|
+
"description": "The success response to a vtc/badges/awards/unshare/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/awards/unshare/0.1#response.",
|
|
222
|
+
"type": "object",
|
|
223
|
+
"additionalProperties": false,
|
|
224
|
+
"required": [
|
|
225
|
+
"award"
|
|
226
|
+
],
|
|
227
|
+
"properties": {
|
|
228
|
+
"award": {
|
|
229
|
+
"$ref": "#/$defs/Award",
|
|
230
|
+
"description": "The award as it now stands, without `shared`."
|
|
231
|
+
},
|
|
232
|
+
"ext": {
|
|
233
|
+
"$ref": "#/$defs/Ext"
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"Ext": {
|
|
238
|
+
"title": "Ext",
|
|
239
|
+
"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.",
|
|
240
|
+
"type": "object",
|
|
241
|
+
"minProperties": 1,
|
|
242
|
+
"additionalProperties": true,
|
|
243
|
+
"propertyNames": {
|
|
244
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"Award": {
|
|
248
|
+
"title": "Award",
|
|
249
|
+
"description": "One giving of a badge to one member. `givenBy` is the giver's directory entry, absent for an award a dynamic badge group's rule made. `note` is shown to the recipient, the giver, the badge's owners and administrators, never to other members. `credentialId` is present on an accepted award of a community badge: the badge credential that evidences it, renewed or re-issued as the badge's regime requires. `shared` is present on an accepted award of a badge its holders may show outside while its holder shares it (vtc/badges/awards/share).",
|
|
250
|
+
"type": "object",
|
|
251
|
+
"additionalProperties": false,
|
|
252
|
+
"required": [
|
|
253
|
+
"awardId",
|
|
254
|
+
"badgeId",
|
|
255
|
+
"entryId",
|
|
256
|
+
"state",
|
|
257
|
+
"offeredAt"
|
|
258
|
+
],
|
|
259
|
+
"properties": {
|
|
260
|
+
"awardId": {
|
|
261
|
+
"$ref": "#/$defs/AwardId"
|
|
262
|
+
},
|
|
263
|
+
"badgeId": {
|
|
264
|
+
"$ref": "#/$defs/BadgeId"
|
|
265
|
+
},
|
|
266
|
+
"entryId": {
|
|
267
|
+
"$ref": "#/$defs/EntryId",
|
|
268
|
+
"description": "The recipient."
|
|
269
|
+
},
|
|
270
|
+
"givenBy": {
|
|
271
|
+
"$ref": "#/$defs/EntryId"
|
|
272
|
+
},
|
|
273
|
+
"note": {
|
|
274
|
+
"$ref": "#/$defs/AwardNote"
|
|
275
|
+
},
|
|
276
|
+
"state": {
|
|
277
|
+
"$ref": "#/$defs/AwardState"
|
|
278
|
+
},
|
|
279
|
+
"offeredAt": {
|
|
280
|
+
"type": "string",
|
|
281
|
+
"format": "date-time"
|
|
282
|
+
},
|
|
283
|
+
"decidedAt": {
|
|
284
|
+
"type": "string",
|
|
285
|
+
"format": "date-time",
|
|
286
|
+
"description": "When the recipient accepted or declined, the giver withdrew, the offer expired, or the award was revoked."
|
|
287
|
+
},
|
|
288
|
+
"expiresAt": {
|
|
289
|
+
"type": "string",
|
|
290
|
+
"format": "date-time",
|
|
291
|
+
"description": "When an unanswered offer lapses, where the community expires offers."
|
|
292
|
+
},
|
|
293
|
+
"credentialId": {
|
|
294
|
+
"$ref": "#/$defs/GroupCredentialId"
|
|
295
|
+
},
|
|
296
|
+
"shared": {
|
|
297
|
+
"$ref": "#/$defs/AwardShare"
|
|
298
|
+
},
|
|
299
|
+
"ext": {
|
|
300
|
+
"$ref": "#/$defs/Ext"
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
"AwardShare": {
|
|
305
|
+
"title": "AwardShare",
|
|
306
|
+
"description": "Where an accepted award is shown outside the community, by its holder's choice (VTI-BDG-070): the public location that answers a verification of exactly what the credential says, the baked image where the community serves one, and since when. Present only while the holder shares the award; absent once they stop, the award is taken back, the badge is retired or the holder departs. The locations are unguessable and name no other holder (VTI-BDG-071).",
|
|
307
|
+
"type": "object",
|
|
308
|
+
"additionalProperties": false,
|
|
309
|
+
"required": [
|
|
310
|
+
"verificationUrl",
|
|
311
|
+
"since"
|
|
312
|
+
],
|
|
313
|
+
"properties": {
|
|
314
|
+
"verificationUrl": {
|
|
315
|
+
"type": "string",
|
|
316
|
+
"format": "uri",
|
|
317
|
+
"maxLength": 2048,
|
|
318
|
+
"description": "The public location that answers the credential and a verification of it."
|
|
319
|
+
},
|
|
320
|
+
"bakedImageUrl": {
|
|
321
|
+
"type": "string",
|
|
322
|
+
"format": "uri",
|
|
323
|
+
"maxLength": 2048,
|
|
324
|
+
"description": "The badge's picture with the credential baked into it, for a website or an email signature. Absent where the community serves no baked image."
|
|
325
|
+
},
|
|
326
|
+
"since": {
|
|
327
|
+
"type": "string",
|
|
328
|
+
"format": "date-time"
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"AwardState": {
|
|
333
|
+
"title": "AwardState",
|
|
334
|
+
"description": "`offered`: waiting for the recipient. `accepted`: the recipient took it; for a community badge the credential was issued and the membership recorded. `declined`: the recipient declined; nothing was recorded in the group and nothing issued. `withdrawn`: the giver withdrew the offer before a decision. `expired`: the offer lapsed unanswered. `revoked`: taken back after acceptance (VTI-BDG-023).",
|
|
335
|
+
"type": "string",
|
|
336
|
+
"enum": [
|
|
337
|
+
"offered",
|
|
338
|
+
"accepted",
|
|
339
|
+
"declined",
|
|
340
|
+
"withdrawn",
|
|
341
|
+
"expired",
|
|
342
|
+
"revoked"
|
|
343
|
+
]
|
|
344
|
+
},
|
|
345
|
+
"AwardNote": {
|
|
346
|
+
"title": "AwardNote",
|
|
347
|
+
"type": "string",
|
|
348
|
+
"minLength": 1,
|
|
349
|
+
"maxLength": 500,
|
|
350
|
+
"description": "What the award is for, from the giver, shown to the recipient and written as the award's evidence narrative where the badge carries a credential. Plain text; erased with its author (VTI-BDG-090)."
|
|
351
|
+
},
|
|
352
|
+
"BadgeId": {
|
|
353
|
+
"title": "BadgeId",
|
|
354
|
+
"description": "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).",
|
|
355
|
+
"type": "string",
|
|
356
|
+
"pattern": "^bdg_[A-Za-z0-9_-]{16,64}$"
|
|
357
|
+
},
|
|
358
|
+
"AwardId": {
|
|
359
|
+
"title": "AwardId",
|
|
360
|
+
"description": "Opaque identifier of one giving of a badge to one member: `awd_` followed by 16 to 64 base64url characters. Random and unique within the community.",
|
|
361
|
+
"type": "string",
|
|
362
|
+
"pattern": "^awd_[A-Za-z0-9_-]{16,64}$"
|
|
363
|
+
},
|
|
364
|
+
"GroupCredentialId": {
|
|
365
|
+
"title": "GroupCredentialId",
|
|
366
|
+
"description": "Identifier (`id`) of a group membership credential issued to a member. Each renewal issues a new credential with a new identifier. Validity is the community's setting; a community SHOULD default to 30 days, renewed when 10 days remain.",
|
|
367
|
+
"type": "string",
|
|
368
|
+
"minLength": 1,
|
|
369
|
+
"maxLength": 512
|
|
370
|
+
},
|
|
371
|
+
"EntryId": {
|
|
372
|
+
"title": "EntryId",
|
|
373
|
+
"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.",
|
|
374
|
+
"type": "string",
|
|
375
|
+
"pattern": "^dir_[A-Za-z0-9_-]{16,64}$"
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
/**
|
|
380
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
381
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
382
|
+
* per-specification and cannot be derived from the document alone, and
|
|
383
|
+
* item 2 needs the schema this carries.
|
|
384
|
+
*/
|
|
385
|
+
export const SPEC = {
|
|
386
|
+
typeUri: TYPE_URI,
|
|
387
|
+
isBearer: false,
|
|
388
|
+
isProofRequired: true,
|
|
389
|
+
isRecipientRequired: true,
|
|
390
|
+
isIssuedAtRequired: true,
|
|
391
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
392
|
+
};
|
|
393
|
+
/**
|
|
394
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
395
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
396
|
+
* parties (§7.3 item 5).
|
|
397
|
+
*/
|
|
398
|
+
export const RESPONSE_SPEC = {
|
|
399
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
400
|
+
isBearer: false,
|
|
401
|
+
isProofRequired: true,
|
|
402
|
+
isRecipientRequired: true,
|
|
403
|
+
isIssuedAtRequired: true,
|
|
404
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
405
|
+
};
|
|
406
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../../src/vtc/badges/awards/unshare/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA6BH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,2DAAoE,CAAC;AAE7F;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAkB,IAAI,CAAC;AA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AM,EAAE,QAAQ;YAChB,SAAS,EAAE,4BAA4B;SACxC;QACD,SAAS,EAAE;YACT,OAAO,EAAE,SAAS;YAClB,aAAa,EAAE,qJAAqJ;YACpK,MAAM,EAAE,QAAQ;YAChB,SAAS,EAAE,4BAA4B;SACxC;QACD,mBAAmB,EAAE;YACnB,OAAO,EAAE,mBAAmB;YAC5B,aAAa,EAAE,6OAA6O;YAC5P,MAAM,EAAE,QAAQ;YAChB,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,GAAG;SACjB;QACD,SAAS,EAAE;YACT,OAAO,EAAE,SAAS;YAClB,aAAa,EAAE,6bAA6b;YAC5c,MAAM,EAAE,QAAQ;YAChB,SAAS,EAAE,4BAA4B;SACxC;KACF;CACO,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,cAAc;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
3
|
* Source: specs/vtc/badges/awards/withdraw/0.1/payload.schema.json
|
|
4
4
|
*/
|
|
5
|
-
import type { Award, AwardId, AwardNote, AwardState, BadgeId, EntryId, Ext, GroupCredentialId } from "../../../../../_shared/components.js";
|
|
5
|
+
import type { Award, AwardId, AwardNote, AwardShare, AwardState, BadgeId, EntryId, Ext, GroupCredentialId } from "../../../../../_shared/components.js";
|
|
6
6
|
/**
|
|
7
7
|
* Withdraw an open offer of a badge before its recipient decides. The outer document members are owned by the framework — SPEC §6.3.
|
|
8
8
|
*/
|
|
@@ -28,7 +28,7 @@ export interface VTCBadgesAwardsWithdrawResponsePayload {
|
|
|
28
28
|
ext?: Ext;
|
|
29
29
|
}
|
|
30
30
|
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
31
|
-
export type { Award, AwardId, AwardNote, AwardState, BadgeId, EntryId, Ext, GroupCredentialId };
|
|
31
|
+
export type { Award, AwardId, AwardNote, AwardShare, AwardState, BadgeId, EntryId, Ext, GroupCredentialId };
|
|
32
32
|
/** Trust Task type URI. */
|
|
33
33
|
export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/badges/awards/withdraw/0.1";
|
|
34
34
|
/**
|
|
@@ -113,7 +113,7 @@ export declare const PAYLOAD_SCHEMA: {
|
|
|
113
113
|
};
|
|
114
114
|
readonly Award: {
|
|
115
115
|
readonly title: "Award";
|
|
116
|
-
readonly description: "One giving of a badge to one member. `givenBy` is the giver's directory entry, absent for an award a dynamic badge group's rule made. `note` is shown to the recipient, the giver, the badge's owners and administrators, never to other members. `credentialId` is present on an accepted award of a community badge: the badge credential that evidences it, renewed or re-issued as the badge's regime requires.";
|
|
116
|
+
readonly description: "One giving of a badge to one member. `givenBy` is the giver's directory entry, absent for an award a dynamic badge group's rule made. `note` is shown to the recipient, the giver, the badge's owners and administrators, never to other members. `credentialId` is present on an accepted award of a community badge: the badge credential that evidences it, renewed or re-issued as the badge's regime requires. `shared` is present on an accepted award of a badge its holders may show outside while its holder shares it (vtc/badges/awards/share).";
|
|
117
117
|
readonly type: "object";
|
|
118
118
|
readonly additionalProperties: false;
|
|
119
119
|
readonly required: readonly ["awardId", "badgeId", "entryId", "state", "offeredAt"];
|
|
@@ -154,11 +154,39 @@ export declare const PAYLOAD_SCHEMA: {
|
|
|
154
154
|
readonly credentialId: {
|
|
155
155
|
readonly $ref: "#/$defs/GroupCredentialId";
|
|
156
156
|
};
|
|
157
|
+
readonly shared: {
|
|
158
|
+
readonly $ref: "#/$defs/AwardShare";
|
|
159
|
+
};
|
|
157
160
|
readonly ext: {
|
|
158
161
|
readonly $ref: "#/$defs/Ext";
|
|
159
162
|
};
|
|
160
163
|
};
|
|
161
164
|
};
|
|
165
|
+
readonly AwardShare: {
|
|
166
|
+
readonly title: "AwardShare";
|
|
167
|
+
readonly description: "Where an accepted award is shown outside the community, by its holder's choice (VTI-BDG-070): the public location that answers a verification of exactly what the credential says, the baked image where the community serves one, and since when. Present only while the holder shares the award; absent once they stop, the award is taken back, the badge is retired or the holder departs. The locations are unguessable and name no other holder (VTI-BDG-071).";
|
|
168
|
+
readonly type: "object";
|
|
169
|
+
readonly additionalProperties: false;
|
|
170
|
+
readonly required: readonly ["verificationUrl", "since"];
|
|
171
|
+
readonly properties: {
|
|
172
|
+
readonly verificationUrl: {
|
|
173
|
+
readonly type: "string";
|
|
174
|
+
readonly format: "uri";
|
|
175
|
+
readonly maxLength: 2048;
|
|
176
|
+
readonly description: "The public location that answers the credential and a verification of it.";
|
|
177
|
+
};
|
|
178
|
+
readonly bakedImageUrl: {
|
|
179
|
+
readonly type: "string";
|
|
180
|
+
readonly format: "uri";
|
|
181
|
+
readonly maxLength: 2048;
|
|
182
|
+
readonly description: "The badge's picture with the credential baked into it, for a website or an email signature. Absent where the community serves no baked image.";
|
|
183
|
+
};
|
|
184
|
+
readonly since: {
|
|
185
|
+
readonly type: "string";
|
|
186
|
+
readonly format: "date-time";
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
};
|
|
162
190
|
readonly AwardState: {
|
|
163
191
|
readonly title: "AwardState";
|
|
164
192
|
readonly description: "`offered`: waiting for the recipient. `accepted`: the recipient took it; for a community badge the credential was issued and the membership recorded. `declined`: the recipient declined; nothing was recorded in the group and nothing issued. `withdrawn`: the giver withdrew the offer before a decision. `expired`: the offer lapsed unanswered. `revoked`: taken back after acceptance (VTI-BDG-023).";
|
|
@@ -233,7 +261,7 @@ export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
|
233
261
|
};
|
|
234
262
|
readonly Award: {
|
|
235
263
|
readonly title: "Award";
|
|
236
|
-
readonly description: "One giving of a badge to one member. `givenBy` is the giver's directory entry, absent for an award a dynamic badge group's rule made. `note` is shown to the recipient, the giver, the badge's owners and administrators, never to other members. `credentialId` is present on an accepted award of a community badge: the badge credential that evidences it, renewed or re-issued as the badge's regime requires.";
|
|
264
|
+
readonly description: "One giving of a badge to one member. `givenBy` is the giver's directory entry, absent for an award a dynamic badge group's rule made. `note` is shown to the recipient, the giver, the badge's owners and administrators, never to other members. `credentialId` is present on an accepted award of a community badge: the badge credential that evidences it, renewed or re-issued as the badge's regime requires. `shared` is present on an accepted award of a badge its holders may show outside while its holder shares it (vtc/badges/awards/share).";
|
|
237
265
|
readonly type: "object";
|
|
238
266
|
readonly additionalProperties: false;
|
|
239
267
|
readonly required: readonly ["awardId", "badgeId", "entryId", "state", "offeredAt"];
|
|
@@ -274,11 +302,39 @@ export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
|
274
302
|
readonly credentialId: {
|
|
275
303
|
readonly $ref: "#/$defs/GroupCredentialId";
|
|
276
304
|
};
|
|
305
|
+
readonly shared: {
|
|
306
|
+
readonly $ref: "#/$defs/AwardShare";
|
|
307
|
+
};
|
|
277
308
|
readonly ext: {
|
|
278
309
|
readonly $ref: "#/$defs/Ext";
|
|
279
310
|
};
|
|
280
311
|
};
|
|
281
312
|
};
|
|
313
|
+
readonly AwardShare: {
|
|
314
|
+
readonly title: "AwardShare";
|
|
315
|
+
readonly description: "Where an accepted award is shown outside the community, by its holder's choice (VTI-BDG-070): the public location that answers a verification of exactly what the credential says, the baked image where the community serves one, and since when. Present only while the holder shares the award; absent once they stop, the award is taken back, the badge is retired or the holder departs. The locations are unguessable and name no other holder (VTI-BDG-071).";
|
|
316
|
+
readonly type: "object";
|
|
317
|
+
readonly additionalProperties: false;
|
|
318
|
+
readonly required: readonly ["verificationUrl", "since"];
|
|
319
|
+
readonly properties: {
|
|
320
|
+
readonly verificationUrl: {
|
|
321
|
+
readonly type: "string";
|
|
322
|
+
readonly format: "uri";
|
|
323
|
+
readonly maxLength: 2048;
|
|
324
|
+
readonly description: "The public location that answers the credential and a verification of it.";
|
|
325
|
+
};
|
|
326
|
+
readonly bakedImageUrl: {
|
|
327
|
+
readonly type: "string";
|
|
328
|
+
readonly format: "uri";
|
|
329
|
+
readonly maxLength: 2048;
|
|
330
|
+
readonly description: "The badge's picture with the credential baked into it, for a website or an email signature. Absent where the community serves no baked image.";
|
|
331
|
+
};
|
|
332
|
+
readonly since: {
|
|
333
|
+
readonly type: "string";
|
|
334
|
+
readonly format: "date-time";
|
|
335
|
+
};
|
|
336
|
+
};
|
|
337
|
+
};
|
|
282
338
|
readonly AwardState: {
|
|
283
339
|
readonly title: "AwardState";
|
|
284
340
|
readonly description: "`offered`: waiting for the recipient. `accepted`: the recipient took it; for a community badge the credential was issued and the membership recorded. `declined`: the recipient declined; nothing was recorded in the group and nothing issued. `withdrawn`: the giver withdrew the offer before a decision. `expired`: the offer lapsed unanswered. `revoked`: taken back after acceptance (VTI-BDG-023).";
|
|
@@ -384,7 +440,7 @@ export declare const SPEC: {
|
|
|
384
440
|
};
|
|
385
441
|
readonly Award: {
|
|
386
442
|
readonly title: "Award";
|
|
387
|
-
readonly description: "One giving of a badge to one member. `givenBy` is the giver's directory entry, absent for an award a dynamic badge group's rule made. `note` is shown to the recipient, the giver, the badge's owners and administrators, never to other members. `credentialId` is present on an accepted award of a community badge: the badge credential that evidences it, renewed or re-issued as the badge's regime requires.";
|
|
443
|
+
readonly description: "One giving of a badge to one member. `givenBy` is the giver's directory entry, absent for an award a dynamic badge group's rule made. `note` is shown to the recipient, the giver, the badge's owners and administrators, never to other members. `credentialId` is present on an accepted award of a community badge: the badge credential that evidences it, renewed or re-issued as the badge's regime requires. `shared` is present on an accepted award of a badge its holders may show outside while its holder shares it (vtc/badges/awards/share).";
|
|
388
444
|
readonly type: "object";
|
|
389
445
|
readonly additionalProperties: false;
|
|
390
446
|
readonly required: readonly ["awardId", "badgeId", "entryId", "state", "offeredAt"];
|
|
@@ -425,11 +481,39 @@ export declare const SPEC: {
|
|
|
425
481
|
readonly credentialId: {
|
|
426
482
|
readonly $ref: "#/$defs/GroupCredentialId";
|
|
427
483
|
};
|
|
484
|
+
readonly shared: {
|
|
485
|
+
readonly $ref: "#/$defs/AwardShare";
|
|
486
|
+
};
|
|
428
487
|
readonly ext: {
|
|
429
488
|
readonly $ref: "#/$defs/Ext";
|
|
430
489
|
};
|
|
431
490
|
};
|
|
432
491
|
};
|
|
492
|
+
readonly AwardShare: {
|
|
493
|
+
readonly title: "AwardShare";
|
|
494
|
+
readonly description: "Where an accepted award is shown outside the community, by its holder's choice (VTI-BDG-070): the public location that answers a verification of exactly what the credential says, the baked image where the community serves one, and since when. Present only while the holder shares the award; absent once they stop, the award is taken back, the badge is retired or the holder departs. The locations are unguessable and name no other holder (VTI-BDG-071).";
|
|
495
|
+
readonly type: "object";
|
|
496
|
+
readonly additionalProperties: false;
|
|
497
|
+
readonly required: readonly ["verificationUrl", "since"];
|
|
498
|
+
readonly properties: {
|
|
499
|
+
readonly verificationUrl: {
|
|
500
|
+
readonly type: "string";
|
|
501
|
+
readonly format: "uri";
|
|
502
|
+
readonly maxLength: 2048;
|
|
503
|
+
readonly description: "The public location that answers the credential and a verification of it.";
|
|
504
|
+
};
|
|
505
|
+
readonly bakedImageUrl: {
|
|
506
|
+
readonly type: "string";
|
|
507
|
+
readonly format: "uri";
|
|
508
|
+
readonly maxLength: 2048;
|
|
509
|
+
readonly description: "The badge's picture with the credential baked into it, for a website or an email signature. Absent where the community serves no baked image.";
|
|
510
|
+
};
|
|
511
|
+
readonly since: {
|
|
512
|
+
readonly type: "string";
|
|
513
|
+
readonly format: "date-time";
|
|
514
|
+
};
|
|
515
|
+
};
|
|
516
|
+
};
|
|
433
517
|
readonly AwardState: {
|
|
434
518
|
readonly title: "AwardState";
|
|
435
519
|
readonly description: "`offered`: waiting for the recipient. `accepted`: the recipient took it; for a community badge the credential was issued and the membership recorded. `declined`: the recipient declined; nothing was recorded in the group and nothing issued. `withdrawn`: the giver withdrew the offer before a decision. `expired`: the offer lapsed unanswered. `revoked`: taken back after acceptance (VTI-BDG-023).";
|
|
@@ -515,7 +599,7 @@ export declare const RESPONSE_SPEC: {
|
|
|
515
599
|
};
|
|
516
600
|
readonly Award: {
|
|
517
601
|
readonly title: "Award";
|
|
518
|
-
readonly description: "One giving of a badge to one member. `givenBy` is the giver's directory entry, absent for an award a dynamic badge group's rule made. `note` is shown to the recipient, the giver, the badge's owners and administrators, never to other members. `credentialId` is present on an accepted award of a community badge: the badge credential that evidences it, renewed or re-issued as the badge's regime requires.";
|
|
602
|
+
readonly description: "One giving of a badge to one member. `givenBy` is the giver's directory entry, absent for an award a dynamic badge group's rule made. `note` is shown to the recipient, the giver, the badge's owners and administrators, never to other members. `credentialId` is present on an accepted award of a community badge: the badge credential that evidences it, renewed or re-issued as the badge's regime requires. `shared` is present on an accepted award of a badge its holders may show outside while its holder shares it (vtc/badges/awards/share).";
|
|
519
603
|
readonly type: "object";
|
|
520
604
|
readonly additionalProperties: false;
|
|
521
605
|
readonly required: readonly ["awardId", "badgeId", "entryId", "state", "offeredAt"];
|
|
@@ -556,11 +640,39 @@ export declare const RESPONSE_SPEC: {
|
|
|
556
640
|
readonly credentialId: {
|
|
557
641
|
readonly $ref: "#/$defs/GroupCredentialId";
|
|
558
642
|
};
|
|
643
|
+
readonly shared: {
|
|
644
|
+
readonly $ref: "#/$defs/AwardShare";
|
|
645
|
+
};
|
|
559
646
|
readonly ext: {
|
|
560
647
|
readonly $ref: "#/$defs/Ext";
|
|
561
648
|
};
|
|
562
649
|
};
|
|
563
650
|
};
|
|
651
|
+
readonly AwardShare: {
|
|
652
|
+
readonly title: "AwardShare";
|
|
653
|
+
readonly description: "Where an accepted award is shown outside the community, by its holder's choice (VTI-BDG-070): the public location that answers a verification of exactly what the credential says, the baked image where the community serves one, and since when. Present only while the holder shares the award; absent once they stop, the award is taken back, the badge is retired or the holder departs. The locations are unguessable and name no other holder (VTI-BDG-071).";
|
|
654
|
+
readonly type: "object";
|
|
655
|
+
readonly additionalProperties: false;
|
|
656
|
+
readonly required: readonly ["verificationUrl", "since"];
|
|
657
|
+
readonly properties: {
|
|
658
|
+
readonly verificationUrl: {
|
|
659
|
+
readonly type: "string";
|
|
660
|
+
readonly format: "uri";
|
|
661
|
+
readonly maxLength: 2048;
|
|
662
|
+
readonly description: "The public location that answers the credential and a verification of it.";
|
|
663
|
+
};
|
|
664
|
+
readonly bakedImageUrl: {
|
|
665
|
+
readonly type: "string";
|
|
666
|
+
readonly format: "uri";
|
|
667
|
+
readonly maxLength: 2048;
|
|
668
|
+
readonly description: "The badge's picture with the credential baked into it, for a website or an email signature. Absent where the community serves no baked image.";
|
|
669
|
+
};
|
|
670
|
+
readonly since: {
|
|
671
|
+
readonly type: "string";
|
|
672
|
+
readonly format: "date-time";
|
|
673
|
+
};
|
|
674
|
+
};
|
|
675
|
+
};
|
|
564
676
|
readonly AwardState: {
|
|
565
677
|
readonly title: "AwardState";
|
|
566
678
|
readonly description: "`offered`: waiting for the recipient. `accepted`: the recipient took it; for a community badge the credential was issued and the membership recorded. `declined`: the recipient declined; nothing was recorded in the group and nothing issued. `withdrawn`: the giver withdrew the offer before a decision. `expired`: the offer lapsed unanswered. `revoked`: taken back after acceptance (VTI-BDG-023).";
|