@openvtc/trust-tasks 0.28.10 → 0.28.12
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 +136 -0
- package/dist/_shared/components.d.ts +941 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +156 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +156 -0
- package/dist/index.js.map +1 -1
- package/dist/vta/collection/_shared/0.1/collection.d.ts +16 -0
- package/dist/vta/collection/_shared/0.1/collection.d.ts.map +1 -0
- package/dist/vta/collection/_shared/0.1/collection.js +6 -0
- package/dist/vta/collection/_shared/0.1/collection.js.map +1 -0
- package/dist/vta/collection/claim/0.1/payload.d.ts +352 -0
- package/dist/vta/collection/claim/0.1/payload.d.ts.map +1 -0
- package/dist/vta/collection/claim/0.1/payload.js +198 -0
- package/dist/vta/collection/claim/0.1/payload.js.map +1 -0
- package/dist/vta/collection/list/0.1/payload.d.ts +740 -0
- package/dist/vta/collection/list/0.1/payload.d.ts.map +1 -0
- package/dist/vta/collection/list/0.1/payload.js +447 -0
- package/dist/vta/collection/list/0.1/payload.js.map +1 -0
- package/dist/vta/collection/release/0.1/payload.d.ts +316 -0
- package/dist/vta/collection/release/0.1/payload.d.ts.map +1 -0
- package/dist/vta/collection/release/0.1/payload.js +182 -0
- package/dist/vta/collection/release/0.1/payload.js.map +1 -0
- package/dist/vta/notifications/deposit/0.1/payload.d.ts +349 -0
- package/dist/vta/notifications/deposit/0.1/payload.d.ts.map +1 -0
- package/dist/vta/notifications/deposit/0.1/payload.js +198 -0
- package/dist/vta/notifications/deposit/0.1/payload.js.map +1 -0
- package/dist/vta/pcs/vetter/recover/0.1/payload.d.ts +667 -0
- package/dist/vta/pcs/vetter/recover/0.1/payload.d.ts.map +1 -0
- package/dist/vta/pcs/vetter/recover/0.1/payload.js +387 -0
- package/dist/vta/pcs/vetter/recover/0.1/payload.js.map +1 -0
- package/dist/vtc/notifications/_shared/0.1/received-notification.d.ts +16 -0
- package/dist/vtc/notifications/_shared/0.1/received-notification.d.ts.map +1 -0
- package/dist/vtc/notifications/_shared/0.1/received-notification.js +6 -0
- package/dist/vtc/notifications/_shared/0.1/received-notification.js.map +1 -0
- package/dist/vtc/notifications/list/0.1/payload.d.ts +1311 -0
- package/dist/vtc/notifications/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/notifications/list/0.1/payload.js +753 -0
- package/dist/vtc/notifications/list/0.1/payload.js.map +1 -0
- package/dist/vtc/notifications/relay/0.1/payload.d.ts +568 -0
- package/dist/vtc/notifications/relay/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/notifications/relay/0.1/payload.js +339 -0
- package/dist/vtc/notifications/relay/0.1/payload.js.map +1 -0
- package/dist/vtc/notifications/show/0.1/payload.d.ts +1229 -0
- package/dist/vtc/notifications/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/notifications/show/0.1/payload.js +727 -0
- package/dist/vtc/notifications/show/0.1/payload.js.map +1 -0
- package/dist/vtc/vetting/vetters/pcs-binding/reset/0.1/payload.d.ts +340 -0
- package/dist/vtc/vetting/vetters/pcs-binding/reset/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/vetting/vetters/pcs-binding/reset/0.1/payload.js +194 -0
- package/dist/vtc/vetting/vetters/pcs-binding/reset/0.1/payload.js.map +1 -0
- package/dist/vtc/vetting/vetters/pcs-binding/show/0.1/payload.d.ts +425 -0
- package/dist/vtc/vetting/vetters/pcs-binding/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/vetting/vetters/pcs-binding/show/0.1/payload.js +233 -0
- package/dist/vtc/vetting/vetters/pcs-binding/show/0.1/payload.js.map +1 -0
- package/dist/vtn/_shared/0.1/directory.d.ts +16 -0
- package/dist/vtn/_shared/0.1/directory.d.ts.map +1 -0
- package/dist/vtn/_shared/0.1/directory.js +6 -0
- package/dist/vtn/_shared/0.1/directory.js.map +1 -0
- package/dist/vtn/_shared/0.1/entry.d.ts +16 -0
- package/dist/vtn/_shared/0.1/entry.d.ts.map +1 -0
- package/dist/vtn/_shared/0.1/entry.js +6 -0
- package/dist/vtn/_shared/0.1/entry.js.map +1 -0
- package/dist/vtn/_shared/0.1/graph.d.ts +16 -0
- package/dist/vtn/_shared/0.1/graph.d.ts.map +1 -0
- package/dist/vtn/_shared/0.1/graph.js +6 -0
- package/dist/vtn/_shared/0.1/graph.js.map +1 -0
- package/dist/vtn/_shared/0.1/groups.d.ts +16 -0
- package/dist/vtn/_shared/0.1/groups.d.ts.map +1 -0
- package/dist/vtn/_shared/0.1/groups.js +6 -0
- package/dist/vtn/_shared/0.1/groups.js.map +1 -0
- package/dist/vtn/_shared/0.1/membership.d.ts +16 -0
- package/dist/vtn/_shared/0.1/membership.d.ts.map +1 -0
- package/dist/vtn/_shared/0.1/membership.js +6 -0
- package/dist/vtn/_shared/0.1/membership.js.map +1 -0
- package/dist/vtn/_shared/0.1/relay.d.ts +16 -0
- package/dist/vtn/_shared/0.1/relay.d.ts.map +1 -0
- package/dist/vtn/_shared/0.1/relay.js +6 -0
- package/dist/vtn/_shared/0.1/relay.js.map +1 -0
- package/dist/vtn/_shared/0.1/rooms.d.ts +16 -0
- package/dist/vtn/_shared/0.1/rooms.d.ts.map +1 -0
- package/dist/vtn/_shared/0.1/rooms.js +6 -0
- package/dist/vtn/_shared/0.1/rooms.js.map +1 -0
- package/dist/vtn/audit/list/0.1/payload.d.ts +457 -0
- package/dist/vtn/audit/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/audit/list/0.1/payload.js +292 -0
- package/dist/vtn/audit/list/0.1/payload.js.map +1 -0
- package/dist/vtn/broadcasts/list/0.1/payload.d.ts +687 -0
- package/dist/vtn/broadcasts/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/broadcasts/list/0.1/payload.js +407 -0
- package/dist/vtn/broadcasts/list/0.1/payload.js.map +1 -0
- package/dist/vtn/broadcasts/send/0.1/payload.d.ts +728 -0
- package/dist/vtn/broadcasts/send/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/broadcasts/send/0.1/payload.js +425 -0
- package/dist/vtn/broadcasts/send/0.1/payload.js.map +1 -0
- package/dist/vtn/broadcasts/show/0.1/payload.d.ts +670 -0
- package/dist/vtn/broadcasts/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/broadcasts/show/0.1/payload.js +402 -0
- package/dist/vtn/broadcasts/show/0.1/payload.js.map +1 -0
- package/dist/vtn/directory/federated/0.1/payload.d.ts +939 -0
- package/dist/vtn/directory/federated/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/directory/federated/0.1/payload.js +536 -0
- package/dist/vtn/directory/federated/0.1/payload.js.map +1 -0
- package/dist/vtn/directory/search/0.1/payload.d.ts +643 -0
- package/dist/vtn/directory/search/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/directory/search/0.1/payload.js +368 -0
- package/dist/vtn/directory/search/0.1/payload.js.map +1 -0
- package/dist/vtn/directory/summary/0.1/payload.d.ts +366 -0
- package/dist/vtn/directory/summary/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/directory/summary/0.1/payload.js +216 -0
- package/dist/vtn/directory/summary/0.1/payload.js.map +1 -0
- package/dist/vtn/entries/show/0.1/payload.d.ts +682 -0
- package/dist/vtn/entries/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/entries/show/0.1/payload.js +398 -0
- package/dist/vtn/entries/show/0.1/payload.js.map +1 -0
- package/dist/vtn/graph/member/0.1/payload.d.ts +754 -0
- package/dist/vtn/graph/member/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/graph/member/0.1/payload.js +470 -0
- package/dist/vtn/graph/member/0.1/payload.js.map +1 -0
- package/dist/vtn/graph/show/0.1/payload.d.ts +754 -0
- package/dist/vtn/graph/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/graph/show/0.1/payload.js +468 -0
- package/dist/vtn/graph/show/0.1/payload.js.map +1 -0
- package/dist/vtn/groups/list/0.1/payload.d.ts +489 -0
- package/dist/vtn/groups/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/groups/list/0.1/payload.js +282 -0
- package/dist/vtn/groups/list/0.1/payload.js.map +1 -0
- package/dist/vtn/groups/register/0.1/payload.d.ts +504 -0
- package/dist/vtn/groups/register/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/groups/register/0.1/payload.js +291 -0
- package/dist/vtn/groups/register/0.1/payload.js.map +1 -0
- package/dist/vtn/listings/create/0.1/payload.d.ts +954 -0
- package/dist/vtn/listings/create/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/listings/create/0.1/payload.js +549 -0
- package/dist/vtn/listings/create/0.1/payload.js.map +1 -0
- package/dist/vtn/listings/list/0.1/payload.d.ts +933 -0
- package/dist/vtn/listings/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/listings/list/0.1/payload.js +538 -0
- package/dist/vtn/listings/list/0.1/payload.js.map +1 -0
- package/dist/vtn/listings/reinstate/0.1/payload.d.ts +926 -0
- package/dist/vtn/listings/reinstate/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/listings/reinstate/0.1/payload.js +536 -0
- package/dist/vtn/listings/reinstate/0.1/payload.js.map +1 -0
- package/dist/vtn/listings/remove/0.1/payload.d.ts +926 -0
- package/dist/vtn/listings/remove/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/listings/remove/0.1/payload.js +536 -0
- package/dist/vtn/listings/remove/0.1/payload.js.map +1 -0
- package/dist/vtn/listings/show/0.1/payload.d.ts +914 -0
- package/dist/vtn/listings/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/listings/show/0.1/payload.js +532 -0
- package/dist/vtn/listings/show/0.1/payload.js.map +1 -0
- package/dist/vtn/listings/suspend/0.1/payload.d.ts +926 -0
- package/dist/vtn/listings/suspend/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/listings/suspend/0.1/payload.js +536 -0
- package/dist/vtn/listings/suspend/0.1/payload.js.map +1 -0
- package/dist/vtn/listings/update/0.1/payload.d.ts +966 -0
- package/dist/vtn/listings/update/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/listings/update/0.1/payload.js +550 -0
- package/dist/vtn/listings/update/0.1/payload.js.map +1 -0
- package/dist/vtn/membership/acknowledge/0.1/payload.d.ts +654 -0
- package/dist/vtn/membership/acknowledge/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/membership/acknowledge/0.1/payload.js +386 -0
- package/dist/vtn/membership/acknowledge/0.1/payload.js.map +1 -0
- package/dist/vtn/membership/offer/0.1/payload.d.ts +247 -0
- package/dist/vtn/membership/offer/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/membership/offer/0.1/payload.js +147 -0
- package/dist/vtn/membership/offer/0.1/payload.js.map +1 -0
- package/dist/vtn/membership/repudiate/0.1/payload.d.ts +654 -0
- package/dist/vtn/membership/repudiate/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/membership/repudiate/0.1/payload.js +386 -0
- package/dist/vtn/membership/repudiate/0.1/payload.js.map +1 -0
- package/dist/vtn/memberships/groups/add/0.1/payload.d.ts +677 -0
- package/dist/vtn/memberships/groups/add/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/memberships/groups/add/0.1/payload.js +394 -0
- package/dist/vtn/memberships/groups/add/0.1/payload.js.map +1 -0
- package/dist/vtn/memberships/join/0.1/payload.d.ts +755 -0
- package/dist/vtn/memberships/join/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/memberships/join/0.1/payload.js +438 -0
- package/dist/vtn/memberships/join/0.1/payload.js.map +1 -0
- package/dist/vtn/memberships/leave/0.1/payload.d.ts +653 -0
- package/dist/vtn/memberships/leave/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/memberships/leave/0.1/payload.js +384 -0
- package/dist/vtn/memberships/leave/0.1/payload.js.map +1 -0
- package/dist/vtn/memberships/list/0.1/payload.d.ts +651 -0
- package/dist/vtn/memberships/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/memberships/list/0.1/payload.js +383 -0
- package/dist/vtn/memberships/list/0.1/payload.js.map +1 -0
- package/dist/vtn/memberships/repudiate/0.1/payload.d.ts +669 -0
- package/dist/vtn/memberships/repudiate/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/memberships/repudiate/0.1/payload.js +391 -0
- package/dist/vtn/memberships/repudiate/0.1/payload.js.map +1 -0
- package/dist/vtn/outbox/list/0.1/payload.d.ts +567 -0
- package/dist/vtn/outbox/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/outbox/list/0.1/payload.js +333 -0
- package/dist/vtn/outbox/list/0.1/payload.js.map +1 -0
- package/dist/vtn/outbox/retry/0.1/payload.d.ts +235 -0
- package/dist/vtn/outbox/retry/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/outbox/retry/0.1/payload.js +141 -0
- package/dist/vtn/outbox/retry/0.1/payload.js.map +1 -0
- package/dist/vtn/relay/deliver/0.1/payload.d.ts +592 -0
- package/dist/vtn/relay/deliver/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/relay/deliver/0.1/payload.js +352 -0
- package/dist/vtn/relay/deliver/0.1/payload.js.map +1 -0
- package/dist/vtn/roles/list/0.1/payload.d.ts +371 -0
- package/dist/vtn/roles/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/roles/list/0.1/payload.js +213 -0
- package/dist/vtn/roles/list/0.1/payload.js.map +1 -0
- package/dist/vtn/rooms/list/0.1/payload.d.ts +447 -0
- package/dist/vtn/rooms/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/rooms/list/0.1/payload.js +255 -0
- package/dist/vtn/rooms/list/0.1/payload.js.map +1 -0
- package/dist/vtn/rooms/pass/0.1/payload.d.ts +674 -0
- package/dist/vtn/rooms/pass/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/rooms/pass/0.1/payload.js +383 -0
- package/dist/vtn/rooms/pass/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +960 -0
- package/src/index.ts +156 -0
- package/src/vta/collection/_shared/0.1/collection.ts +17 -0
- package/src/vta/collection/claim/0.1/payload.ts +247 -0
- package/src/vta/collection/list/0.1/payload.ts +500 -0
- package/src/vta/collection/release/0.1/payload.ts +223 -0
- package/src/vta/notifications/deposit/0.1/payload.ts +243 -0
- package/src/vta/pcs/vetter/recover/0.1/payload.ts +437 -0
- package/src/vtc/notifications/_shared/0.1/received-notification.ts +17 -0
- package/src/vtc/notifications/list/0.1/payload.ts +809 -0
- package/src/vtc/notifications/relay/0.1/payload.ts +382 -0
- package/src/vtc/notifications/show/0.1/payload.ts +761 -0
- package/src/vtc/vetting/vetters/pcs-binding/reset/0.1/payload.ts +247 -0
- package/src/vtc/vetting/vetters/pcs-binding/show/0.1/payload.ts +295 -0
- package/src/vtn/_shared/0.1/directory.ts +17 -0
- package/src/vtn/_shared/0.1/entry.ts +17 -0
- package/src/vtn/_shared/0.1/graph.ts +17 -0
- package/src/vtn/_shared/0.1/groups.ts +17 -0
- package/src/vtn/_shared/0.1/membership.ts +17 -0
- package/src/vtn/_shared/0.1/relay.ts +17 -0
- package/src/vtn/_shared/0.1/rooms.ts +17 -0
- package/src/vtn/audit/list/0.1/payload.ts +336 -0
- package/src/vtn/broadcasts/list/0.1/payload.ts +447 -0
- package/src/vtn/broadcasts/send/0.1/payload.ts +478 -0
- package/src/vtn/broadcasts/show/0.1/payload.ts +439 -0
- package/src/vtn/directory/federated/0.1/payload.ts +594 -0
- package/src/vtn/directory/search/0.1/payload.ts +418 -0
- package/src/vtn/directory/summary/0.1/payload.ts +253 -0
- package/src/vtn/entries/show/0.1/payload.ts +439 -0
- package/src/vtn/graph/member/0.1/payload.ts +511 -0
- package/src/vtn/graph/show/0.1/payload.ts +509 -0
- package/src/vtn/groups/list/0.1/payload.ts +322 -0
- package/src/vtn/groups/register/0.1/payload.ts +336 -0
- package/src/vtn/listings/create/0.1/payload.ts +594 -0
- package/src/vtn/listings/list/0.1/payload.ts +578 -0
- package/src/vtn/listings/reinstate/0.1/payload.ts +577 -0
- package/src/vtn/listings/remove/0.1/payload.ts +577 -0
- package/src/vtn/listings/show/0.1/payload.ts +569 -0
- package/src/vtn/listings/suspend/0.1/payload.ts +577 -0
- package/src/vtn/listings/update/0.1/payload.ts +603 -0
- package/src/vtn/membership/acknowledge/0.1/payload.ts +423 -0
- package/src/vtn/membership/offer/0.1/payload.ts +183 -0
- package/src/vtn/membership/repudiate/0.1/payload.ts +423 -0
- package/src/vtn/memberships/groups/add/0.1/payload.ts +442 -0
- package/src/vtn/memberships/join/0.1/payload.ts +488 -0
- package/src/vtn/memberships/leave/0.1/payload.ts +424 -0
- package/src/vtn/memberships/list/0.1/payload.ts +419 -0
- package/src/vtn/memberships/repudiate/0.1/payload.ts +435 -0
- package/src/vtn/outbox/list/0.1/payload.ts +369 -0
- package/src/vtn/outbox/retry/0.1/payload.ts +177 -0
- package/src/vtn/relay/deliver/0.1/payload.ts +397 -0
- package/src/vtn/roles/list/0.1/payload.ts +253 -0
- package/src/vtn/rooms/list/0.1/payload.ts +295 -0
- package/src/vtn/rooms/pass/0.1/payload.ts +439 -0
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/notifications/relay/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext, GroupId, Recipients, RecipientScope, RecordId_VtcNotificationsV0_1 as RecordId } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* An administrator with `vtc.notifications.relay` decides that the community relays one notification it holds to some of its members — all of them, the members of one group, or the holders of one community role — having been shown what the relay discloses about the community (VTI-NTF-046, VTI-NTF-071 – VTI-NTF-073). The community relays the document it received exactly as received, one notifications/relay/0.1 per member, never to itself, the originator or any earlier relayer, and relays every later revision to the same members without a further decision (VTI-NTF-044). The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTCNotificationsRelayPayload {
|
|
13
|
+
recordId: RecordId;
|
|
14
|
+
recipients: Recipients;
|
|
15
|
+
/**
|
|
16
|
+
* The administrator's statement that they were shown the notification's `relayDisclosure` and decide the relay knowing it (VTI-NTF-046). REQUIRED to be true for a notification whose kind's definition says a relay discloses something; ignored for one whose definition says nothing is disclosed.
|
|
17
|
+
*/
|
|
18
|
+
disclosureAcknowledged?: boolean;
|
|
19
|
+
ext?: Ext;
|
|
20
|
+
}
|
|
21
|
+
export interface VTCNotificationsRelayResponsePayload {
|
|
22
|
+
recordId: RecordId;
|
|
23
|
+
/**
|
|
24
|
+
* The revision of the notification the decision relays.
|
|
25
|
+
*/
|
|
26
|
+
revision: number;
|
|
27
|
+
/**
|
|
28
|
+
* How many parties this decision added to those the notification is relayed to, each of which the community has queued one relay for. Zero when the selection reaches no member an earlier decision had not.
|
|
29
|
+
*/
|
|
30
|
+
recipientCount: number;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
34
|
+
export type { Ext, GroupId, Recipients, RecipientScope, RecordId };
|
|
35
|
+
|
|
36
|
+
/** Trust Task type URI. */
|
|
37
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/notifications/relay/0.1" as const;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The earlier version of this specification that this one declares it
|
|
41
|
+
* extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
|
|
42
|
+
* `null`. Only the direct declaration — follow the chain with
|
|
43
|
+
* `extendsChain` / `readForSpec`.
|
|
44
|
+
*/
|
|
45
|
+
export const EXTENDS: string | null = null;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Why this version is deprecated, or `null` while it is current. A
|
|
49
|
+
* superseded or retired version is still supported, and is withdrawn from
|
|
50
|
+
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
51
|
+
* Versions").
|
|
52
|
+
*/
|
|
53
|
+
export const DEPRECATION: string | null = null;
|
|
54
|
+
|
|
55
|
+
/** Stable alias for this specification's request payload shape. */
|
|
56
|
+
export type Payload = VTCNotificationsRelayPayload;
|
|
57
|
+
|
|
58
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
59
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/notifications/relay/0.1#response" as const;
|
|
60
|
+
|
|
61
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
62
|
+
export type Response = VTCNotificationsRelayResponsePayload;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* This specification's payload schema, as a value.
|
|
66
|
+
*
|
|
67
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
68
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
69
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
70
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
71
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
72
|
+
*/
|
|
73
|
+
export const PAYLOAD_SCHEMA = {
|
|
74
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
75
|
+
"$id": "https://trusttasks.org/spec/vtc/notifications/relay/0.1",
|
|
76
|
+
"title": "VTC Notifications — Relay — payload",
|
|
77
|
+
"description": "An administrator with `vtc.notifications.relay` decides that the community relays one notification it holds to some of its members — all of them, the members of one group, or the holders of one community role — having been shown what the relay discloses about the community (VTI-NTF-046, VTI-NTF-071 – VTI-NTF-073). The community relays the document it received exactly as received, one notifications/relay/0.1 per member, never to itself, the originator or any earlier relayer, and relays every later revision to the same members without a further decision (VTI-NTF-044). The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
|
|
78
|
+
"type": "object",
|
|
79
|
+
"additionalProperties": false,
|
|
80
|
+
"required": [
|
|
81
|
+
"recordId",
|
|
82
|
+
"recipients"
|
|
83
|
+
],
|
|
84
|
+
"properties": {
|
|
85
|
+
"recordId": {
|
|
86
|
+
"$ref": "#/$defs/RecordId"
|
|
87
|
+
},
|
|
88
|
+
"recipients": {
|
|
89
|
+
"$ref": "#/$defs/Recipients"
|
|
90
|
+
},
|
|
91
|
+
"disclosureAcknowledged": {
|
|
92
|
+
"type": "boolean",
|
|
93
|
+
"description": "The administrator's statement that they were shown the notification's `relayDisclosure` and decide the relay knowing it (VTI-NTF-046). REQUIRED to be true for a notification whose kind's definition says a relay discloses something; ignored for one whose definition says nothing is disclosed."
|
|
94
|
+
},
|
|
95
|
+
"ext": {
|
|
96
|
+
"$ref": "#/$defs/Ext"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"$defs": {
|
|
100
|
+
"Response": {
|
|
101
|
+
"$anchor": "response",
|
|
102
|
+
"title": "VTC Notifications — Relay — response payload",
|
|
103
|
+
"type": "object",
|
|
104
|
+
"additionalProperties": false,
|
|
105
|
+
"required": [
|
|
106
|
+
"recordId",
|
|
107
|
+
"revision",
|
|
108
|
+
"recipientCount"
|
|
109
|
+
],
|
|
110
|
+
"properties": {
|
|
111
|
+
"recordId": {
|
|
112
|
+
"$ref": "#/$defs/RecordId"
|
|
113
|
+
},
|
|
114
|
+
"revision": {
|
|
115
|
+
"type": "integer",
|
|
116
|
+
"minimum": 1,
|
|
117
|
+
"maximum": 1000000,
|
|
118
|
+
"description": "The revision of the notification the decision relays."
|
|
119
|
+
},
|
|
120
|
+
"recipientCount": {
|
|
121
|
+
"type": "integer",
|
|
122
|
+
"minimum": 0,
|
|
123
|
+
"description": "How many parties this decision added to those the notification is relayed to, each of which the community has queued one relay for. Zero when the selection reaches no member an earlier decision had not."
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"RecordId": {
|
|
128
|
+
"title": "RecordId",
|
|
129
|
+
"description": "The community's own identifier for one received notification, stable across the revisions that replace it. Opaque and compared for equality only; unguessable, because a read by a caller without the capability is refused and an enumerable identifier would turn the refusal into an oracle.",
|
|
130
|
+
"type": "string",
|
|
131
|
+
"minLength": 16,
|
|
132
|
+
"maxLength": 128,
|
|
133
|
+
"pattern": "^[A-Za-z0-9._~:-]+$"
|
|
134
|
+
},
|
|
135
|
+
"Ext": {
|
|
136
|
+
"title": "Ext",
|
|
137
|
+
"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.",
|
|
138
|
+
"type": "object",
|
|
139
|
+
"minProperties": 1,
|
|
140
|
+
"additionalProperties": true,
|
|
141
|
+
"propertyNames": {
|
|
142
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"Recipients": {
|
|
146
|
+
"title": "Recipients",
|
|
147
|
+
"description": "The members a relay decision reaches, resolved by the community from its own records when the decision is made (VTI-NTF-072). `groupId` is present exactly when `scope` is `group`, and `role` exactly when `scope` is `role`. Whatever the scope, the community never relays to itself, to the notification's originator, or to any relayer the received chain names (VTI-NTF-047), and relays to each party at most once per revision.",
|
|
148
|
+
"type": "object",
|
|
149
|
+
"additionalProperties": false,
|
|
150
|
+
"required": [
|
|
151
|
+
"scope"
|
|
152
|
+
],
|
|
153
|
+
"properties": {
|
|
154
|
+
"scope": {
|
|
155
|
+
"$ref": "#/$defs/RecipientScope"
|
|
156
|
+
},
|
|
157
|
+
"groupId": {
|
|
158
|
+
"$ref": "#/$defs/GroupId",
|
|
159
|
+
"description": "The community group whose active members the relay reaches."
|
|
160
|
+
},
|
|
161
|
+
"role": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"minLength": 1,
|
|
164
|
+
"maxLength": 128,
|
|
165
|
+
"description": "The community role whose active holders the relay reaches, in the wire form the community's member records use — for example `moderator`, or `custom:editor`."
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"dependentSchemas": {
|
|
169
|
+
"scope": {
|
|
170
|
+
"anyOf": [
|
|
171
|
+
{
|
|
172
|
+
"required": [
|
|
173
|
+
"groupId"
|
|
174
|
+
]
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"required": [
|
|
178
|
+
"role"
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"properties": {
|
|
183
|
+
"scope": {
|
|
184
|
+
"const": "allMembers"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
"groupId": {
|
|
191
|
+
"properties": {
|
|
192
|
+
"scope": {
|
|
193
|
+
"const": "group"
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"role": {
|
|
198
|
+
"properties": {
|
|
199
|
+
"scope": {
|
|
200
|
+
"const": "role"
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"RecipientScope": {
|
|
207
|
+
"title": "RecipientScope",
|
|
208
|
+
"description": "Which of the community's members a relay decision reaches: `allMembers` — every active member; `group` — the active members of one community group; `role` — the active members holding one community role.",
|
|
209
|
+
"type": "string",
|
|
210
|
+
"enum": [
|
|
211
|
+
"allMembers",
|
|
212
|
+
"group",
|
|
213
|
+
"role"
|
|
214
|
+
]
|
|
215
|
+
},
|
|
216
|
+
"GroupId": {
|
|
217
|
+
"title": "GroupId",
|
|
218
|
+
"description": "Opaque identifier of a community group: `grp_` followed by 16 to 64 base64url characters. Random and community-scoped; not the group's DID.",
|
|
219
|
+
"type": "string",
|
|
220
|
+
"pattern": "^grp_[A-Za-z0-9_-]{16,64}$"
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
} as const;
|
|
224
|
+
|
|
225
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
226
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
227
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
228
|
+
"$ref": "#/$defs/Response",
|
|
229
|
+
"$defs": {
|
|
230
|
+
"Response": {
|
|
231
|
+
"$anchor": "response",
|
|
232
|
+
"title": "VTC Notifications — Relay — response payload",
|
|
233
|
+
"type": "object",
|
|
234
|
+
"additionalProperties": false,
|
|
235
|
+
"required": [
|
|
236
|
+
"recordId",
|
|
237
|
+
"revision",
|
|
238
|
+
"recipientCount"
|
|
239
|
+
],
|
|
240
|
+
"properties": {
|
|
241
|
+
"recordId": {
|
|
242
|
+
"$ref": "#/$defs/RecordId"
|
|
243
|
+
},
|
|
244
|
+
"revision": {
|
|
245
|
+
"type": "integer",
|
|
246
|
+
"minimum": 1,
|
|
247
|
+
"maximum": 1000000,
|
|
248
|
+
"description": "The revision of the notification the decision relays."
|
|
249
|
+
},
|
|
250
|
+
"recipientCount": {
|
|
251
|
+
"type": "integer",
|
|
252
|
+
"minimum": 0,
|
|
253
|
+
"description": "How many parties this decision added to those the notification is relayed to, each of which the community has queued one relay for. Zero when the selection reaches no member an earlier decision had not."
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"RecordId": {
|
|
258
|
+
"title": "RecordId",
|
|
259
|
+
"description": "The community's own identifier for one received notification, stable across the revisions that replace it. Opaque and compared for equality only; unguessable, because a read by a caller without the capability is refused and an enumerable identifier would turn the refusal into an oracle.",
|
|
260
|
+
"type": "string",
|
|
261
|
+
"minLength": 16,
|
|
262
|
+
"maxLength": 128,
|
|
263
|
+
"pattern": "^[A-Za-z0-9._~:-]+$"
|
|
264
|
+
},
|
|
265
|
+
"Ext": {
|
|
266
|
+
"title": "Ext",
|
|
267
|
+
"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.",
|
|
268
|
+
"type": "object",
|
|
269
|
+
"minProperties": 1,
|
|
270
|
+
"additionalProperties": true,
|
|
271
|
+
"propertyNames": {
|
|
272
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
"Recipients": {
|
|
276
|
+
"title": "Recipients",
|
|
277
|
+
"description": "The members a relay decision reaches, resolved by the community from its own records when the decision is made (VTI-NTF-072). `groupId` is present exactly when `scope` is `group`, and `role` exactly when `scope` is `role`. Whatever the scope, the community never relays to itself, to the notification's originator, or to any relayer the received chain names (VTI-NTF-047), and relays to each party at most once per revision.",
|
|
278
|
+
"type": "object",
|
|
279
|
+
"additionalProperties": false,
|
|
280
|
+
"required": [
|
|
281
|
+
"scope"
|
|
282
|
+
],
|
|
283
|
+
"properties": {
|
|
284
|
+
"scope": {
|
|
285
|
+
"$ref": "#/$defs/RecipientScope"
|
|
286
|
+
},
|
|
287
|
+
"groupId": {
|
|
288
|
+
"$ref": "#/$defs/GroupId",
|
|
289
|
+
"description": "The community group whose active members the relay reaches."
|
|
290
|
+
},
|
|
291
|
+
"role": {
|
|
292
|
+
"type": "string",
|
|
293
|
+
"minLength": 1,
|
|
294
|
+
"maxLength": 128,
|
|
295
|
+
"description": "The community role whose active holders the relay reaches, in the wire form the community's member records use — for example `moderator`, or `custom:editor`."
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"dependentSchemas": {
|
|
299
|
+
"scope": {
|
|
300
|
+
"anyOf": [
|
|
301
|
+
{
|
|
302
|
+
"required": [
|
|
303
|
+
"groupId"
|
|
304
|
+
]
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"required": [
|
|
308
|
+
"role"
|
|
309
|
+
]
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"properties": {
|
|
313
|
+
"scope": {
|
|
314
|
+
"const": "allMembers"
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
]
|
|
319
|
+
},
|
|
320
|
+
"groupId": {
|
|
321
|
+
"properties": {
|
|
322
|
+
"scope": {
|
|
323
|
+
"const": "group"
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
"role": {
|
|
328
|
+
"properties": {
|
|
329
|
+
"scope": {
|
|
330
|
+
"const": "role"
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"RecipientScope": {
|
|
337
|
+
"title": "RecipientScope",
|
|
338
|
+
"description": "Which of the community's members a relay decision reaches: `allMembers` — every active member; `group` — the active members of one community group; `role` — the active members holding one community role.",
|
|
339
|
+
"type": "string",
|
|
340
|
+
"enum": [
|
|
341
|
+
"allMembers",
|
|
342
|
+
"group",
|
|
343
|
+
"role"
|
|
344
|
+
]
|
|
345
|
+
},
|
|
346
|
+
"GroupId": {
|
|
347
|
+
"title": "GroupId",
|
|
348
|
+
"description": "Opaque identifier of a community group: `grp_` followed by 16 to 64 base64url characters. Random and community-scoped; not the group's DID.",
|
|
349
|
+
"type": "string",
|
|
350
|
+
"pattern": "^grp_[A-Za-z0-9_-]{16,64}$"
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
} as const;
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
357
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
358
|
+
* per-specification and cannot be derived from the document alone, and
|
|
359
|
+
* item 2 needs the schema this carries.
|
|
360
|
+
*/
|
|
361
|
+
export const SPEC = {
|
|
362
|
+
typeUri: TYPE_URI,
|
|
363
|
+
isBearer: false,
|
|
364
|
+
isProofRequired: true,
|
|
365
|
+
isRecipientRequired: true,
|
|
366
|
+
isIssuedAtRequired: true,
|
|
367
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
368
|
+
} as const;
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
372
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
373
|
+
* parties (§7.3 item 5).
|
|
374
|
+
*/
|
|
375
|
+
export const RESPONSE_SPEC = {
|
|
376
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
377
|
+
isBearer: false,
|
|
378
|
+
isProofRequired: true,
|
|
379
|
+
isRecipientRequired: true,
|
|
380
|
+
isIssuedAtRequired: true,
|
|
381
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
382
|
+
} as const;
|