@openvtc/trust-tasks 0.19.20 → 0.19.22
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 +4 -0
- package/dist/_framework/0.4/framework.d.ts +18 -0
- package/dist/_framework/0.4/framework.d.ts.map +1 -0
- package/dist/_framework/0.4/framework.js +6 -0
- package/dist/_framework/0.4/framework.js.map +1 -0
- package/dist/_shared/components.d.ts +72 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/messaging/_shared/0.1/messaging.d.ts +1 -1
- package/dist/messaging/_shared/0.1/messaging.d.ts.map +1 -1
- package/dist/messaging/account/add/0.1/payload.d.ts +314 -2
- package/dist/messaging/account/add/0.1/payload.d.ts.map +1 -1
- package/dist/messaging/account/add/0.1/payload.js +156 -0
- package/dist/messaging/account/add/0.1/payload.js.map +1 -1
- package/dist/messaging/account/change-queue-limits/0.1/payload.d.ts +314 -2
- package/dist/messaging/account/change-queue-limits/0.1/payload.d.ts.map +1 -1
- package/dist/messaging/account/change-queue-limits/0.1/payload.js +156 -0
- package/dist/messaging/account/change-queue-limits/0.1/payload.js.map +1 -1
- package/dist/messaging/account/change-type/0.1/payload.d.ts +314 -2
- package/dist/messaging/account/change-type/0.1/payload.d.ts.map +1 -1
- package/dist/messaging/account/change-type/0.1/payload.js +156 -0
- package/dist/messaging/account/change-type/0.1/payload.js.map +1 -1
- package/dist/messaging/account/get/0.1/payload.d.ts +338 -2
- package/dist/messaging/account/get/0.1/payload.d.ts.map +1 -1
- package/dist/messaging/account/get/0.1/payload.js +164 -0
- package/dist/messaging/account/get/0.1/payload.js.map +1 -1
- package/dist/messaging/account/list/0.1/payload.d.ts +338 -2
- package/dist/messaging/account/list/0.1/payload.d.ts.map +1 -1
- package/dist/messaging/account/list/0.1/payload.js +164 -0
- package/dist/messaging/account/list/0.1/payload.js.map +1 -1
- package/dist/messaging/account/update/0.1/payload.d.ts +314 -2
- package/dist/messaging/account/update/0.1/payload.d.ts.map +1 -1
- package/dist/messaging/account/update/0.1/payload.js +156 -0
- package/dist/messaging/account/update/0.1/payload.js.map +1 -1
- package/dist/vtc/join-requests/manifest/0.2/payload.d.ts +96 -2
- package/dist/vtc/join-requests/manifest/0.2/payload.d.ts.map +1 -1
- package/dist/vtc/join-requests/manifest/0.2/payload.js +48 -0
- package/dist/vtc/join-requests/manifest/0.2/payload.js.map +1 -1
- package/dist/vtc/vetting/vetters/show/0.1/payload.d.ts +378 -0
- package/dist/vtc/vetting/vetters/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/vetting/vetters/show/0.1/payload.js +207 -0
- package/dist/vtc/vetting/vetters/show/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_framework/0.4/framework.ts +19 -0
- package/src/_shared/components.ts +72 -0
- package/src/index.ts +2 -0
- package/src/messaging/_shared/0.1/messaging.ts +1 -1
- package/src/messaging/account/add/0.1/payload.ts +158 -2
- package/src/messaging/account/change-queue-limits/0.1/payload.ts +158 -2
- package/src/messaging/account/change-type/0.1/payload.ts +158 -2
- package/src/messaging/account/get/0.1/payload.ts +174 -2
- package/src/messaging/account/list/0.1/payload.ts +174 -2
- package/src/messaging/account/update/0.1/payload.ts +158 -2
- package/src/vtc/join-requests/manifest/0.2/payload.ts +64 -2
- package/src/vtc/vetting/vetters/show/0.1/payload.ts +267 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Source: specs/messaging/account/update/0.1/payload.schema.json
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { Account, AccountType, Ext, MediatorAcl, QueueLimits, Vid } from "../../../../_shared/components.js";
|
|
6
|
+
import type { Account, AccountStats, AccountType, Ext, MediatorAcl, ProtocolCounts, QueueLimits, Vid } from "../../../../_shared/components.js";
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
export interface MessagingUpdateAccountPayload {
|
|
@@ -43,7 +43,7 @@ export interface MessagingUpdateAccountResponsePayload {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
46
|
-
export type { Account, AccountType, Ext, MediatorAcl, QueueLimits, Vid };
|
|
46
|
+
export type { Account, AccountStats, AccountType, Ext, MediatorAcl, ProtocolCounts, QueueLimits, Vid };
|
|
47
47
|
|
|
48
48
|
/** Trust Task type URI. */
|
|
49
49
|
export const TYPE_URI = "https://trusttasks.org/spec/messaging/account/update/0.1" as const;
|
|
@@ -176,6 +176,84 @@ export const PAYLOAD_SCHEMA = {
|
|
|
176
176
|
"type": "integer",
|
|
177
177
|
"minimum": 0,
|
|
178
178
|
"description": "Number of entries in the account's access list."
|
|
179
|
+
},
|
|
180
|
+
"lastReceivedAt": {
|
|
181
|
+
"type": "integer",
|
|
182
|
+
"minimum": 0,
|
|
183
|
+
"description": "Unix epoch seconds at which the mediator last accepted a message addressed to this account. Present only when the request set `includeActivity` and the mediator has recorded such a message; MAY lag the true time by up to 60 seconds."
|
|
184
|
+
},
|
|
185
|
+
"lastAuthenticatedAt": {
|
|
186
|
+
"type": "integer",
|
|
187
|
+
"minimum": 0,
|
|
188
|
+
"description": "Unix epoch seconds at which this account last completed authentication with the mediator, over any transport. Present only when the request set `includeActivity` and the mediator has recorded an authentication."
|
|
189
|
+
},
|
|
190
|
+
"stats": {
|
|
191
|
+
"$ref": "#/$defs/AccountStats",
|
|
192
|
+
"description": "Lifetime counters the mediator keeps for this account. Present only when the request set `includeStats`."
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"AccountStats": {
|
|
197
|
+
"title": "AccountStats",
|
|
198
|
+
"type": "object",
|
|
199
|
+
"additionalProperties": false,
|
|
200
|
+
"description": "What an account has sent and received over its lifetime, as the mediator counted it. Every member is optional: a mediator reports what it keeps, and a counter absent from a response was not kept rather than zero. Counters survive restarts and are not reset by reading them; removing an account discards them.",
|
|
201
|
+
"properties": {
|
|
202
|
+
"messagesReceived": {
|
|
203
|
+
"type": "integer",
|
|
204
|
+
"minimum": 0,
|
|
205
|
+
"description": "Messages the mediator accepted addressed to this account."
|
|
206
|
+
},
|
|
207
|
+
"messagesSent": {
|
|
208
|
+
"type": "integer",
|
|
209
|
+
"minimum": 0,
|
|
210
|
+
"description": "Messages the mediator accepted from this account."
|
|
211
|
+
},
|
|
212
|
+
"bytesReceived": {
|
|
213
|
+
"type": "integer",
|
|
214
|
+
"minimum": 0,
|
|
215
|
+
"description": "Total size of the messages counted by messagesReceived."
|
|
216
|
+
},
|
|
217
|
+
"bytesSent": {
|
|
218
|
+
"type": "integer",
|
|
219
|
+
"minimum": 0,
|
|
220
|
+
"description": "Total size of the messages counted by messagesSent."
|
|
221
|
+
},
|
|
222
|
+
"receivedByProtocol": {
|
|
223
|
+
"$ref": "#/$defs/ProtocolCounts",
|
|
224
|
+
"description": "messagesReceived split by the wire protocol the message arrived in."
|
|
225
|
+
},
|
|
226
|
+
"sentByProtocol": {
|
|
227
|
+
"$ref": "#/$defs/ProtocolCounts",
|
|
228
|
+
"description": "messagesSent split by the wire protocol the message was sent in."
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"ProtocolCounts": {
|
|
233
|
+
"title": "ProtocolCounts",
|
|
234
|
+
"type": "object",
|
|
235
|
+
"additionalProperties": false,
|
|
236
|
+
"description": "Message counts split by wire protocol. An absent member is a protocol the mediator counted nothing for. The member names match the WireProtocol values the traffic monitor reports.",
|
|
237
|
+
"properties": {
|
|
238
|
+
"didcomm": {
|
|
239
|
+
"type": "integer",
|
|
240
|
+
"minimum": 0,
|
|
241
|
+
"description": "DIDComm v2 (JWE/JWS)."
|
|
242
|
+
},
|
|
243
|
+
"didcommV1": {
|
|
244
|
+
"type": "integer",
|
|
245
|
+
"minimum": 0,
|
|
246
|
+
"description": "A DIDComm v1 envelope."
|
|
247
|
+
},
|
|
248
|
+
"tsp": {
|
|
249
|
+
"type": "integer",
|
|
250
|
+
"minimum": 0,
|
|
251
|
+
"description": "A Trust Spanning Protocol message."
|
|
252
|
+
},
|
|
253
|
+
"other": {
|
|
254
|
+
"type": "integer",
|
|
255
|
+
"minimum": 0,
|
|
256
|
+
"description": "Anything the mediator could not classify."
|
|
179
257
|
}
|
|
180
258
|
}
|
|
181
259
|
},
|
|
@@ -368,6 +446,84 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
368
446
|
"type": "integer",
|
|
369
447
|
"minimum": 0,
|
|
370
448
|
"description": "Number of entries in the account's access list."
|
|
449
|
+
},
|
|
450
|
+
"lastReceivedAt": {
|
|
451
|
+
"type": "integer",
|
|
452
|
+
"minimum": 0,
|
|
453
|
+
"description": "Unix epoch seconds at which the mediator last accepted a message addressed to this account. Present only when the request set `includeActivity` and the mediator has recorded such a message; MAY lag the true time by up to 60 seconds."
|
|
454
|
+
},
|
|
455
|
+
"lastAuthenticatedAt": {
|
|
456
|
+
"type": "integer",
|
|
457
|
+
"minimum": 0,
|
|
458
|
+
"description": "Unix epoch seconds at which this account last completed authentication with the mediator, over any transport. Present only when the request set `includeActivity` and the mediator has recorded an authentication."
|
|
459
|
+
},
|
|
460
|
+
"stats": {
|
|
461
|
+
"$ref": "#/$defs/AccountStats",
|
|
462
|
+
"description": "Lifetime counters the mediator keeps for this account. Present only when the request set `includeStats`."
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
"AccountStats": {
|
|
467
|
+
"title": "AccountStats",
|
|
468
|
+
"type": "object",
|
|
469
|
+
"additionalProperties": false,
|
|
470
|
+
"description": "What an account has sent and received over its lifetime, as the mediator counted it. Every member is optional: a mediator reports what it keeps, and a counter absent from a response was not kept rather than zero. Counters survive restarts and are not reset by reading them; removing an account discards them.",
|
|
471
|
+
"properties": {
|
|
472
|
+
"messagesReceived": {
|
|
473
|
+
"type": "integer",
|
|
474
|
+
"minimum": 0,
|
|
475
|
+
"description": "Messages the mediator accepted addressed to this account."
|
|
476
|
+
},
|
|
477
|
+
"messagesSent": {
|
|
478
|
+
"type": "integer",
|
|
479
|
+
"minimum": 0,
|
|
480
|
+
"description": "Messages the mediator accepted from this account."
|
|
481
|
+
},
|
|
482
|
+
"bytesReceived": {
|
|
483
|
+
"type": "integer",
|
|
484
|
+
"minimum": 0,
|
|
485
|
+
"description": "Total size of the messages counted by messagesReceived."
|
|
486
|
+
},
|
|
487
|
+
"bytesSent": {
|
|
488
|
+
"type": "integer",
|
|
489
|
+
"minimum": 0,
|
|
490
|
+
"description": "Total size of the messages counted by messagesSent."
|
|
491
|
+
},
|
|
492
|
+
"receivedByProtocol": {
|
|
493
|
+
"$ref": "#/$defs/ProtocolCounts",
|
|
494
|
+
"description": "messagesReceived split by the wire protocol the message arrived in."
|
|
495
|
+
},
|
|
496
|
+
"sentByProtocol": {
|
|
497
|
+
"$ref": "#/$defs/ProtocolCounts",
|
|
498
|
+
"description": "messagesSent split by the wire protocol the message was sent in."
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
"ProtocolCounts": {
|
|
503
|
+
"title": "ProtocolCounts",
|
|
504
|
+
"type": "object",
|
|
505
|
+
"additionalProperties": false,
|
|
506
|
+
"description": "Message counts split by wire protocol. An absent member is a protocol the mediator counted nothing for. The member names match the WireProtocol values the traffic monitor reports.",
|
|
507
|
+
"properties": {
|
|
508
|
+
"didcomm": {
|
|
509
|
+
"type": "integer",
|
|
510
|
+
"minimum": 0,
|
|
511
|
+
"description": "DIDComm v2 (JWE/JWS)."
|
|
512
|
+
},
|
|
513
|
+
"didcommV1": {
|
|
514
|
+
"type": "integer",
|
|
515
|
+
"minimum": 0,
|
|
516
|
+
"description": "A DIDComm v1 envelope."
|
|
517
|
+
},
|
|
518
|
+
"tsp": {
|
|
519
|
+
"type": "integer",
|
|
520
|
+
"minimum": 0,
|
|
521
|
+
"description": "A Trust Spanning Protocol message."
|
|
522
|
+
},
|
|
523
|
+
"other": {
|
|
524
|
+
"type": "integer",
|
|
525
|
+
"minimum": 0,
|
|
526
|
+
"description": "Anything the mediator could not classify."
|
|
371
527
|
}
|
|
372
528
|
}
|
|
373
529
|
},
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Source: specs/vtc/join-requests/manifest/0.2/payload.schema.json
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { ClaimType, DigestMultibase, Ext, VettingDocumentation, VettingMethod } from "../../../../_shared/components.js";
|
|
6
|
+
import type { ClaimType, DigestMultibase, Ext, ExtCritical, VettingDocumentation, VettingMethod } from "../../../../_shared/components.js";
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -135,6 +135,20 @@ export interface VettingRequirements {
|
|
|
135
135
|
* Where the community's vetting governance — including the attestation text vetters sign — is published.
|
|
136
136
|
*/
|
|
137
137
|
governanceFrameworkUrl?: string;
|
|
138
|
+
/**
|
|
139
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1, for vetting parameters this version does not enumerate. A community publishing an admission mode the base members cannot express — the zero-knowledge parameters an applicant proves against, say — puts them under a namespace it controls, rather than waiting for a version that names them.
|
|
140
|
+
*
|
|
141
|
+
* This object is already `additionalProperties: true`, so an unknown member here has always validated. That is not the same as reaching a consumer: a generated type names the members this schema declares and drops the rest, so an undeclared member is parsed and discarded, and it is discarded again on the re-serialization `requirementsDigest` is computed over. `ext` is a declared member, so it survives both.
|
|
142
|
+
*/
|
|
143
|
+
ext?: Ext;
|
|
144
|
+
/**
|
|
145
|
+
* Namespaces of `ext` an applicant MUST understand or refuse, per SPEC.md §4.5.1.
|
|
146
|
+
*
|
|
147
|
+
* A community marks a namespace here when applying under this criterion without understanding it would mean something other than what the community requires — an applicant that ignored a hidden-vetting namespace, for instance, would submit named statements to a criterion whose whole point was that it does not receive them. An applicant that does not recognize a marked namespace stops rather than downgrading silently.
|
|
148
|
+
*
|
|
149
|
+
* Absent, which is the common case, every namespace under `ext` is advisory and ignorable.
|
|
150
|
+
*/
|
|
151
|
+
extCritical?: ExtCritical;
|
|
138
152
|
[k: string]: unknown | undefined;
|
|
139
153
|
}
|
|
140
154
|
/**
|
|
@@ -157,7 +171,7 @@ export interface CommunityBranding {
|
|
|
157
171
|
}
|
|
158
172
|
|
|
159
173
|
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
160
|
-
export type { ClaimType, DigestMultibase, Ext, VettingDocumentation, VettingMethod };
|
|
174
|
+
export type { ClaimType, DigestMultibase, Ext, ExtCritical, VettingDocumentation, VettingMethod };
|
|
161
175
|
|
|
162
176
|
/** Trust Task type URI. */
|
|
163
177
|
export const TYPE_URI = "https://trusttasks.org/spec/vtc/join-requests/manifest/0.2" as const;
|
|
@@ -375,6 +389,14 @@ export const PAYLOAD_SCHEMA = {
|
|
|
375
389
|
"pattern": "^https://",
|
|
376
390
|
"maxLength": 2048,
|
|
377
391
|
"description": "Where the community's vetting governance — including the attestation text vetters sign — is published."
|
|
392
|
+
},
|
|
393
|
+
"ext": {
|
|
394
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1, for vetting parameters this version does not enumerate. A community publishing an admission mode the base members cannot express — the zero-knowledge parameters an applicant proves against, say — puts them under a namespace it controls, rather than waiting for a version that names them.\n\nThis object is already `additionalProperties: true`, so an unknown member here has always validated. That is not the same as reaching a consumer: a generated type names the members this schema declares and drops the rest, so an undeclared member is parsed and discarded, and it is discarded again on the re-serialization `requirementsDigest` is computed over. `ext` is a declared member, so it survives both.",
|
|
395
|
+
"$ref": "#/$defs/Ext"
|
|
396
|
+
},
|
|
397
|
+
"extCritical": {
|
|
398
|
+
"description": "Namespaces of `ext` an applicant MUST understand or refuse, per SPEC.md §4.5.1.\n\nA community marks a namespace here when applying under this criterion without understanding it would mean something other than what the community requires — an applicant that ignored a hidden-vetting namespace, for instance, would submit named statements to a criterion whose whole point was that it does not receive them. An applicant that does not recognize a marked namespace stops rather than downgrading silently.\n\nAbsent, which is the common case, every namespace under `ext` is advisory and ignorable.",
|
|
399
|
+
"$ref": "#/$defs/ExtCritical"
|
|
378
400
|
}
|
|
379
401
|
}
|
|
380
402
|
},
|
|
@@ -476,6 +498,22 @@ export const PAYLOAD_SCHEMA = {
|
|
|
476
498
|
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
477
499
|
}
|
|
478
500
|
},
|
|
501
|
+
"ExtCritical": {
|
|
502
|
+
"title": "ExtCritical",
|
|
503
|
+
"description": "Names the `ext` namespaces a consumer MUST understand or refuse, per SPEC.md §4.5.1.\n\nEvery entry MUST be an immediate key of the sibling `ext` object at the same level; an entry naming an absent namespace is non-conforming and the consumer rejects the document with `malformedRequest`. A consumer that does not recognize a namespace named here MUST NOT process the document as though the namespace were absent, and rejects it with `unsupportedExtension` — the exception to the rule that unrecognized namespaces are ignored.\n\nA producer marks a namespace only where the document's meaning depends on it. Marking one that merely carries a hint or an annotation turns every consumer that has not implemented it into a failure where it would otherwise have interoperated. JSON Schema cannot check either of those rules: that an entry names a present namespace is checkable only against the sibling `ext`, and whether a namespace is load-bearing is not a schema question at all. Both are consumer-side checks.",
|
|
504
|
+
"type": "array",
|
|
505
|
+
"minItems": 1,
|
|
506
|
+
"uniqueItems": true,
|
|
507
|
+
"items": {
|
|
508
|
+
"type": "string",
|
|
509
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
510
|
+
},
|
|
511
|
+
"examples": [
|
|
512
|
+
[
|
|
513
|
+
"org.openvtc.hidden-vetting"
|
|
514
|
+
]
|
|
515
|
+
]
|
|
516
|
+
},
|
|
479
517
|
"VettingRelationship": {
|
|
480
518
|
"title": "VettingRelationship",
|
|
481
519
|
"type": "string",
|
|
@@ -714,6 +752,14 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
714
752
|
"pattern": "^https://",
|
|
715
753
|
"maxLength": 2048,
|
|
716
754
|
"description": "Where the community's vetting governance — including the attestation text vetters sign — is published."
|
|
755
|
+
},
|
|
756
|
+
"ext": {
|
|
757
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1, for vetting parameters this version does not enumerate. A community publishing an admission mode the base members cannot express — the zero-knowledge parameters an applicant proves against, say — puts them under a namespace it controls, rather than waiting for a version that names them.\n\nThis object is already `additionalProperties: true`, so an unknown member here has always validated. That is not the same as reaching a consumer: a generated type names the members this schema declares and drops the rest, so an undeclared member is parsed and discarded, and it is discarded again on the re-serialization `requirementsDigest` is computed over. `ext` is a declared member, so it survives both.",
|
|
758
|
+
"$ref": "#/$defs/Ext"
|
|
759
|
+
},
|
|
760
|
+
"extCritical": {
|
|
761
|
+
"description": "Namespaces of `ext` an applicant MUST understand or refuse, per SPEC.md §4.5.1.\n\nA community marks a namespace here when applying under this criterion without understanding it would mean something other than what the community requires — an applicant that ignored a hidden-vetting namespace, for instance, would submit named statements to a criterion whose whole point was that it does not receive them. An applicant that does not recognize a marked namespace stops rather than downgrading silently.\n\nAbsent, which is the common case, every namespace under `ext` is advisory and ignorable.",
|
|
762
|
+
"$ref": "#/$defs/ExtCritical"
|
|
717
763
|
}
|
|
718
764
|
}
|
|
719
765
|
},
|
|
@@ -815,6 +861,22 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
815
861
|
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
816
862
|
}
|
|
817
863
|
},
|
|
864
|
+
"ExtCritical": {
|
|
865
|
+
"title": "ExtCritical",
|
|
866
|
+
"description": "Names the `ext` namespaces a consumer MUST understand or refuse, per SPEC.md §4.5.1.\n\nEvery entry MUST be an immediate key of the sibling `ext` object at the same level; an entry naming an absent namespace is non-conforming and the consumer rejects the document with `malformedRequest`. A consumer that does not recognize a namespace named here MUST NOT process the document as though the namespace were absent, and rejects it with `unsupportedExtension` — the exception to the rule that unrecognized namespaces are ignored.\n\nA producer marks a namespace only where the document's meaning depends on it. Marking one that merely carries a hint or an annotation turns every consumer that has not implemented it into a failure where it would otherwise have interoperated. JSON Schema cannot check either of those rules: that an entry names a present namespace is checkable only against the sibling `ext`, and whether a namespace is load-bearing is not a schema question at all. Both are consumer-side checks.",
|
|
867
|
+
"type": "array",
|
|
868
|
+
"minItems": 1,
|
|
869
|
+
"uniqueItems": true,
|
|
870
|
+
"items": {
|
|
871
|
+
"type": "string",
|
|
872
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
873
|
+
},
|
|
874
|
+
"examples": [
|
|
875
|
+
[
|
|
876
|
+
"org.openvtc.hidden-vetting"
|
|
877
|
+
]
|
|
878
|
+
]
|
|
879
|
+
},
|
|
818
880
|
"VettingRelationship": {
|
|
819
881
|
"title": "VettingRelationship",
|
|
820
882
|
"type": "string",
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/vetting/vetters/show/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The state of a vetter's grant in this community. The three refusing values are deliberately distinct: `revoked` says the community withdrew a grant it had made, `expired` says one ran out, and `none` says there is nothing to withdraw. An applicant reads those differently, and so does a vetter checking their own standing.
|
|
11
|
+
*/
|
|
12
|
+
export type GrantStatus = "live" | "revoked" | "expired" | "none";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* An authenticated applicant or member asks a community about one vetter, by DID. The answer is the state of that vetter's grant — `live`, `revoked`, `expired` or `none` — which a list of vetters cannot express, because an absent vetter and a revoked one look identical in it. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
16
|
+
*/
|
|
17
|
+
export interface VTCVettingShowVetterPayload {
|
|
18
|
+
/**
|
|
19
|
+
* The DID of the vetter being asked about — the subject of the vetter role credential. The caller usually holds it from an earlier listing, or from a vetting exchange that has since gone quiet.
|
|
20
|
+
*/
|
|
21
|
+
vetterDid: string;
|
|
22
|
+
ext?: Ext;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* One vetter's grant status. Carries no profile: what a vetter published for a directory is answered by vtc/vetting/vetters/list, and this task answers a caller who already knows which vetter they mean.
|
|
26
|
+
*/
|
|
27
|
+
export interface VTCVettingShowVetterResponsePayload {
|
|
28
|
+
/**
|
|
29
|
+
* The DID asked about, echoed so a response is self-contained.
|
|
30
|
+
*/
|
|
31
|
+
vetterDid: string;
|
|
32
|
+
status: GrantStatus;
|
|
33
|
+
/**
|
|
34
|
+
* The identifier of the grant this status is about. Present for `live`, `revoked` and `expired`; absent for `none`, which is the absence of a grant and so has nothing to identify.
|
|
35
|
+
*/
|
|
36
|
+
grantId?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The grant's `validUntil`. Present for `live` and `expired` — for `expired` it is when it ran out, which tells a caller whether it lapsed long ago or yesterday. Absent for `none`, and for `revoked`, where the revocation and not the expiry is what ended it.
|
|
39
|
+
*/
|
|
40
|
+
validUntil?: string;
|
|
41
|
+
/**
|
|
42
|
+
* When the grant was revoked. Present only for `revoked`. The reason is deliberately not carried: it is the community's internal record, and an applicant needs to know the grant does not hold, not why.
|
|
43
|
+
*/
|
|
44
|
+
revokedAt?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Whether this vetter has a profile stored with `listed: true`, and so would appear in vtc/vetting/vetters/list. Present only for `live`. It is what separates the two reasons a live vetter is missing from a listing: unlisted by choice, rather than not a vetter.
|
|
47
|
+
*/
|
|
48
|
+
listed?: boolean;
|
|
49
|
+
ext?: Ext;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
53
|
+
export type { Ext };
|
|
54
|
+
|
|
55
|
+
/** Trust Task type URI. */
|
|
56
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/vetting/vetters/show/0.1" as const;
|
|
57
|
+
|
|
58
|
+
/** Stable alias for this specification's request payload shape. */
|
|
59
|
+
export type Payload = VTCVettingShowVetterPayload;
|
|
60
|
+
|
|
61
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
62
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/vetting/vetters/show/0.1#response" as const;
|
|
63
|
+
|
|
64
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
65
|
+
export type Response = VTCVettingShowVetterResponsePayload;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* This specification's payload schema, as a value.
|
|
69
|
+
*
|
|
70
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
71
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
72
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
73
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
74
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
75
|
+
*/
|
|
76
|
+
export const PAYLOAD_SCHEMA = {
|
|
77
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
78
|
+
"$id": "https://trusttasks.org/spec/vtc/vetting/vetters/show/0.1",
|
|
79
|
+
"title": "VTC Vetting — Show Vetter — payload",
|
|
80
|
+
"description": "An authenticated applicant or member asks a community about one vetter, by DID. The answer is the state of that vetter's grant — `live`, `revoked`, `expired` or `none` — which a list of vetters cannot express, because an absent vetter and a revoked one look identical in it. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
|
|
81
|
+
"type": "object",
|
|
82
|
+
"additionalProperties": false,
|
|
83
|
+
"required": [
|
|
84
|
+
"vetterDid"
|
|
85
|
+
],
|
|
86
|
+
"properties": {
|
|
87
|
+
"vetterDid": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"pattern": "^did:",
|
|
90
|
+
"minLength": 1,
|
|
91
|
+
"maxLength": 2048,
|
|
92
|
+
"description": "The DID of the vetter being asked about — the subject of the vetter role credential. The caller usually holds it from an earlier listing, or from a vetting exchange that has since gone quiet."
|
|
93
|
+
},
|
|
94
|
+
"ext": {
|
|
95
|
+
"$ref": "#/$defs/Ext"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"$defs": {
|
|
99
|
+
"GrantStatus": {
|
|
100
|
+
"title": "GrantStatus",
|
|
101
|
+
"description": "The state of a vetter's grant in this community. The three refusing values are deliberately distinct: `revoked` says the community withdrew a grant it had made, `expired` says one ran out, and `none` says there is nothing to withdraw. An applicant reads those differently, and so does a vetter checking their own standing.",
|
|
102
|
+
"type": "string",
|
|
103
|
+
"enum": [
|
|
104
|
+
"live",
|
|
105
|
+
"revoked",
|
|
106
|
+
"expired",
|
|
107
|
+
"none"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"Response": {
|
|
111
|
+
"$anchor": "response",
|
|
112
|
+
"title": "VTC Vetting — Show Vetter — response payload",
|
|
113
|
+
"description": "One vetter's grant status. Carries no profile: what a vetter published for a directory is answered by vtc/vetting/vetters/list, and this task answers a caller who already knows which vetter they mean.",
|
|
114
|
+
"type": "object",
|
|
115
|
+
"additionalProperties": false,
|
|
116
|
+
"required": [
|
|
117
|
+
"vetterDid",
|
|
118
|
+
"status"
|
|
119
|
+
],
|
|
120
|
+
"properties": {
|
|
121
|
+
"vetterDid": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"pattern": "^did:",
|
|
124
|
+
"description": "The DID asked about, echoed so a response is self-contained."
|
|
125
|
+
},
|
|
126
|
+
"status": {
|
|
127
|
+
"$ref": "#/$defs/GrantStatus"
|
|
128
|
+
},
|
|
129
|
+
"grantId": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"minLength": 1,
|
|
132
|
+
"maxLength": 512,
|
|
133
|
+
"description": "The identifier of the grant this status is about. Present for `live`, `revoked` and `expired`; absent for `none`, which is the absence of a grant and so has nothing to identify."
|
|
134
|
+
},
|
|
135
|
+
"validUntil": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"format": "date-time",
|
|
138
|
+
"description": "The grant's `validUntil`. Present for `live` and `expired` — for `expired` it is when it ran out, which tells a caller whether it lapsed long ago or yesterday. Absent for `none`, and for `revoked`, where the revocation and not the expiry is what ended it."
|
|
139
|
+
},
|
|
140
|
+
"revokedAt": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"format": "date-time",
|
|
143
|
+
"description": "When the grant was revoked. Present only for `revoked`. The reason is deliberately not carried: it is the community's internal record, and an applicant needs to know the grant does not hold, not why."
|
|
144
|
+
},
|
|
145
|
+
"listed": {
|
|
146
|
+
"type": "boolean",
|
|
147
|
+
"description": "Whether this vetter has a profile stored with `listed: true`, and so would appear in vtc/vetting/vetters/list. Present only for `live`. It is what separates the two reasons a live vetter is missing from a listing: unlisted by choice, rather than not a vetter."
|
|
148
|
+
},
|
|
149
|
+
"ext": {
|
|
150
|
+
"$ref": "#/$defs/Ext"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"Ext": {
|
|
155
|
+
"title": "Ext",
|
|
156
|
+
"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.",
|
|
157
|
+
"type": "object",
|
|
158
|
+
"minProperties": 1,
|
|
159
|
+
"additionalProperties": true,
|
|
160
|
+
"propertyNames": {
|
|
161
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
} as const;
|
|
166
|
+
|
|
167
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
168
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
169
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
170
|
+
"$ref": "#/$defs/Response",
|
|
171
|
+
"$defs": {
|
|
172
|
+
"GrantStatus": {
|
|
173
|
+
"title": "GrantStatus",
|
|
174
|
+
"description": "The state of a vetter's grant in this community. The three refusing values are deliberately distinct: `revoked` says the community withdrew a grant it had made, `expired` says one ran out, and `none` says there is nothing to withdraw. An applicant reads those differently, and so does a vetter checking their own standing.",
|
|
175
|
+
"type": "string",
|
|
176
|
+
"enum": [
|
|
177
|
+
"live",
|
|
178
|
+
"revoked",
|
|
179
|
+
"expired",
|
|
180
|
+
"none"
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
"Response": {
|
|
184
|
+
"$anchor": "response",
|
|
185
|
+
"title": "VTC Vetting — Show Vetter — response payload",
|
|
186
|
+
"description": "One vetter's grant status. Carries no profile: what a vetter published for a directory is answered by vtc/vetting/vetters/list, and this task answers a caller who already knows which vetter they mean.",
|
|
187
|
+
"type": "object",
|
|
188
|
+
"additionalProperties": false,
|
|
189
|
+
"required": [
|
|
190
|
+
"vetterDid",
|
|
191
|
+
"status"
|
|
192
|
+
],
|
|
193
|
+
"properties": {
|
|
194
|
+
"vetterDid": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"pattern": "^did:",
|
|
197
|
+
"description": "The DID asked about, echoed so a response is self-contained."
|
|
198
|
+
},
|
|
199
|
+
"status": {
|
|
200
|
+
"$ref": "#/$defs/GrantStatus"
|
|
201
|
+
},
|
|
202
|
+
"grantId": {
|
|
203
|
+
"type": "string",
|
|
204
|
+
"minLength": 1,
|
|
205
|
+
"maxLength": 512,
|
|
206
|
+
"description": "The identifier of the grant this status is about. Present for `live`, `revoked` and `expired`; absent for `none`, which is the absence of a grant and so has nothing to identify."
|
|
207
|
+
},
|
|
208
|
+
"validUntil": {
|
|
209
|
+
"type": "string",
|
|
210
|
+
"format": "date-time",
|
|
211
|
+
"description": "The grant's `validUntil`. Present for `live` and `expired` — for `expired` it is when it ran out, which tells a caller whether it lapsed long ago or yesterday. Absent for `none`, and for `revoked`, where the revocation and not the expiry is what ended it."
|
|
212
|
+
},
|
|
213
|
+
"revokedAt": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"format": "date-time",
|
|
216
|
+
"description": "When the grant was revoked. Present only for `revoked`. The reason is deliberately not carried: it is the community's internal record, and an applicant needs to know the grant does not hold, not why."
|
|
217
|
+
},
|
|
218
|
+
"listed": {
|
|
219
|
+
"type": "boolean",
|
|
220
|
+
"description": "Whether this vetter has a profile stored with `listed: true`, and so would appear in vtc/vetting/vetters/list. Present only for `live`. It is what separates the two reasons a live vetter is missing from a listing: unlisted by choice, rather than not a vetter."
|
|
221
|
+
},
|
|
222
|
+
"ext": {
|
|
223
|
+
"$ref": "#/$defs/Ext"
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"Ext": {
|
|
228
|
+
"title": "Ext",
|
|
229
|
+
"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.",
|
|
230
|
+
"type": "object",
|
|
231
|
+
"minProperties": 1,
|
|
232
|
+
"additionalProperties": true,
|
|
233
|
+
"propertyNames": {
|
|
234
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
} as const;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
242
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
243
|
+
* per-specification and cannot be derived from the document alone, and
|
|
244
|
+
* item 2 needs the schema this carries.
|
|
245
|
+
*/
|
|
246
|
+
export const SPEC = {
|
|
247
|
+
typeUri: TYPE_URI,
|
|
248
|
+
isBearer: false,
|
|
249
|
+
isProofRequired: false,
|
|
250
|
+
isRecipientRequired: true,
|
|
251
|
+
isIssuedAtRequired: false,
|
|
252
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
253
|
+
} as const;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
257
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
258
|
+
* parties (§7.3 item 5).
|
|
259
|
+
*/
|
|
260
|
+
export const RESPONSE_SPEC = {
|
|
261
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
262
|
+
isBearer: false,
|
|
263
|
+
isProofRequired: false,
|
|
264
|
+
isRecipientRequired: true,
|
|
265
|
+
isIssuedAtRequired: false,
|
|
266
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
267
|
+
} as const;
|