@openvtc/trust-tasks 0.28.11 → 0.28.13
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 +57 -0
- package/dist/_shared/components.d.ts +496 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +54 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +54 -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/vtc/boards/_shared/0.1/board.d.ts +22 -0
- package/dist/vtc/boards/_shared/0.1/board.d.ts.map +1 -0
- package/dist/vtc/boards/_shared/0.1/board.js +6 -0
- package/dist/vtc/boards/_shared/0.1/board.js.map +1 -0
- package/dist/vtc/boards/create/0.1/payload.d.ts +2402 -0
- package/dist/vtc/boards/create/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/boards/create/0.1/payload.js +1349 -0
- package/dist/vtc/boards/create/0.1/payload.js.map +1 -0
- package/dist/vtc/boards/ideas/decide/0.1/payload.d.ts +1781 -0
- package/dist/vtc/boards/ideas/decide/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/boards/ideas/decide/0.1/payload.js +1028 -0
- package/dist/vtc/boards/ideas/decide/0.1/payload.js.map +1 -0
- package/dist/vtc/boards/ideas/propose/0.1/payload.d.ts +1781 -0
- package/dist/vtc/boards/ideas/propose/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/boards/ideas/propose/0.1/payload.js +1025 -0
- package/dist/vtc/boards/ideas/propose/0.1/payload.js.map +1 -0
- package/dist/vtc/boards/ideas/select/0.1/payload.d.ts +1788 -0
- package/dist/vtc/boards/ideas/select/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/boards/ideas/select/0.1/payload.js +1029 -0
- package/dist/vtc/boards/ideas/select/0.1/payload.js.map +1 -0
- package/dist/vtc/boards/ideas/update/0.1/payload.d.ts +1781 -0
- package/dist/vtc/boards/ideas/update/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/boards/ideas/update/0.1/payload.js +1023 -0
- package/dist/vtc/boards/ideas/update/0.1/payload.js.map +1 -0
- package/dist/vtc/boards/ideas/withdraw/0.1/payload.d.ts +1753 -0
- package/dist/vtc/boards/ideas/withdraw/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/boards/ideas/withdraw/0.1/payload.js +1011 -0
- package/dist/vtc/boards/ideas/withdraw/0.1/payload.js.map +1 -0
- package/dist/vtc/boards/list/0.1/payload.d.ts +2267 -0
- package/dist/vtc/boards/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/boards/list/0.1/payload.js +1326 -0
- package/dist/vtc/boards/list/0.1/payload.js.map +1 -0
- package/dist/vtc/boards/notes/add/0.1/payload.d.ts +655 -0
- package/dist/vtc/boards/notes/add/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/boards/notes/add/0.1/payload.js +374 -0
- package/dist/vtc/boards/notes/add/0.1/payload.js.map +1 -0
- package/dist/vtc/boards/notes/hide/0.1/payload.d.ts +657 -0
- package/dist/vtc/boards/notes/hide/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/boards/notes/hide/0.1/payload.js +378 -0
- package/dist/vtc/boards/notes/hide/0.1/payload.js.map +1 -0
- package/dist/vtc/boards/notes/list/0.1/payload.d.ts +730 -0
- package/dist/vtc/boards/notes/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/boards/notes/list/0.1/payload.js +406 -0
- package/dist/vtc/boards/notes/list/0.1/payload.js.map +1 -0
- package/dist/vtc/boards/notes/withdraw/0.1/payload.d.ts +641 -0
- package/dist/vtc/boards/notes/withdraw/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/boards/notes/withdraw/0.1/payload.js +367 -0
- package/dist/vtc/boards/notes/withdraw/0.1/payload.js.map +1 -0
- package/dist/vtc/boards/show/0.1/payload.d.ts +3713 -0
- package/dist/vtc/boards/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/boards/show/0.1/payload.js +2160 -0
- package/dist/vtc/boards/show/0.1/payload.js.map +1 -0
- package/dist/vtc/boards/update/0.1/payload.d.ts +2423 -0
- package/dist/vtc/boards/update/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/boards/update/0.1/payload.js +1356 -0
- package/dist/vtc/boards/update/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +531 -0
- package/src/index.ts +54 -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/vtc/boards/_shared/0.1/board.ts +23 -0
- package/src/vtc/boards/create/0.1/payload.ts +1517 -0
- package/src/vtc/boards/ideas/decide/0.1/payload.ts +1068 -0
- package/src/vtc/boards/ideas/propose/0.1/payload.ts +1063 -0
- package/src/vtc/boards/ideas/select/0.1/payload.ts +1070 -0
- package/src/vtc/boards/ideas/update/0.1/payload.ts +1061 -0
- package/src/vtc/boards/ideas/withdraw/0.1/payload.ts +1045 -0
- package/src/vtc/boards/list/0.1/payload.ts +1376 -0
- package/src/vtc/boards/notes/add/0.1/payload.ts +410 -0
- package/src/vtc/boards/notes/hide/0.1/payload.ts +414 -0
- package/src/vtc/boards/notes/list/0.1/payload.ts +457 -0
- package/src/vtc/boards/notes/withdraw/0.1/payload.ts +401 -0
- package/src/vtc/boards/show/0.1/payload.ts +2212 -0
- package/src/vtc/boards/update/0.1/payload.ts +1529 -0
package/src/index.ts
CHANGED
|
@@ -2339,6 +2339,18 @@ export import VtaBackupInitiateImport_v1_1 = _VtaBackupInitiateImport_v1_1;
|
|
|
2339
2339
|
import * as _VtaBackupPutChunk_v1_0 from "./vta/backup/put-chunk/1.0/payload.js";
|
|
2340
2340
|
/** @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). */
|
|
2341
2341
|
export import VtaBackupPutChunk_v1_0 = _VtaBackupPutChunk_v1_0;
|
|
2342
|
+
import * as _CollectionShared_v0_1 from "./vta/collection/_shared/0.1/collection.js";
|
|
2343
|
+
/** @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). */
|
|
2344
|
+
export import CollectionShared_v0_1 = _CollectionShared_v0_1;
|
|
2345
|
+
import * as _VtaCollectionClaim_v0_1 from "./vta/collection/claim/0.1/payload.js";
|
|
2346
|
+
/** @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). */
|
|
2347
|
+
export import VtaCollectionClaim_v0_1 = _VtaCollectionClaim_v0_1;
|
|
2348
|
+
import * as _VtaCollectionList_v0_1 from "./vta/collection/list/0.1/payload.js";
|
|
2349
|
+
/** @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). */
|
|
2350
|
+
export import VtaCollectionList_v0_1 = _VtaCollectionList_v0_1;
|
|
2351
|
+
import * as _VtaCollectionRelease_v0_1 from "./vta/collection/release/0.1/payload.js";
|
|
2352
|
+
/** @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). */
|
|
2353
|
+
export import VtaCollectionRelease_v0_1 = _VtaCollectionRelease_v0_1;
|
|
2342
2354
|
import * as _VtaContextsCreate_v1_0 from "./vta/contexts/create/1.0/payload.js";
|
|
2343
2355
|
/** @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). */
|
|
2344
2356
|
export import VtaContextsCreate_v1_0 = _VtaContextsCreate_v1_0;
|
|
@@ -3134,6 +3146,48 @@ export import VtcBackupExport_v0_1 = _VtcBackupExport_v0_1;
|
|
|
3134
3146
|
import * as _VtcBackupImport_v0_1 from "./vtc/backup/import/0.1/payload.js";
|
|
3135
3147
|
/** @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). */
|
|
3136
3148
|
export import VtcBackupImport_v0_1 = _VtcBackupImport_v0_1;
|
|
3149
|
+
import * as _BoardShared_v0_1 from "./vtc/boards/_shared/0.1/board.js";
|
|
3150
|
+
/** @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). */
|
|
3151
|
+
export import BoardShared_v0_1 = _BoardShared_v0_1;
|
|
3152
|
+
import * as _VtcBoardsCreate_v0_1 from "./vtc/boards/create/0.1/payload.js";
|
|
3153
|
+
/** @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). */
|
|
3154
|
+
export import VtcBoardsCreate_v0_1 = _VtcBoardsCreate_v0_1;
|
|
3155
|
+
import * as _VtcBoardsIdeasDecide_v0_1 from "./vtc/boards/ideas/decide/0.1/payload.js";
|
|
3156
|
+
/** @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). */
|
|
3157
|
+
export import VtcBoardsIdeasDecide_v0_1 = _VtcBoardsIdeasDecide_v0_1;
|
|
3158
|
+
import * as _VtcBoardsIdeasPropose_v0_1 from "./vtc/boards/ideas/propose/0.1/payload.js";
|
|
3159
|
+
/** @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). */
|
|
3160
|
+
export import VtcBoardsIdeasPropose_v0_1 = _VtcBoardsIdeasPropose_v0_1;
|
|
3161
|
+
import * as _VtcBoardsIdeasSelect_v0_1 from "./vtc/boards/ideas/select/0.1/payload.js";
|
|
3162
|
+
/** @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). */
|
|
3163
|
+
export import VtcBoardsIdeasSelect_v0_1 = _VtcBoardsIdeasSelect_v0_1;
|
|
3164
|
+
import * as _VtcBoardsIdeasUpdate_v0_1 from "./vtc/boards/ideas/update/0.1/payload.js";
|
|
3165
|
+
/** @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). */
|
|
3166
|
+
export import VtcBoardsIdeasUpdate_v0_1 = _VtcBoardsIdeasUpdate_v0_1;
|
|
3167
|
+
import * as _VtcBoardsIdeasWithdraw_v0_1 from "./vtc/boards/ideas/withdraw/0.1/payload.js";
|
|
3168
|
+
/** @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). */
|
|
3169
|
+
export import VtcBoardsIdeasWithdraw_v0_1 = _VtcBoardsIdeasWithdraw_v0_1;
|
|
3170
|
+
import * as _VtcBoardsList_v0_1 from "./vtc/boards/list/0.1/payload.js";
|
|
3171
|
+
/** @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). */
|
|
3172
|
+
export import VtcBoardsList_v0_1 = _VtcBoardsList_v0_1;
|
|
3173
|
+
import * as _VtcBoardsNotesAdd_v0_1 from "./vtc/boards/notes/add/0.1/payload.js";
|
|
3174
|
+
/** @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). */
|
|
3175
|
+
export import VtcBoardsNotesAdd_v0_1 = _VtcBoardsNotesAdd_v0_1;
|
|
3176
|
+
import * as _VtcBoardsNotesHide_v0_1 from "./vtc/boards/notes/hide/0.1/payload.js";
|
|
3177
|
+
/** @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). */
|
|
3178
|
+
export import VtcBoardsNotesHide_v0_1 = _VtcBoardsNotesHide_v0_1;
|
|
3179
|
+
import * as _VtcBoardsNotesList_v0_1 from "./vtc/boards/notes/list/0.1/payload.js";
|
|
3180
|
+
/** @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). */
|
|
3181
|
+
export import VtcBoardsNotesList_v0_1 = _VtcBoardsNotesList_v0_1;
|
|
3182
|
+
import * as _VtcBoardsNotesWithdraw_v0_1 from "./vtc/boards/notes/withdraw/0.1/payload.js";
|
|
3183
|
+
/** @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). */
|
|
3184
|
+
export import VtcBoardsNotesWithdraw_v0_1 = _VtcBoardsNotesWithdraw_v0_1;
|
|
3185
|
+
import * as _VtcBoardsShow_v0_1 from "./vtc/boards/show/0.1/payload.js";
|
|
3186
|
+
/** @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). */
|
|
3187
|
+
export import VtcBoardsShow_v0_1 = _VtcBoardsShow_v0_1;
|
|
3188
|
+
import * as _VtcBoardsUpdate_v0_1 from "./vtc/boards/update/0.1/payload.js";
|
|
3189
|
+
/** @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). */
|
|
3190
|
+
export import VtcBoardsUpdate_v0_1 = _VtcBoardsUpdate_v0_1;
|
|
3137
3191
|
import * as _VtcCeremoniesList_v0_1 from "./vtc/ceremonies/list/0.1/payload.js";
|
|
3138
3192
|
/** @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). */
|
|
3139
3193
|
export import VtcCeremoniesList_v0_1 = _VtcCeremoniesList_v0_1;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/collection/_shared/0.1/collection.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Shared shapes for the collection of messages for a principal's identifiers. A VTA collects, from the mediator each identifier's DID document advertises, the messages queued for every identifier whose messaging keys it holds in one of the principal's trust contexts — its personas — unless a client of the principal holds a collection claim for it: a lease, granted by vta/collection/claim and ended by vta/collection/release or at its end, under which that client is the identifier's one collector. The mediator permits one connection per identifier, so at most one party collects for an identifier at a time (VTI-NTF-080 – VTI-NTF-092).
|
|
8
|
+
*/
|
|
9
|
+
export interface VTACollectionSharedDefinitions {
|
|
10
|
+
[k: string]: unknown | undefined;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The definitions this shared schema publishes, hoisted to one declaration each.
|
|
15
|
+
* See "../../../../_shared/components.js".
|
|
16
|
+
*/
|
|
17
|
+
export type { Claim, CollectionEntry, Collector, ContextId_VtaCollectionV0_1 as ContextId, Did_NotificationsV0_1 as Did, NotCollectedReason } from "../../../../_shared/components.js";
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/collection/claim/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { ContextId_VtaCollectionV0_1 as ContextId, Did_NotificationsV0_1 as Did, Ext } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A client with standing in a trust context asks its VTA to make it, until a stated end, the one collector of the messages queued at the mediator for an identifier whose keys the VTA holds there — a persona DID — or renews a claim it already holds. Before it grants, the VTA stops collecting for the identifier and closes every connection it holds for it; the client opens its own only once it holds the grant, and closes it before the claim ends unless it has renewed (VTI-NTF-081 – VTI-NTF-083). The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTACollectionClaimPayload {
|
|
13
|
+
contextId: ContextId;
|
|
14
|
+
/**
|
|
15
|
+
* The identifier to collect for: one whose messaging keys the VTA holds in `contextId` and whose DID document advertises a transport through a mediator.
|
|
16
|
+
*/
|
|
17
|
+
identifier: Did;
|
|
18
|
+
/**
|
|
19
|
+
* How long the client asks the claim to last from the grant. The VTA grants no longer than the maximum it states, and may grant less; absent, it grants its own default. The granted end is `endsAt` in the response.
|
|
20
|
+
*/
|
|
21
|
+
durationSeconds?: number;
|
|
22
|
+
ext?: Ext;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The grant: the VTA has stopped collecting for `identifier` and closed every connection it held for it, and the caller is its collector until `endsAt`.
|
|
26
|
+
*/
|
|
27
|
+
export interface VTACollectionClaimResponsePayload {
|
|
28
|
+
identifier: Did;
|
|
29
|
+
/**
|
|
30
|
+
* When the claim ends unless renewed. The client stops collecting before this instant less its clock-skew tolerance (VTI-NTF-083).
|
|
31
|
+
*/
|
|
32
|
+
endsAt: string;
|
|
33
|
+
/**
|
|
34
|
+
* True when the caller already held a claim for the identifier and this grant moved its end; absent or false for a new claim.
|
|
35
|
+
*/
|
|
36
|
+
renewed?: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
40
|
+
export type { ContextId, Did, Ext };
|
|
41
|
+
|
|
42
|
+
/** Trust Task type URI. */
|
|
43
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/collection/claim/0.1" as const;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The earlier version of this specification that this one declares it
|
|
47
|
+
* extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
|
|
48
|
+
* `null`. Only the direct declaration — follow the chain with
|
|
49
|
+
* `extendsChain` / `readForSpec`.
|
|
50
|
+
*/
|
|
51
|
+
export const EXTENDS: string | null = null;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Why this version is deprecated, or `null` while it is current. A
|
|
55
|
+
* superseded or retired version is still supported, and is withdrawn from
|
|
56
|
+
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
57
|
+
* Versions").
|
|
58
|
+
*/
|
|
59
|
+
export const DEPRECATION: string | null = null;
|
|
60
|
+
|
|
61
|
+
/** Stable alias for this specification's request payload shape. */
|
|
62
|
+
export type Payload = VTACollectionClaimPayload;
|
|
63
|
+
|
|
64
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
65
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/collection/claim/0.1#response" as const;
|
|
66
|
+
|
|
67
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
68
|
+
export type Response = VTACollectionClaimResponsePayload;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* This specification's payload schema, as a value.
|
|
72
|
+
*
|
|
73
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
74
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
75
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
76
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
77
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
78
|
+
*/
|
|
79
|
+
export const PAYLOAD_SCHEMA = {
|
|
80
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
81
|
+
"$id": "https://trusttasks.org/spec/vta/collection/claim/0.1",
|
|
82
|
+
"title": "VTA Collection — Claim — payload",
|
|
83
|
+
"description": "A client with standing in a trust context asks its VTA to make it, until a stated end, the one collector of the messages queued at the mediator for an identifier whose keys the VTA holds there — a persona DID — or renews a claim it already holds. Before it grants, the VTA stops collecting for the identifier and closes every connection it holds for it; the client opens its own only once it holds the grant, and closes it before the claim ends unless it has renewed (VTI-NTF-081 – VTI-NTF-083). The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
|
|
84
|
+
"type": "object",
|
|
85
|
+
"additionalProperties": false,
|
|
86
|
+
"required": [
|
|
87
|
+
"contextId",
|
|
88
|
+
"identifier"
|
|
89
|
+
],
|
|
90
|
+
"properties": {
|
|
91
|
+
"contextId": {
|
|
92
|
+
"$ref": "#/$defs/ContextId"
|
|
93
|
+
},
|
|
94
|
+
"identifier": {
|
|
95
|
+
"$ref": "#/$defs/Did",
|
|
96
|
+
"description": "The identifier to collect for: one whose messaging keys the VTA holds in `contextId` and whose DID document advertises a transport through a mediator."
|
|
97
|
+
},
|
|
98
|
+
"durationSeconds": {
|
|
99
|
+
"type": "integer",
|
|
100
|
+
"minimum": 60,
|
|
101
|
+
"maximum": 2592000,
|
|
102
|
+
"description": "How long the client asks the claim to last from the grant. The VTA grants no longer than the maximum it states, and may grant less; absent, it grants its own default. The granted end is `endsAt` in the response."
|
|
103
|
+
},
|
|
104
|
+
"ext": {
|
|
105
|
+
"$ref": "#/$defs/Ext"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"$defs": {
|
|
109
|
+
"Response": {
|
|
110
|
+
"$anchor": "response",
|
|
111
|
+
"title": "VTA Collection — Claim — response payload",
|
|
112
|
+
"type": "object",
|
|
113
|
+
"additionalProperties": false,
|
|
114
|
+
"required": [
|
|
115
|
+
"identifier",
|
|
116
|
+
"endsAt"
|
|
117
|
+
],
|
|
118
|
+
"description": "The grant: the VTA has stopped collecting for `identifier` and closed every connection it held for it, and the caller is its collector until `endsAt`.",
|
|
119
|
+
"properties": {
|
|
120
|
+
"identifier": {
|
|
121
|
+
"$ref": "#/$defs/Did"
|
|
122
|
+
},
|
|
123
|
+
"endsAt": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"format": "date-time",
|
|
126
|
+
"description": "When the claim ends unless renewed. The client stops collecting before this instant less its clock-skew tolerance (VTI-NTF-083)."
|
|
127
|
+
},
|
|
128
|
+
"renewed": {
|
|
129
|
+
"type": "boolean",
|
|
130
|
+
"description": "True when the caller already held a claim for the identifier and this grant moved its end; absent or false for a new claim."
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"Did": {
|
|
135
|
+
"title": "Did",
|
|
136
|
+
"description": "A DID.",
|
|
137
|
+
"type": "string",
|
|
138
|
+
"minLength": 8,
|
|
139
|
+
"maxLength": 2048,
|
|
140
|
+
"pattern": "^did:[a-z0-9]+:\\S+$"
|
|
141
|
+
},
|
|
142
|
+
"Ext": {
|
|
143
|
+
"title": "Ext",
|
|
144
|
+
"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.",
|
|
145
|
+
"type": "object",
|
|
146
|
+
"minProperties": 1,
|
|
147
|
+
"additionalProperties": true,
|
|
148
|
+
"propertyNames": {
|
|
149
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"ContextId": {
|
|
153
|
+
"title": "ContextId",
|
|
154
|
+
"description": "The trust context the identifier belongs to.",
|
|
155
|
+
"type": "string",
|
|
156
|
+
"minLength": 1,
|
|
157
|
+
"maxLength": 256
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
} as const;
|
|
161
|
+
|
|
162
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
163
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
164
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
165
|
+
"$ref": "#/$defs/Response",
|
|
166
|
+
"$defs": {
|
|
167
|
+
"Response": {
|
|
168
|
+
"$anchor": "response",
|
|
169
|
+
"title": "VTA Collection — Claim — response payload",
|
|
170
|
+
"type": "object",
|
|
171
|
+
"additionalProperties": false,
|
|
172
|
+
"required": [
|
|
173
|
+
"identifier",
|
|
174
|
+
"endsAt"
|
|
175
|
+
],
|
|
176
|
+
"description": "The grant: the VTA has stopped collecting for `identifier` and closed every connection it held for it, and the caller is its collector until `endsAt`.",
|
|
177
|
+
"properties": {
|
|
178
|
+
"identifier": {
|
|
179
|
+
"$ref": "#/$defs/Did"
|
|
180
|
+
},
|
|
181
|
+
"endsAt": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"format": "date-time",
|
|
184
|
+
"description": "When the claim ends unless renewed. The client stops collecting before this instant less its clock-skew tolerance (VTI-NTF-083)."
|
|
185
|
+
},
|
|
186
|
+
"renewed": {
|
|
187
|
+
"type": "boolean",
|
|
188
|
+
"description": "True when the caller already held a claim for the identifier and this grant moved its end; absent or false for a new claim."
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"Did": {
|
|
193
|
+
"title": "Did",
|
|
194
|
+
"description": "A DID.",
|
|
195
|
+
"type": "string",
|
|
196
|
+
"minLength": 8,
|
|
197
|
+
"maxLength": 2048,
|
|
198
|
+
"pattern": "^did:[a-z0-9]+:\\S+$"
|
|
199
|
+
},
|
|
200
|
+
"Ext": {
|
|
201
|
+
"title": "Ext",
|
|
202
|
+
"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.",
|
|
203
|
+
"type": "object",
|
|
204
|
+
"minProperties": 1,
|
|
205
|
+
"additionalProperties": true,
|
|
206
|
+
"propertyNames": {
|
|
207
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"ContextId": {
|
|
211
|
+
"title": "ContextId",
|
|
212
|
+
"description": "The trust context the identifier belongs to.",
|
|
213
|
+
"type": "string",
|
|
214
|
+
"minLength": 1,
|
|
215
|
+
"maxLength": 256
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
} as const;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
222
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
223
|
+
* per-specification and cannot be derived from the document alone, and
|
|
224
|
+
* item 2 needs the schema this carries.
|
|
225
|
+
*/
|
|
226
|
+
export const SPEC = {
|
|
227
|
+
typeUri: TYPE_URI,
|
|
228
|
+
isBearer: false,
|
|
229
|
+
isProofRequired: false,
|
|
230
|
+
isRecipientRequired: true,
|
|
231
|
+
isIssuedAtRequired: true,
|
|
232
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
233
|
+
} as const;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
237
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
238
|
+
* parties (§7.3 item 5).
|
|
239
|
+
*/
|
|
240
|
+
export const RESPONSE_SPEC = {
|
|
241
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
242
|
+
isBearer: false,
|
|
243
|
+
isProofRequired: false,
|
|
244
|
+
isRecipientRequired: true,
|
|
245
|
+
isIssuedAtRequired: true,
|
|
246
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
247
|
+
} as const;
|