@openvtc/trust-tasks 0.28.20 → 0.28.21
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 +40 -0
- package/dist/auth/step-up/requests/show/0.1/payload.d.ts +458 -0
- package/dist/auth/step-up/requests/show/0.1/payload.d.ts.map +1 -0
- package/dist/auth/step-up/requests/show/0.1/payload.js +261 -0
- package/dist/auth/step-up/requests/show/0.1/payload.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/vtc/badges/show/0.1/payload.d.ts +472 -26
- package/dist/vtc/badges/show/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/badges/show/0.1/payload.js +264 -12
- package/dist/vtc/badges/show/0.1/payload.js.map +1 -1
- package/package.json +1 -1
- package/src/auth/step-up/requests/show/0.1/payload.ts +317 -0
- package/src/index.ts +3 -0
- package/src/vtc/badges/show/0.1/payload.ts +272 -14
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/auth/step-up/requests/show/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A single-use reference to one pending step-up, minted by the relying party with at least 128 bits of entropy and carried as base64url without padding. It names the request; it is not the request's challenge, and knowing it authorizes nothing but this one read.
|
|
11
|
+
*/
|
|
12
|
+
export type Handle = string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The approver's agent asks the relying party for a pending step-up bound to one operation, named by the hand-off handle the relying party gave the operation's producer. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
16
|
+
*/
|
|
17
|
+
export interface AuthStepUpRequestShowPayload {
|
|
18
|
+
handle: Handle;
|
|
19
|
+
ext?: Ext;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The pending step-up and the operation it is bound to. Failures use trust-task-error, not this shape.
|
|
23
|
+
*/
|
|
24
|
+
export interface AuthStepUpRequestShowResponsePayload {
|
|
25
|
+
/**
|
|
26
|
+
* A complete auth/step-up/approve-request/0.5 Trust Task document, issued and signed by the relying party, whose recipient is the step-up's subject and whose payload is the request the operation's producer received inline — the same challenge, boundTo, accepts and approvers. The agent verifies it as a document in its own right — envelope, proof and payload against that specification's schema — over the members exactly as received: its proof covers every member, so it is deliberately an open object here rather than a typed one a binding could narrow.
|
|
27
|
+
*/
|
|
28
|
+
request: {};
|
|
29
|
+
operation: Operation;
|
|
30
|
+
ext?: Ext;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The operation the step-up is bound to, exactly as the relying party received it.
|
|
34
|
+
*/
|
|
35
|
+
export interface Operation {
|
|
36
|
+
/**
|
|
37
|
+
* The operation's Type URI, as the document the relying party refused named it.
|
|
38
|
+
*/
|
|
39
|
+
type: string;
|
|
40
|
+
/**
|
|
41
|
+
* The operation's payload, member for member as received, so that the approver's agent can show it and — where it knows how the relying party derives `boundTo` — recompute the binding.
|
|
42
|
+
*/
|
|
43
|
+
payload: {};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
47
|
+
export type { Ext };
|
|
48
|
+
|
|
49
|
+
/** Trust Task type URI. */
|
|
50
|
+
export const TYPE_URI = "https://trusttasks.org/spec/auth/step-up/requests/show/0.1" as const;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The earlier version of this specification that this one declares it
|
|
54
|
+
* extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
|
|
55
|
+
* `null`. Only the direct declaration — follow the chain with
|
|
56
|
+
* `extendsChain` / `readForSpec`.
|
|
57
|
+
*/
|
|
58
|
+
export const EXTENDS: string | null = null;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Why this version is deprecated, or `null` while it is current. A
|
|
62
|
+
* superseded or retired version is still supported, and is withdrawn from
|
|
63
|
+
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
64
|
+
* Versions").
|
|
65
|
+
*/
|
|
66
|
+
export const DEPRECATION: string | null = null;
|
|
67
|
+
|
|
68
|
+
/** Stable alias for this specification's request payload shape. */
|
|
69
|
+
export type Payload = AuthStepUpRequestShowPayload;
|
|
70
|
+
|
|
71
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
72
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/auth/step-up/requests/show/0.1#response" as const;
|
|
73
|
+
|
|
74
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
75
|
+
export type Response = AuthStepUpRequestShowResponsePayload;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* This specification's payload schema, as a value.
|
|
79
|
+
*
|
|
80
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
81
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
82
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
83
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
84
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
85
|
+
*/
|
|
86
|
+
export const PAYLOAD_SCHEMA = {
|
|
87
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
88
|
+
"$id": "https://trusttasks.org/spec/auth/step-up/requests/show/0.1",
|
|
89
|
+
"title": "Auth — Step-up Request Show — payload",
|
|
90
|
+
"description": "The approver's agent asks the relying party for a pending step-up bound to one operation, named by the hand-off handle the relying party gave the operation's producer. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
|
|
91
|
+
"type": "object",
|
|
92
|
+
"additionalProperties": false,
|
|
93
|
+
"required": [
|
|
94
|
+
"handle"
|
|
95
|
+
],
|
|
96
|
+
"properties": {
|
|
97
|
+
"handle": {
|
|
98
|
+
"$ref": "#/$defs/Handle"
|
|
99
|
+
},
|
|
100
|
+
"ext": {
|
|
101
|
+
"$ref": "#/$defs/Ext"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"$defs": {
|
|
105
|
+
"Handle": {
|
|
106
|
+
"title": "Handle",
|
|
107
|
+
"description": "A single-use reference to one pending step-up, minted by the relying party with at least 128 bits of entropy and carried as base64url without padding. It names the request; it is not the request's challenge, and knowing it authorizes nothing but this one read.",
|
|
108
|
+
"type": "string",
|
|
109
|
+
"pattern": "^[A-Za-z0-9_-]{22,86}$"
|
|
110
|
+
},
|
|
111
|
+
"Handoff": {
|
|
112
|
+
"title": "Handoff",
|
|
113
|
+
"description": "What a relying party MAY carry as `details.stepUpHandoff` beside an inline `details.stepUpRequest` (auth/step-up/approve-request/0.5, Inline delivery), so that a producer which cannot obtain the evidence itself can hand the step-up to the subject's approver agent. Not a payload of this task: defined here so producers and consumers share one shape.",
|
|
114
|
+
"type": "object",
|
|
115
|
+
"additionalProperties": false,
|
|
116
|
+
"required": [
|
|
117
|
+
"handle",
|
|
118
|
+
"expiresAt",
|
|
119
|
+
"show"
|
|
120
|
+
],
|
|
121
|
+
"properties": {
|
|
122
|
+
"handle": {
|
|
123
|
+
"$ref": "#/$defs/Handle"
|
|
124
|
+
},
|
|
125
|
+
"expiresAt": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"format": "date-time",
|
|
128
|
+
"description": "The instant after which the relying party answers the handle with `notFound`: no later than the pending step-up's own expiry."
|
|
129
|
+
},
|
|
130
|
+
"show": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"const": "https://trusttasks.org/spec/auth/step-up/requests/show/0.1",
|
|
133
|
+
"description": "The Type URI the approver's agent sends with the handle."
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"Operation": {
|
|
138
|
+
"title": "Operation",
|
|
139
|
+
"description": "The operation the step-up is bound to, exactly as the relying party received it.",
|
|
140
|
+
"type": "object",
|
|
141
|
+
"additionalProperties": false,
|
|
142
|
+
"required": [
|
|
143
|
+
"type",
|
|
144
|
+
"payload"
|
|
145
|
+
],
|
|
146
|
+
"properties": {
|
|
147
|
+
"type": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"minLength": 1,
|
|
150
|
+
"maxLength": 2048,
|
|
151
|
+
"description": "The operation's Type URI, as the document the relying party refused named it."
|
|
152
|
+
},
|
|
153
|
+
"payload": {
|
|
154
|
+
"type": "object",
|
|
155
|
+
"description": "The operation's payload, member for member as received, so that the approver's agent can show it and — where it knows how the relying party derives `boundTo` — recompute the binding."
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"Response": {
|
|
160
|
+
"$anchor": "response",
|
|
161
|
+
"title": "Auth — Step-up Request Show — response payload",
|
|
162
|
+
"type": "object",
|
|
163
|
+
"additionalProperties": false,
|
|
164
|
+
"required": [
|
|
165
|
+
"request",
|
|
166
|
+
"operation"
|
|
167
|
+
],
|
|
168
|
+
"description": "The pending step-up and the operation it is bound to. Failures use trust-task-error, not this shape.",
|
|
169
|
+
"properties": {
|
|
170
|
+
"request": {
|
|
171
|
+
"type": "object",
|
|
172
|
+
"description": "A complete auth/step-up/approve-request/0.5 Trust Task document, issued and signed by the relying party, whose recipient is the step-up's subject and whose payload is the request the operation's producer received inline — the same challenge, boundTo, accepts and approvers. The agent verifies it as a document in its own right — envelope, proof and payload against that specification's schema — over the members exactly as received: its proof covers every member, so it is deliberately an open object here rather than a typed one a binding could narrow."
|
|
173
|
+
},
|
|
174
|
+
"operation": {
|
|
175
|
+
"$ref": "#/$defs/Operation"
|
|
176
|
+
},
|
|
177
|
+
"ext": {
|
|
178
|
+
"$ref": "#/$defs/Ext"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"Ext": {
|
|
183
|
+
"title": "Ext",
|
|
184
|
+
"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.",
|
|
185
|
+
"type": "object",
|
|
186
|
+
"minProperties": 1,
|
|
187
|
+
"additionalProperties": true,
|
|
188
|
+
"propertyNames": {
|
|
189
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
} as const;
|
|
194
|
+
|
|
195
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
196
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
197
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
198
|
+
"$ref": "#/$defs/Response",
|
|
199
|
+
"$defs": {
|
|
200
|
+
"Handle": {
|
|
201
|
+
"title": "Handle",
|
|
202
|
+
"description": "A single-use reference to one pending step-up, minted by the relying party with at least 128 bits of entropy and carried as base64url without padding. It names the request; it is not the request's challenge, and knowing it authorizes nothing but this one read.",
|
|
203
|
+
"type": "string",
|
|
204
|
+
"pattern": "^[A-Za-z0-9_-]{22,86}$"
|
|
205
|
+
},
|
|
206
|
+
"Handoff": {
|
|
207
|
+
"title": "Handoff",
|
|
208
|
+
"description": "What a relying party MAY carry as `details.stepUpHandoff` beside an inline `details.stepUpRequest` (auth/step-up/approve-request/0.5, Inline delivery), so that a producer which cannot obtain the evidence itself can hand the step-up to the subject's approver agent. Not a payload of this task: defined here so producers and consumers share one shape.",
|
|
209
|
+
"type": "object",
|
|
210
|
+
"additionalProperties": false,
|
|
211
|
+
"required": [
|
|
212
|
+
"handle",
|
|
213
|
+
"expiresAt",
|
|
214
|
+
"show"
|
|
215
|
+
],
|
|
216
|
+
"properties": {
|
|
217
|
+
"handle": {
|
|
218
|
+
"$ref": "#/$defs/Handle"
|
|
219
|
+
},
|
|
220
|
+
"expiresAt": {
|
|
221
|
+
"type": "string",
|
|
222
|
+
"format": "date-time",
|
|
223
|
+
"description": "The instant after which the relying party answers the handle with `notFound`: no later than the pending step-up's own expiry."
|
|
224
|
+
},
|
|
225
|
+
"show": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"const": "https://trusttasks.org/spec/auth/step-up/requests/show/0.1",
|
|
228
|
+
"description": "The Type URI the approver's agent sends with the handle."
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"Operation": {
|
|
233
|
+
"title": "Operation",
|
|
234
|
+
"description": "The operation the step-up is bound to, exactly as the relying party received it.",
|
|
235
|
+
"type": "object",
|
|
236
|
+
"additionalProperties": false,
|
|
237
|
+
"required": [
|
|
238
|
+
"type",
|
|
239
|
+
"payload"
|
|
240
|
+
],
|
|
241
|
+
"properties": {
|
|
242
|
+
"type": {
|
|
243
|
+
"type": "string",
|
|
244
|
+
"minLength": 1,
|
|
245
|
+
"maxLength": 2048,
|
|
246
|
+
"description": "The operation's Type URI, as the document the relying party refused named it."
|
|
247
|
+
},
|
|
248
|
+
"payload": {
|
|
249
|
+
"type": "object",
|
|
250
|
+
"description": "The operation's payload, member for member as received, so that the approver's agent can show it and — where it knows how the relying party derives `boundTo` — recompute the binding."
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"Response": {
|
|
255
|
+
"$anchor": "response",
|
|
256
|
+
"title": "Auth — Step-up Request Show — response payload",
|
|
257
|
+
"type": "object",
|
|
258
|
+
"additionalProperties": false,
|
|
259
|
+
"required": [
|
|
260
|
+
"request",
|
|
261
|
+
"operation"
|
|
262
|
+
],
|
|
263
|
+
"description": "The pending step-up and the operation it is bound to. Failures use trust-task-error, not this shape.",
|
|
264
|
+
"properties": {
|
|
265
|
+
"request": {
|
|
266
|
+
"type": "object",
|
|
267
|
+
"description": "A complete auth/step-up/approve-request/0.5 Trust Task document, issued and signed by the relying party, whose recipient is the step-up's subject and whose payload is the request the operation's producer received inline — the same challenge, boundTo, accepts and approvers. The agent verifies it as a document in its own right — envelope, proof and payload against that specification's schema — over the members exactly as received: its proof covers every member, so it is deliberately an open object here rather than a typed one a binding could narrow."
|
|
268
|
+
},
|
|
269
|
+
"operation": {
|
|
270
|
+
"$ref": "#/$defs/Operation"
|
|
271
|
+
},
|
|
272
|
+
"ext": {
|
|
273
|
+
"$ref": "#/$defs/Ext"
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"Ext": {
|
|
278
|
+
"title": "Ext",
|
|
279
|
+
"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.",
|
|
280
|
+
"type": "object",
|
|
281
|
+
"minProperties": 1,
|
|
282
|
+
"additionalProperties": true,
|
|
283
|
+
"propertyNames": {
|
|
284
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
} as const;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
292
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
293
|
+
* per-specification and cannot be derived from the document alone, and
|
|
294
|
+
* item 2 needs the schema this carries.
|
|
295
|
+
*/
|
|
296
|
+
export const SPEC = {
|
|
297
|
+
typeUri: TYPE_URI,
|
|
298
|
+
isBearer: false,
|
|
299
|
+
isProofRequired: true,
|
|
300
|
+
isRecipientRequired: true,
|
|
301
|
+
isIssuedAtRequired: true,
|
|
302
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
303
|
+
} as const;
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
307
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
308
|
+
* parties (§7.3 item 5).
|
|
309
|
+
*/
|
|
310
|
+
export const RESPONSE_SPEC = {
|
|
311
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
312
|
+
isBearer: false,
|
|
313
|
+
isProofRequired: true,
|
|
314
|
+
isRecipientRequired: true,
|
|
315
|
+
isIssuedAtRequired: true,
|
|
316
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
317
|
+
} as const;
|
package/src/index.ts
CHANGED
|
@@ -328,6 +328,9 @@ export import AuthStepUpPolicy_v0_1 = _AuthStepUpPolicy_v0_1;
|
|
|
328
328
|
import * as _AuthStepUpPolicy_v0_2 from "./auth/step-up/policy/0.2/payload.js";
|
|
329
329
|
/** @deprecated The prebuilt specification modules will be removed: pin the tasks you use with the `trust-tasks` CLI, generate them with `@openvtc/trust-tasks-gen`, and import the runtime from `@openvtc/trust-tasks/runtime` (GETTING-STARTED.md). */
|
|
330
330
|
export import AuthStepUpPolicy_v0_2 = _AuthStepUpPolicy_v0_2;
|
|
331
|
+
import * as _AuthStepUpRequestsShow_v0_1 from "./auth/step-up/requests/show/0.1/payload.js";
|
|
332
|
+
/** @deprecated The prebuilt specification modules will be removed: pin the tasks you use with the `trust-tasks` CLI, generate them with `@openvtc/trust-tasks-gen`, and import the runtime from `@openvtc/trust-tasks/runtime` (GETTING-STARTED.md). */
|
|
333
|
+
export import AuthStepUpRequestsShow_v0_1 = _AuthStepUpRequestsShow_v0_1;
|
|
331
334
|
import * as _AuthStepUpStart_v0_1 from "./auth/step-up/start/0.1/payload.js";
|
|
332
335
|
/** @deprecated The prebuilt specification modules will be removed: pin the tasks you use with the `trust-tasks` CLI, generate them with `@openvtc/trust-tasks-gen`, and import the runtime from `@openvtc/trust-tasks/runtime` (GETTING-STARTED.md). */
|
|
333
336
|
export import AuthStepUpStart_v0_1 = _AuthStepUpStart_v0_1;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Source: specs/vtc/badges/show/0.1/payload.schema.json
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { Badge, BadgeCriteria, BadgeDescription, BadgeId, BadgeKind, BadgeName, BadgeState, CardBlobRef, EntryId, Ext, GroupId } from "../../../../_shared/components.js";
|
|
6
|
+
import type { Award, AwardId, AwardNote, AwardShare, AwardState, Badge, BadgeCriteria, BadgeDescription, BadgeId, BadgeKind, BadgeName, BadgeState, CardBlobRef, EntryId, Ext, GroupCredentialId, GroupId } from "../../../../_shared/components.js";
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -35,6 +35,12 @@ export interface VTCBadgesShowResponsePayload {
|
|
|
35
35
|
*/
|
|
36
36
|
myCount: number;
|
|
37
37
|
myState: MyState;
|
|
38
|
+
/**
|
|
39
|
+
* The caller's own accepted awards of this badge, newest first, each with `shared` where they show it outside the community — what `vtc/badges/awards/share` and `unshare` name. Absent where the caller holds none. Never another member's award.
|
|
40
|
+
*
|
|
41
|
+
* @maxItems 1000
|
|
42
|
+
*/
|
|
43
|
+
myAwards?: Award[];
|
|
38
44
|
/**
|
|
39
45
|
* Community badges only: the badge group's managers, whom a request for the badge goes to. Shown to every caller who may see the badge.
|
|
40
46
|
*
|
|
@@ -50,7 +56,7 @@ export interface VTCBadgesShowResponsePayload {
|
|
|
50
56
|
}
|
|
51
57
|
|
|
52
58
|
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
53
|
-
export type { Badge, BadgeCriteria, BadgeDescription, BadgeId, BadgeKind, BadgeName, BadgeState, CardBlobRef, EntryId, Ext, GroupId };
|
|
59
|
+
export type { Award, AwardId, AwardNote, AwardShare, AwardState, Badge, BadgeCriteria, BadgeDescription, BadgeId, BadgeKind, BadgeName, BadgeState, CardBlobRef, EntryId, Ext, GroupCredentialId, GroupId };
|
|
54
60
|
|
|
55
61
|
/** Trust Task type URI. */
|
|
56
62
|
export const TYPE_URI = "https://trusttasks.org/spec/vtc/badges/show/0.1" as const;
|
|
@@ -154,6 +160,14 @@ export const PAYLOAD_SCHEMA = {
|
|
|
154
160
|
"myState": {
|
|
155
161
|
"$ref": "#/$defs/MyState"
|
|
156
162
|
},
|
|
163
|
+
"myAwards": {
|
|
164
|
+
"type": "array",
|
|
165
|
+
"maxItems": 1000,
|
|
166
|
+
"items": {
|
|
167
|
+
"$ref": "#/$defs/Award"
|
|
168
|
+
},
|
|
169
|
+
"description": "The caller's own accepted awards of this badge, newest first, each with `shared` where they show it outside the community — what `vtc/badges/awards/share` and `unshare` name. Absent where the caller holds none. Never another member's award."
|
|
170
|
+
},
|
|
157
171
|
"owners": {
|
|
158
172
|
"type": "array",
|
|
159
173
|
"maxItems": 64,
|
|
@@ -191,6 +205,130 @@ export const PAYLOAD_SCHEMA = {
|
|
|
191
205
|
"type": "string",
|
|
192
206
|
"pattern": "^dir_[A-Za-z0-9_-]{16,64}$"
|
|
193
207
|
},
|
|
208
|
+
"Award": {
|
|
209
|
+
"title": "Award",
|
|
210
|
+
"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).",
|
|
211
|
+
"type": "object",
|
|
212
|
+
"additionalProperties": false,
|
|
213
|
+
"required": [
|
|
214
|
+
"awardId",
|
|
215
|
+
"badgeId",
|
|
216
|
+
"entryId",
|
|
217
|
+
"state",
|
|
218
|
+
"offeredAt"
|
|
219
|
+
],
|
|
220
|
+
"properties": {
|
|
221
|
+
"awardId": {
|
|
222
|
+
"$ref": "#/$defs/AwardId"
|
|
223
|
+
},
|
|
224
|
+
"badgeId": {
|
|
225
|
+
"$ref": "#/$defs/BadgeId"
|
|
226
|
+
},
|
|
227
|
+
"entryId": {
|
|
228
|
+
"$ref": "#/$defs/EntryId",
|
|
229
|
+
"description": "The recipient."
|
|
230
|
+
},
|
|
231
|
+
"givenBy": {
|
|
232
|
+
"$ref": "#/$defs/EntryId"
|
|
233
|
+
},
|
|
234
|
+
"note": {
|
|
235
|
+
"$ref": "#/$defs/AwardNote"
|
|
236
|
+
},
|
|
237
|
+
"state": {
|
|
238
|
+
"$ref": "#/$defs/AwardState"
|
|
239
|
+
},
|
|
240
|
+
"offeredAt": {
|
|
241
|
+
"type": "string",
|
|
242
|
+
"format": "date-time"
|
|
243
|
+
},
|
|
244
|
+
"decidedAt": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"format": "date-time",
|
|
247
|
+
"description": "When the recipient accepted or declined, the giver withdrew, the offer expired, or the award was revoked."
|
|
248
|
+
},
|
|
249
|
+
"expiresAt": {
|
|
250
|
+
"type": "string",
|
|
251
|
+
"format": "date-time",
|
|
252
|
+
"description": "When an unanswered offer lapses, where the community expires offers."
|
|
253
|
+
},
|
|
254
|
+
"credentialId": {
|
|
255
|
+
"$ref": "#/$defs/GroupCredentialId"
|
|
256
|
+
},
|
|
257
|
+
"shared": {
|
|
258
|
+
"$ref": "#/$defs/AwardShare"
|
|
259
|
+
},
|
|
260
|
+
"ext": {
|
|
261
|
+
"$ref": "#/$defs/Ext"
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"AwardShare": {
|
|
266
|
+
"title": "AwardShare",
|
|
267
|
+
"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).",
|
|
268
|
+
"type": "object",
|
|
269
|
+
"additionalProperties": false,
|
|
270
|
+
"required": [
|
|
271
|
+
"verificationUrl",
|
|
272
|
+
"since"
|
|
273
|
+
],
|
|
274
|
+
"properties": {
|
|
275
|
+
"verificationUrl": {
|
|
276
|
+
"type": "string",
|
|
277
|
+
"format": "uri",
|
|
278
|
+
"maxLength": 2048,
|
|
279
|
+
"description": "The public location that answers the credential and a verification of it."
|
|
280
|
+
},
|
|
281
|
+
"bakedImageUrl": {
|
|
282
|
+
"type": "string",
|
|
283
|
+
"format": "uri",
|
|
284
|
+
"maxLength": 2048,
|
|
285
|
+
"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."
|
|
286
|
+
},
|
|
287
|
+
"since": {
|
|
288
|
+
"type": "string",
|
|
289
|
+
"format": "date-time"
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"AwardState": {
|
|
294
|
+
"title": "AwardState",
|
|
295
|
+
"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).",
|
|
296
|
+
"type": "string",
|
|
297
|
+
"enum": [
|
|
298
|
+
"offered",
|
|
299
|
+
"accepted",
|
|
300
|
+
"declined",
|
|
301
|
+
"withdrawn",
|
|
302
|
+
"expired",
|
|
303
|
+
"revoked"
|
|
304
|
+
]
|
|
305
|
+
},
|
|
306
|
+
"AwardNote": {
|
|
307
|
+
"title": "AwardNote",
|
|
308
|
+
"type": "string",
|
|
309
|
+
"minLength": 1,
|
|
310
|
+
"maxLength": 500,
|
|
311
|
+
"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)."
|
|
312
|
+
},
|
|
313
|
+
"BadgeId": {
|
|
314
|
+
"title": "BadgeId",
|
|
315
|
+
"description": "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).",
|
|
316
|
+
"type": "string",
|
|
317
|
+
"pattern": "^bdg_[A-Za-z0-9_-]{16,64}$"
|
|
318
|
+
},
|
|
319
|
+
"AwardId": {
|
|
320
|
+
"title": "AwardId",
|
|
321
|
+
"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.",
|
|
322
|
+
"type": "string",
|
|
323
|
+
"pattern": "^awd_[A-Za-z0-9_-]{16,64}$"
|
|
324
|
+
},
|
|
325
|
+
"GroupCredentialId": {
|
|
326
|
+
"title": "GroupCredentialId",
|
|
327
|
+
"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.",
|
|
328
|
+
"type": "string",
|
|
329
|
+
"minLength": 1,
|
|
330
|
+
"maxLength": 512
|
|
331
|
+
},
|
|
194
332
|
"Badge": {
|
|
195
333
|
"title": "Badge",
|
|
196
334
|
"description": "A badge as a caller who may see it sees it. `groupId` is present exactly when `kind` is `community`. `holderCount` only to callers who may see the badge's holders, counted over holders who have not hidden it (VTI-BDG-030, VTI-BDG-033). `createdBy` is the directory entry of the administrator or member who made it, where they have one.",
|
|
@@ -315,12 +453,6 @@ export const PAYLOAD_SCHEMA = {
|
|
|
315
453
|
"kudos"
|
|
316
454
|
]
|
|
317
455
|
},
|
|
318
|
-
"BadgeId": {
|
|
319
|
-
"title": "BadgeId",
|
|
320
|
-
"description": "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).",
|
|
321
|
-
"type": "string",
|
|
322
|
-
"pattern": "^bdg_[A-Za-z0-9_-]{16,64}$"
|
|
323
|
-
},
|
|
324
456
|
"GroupId": {
|
|
325
457
|
"title": "GroupId",
|
|
326
458
|
"description": "Opaque identifier of a community group: `grp_` followed by 16 to 64 base64url characters. Random and community-scoped; not the group's DID.",
|
|
@@ -425,6 +557,14 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
425
557
|
"myState": {
|
|
426
558
|
"$ref": "#/$defs/MyState"
|
|
427
559
|
},
|
|
560
|
+
"myAwards": {
|
|
561
|
+
"type": "array",
|
|
562
|
+
"maxItems": 1000,
|
|
563
|
+
"items": {
|
|
564
|
+
"$ref": "#/$defs/Award"
|
|
565
|
+
},
|
|
566
|
+
"description": "The caller's own accepted awards of this badge, newest first, each with `shared` where they show it outside the community — what `vtc/badges/awards/share` and `unshare` name. Absent where the caller holds none. Never another member's award."
|
|
567
|
+
},
|
|
428
568
|
"owners": {
|
|
429
569
|
"type": "array",
|
|
430
570
|
"maxItems": 64,
|
|
@@ -462,6 +602,130 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
462
602
|
"type": "string",
|
|
463
603
|
"pattern": "^dir_[A-Za-z0-9_-]{16,64}$"
|
|
464
604
|
},
|
|
605
|
+
"Award": {
|
|
606
|
+
"title": "Award",
|
|
607
|
+
"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).",
|
|
608
|
+
"type": "object",
|
|
609
|
+
"additionalProperties": false,
|
|
610
|
+
"required": [
|
|
611
|
+
"awardId",
|
|
612
|
+
"badgeId",
|
|
613
|
+
"entryId",
|
|
614
|
+
"state",
|
|
615
|
+
"offeredAt"
|
|
616
|
+
],
|
|
617
|
+
"properties": {
|
|
618
|
+
"awardId": {
|
|
619
|
+
"$ref": "#/$defs/AwardId"
|
|
620
|
+
},
|
|
621
|
+
"badgeId": {
|
|
622
|
+
"$ref": "#/$defs/BadgeId"
|
|
623
|
+
},
|
|
624
|
+
"entryId": {
|
|
625
|
+
"$ref": "#/$defs/EntryId",
|
|
626
|
+
"description": "The recipient."
|
|
627
|
+
},
|
|
628
|
+
"givenBy": {
|
|
629
|
+
"$ref": "#/$defs/EntryId"
|
|
630
|
+
},
|
|
631
|
+
"note": {
|
|
632
|
+
"$ref": "#/$defs/AwardNote"
|
|
633
|
+
},
|
|
634
|
+
"state": {
|
|
635
|
+
"$ref": "#/$defs/AwardState"
|
|
636
|
+
},
|
|
637
|
+
"offeredAt": {
|
|
638
|
+
"type": "string",
|
|
639
|
+
"format": "date-time"
|
|
640
|
+
},
|
|
641
|
+
"decidedAt": {
|
|
642
|
+
"type": "string",
|
|
643
|
+
"format": "date-time",
|
|
644
|
+
"description": "When the recipient accepted or declined, the giver withdrew, the offer expired, or the award was revoked."
|
|
645
|
+
},
|
|
646
|
+
"expiresAt": {
|
|
647
|
+
"type": "string",
|
|
648
|
+
"format": "date-time",
|
|
649
|
+
"description": "When an unanswered offer lapses, where the community expires offers."
|
|
650
|
+
},
|
|
651
|
+
"credentialId": {
|
|
652
|
+
"$ref": "#/$defs/GroupCredentialId"
|
|
653
|
+
},
|
|
654
|
+
"shared": {
|
|
655
|
+
"$ref": "#/$defs/AwardShare"
|
|
656
|
+
},
|
|
657
|
+
"ext": {
|
|
658
|
+
"$ref": "#/$defs/Ext"
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
},
|
|
662
|
+
"AwardShare": {
|
|
663
|
+
"title": "AwardShare",
|
|
664
|
+
"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).",
|
|
665
|
+
"type": "object",
|
|
666
|
+
"additionalProperties": false,
|
|
667
|
+
"required": [
|
|
668
|
+
"verificationUrl",
|
|
669
|
+
"since"
|
|
670
|
+
],
|
|
671
|
+
"properties": {
|
|
672
|
+
"verificationUrl": {
|
|
673
|
+
"type": "string",
|
|
674
|
+
"format": "uri",
|
|
675
|
+
"maxLength": 2048,
|
|
676
|
+
"description": "The public location that answers the credential and a verification of it."
|
|
677
|
+
},
|
|
678
|
+
"bakedImageUrl": {
|
|
679
|
+
"type": "string",
|
|
680
|
+
"format": "uri",
|
|
681
|
+
"maxLength": 2048,
|
|
682
|
+
"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."
|
|
683
|
+
},
|
|
684
|
+
"since": {
|
|
685
|
+
"type": "string",
|
|
686
|
+
"format": "date-time"
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
},
|
|
690
|
+
"AwardState": {
|
|
691
|
+
"title": "AwardState",
|
|
692
|
+
"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).",
|
|
693
|
+
"type": "string",
|
|
694
|
+
"enum": [
|
|
695
|
+
"offered",
|
|
696
|
+
"accepted",
|
|
697
|
+
"declined",
|
|
698
|
+
"withdrawn",
|
|
699
|
+
"expired",
|
|
700
|
+
"revoked"
|
|
701
|
+
]
|
|
702
|
+
},
|
|
703
|
+
"AwardNote": {
|
|
704
|
+
"title": "AwardNote",
|
|
705
|
+
"type": "string",
|
|
706
|
+
"minLength": 1,
|
|
707
|
+
"maxLength": 500,
|
|
708
|
+
"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)."
|
|
709
|
+
},
|
|
710
|
+
"BadgeId": {
|
|
711
|
+
"title": "BadgeId",
|
|
712
|
+
"description": "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).",
|
|
713
|
+
"type": "string",
|
|
714
|
+
"pattern": "^bdg_[A-Za-z0-9_-]{16,64}$"
|
|
715
|
+
},
|
|
716
|
+
"AwardId": {
|
|
717
|
+
"title": "AwardId",
|
|
718
|
+
"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.",
|
|
719
|
+
"type": "string",
|
|
720
|
+
"pattern": "^awd_[A-Za-z0-9_-]{16,64}$"
|
|
721
|
+
},
|
|
722
|
+
"GroupCredentialId": {
|
|
723
|
+
"title": "GroupCredentialId",
|
|
724
|
+
"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.",
|
|
725
|
+
"type": "string",
|
|
726
|
+
"minLength": 1,
|
|
727
|
+
"maxLength": 512
|
|
728
|
+
},
|
|
465
729
|
"Badge": {
|
|
466
730
|
"title": "Badge",
|
|
467
731
|
"description": "A badge as a caller who may see it sees it. `groupId` is present exactly when `kind` is `community`. `holderCount` only to callers who may see the badge's holders, counted over holders who have not hidden it (VTI-BDG-030, VTI-BDG-033). `createdBy` is the directory entry of the administrator or member who made it, where they have one.",
|
|
@@ -586,12 +850,6 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
586
850
|
"kudos"
|
|
587
851
|
]
|
|
588
852
|
},
|
|
589
|
-
"BadgeId": {
|
|
590
|
-
"title": "BadgeId",
|
|
591
|
-
"description": "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).",
|
|
592
|
-
"type": "string",
|
|
593
|
-
"pattern": "^bdg_[A-Za-z0-9_-]{16,64}$"
|
|
594
|
-
},
|
|
595
853
|
"GroupId": {
|
|
596
854
|
"title": "GroupId",
|
|
597
855
|
"description": "Opaque identifier of a community group: `grp_` followed by 16 to 64 base64url characters. Random and community-scoped; not the group's DID.",
|