@openvtc/trust-tasks 0.2.12 → 0.2.14
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/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -1
- package/dist/messaging/access-list/add/0.1/payload.d.ts +1 -1
- package/dist/messaging/access-list/get/0.1/payload.d.ts +1 -1
- package/dist/messaging/access-list/remove/0.1/payload.d.ts +1 -1
- package/dist/messaging/acl/get/0.1/payload.d.ts +1 -1
- package/dist/messaging/admin/add/0.1/payload.d.ts +28 -0
- package/dist/messaging/admin/add/0.1/payload.d.ts.map +1 -0
- package/dist/messaging/admin/add/0.1/payload.js +9 -0
- package/dist/messaging/admin/add/0.1/payload.js.map +1 -0
- package/dist/messaging/admin/audit-log/0.1/payload.d.ts +26 -0
- package/dist/messaging/admin/audit-log/0.1/payload.d.ts.map +1 -0
- package/dist/messaging/admin/audit-log/0.1/payload.js +9 -0
- package/dist/messaging/admin/audit-log/0.1/payload.js.map +1 -0
- package/dist/messaging/admin/config/0.1/payload.d.ts +18 -0
- package/dist/messaging/admin/config/0.1/payload.d.ts.map +1 -0
- package/dist/messaging/admin/config/0.1/payload.js +9 -0
- package/dist/messaging/admin/config/0.1/payload.js.map +1 -0
- package/dist/messaging/admin/list/0.1/payload.d.ts +26 -0
- package/dist/messaging/admin/list/0.1/payload.d.ts.map +1 -0
- package/dist/messaging/admin/list/0.1/payload.js +9 -0
- package/dist/messaging/admin/list/0.1/payload.js.map +1 -0
- package/dist/messaging/admin/strip/0.1/payload.d.ts +28 -0
- package/dist/messaging/admin/strip/0.1/payload.d.ts.map +1 -0
- package/dist/messaging/admin/strip/0.1/payload.js +9 -0
- package/dist/messaging/admin/strip/0.1/payload.js.map +1 -0
- package/dist/policy/_shared/0.3/policy.d.ts +11 -0
- package/dist/policy/_shared/0.3/policy.d.ts.map +1 -0
- package/dist/policy/_shared/0.3/policy.js +6 -0
- package/dist/policy/_shared/0.3/policy.js.map +1 -0
- package/dist/policy/evaluate/0.3/payload.d.ts +125 -0
- package/dist/policy/evaluate/0.3/payload.d.ts.map +1 -0
- package/dist/policy/evaluate/0.3/payload.js +9 -0
- package/dist/policy/evaluate/0.3/payload.js.map +1 -0
- package/dist/registry/_shared/0.1/registry.d.ts +11 -0
- package/dist/registry/_shared/0.1/registry.d.ts.map +1 -0
- package/dist/registry/_shared/0.1/registry.js +6 -0
- package/dist/registry/_shared/0.1/registry.js.map +1 -0
- package/dist/registry/authorization/0.1/payload.d.ts +52 -0
- package/dist/registry/authorization/0.1/payload.d.ts.map +1 -0
- package/dist/registry/authorization/0.1/payload.js +9 -0
- package/dist/registry/authorization/0.1/payload.js.map +1 -0
- package/dist/registry/recognition/0.1/payload.d.ts +52 -0
- package/dist/registry/recognition/0.1/payload.d.ts.map +1 -0
- package/dist/registry/recognition/0.1/payload.js +9 -0
- package/dist/registry/recognition/0.1/payload.js.map +1 -0
- package/dist/registry/record/create/0.1/payload.d.ts +47 -0
- package/dist/registry/record/create/0.1/payload.d.ts.map +1 -0
- package/dist/registry/record/create/0.1/payload.js +9 -0
- package/dist/registry/record/create/0.1/payload.js.map +1 -0
- package/dist/registry/record/delete/0.1/payload.d.ts +25 -0
- package/dist/registry/record/delete/0.1/payload.d.ts.map +1 -0
- package/dist/registry/record/delete/0.1/payload.js +9 -0
- package/dist/registry/record/delete/0.1/payload.js.map +1 -0
- package/dist/registry/record/list/0.1/payload.d.ts +21 -0
- package/dist/registry/record/list/0.1/payload.d.ts.map +1 -0
- package/dist/registry/record/list/0.1/payload.js +9 -0
- package/dist/registry/record/list/0.1/payload.js.map +1 -0
- package/dist/registry/record/read/0.1/payload.d.ts +25 -0
- package/dist/registry/record/read/0.1/payload.d.ts.map +1 -0
- package/dist/registry/record/read/0.1/payload.js +9 -0
- package/dist/registry/record/read/0.1/payload.js.map +1 -0
- package/dist/registry/record/update/0.1/payload.d.ts +47 -0
- package/dist/registry/record/update/0.1/payload.d.ts.map +1 -0
- package/dist/registry/record/update/0.1/payload.js +9 -0
- package/dist/registry/record/update/0.1/payload.js.map +1 -0
- package/dist/task-consent/_shared/0.1/task-consent.d.ts +11 -0
- package/dist/task-consent/_shared/0.1/task-consent.d.ts.map +1 -0
- package/dist/task-consent/_shared/0.1/task-consent.js +6 -0
- package/dist/task-consent/_shared/0.1/task-consent.js.map +1 -0
- package/dist/task-consent/decision/0.1/payload.d.ts +38 -0
- package/dist/task-consent/decision/0.1/payload.d.ts.map +1 -0
- package/dist/task-consent/decision/0.1/payload.js +9 -0
- package/dist/task-consent/decision/0.1/payload.js.map +1 -0
- package/dist/task-consent/request/0.1/payload.d.ts +140 -0
- package/dist/task-consent/request/0.1/payload.d.ts.map +1 -0
- package/dist/task-consent/request/0.1/payload.js +9 -0
- package/dist/task-consent/request/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +18 -0
- package/src/messaging/access-list/add/0.1/payload.ts +1 -1
- package/src/messaging/access-list/get/0.1/payload.ts +1 -1
- package/src/messaging/access-list/remove/0.1/payload.ts +1 -1
- package/src/messaging/acl/get/0.1/payload.ts +1 -1
- package/src/messaging/admin/add/0.1/payload.ts +31 -0
- package/src/messaging/admin/audit-log/0.1/payload.ts +28 -0
- package/src/messaging/admin/config/0.1/payload.ts +20 -0
- package/src/messaging/admin/list/0.1/payload.ts +28 -0
- package/src/messaging/admin/strip/0.1/payload.ts +31 -0
- package/src/policy/_shared/0.3/policy.ts +11 -0
- package/src/policy/evaluate/0.3/payload.ts +128 -0
- package/src/registry/_shared/0.1/registry.ts +11 -0
- package/src/registry/authorization/0.1/payload.ts +54 -0
- package/src/registry/recognition/0.1/payload.ts +54 -0
- package/src/registry/record/create/0.1/payload.ts +50 -0
- package/src/registry/record/delete/0.1/payload.ts +27 -0
- package/src/registry/record/list/0.1/payload.ts +23 -0
- package/src/registry/record/read/0.1/payload.ts +27 -0
- package/src/registry/record/update/0.1/payload.ts +50 -0
- package/src/task-consent/_shared/0.1/task-consent.ts +11 -0
- package/src/task-consent/decision/0.1/payload.ts +41 -0
- package/src/task-consent/request/0.1/payload.ts +142 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/task-consent/request/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* The executor asks an enrolled approver device to authorize one pending privileged task, presenting the effects it computed by dry-running the real handler against its own prior state. The executor signs this document; the approver renders only what it verifies under that signature.
|
|
7
|
+
*/
|
|
8
|
+
export interface TaskConsentRequestPayload {
|
|
9
|
+
/**
|
|
10
|
+
* Per-request nonce (≥128 bits entropy) echoed and signed by the matching task-consent/decision. It is also the salt in `payloadDigest`, so a party that holds this request can re-derive the digest and a party that does not cannot invert it.
|
|
11
|
+
*/
|
|
12
|
+
challenge: string;
|
|
13
|
+
/**
|
|
14
|
+
* Type URI of the task awaiting approval. It is bound into `payloadDigest`: without that binding, two tasks whose payloads canonicalize identically would share a digest, and an approval for a benign task would authorize a destructive one.
|
|
15
|
+
*/
|
|
16
|
+
taskType: string;
|
|
17
|
+
/**
|
|
18
|
+
* The binding between what the approver sees and what executes. Digest of the canonical (RFC 8785 JCS) payload, the task type, and the `challenge` as salt. The decision echoes it; the executor re-derives it from the payload it is about to run and refuses on mismatch. Salted because an unsalted digest over a low-entropy payload is a confirmation oracle for anyone who observes it in transit.
|
|
19
|
+
*/
|
|
20
|
+
payloadDigest: string;
|
|
21
|
+
/**
|
|
22
|
+
* Authoritative SPEC §7.3 item 13 side-effect class of the pending task, derived by the executor from the compiled handler it is about to invoke. NEVER taken from the registry: a registry that decided this would be a consent kill-switch, downgradeable by publishing a new version with a weaker class.
|
|
23
|
+
*/
|
|
24
|
+
sideEffects: "none" | "mutating" | "destructive";
|
|
25
|
+
exposure: Exposure;
|
|
26
|
+
/**
|
|
27
|
+
* What executing this task will actually do, computed by dry-running the real handler against the executor's prior state. MAY be empty when the executor has no dry-run for this handler — in which case `consequences` carries the specification's static fallback text. When BOTH are empty the surface MUST tell the approver the consequences could not be determined, and MUST NOT present the task as though it had none.
|
|
28
|
+
*/
|
|
29
|
+
effects: Effect[];
|
|
30
|
+
/**
|
|
31
|
+
* Static, human-facing second-order effects declared in the task's specification (SPEC §7.3 item 13). A fallback for handlers with no dry-run — per-task, not per-request, so it can say 'any document change rotates the update keys' but not which keys. Prefer `effects`.
|
|
32
|
+
*/
|
|
33
|
+
consequences?: string[];
|
|
34
|
+
/**
|
|
35
|
+
* OPTIONAL identifier the task acts on — the value at the specification's `subjectPath`, usually a DID. Absent for subjectless tasks.
|
|
36
|
+
*/
|
|
37
|
+
subject?: string;
|
|
38
|
+
/**
|
|
39
|
+
* DID that submitted the pending task. Shown to the approver, and compared against the approver when `excludeRequester` is set.
|
|
40
|
+
*/
|
|
41
|
+
requester: string;
|
|
42
|
+
/**
|
|
43
|
+
* OPTIONAL enrolled device the task was submitted from.
|
|
44
|
+
*/
|
|
45
|
+
requesterDeviceId?: string;
|
|
46
|
+
/**
|
|
47
|
+
* OPTIONAL web origin that proposed the task, when it arrived via a relying party. This MUST be the origin the consumer's own runtime attested (e.g. the browser-supplied sender origin) — never a value the proposing page supplied, and never one the relying party could author.
|
|
48
|
+
*/
|
|
49
|
+
origin?: string;
|
|
50
|
+
statePin?: StatePin;
|
|
51
|
+
/**
|
|
52
|
+
* Name of the approver set the policy's `requireConsent` named.
|
|
53
|
+
*/
|
|
54
|
+
approverSet: string;
|
|
55
|
+
/**
|
|
56
|
+
* Distinct approvals from the set required before the task may execute.
|
|
57
|
+
*/
|
|
58
|
+
minApprovals: number;
|
|
59
|
+
/**
|
|
60
|
+
* When true, `requester` may not count toward the threshold — so a single compromised device cannot both propose and approve. A surface MUST NOT offer to approve a request whose `requester` is its own subject when this is set.
|
|
61
|
+
*/
|
|
62
|
+
excludeRequester: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* After this instant the pending request lapses and no decision is accepted for it.
|
|
65
|
+
*/
|
|
66
|
+
expiresAt: string;
|
|
67
|
+
ext?: Ext;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The authoritative SPEC §7.3 item 14 exposure class of the pending task, derived by the executor from the compiled handler it is about to invoke — never from the registry's declared value.
|
|
71
|
+
*/
|
|
72
|
+
export interface Exposure {
|
|
73
|
+
/**
|
|
74
|
+
* Sensitivity of data the task returns to its caller.
|
|
75
|
+
*/
|
|
76
|
+
discloses: "none" | "metadata" | "secret";
|
|
77
|
+
/**
|
|
78
|
+
* Whether execution exercises the subject's own authority to produce an attributable effect in the subject's name.
|
|
79
|
+
*/
|
|
80
|
+
actsAsSubject: boolean;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* One consequence of executing the pending task, authored by the executor that is about to run it. An effect is produced by dry-running the real handler against the executor's own prior state — never by the requester, and never by re-implementing the handler's semantics elsewhere. A consent surface renders ONLY effects it received under the executor's signature.
|
|
84
|
+
*/
|
|
85
|
+
export interface Effect {
|
|
86
|
+
/**
|
|
87
|
+
* Machine discriminator for rich rendering. Well-known kinds are registered in the prose (`documentChange`, `keyRotation`, `preRotationRefresh`, `resourceDelete`, `disclosure`), but the set is OPEN: handlers evolve faster than this schema, and an executor MUST be able to describe a consequence this version does not name. A surface that does not recognise a `kind` MUST still render `summary`.
|
|
88
|
+
*/
|
|
89
|
+
kind: string;
|
|
90
|
+
/**
|
|
91
|
+
* REQUIRED human-facing sentence describing this consequence, authored by the executor. This is the ONLY member a consent surface is guaranteed to be able to render, and it is what makes an unrecognised `kind` degrade to something truthful rather than something invisible. A surface MUST render it verbatim; it MUST NOT substitute its own prose.
|
|
92
|
+
*/
|
|
93
|
+
summary: string;
|
|
94
|
+
/**
|
|
95
|
+
* OPTIONAL RFC 6901 JSON Pointer locating the change within the subject resource (e.g. `/service/0`).
|
|
96
|
+
*/
|
|
97
|
+
path?: string;
|
|
98
|
+
/**
|
|
99
|
+
* OPTIONAL prior value at `path`, from the executor's authoritative state. ABSENT means there was no prior value (a creation); an explicit `null` is treated identically, so an executor MUST NOT rely on the two being distinguishable. Structured members are for rich rendering only — `summary` is what a surface is obliged to show, and it is where an executor states a distinction this shape cannot carry.
|
|
100
|
+
*/
|
|
101
|
+
before?: {
|
|
102
|
+
[k: string]: unknown | undefined;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* OPTIONAL resulting value at `path` once the task executes. ABSENT means the value is removed (a deletion), under the same rule as `before`.
|
|
106
|
+
*/
|
|
107
|
+
after?: {
|
|
108
|
+
[k: string]: unknown | undefined;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* OPTIONAL kind-specific structured extras (e.g. `{ "commitments": 2 }` for `preRotationRefresh`).
|
|
112
|
+
*/
|
|
113
|
+
detail?: {
|
|
114
|
+
[k: string]: unknown | undefined;
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* The prior state the effects were computed against. A human in the loop makes the approval window minutes wide, so the state can move underneath a pending approval. The executor asserts this pin still holds at execution and refuses otherwise — without it, a lost update silently executes against state the approver never saw.
|
|
119
|
+
*/
|
|
120
|
+
export interface StatePin {
|
|
121
|
+
/**
|
|
122
|
+
* Identifier of the pinned resource (usually the subject DID).
|
|
123
|
+
*/
|
|
124
|
+
resource: string;
|
|
125
|
+
/**
|
|
126
|
+
* Opaque version identifier of the prior state (e.g. a did:webvh `versionId`). Compared for equality at execution; the executor MUST NOT attempt to order or interpret it.
|
|
127
|
+
*/
|
|
128
|
+
version: string;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* 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.
|
|
132
|
+
*/
|
|
133
|
+
export interface Ext {
|
|
134
|
+
[k: string]: unknown | undefined;
|
|
135
|
+
}
|
|
136
|
+
/** Trust Task type URI. */
|
|
137
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/task-consent/request/0.1";
|
|
138
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
139
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/task-consent/request/0.1#response";
|
|
140
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../src/task-consent/request/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,UAAU,GAAG,aAAa,CAAC;IACjD,QAAQ,EAAE,QAAQ,CAAC;IACnB;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,gBAAgB,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC;IAC1C;;OAEG;IACH,aAAa,EAAE,OAAO,CAAC;CACxB;AACD;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE;QACP,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;KAClC,CAAC;IACF;;OAEG;IACH,KAAK,CAAC,EAAE;QACN,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;KAClC,CAAC;IACF;;OAEG;IACH,MAAM,CAAC,EAAE;QACP,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;KAClC,CAAC;CACH;AACD;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AACD;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AAED,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,sDAA+D,CAAC;AAExF,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,+DAAwE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/task-consent/request/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/task-consent/request/0.1";
|
|
7
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
8
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/task-consent/request/0.1#response";
|
|
9
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../src/task-consent/request/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAsIH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,sDAA+D,CAAC;AAExF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,+DAAwE,CAAC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -97,12 +97,19 @@ export * as MessagingAccountList_v0_1 from "./messaging/account/list/0.1/payload
|
|
|
97
97
|
export * as MessagingAccountRemove_v0_1 from "./messaging/account/remove/0.1/payload";
|
|
98
98
|
export * as MessagingAclGet_v0_1 from "./messaging/acl/get/0.1/payload";
|
|
99
99
|
export * as MessagingAclSet_v0_1 from "./messaging/acl/set/0.1/payload";
|
|
100
|
+
export * as MessagingAdminAdd_v0_1 from "./messaging/admin/add/0.1/payload";
|
|
101
|
+
export * as MessagingAdminAuditLog_v0_1 from "./messaging/admin/audit-log/0.1/payload";
|
|
102
|
+
export * as MessagingAdminConfig_v0_1 from "./messaging/admin/config/0.1/payload";
|
|
103
|
+
export * as MessagingAdminList_v0_1 from "./messaging/admin/list/0.1/payload";
|
|
104
|
+
export * as MessagingAdminStrip_v0_1 from "./messaging/admin/strip/0.1/payload";
|
|
100
105
|
export * as MessagingPing_v0_1 from "./messaging/ping/0.1/payload";
|
|
101
106
|
export * as PolicyShared_v0_1 from "./policy/_shared/0.1/policy";
|
|
102
107
|
export * as PolicyShared_v0_2 from "./policy/_shared/0.2/policy";
|
|
108
|
+
export * as PolicyShared_v0_3 from "./policy/_shared/0.3/policy";
|
|
103
109
|
export * as PolicyDelete_v0_1 from "./policy/delete/0.1/payload";
|
|
104
110
|
export * as PolicyEvaluate_v0_1 from "./policy/evaluate/0.1/payload";
|
|
105
111
|
export * as PolicyEvaluate_v0_2 from "./policy/evaluate/0.2/payload";
|
|
112
|
+
export * as PolicyEvaluate_v0_3 from "./policy/evaluate/0.3/payload";
|
|
106
113
|
export * as PolicyList_v0_1 from "./policy/list/0.1/payload";
|
|
107
114
|
export * as PolicyList_v0_2 from "./policy/list/0.2/payload";
|
|
108
115
|
export * as PolicyUpsert_v0_1 from "./policy/upsert/0.1/payload";
|
|
@@ -115,10 +122,21 @@ export * as PushRegister_v0_1 from "./push/register/0.1/payload";
|
|
|
115
122
|
export * as PushRegister_v0_2 from "./push/register/0.2/payload";
|
|
116
123
|
export * as PushWake_v0_1 from "./push/wake/0.1/payload";
|
|
117
124
|
export * as PushWake_v0_2 from "./push/wake/0.2/payload";
|
|
125
|
+
export * as RegistryShared_v0_1 from "./registry/_shared/0.1/registry";
|
|
126
|
+
export * as RegistryAuthorization_v0_1 from "./registry/authorization/0.1/payload";
|
|
127
|
+
export * as RegistryRecognition_v0_1 from "./registry/recognition/0.1/payload";
|
|
128
|
+
export * as RegistryRecordCreate_v0_1 from "./registry/record/create/0.1/payload";
|
|
129
|
+
export * as RegistryRecordDelete_v0_1 from "./registry/record/delete/0.1/payload";
|
|
130
|
+
export * as RegistryRecordList_v0_1 from "./registry/record/list/0.1/payload";
|
|
131
|
+
export * as RegistryRecordRead_v0_1 from "./registry/record/read/0.1/payload";
|
|
132
|
+
export * as RegistryRecordUpdate_v0_1 from "./registry/record/update/0.1/payload";
|
|
118
133
|
export * as SyncEventShared_v0_1 from "./sync/_shared/0.1/sync-event";
|
|
119
134
|
export * as SyncEventShared_v0_2 from "./sync/_shared/0.2/sync-event";
|
|
120
135
|
export * as SyncEvent_v0_1 from "./sync/event/0.1/payload";
|
|
121
136
|
export * as SyncEvent_v0_2 from "./sync/event/0.2/payload";
|
|
137
|
+
export * as TaskConsentShared_v0_1 from "./task-consent/_shared/0.1/task-consent";
|
|
138
|
+
export * as TaskConsentDecision_v0_1 from "./task-consent/decision/0.1/payload";
|
|
139
|
+
export * as TaskConsentRequest_v0_1 from "./task-consent/request/0.1/payload";
|
|
122
140
|
export * as TrustTaskDiscovery_v0_1 from "./trust-task-discovery/0.1/payload";
|
|
123
141
|
export * as TrustTaskError_v0_1 from "./trust-task-error/0.1/payload";
|
|
124
142
|
export * as TrustTaskError_v0_2 from "./trust-task-error/0.2/payload";
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export type Vid = string;
|
|
10
10
|
/**
|
|
11
|
-
* A Verifiable Identifier (SPEC §4.8). For a mediator-served account this is the account's controlling DID
|
|
11
|
+
* A Verifiable Identifier (SPEC §4.8). For a mediator-served account this is the account's controlling DID, carried verbatim and compared by exact string equality. For privacy — and because some mediators key accounts by a one-way hash and never hold the full DID — a stable hash of the DID (e.g. its SHA-256 digest) is an equally valid value here: producer and consumer simply agree on the same opaque identifier and compare by exact string equality. The field carries whichever form the issuing mediator uses.
|
|
12
12
|
*/
|
|
13
13
|
export type Vid1 = string;
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export type Vid = string;
|
|
10
10
|
/**
|
|
11
|
-
* A Verifiable Identifier (SPEC §4.8). For a mediator-served account this is the account's controlling DID
|
|
11
|
+
* A Verifiable Identifier (SPEC §4.8). For a mediator-served account this is the account's controlling DID, carried verbatim and compared by exact string equality. For privacy — and because some mediators key accounts by a one-way hash and never hold the full DID — a stable hash of the DID (e.g. its SHA-256 digest) is an equally valid value here: producer and consumer simply agree on the same opaque identifier and compare by exact string equality. The field carries whichever form the issuing mediator uses.
|
|
12
12
|
*/
|
|
13
13
|
export type Vid1 = string;
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export type Vid = string;
|
|
10
10
|
/**
|
|
11
|
-
* A Verifiable Identifier (SPEC §4.8). For a mediator-served account this is the account's controlling DID
|
|
11
|
+
* A Verifiable Identifier (SPEC §4.8). For a mediator-served account this is the account's controlling DID, carried verbatim and compared by exact string equality. For privacy — and because some mediators key accounts by a one-way hash and never hold the full DID — a stable hash of the DID (e.g. its SHA-256 digest) is an equally valid value here: producer and consumer simply agree on the same opaque identifier and compare by exact string equality. The field carries whichever form the issuing mediator uses.
|
|
12
12
|
*/
|
|
13
13
|
export type Vid1 = string;
|
|
14
14
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* A Verifiable Identifier (SPEC §4.8). For a mediator-served account this is the account's controlling DID
|
|
7
|
+
* A Verifiable Identifier (SPEC §4.8). For a mediator-served account this is the account's controlling DID, carried verbatim and compared by exact string equality. For privacy — and because some mediators key accounts by a one-way hash and never hold the full DID — a stable hash of the DID (e.g. its SHA-256 digest) is an equally valid value here: producer and consumer simply agree on the same opaque identifier and compare by exact string equality. The field carries whichever form the issuing mediator uses.
|
|
8
8
|
*/
|
|
9
9
|
export type Vid = string;
|
|
10
10
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/messaging/admin/add/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A Verifiable Identifier (SPEC §4.8). For a mediator-served account this is the account's controlling DID, carried verbatim and compared by exact string equality. For privacy — and because some mediators key accounts by a one-way hash and never hold the full DID — a stable hash of the DID (e.g. its SHA-256 digest) is an equally valid value here: producer and consumer simply agree on the same opaque identifier and compare by exact string equality. The field carries whichever form the issuing mediator uses.
|
|
8
|
+
*/
|
|
9
|
+
export type Vid = string;
|
|
10
|
+
|
|
11
|
+
export interface MessagingAddAdminsPayload {
|
|
12
|
+
/**
|
|
13
|
+
* The accounts to grant admin rights to.
|
|
14
|
+
*
|
|
15
|
+
* @minItems 1
|
|
16
|
+
*/
|
|
17
|
+
dids: [Vid, ...Vid[]];
|
|
18
|
+
ext?: Ext;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
22
|
+
*/
|
|
23
|
+
export interface Ext {
|
|
24
|
+
[k: string]: unknown | undefined;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Trust Task type URI. */
|
|
28
|
+
export const TYPE_URI = "https://trusttasks.org/spec/messaging/admin/add/0.1" as const;
|
|
29
|
+
|
|
30
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
31
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/messaging/admin/add/0.1#response" as const;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/messaging/admin/audit-log/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface MessagingAuditLogPayload {
|
|
7
|
+
/**
|
|
8
|
+
* Opaque continuation token from a prior page's nextCursor. Echoed verbatim; treated as unstructured by the requester.
|
|
9
|
+
*/
|
|
10
|
+
cursor?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Maximum number of audit entries to return in this page. The mediator chooses a default when omitted.
|
|
13
|
+
*/
|
|
14
|
+
limit?: number;
|
|
15
|
+
ext?: Ext;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
19
|
+
*/
|
|
20
|
+
export interface Ext {
|
|
21
|
+
[k: string]: unknown | undefined;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Trust Task type URI. */
|
|
25
|
+
export const TYPE_URI = "https://trusttasks.org/spec/messaging/admin/audit-log/0.1" as const;
|
|
26
|
+
|
|
27
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
28
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/messaging/admin/audit-log/0.1#response" as const;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/messaging/admin/config/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface MessagingGetConfigurationPayload {
|
|
7
|
+
ext?: Ext;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
11
|
+
*/
|
|
12
|
+
export interface Ext {
|
|
13
|
+
[k: string]: unknown | undefined;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Trust Task type URI. */
|
|
17
|
+
export const TYPE_URI = "https://trusttasks.org/spec/messaging/admin/config/0.1" as const;
|
|
18
|
+
|
|
19
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
20
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/messaging/admin/config/0.1#response" as const;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/messaging/admin/list/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface MessagingListAdminsPayload {
|
|
7
|
+
/**
|
|
8
|
+
* Opaque continuation token from a prior page's nextCursor. Echoed verbatim; treated as unstructured by the requester.
|
|
9
|
+
*/
|
|
10
|
+
cursor?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Maximum number of admin accounts to return in this page. The mediator chooses a default when omitted.
|
|
13
|
+
*/
|
|
14
|
+
limit?: number;
|
|
15
|
+
ext?: Ext;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
19
|
+
*/
|
|
20
|
+
export interface Ext {
|
|
21
|
+
[k: string]: unknown | undefined;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Trust Task type URI. */
|
|
25
|
+
export const TYPE_URI = "https://trusttasks.org/spec/messaging/admin/list/0.1" as const;
|
|
26
|
+
|
|
27
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
28
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/messaging/admin/list/0.1#response" as const;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/messaging/admin/strip/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A Verifiable Identifier (SPEC §4.8). For a mediator-served account this is the account's controlling DID, carried verbatim and compared by exact string equality. For privacy — and because some mediators key accounts by a one-way hash and never hold the full DID — a stable hash of the DID (e.g. its SHA-256 digest) is an equally valid value here: producer and consumer simply agree on the same opaque identifier and compare by exact string equality. The field carries whichever form the issuing mediator uses.
|
|
8
|
+
*/
|
|
9
|
+
export type Vid = string;
|
|
10
|
+
|
|
11
|
+
export interface MessagingStripAdminsPayload {
|
|
12
|
+
/**
|
|
13
|
+
* The accounts to strip admin rights from (demoting them to standard).
|
|
14
|
+
*
|
|
15
|
+
* @minItems 1
|
|
16
|
+
*/
|
|
17
|
+
dids: [Vid, ...Vid[]];
|
|
18
|
+
ext?: Ext;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
22
|
+
*/
|
|
23
|
+
export interface Ext {
|
|
24
|
+
[k: string]: unknown | undefined;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Trust Task type URI. */
|
|
28
|
+
export const TYPE_URI = "https://trusttasks.org/spec/messaging/admin/strip/0.1" as const;
|
|
29
|
+
|
|
30
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
31
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/messaging/admin/strip/0.1#response" as const;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/policy/_shared/0.3/policy.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Shared Rego policy types referenced by the policy/* spec family. The maintainer evaluates these against PolicyInput (the request context) to decide the disposition of a task. 0.3 generalises PolicyInput from the vault-flow triad (proxy-login / release / step-up) to any Trust Task, carrying the task's Type URI, subject, and the two authoritative SPEC §7.3 classifications (side-effect and exposure) so a policy can gate on what a task does; and adds a `requireConsent` decision so a policy can demand approver-set consent. Engine: embedded Rego via `regorus` (pure-Rust evaluator) in the canonical maintainer implementation; other implementations MAY use a different engine if they accept the same Rego syntax.
|
|
8
|
+
*/
|
|
9
|
+
export interface PolicySharedDefinitions {
|
|
10
|
+
[k: string]: unknown | undefined;
|
|
11
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/policy/evaluate/0.3/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A single binding target for a vault entry. Tagged union over the discriminator `kind`. A VaultEntry's `targets` array MAY mix any number of these.
|
|
8
|
+
*/
|
|
9
|
+
export type SiteTarget = WebOrigin | Did | IosApp | AndroidApp;
|
|
10
|
+
/**
|
|
11
|
+
* Discriminator: is this consumer a user-driven Companion or a headless Service?
|
|
12
|
+
*/
|
|
13
|
+
export type ConsumerKind = Companion | Service;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Dry-run a policy decision against a synthetic PolicyInput. Returns the policy decision plus a trace of which policy modules matched and which rules fired. Used by the policy-editor UI to verify changes before save and by admins to diagnose unexpected outcomes. 0.3 evaluates against the generalised PolicyInput (any Trust Task, carrying typeUri + side-effect/exposure classes) and can return the `requireConsent` decision.
|
|
17
|
+
*/
|
|
18
|
+
export interface PolicyEvaluatePayload {
|
|
19
|
+
input: PolicyInput;
|
|
20
|
+
/**
|
|
21
|
+
* Optional — when supplied, evaluate as if this Rego source were active (e.g. preview a pending upsert). The candidate is layered into the evaluator at the priority specified by `candidatePriority` (default 1000) for this call only.
|
|
22
|
+
*/
|
|
23
|
+
candidateModule?: string;
|
|
24
|
+
candidatePriority?: number;
|
|
25
|
+
includeTrace?: boolean;
|
|
26
|
+
ext?: Ext;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The structured input fed to a policy evaluator before dispatching a task. Generalised in 0.3 from the vault-flow triad to any Trust Task: `request.typeUri` identifies the task and `request.sideEffects` / `request.exposure` carry the authoritative SPEC §7.3 classifications the evaluator derives from the compiled handler.
|
|
30
|
+
*/
|
|
31
|
+
export interface PolicyInput {
|
|
32
|
+
request: {
|
|
33
|
+
/**
|
|
34
|
+
* Type URI of the task being authorized — the evaluator's primary discriminator (e.g. https://trusttasks.org/spec/did-management/did/delete/0.1).
|
|
35
|
+
*/
|
|
36
|
+
typeUri: string;
|
|
37
|
+
/**
|
|
38
|
+
* Optional coarse category retained from 0.2 (`proxyLogin` | `release` | `stepUpResponse` | …) for policies that switch on it. `typeUri` is authoritative in 0.3.
|
|
39
|
+
*/
|
|
40
|
+
kind?: string;
|
|
41
|
+
/**
|
|
42
|
+
* The identifier the task acts on — the value at the spec's `subjectPath` (usually a DID). The evaluator checks the consumer's authority to act on this subject. Absent for subjectless tasks (discovery, list).
|
|
43
|
+
*/
|
|
44
|
+
subject?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Multihash of the canonicalized payload, salted with the request challenge, present when a delegated-execution consent flow must bind approval to this exact payload. Absent when no consent binding is in play.
|
|
47
|
+
*/
|
|
48
|
+
payloadDigest?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Authoritative integrity class (SPEC §7.3 item 13). The evaluator MUST derive this from the compiled handler it is about to invoke, not from the wire — the registry's declared value is advisory only.
|
|
51
|
+
*/
|
|
52
|
+
sideEffects: "none" | "mutating" | "destructive";
|
|
53
|
+
/**
|
|
54
|
+
* Authoritative exposure class (SPEC §7.3 item 14), likewise derived from the compiled handler. `discloses` is the sensitivity of returned data; `actsAsSubject` is whether the subject's authority is exercised.
|
|
55
|
+
*/
|
|
56
|
+
exposure: {
|
|
57
|
+
discloses: "none" | "metadata" | "secret";
|
|
58
|
+
actsAsSubject: boolean;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
site: SiteTarget;
|
|
62
|
+
contextId: string;
|
|
63
|
+
consumer: {
|
|
64
|
+
did: string;
|
|
65
|
+
kind?: ConsumerKind;
|
|
66
|
+
deviceId?: string;
|
|
67
|
+
lastUserVerificationAt?: string;
|
|
68
|
+
networkClass?: "unknown" | "home" | "corp" | "public" | "vpn";
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export interface WebOrigin {
|
|
72
|
+
kind: "webOrigin";
|
|
73
|
+
/**
|
|
74
|
+
* Web origin per RFC 6454 (scheme + host + optional port), e.g. "https://github.com". Compared by exact string equality after canonicalisation (lowercase host, default port elided). Consumers wanting subdomain coverage SHOULD add multiple targets, not encode a wildcard.
|
|
75
|
+
*/
|
|
76
|
+
origin: string;
|
|
77
|
+
}
|
|
78
|
+
export interface Did {
|
|
79
|
+
kind: "did";
|
|
80
|
+
/**
|
|
81
|
+
* DID identifying the relying party (e.g. did:web:rp.example). The vault maintainer is responsible for any DID resolution required to act on this entry.
|
|
82
|
+
*/
|
|
83
|
+
did: string;
|
|
84
|
+
}
|
|
85
|
+
export interface IosApp {
|
|
86
|
+
kind: "iosApp";
|
|
87
|
+
/**
|
|
88
|
+
* iOS bundle identifier in reverse-DNS form (e.g. "com.github.stwalkerster.codehub"). Compared by exact string equality. Matches when an iOS Companion identifies the requesting app via its bundle id (typically via the OS Credential Manager integration).
|
|
89
|
+
*/
|
|
90
|
+
bundleId: string;
|
|
91
|
+
/**
|
|
92
|
+
* Optional Apple Developer Team identifier (10-character alphanumeric). When supplied, the maintainer SHOULD also verify the team id of the requesting app before matching — defense in depth against bundle-id squatting on jailbroken devices.
|
|
93
|
+
*/
|
|
94
|
+
teamId?: string;
|
|
95
|
+
}
|
|
96
|
+
export interface AndroidApp {
|
|
97
|
+
kind: "androidApp";
|
|
98
|
+
/**
|
|
99
|
+
* Android package name in reverse-DNS form (e.g. "com.github.android").
|
|
100
|
+
*/
|
|
101
|
+
packageName: string;
|
|
102
|
+
/**
|
|
103
|
+
* SHA-256 fingerprints of the app's signing certificates, in colon-separated hex (the format `apksigner` and the Play Console emit). At least one fingerprint MUST be present. The maintainer matches when ANY of the provided fingerprints matches the requesting app's signature — this supports apps signed by multiple keys (e.g. during certificate rotation via Play App Signing).
|
|
104
|
+
*
|
|
105
|
+
* @minItems 1
|
|
106
|
+
*/
|
|
107
|
+
sha256CertFingerprints: [string, ...string[]];
|
|
108
|
+
}
|
|
109
|
+
export interface Companion {
|
|
110
|
+
kind: "companion";
|
|
111
|
+
formFactor: "browser" | "mobile" | "desktop";
|
|
112
|
+
}
|
|
113
|
+
export interface Service {
|
|
114
|
+
kind: "service";
|
|
115
|
+
serviceKind: "mediator" | "aiAgent" | "daemon";
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* 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.
|
|
119
|
+
*/
|
|
120
|
+
export interface Ext {
|
|
121
|
+
[k: string]: unknown | undefined;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** Trust Task type URI. */
|
|
125
|
+
export const TYPE_URI = "https://trusttasks.org/spec/policy/evaluate/0.3" as const;
|
|
126
|
+
|
|
127
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
128
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/policy/evaluate/0.3#response" as const;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/registry/_shared/0.1/registry.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Canonical $defs referenced by every registry/* specification: the TRQP query tuple, the query context, the trust record, and the mutation acknowledgement. Not itself a Trust Task specification (the `_shared` folder is skipped by the registry build and the codegen). Field names for the query tuple and the query responses are verbatim from the ToIP Trust Registry Query Protocol (TRQP) v2.0 JSON schemas, so one shape serves both the plain HTTP TRQP binding and the Trust Task payload.
|
|
8
|
+
*/
|
|
9
|
+
export interface SharedDefinitionsForTheRegistrySpecFamily {
|
|
10
|
+
[k: string]: unknown | undefined;
|
|
11
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/registry/authorization/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* TRQP v2.0 authorization query: ask a trust registry whether an entity is authorized by an authority for a given action+resource. Field names are verbatim from the TRQP authorization request/response schemas so the same payload serves the plain HTTP TRQP binding and the Trust Task binding.
|
|
8
|
+
*/
|
|
9
|
+
export interface RegistryAuthorizationPayload {
|
|
10
|
+
/**
|
|
11
|
+
* Identifier of the entity being tested for authorization.
|
|
12
|
+
*/
|
|
13
|
+
entity_id: string;
|
|
14
|
+
/**
|
|
15
|
+
* Identifier of the authority being queried.
|
|
16
|
+
*/
|
|
17
|
+
authority_id: string;
|
|
18
|
+
/**
|
|
19
|
+
* The action the query is checking authorization for.
|
|
20
|
+
*/
|
|
21
|
+
action: string;
|
|
22
|
+
/**
|
|
23
|
+
* The resource the query is checking authorization for.
|
|
24
|
+
*/
|
|
25
|
+
resource: string;
|
|
26
|
+
context?: QueryContext;
|
|
27
|
+
ext?: Ext;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Optional TRQP query context. `time` requests evaluation as of a given instant; `locator` is an authority-defined hint for locating records.
|
|
31
|
+
*/
|
|
32
|
+
export interface QueryContext {
|
|
33
|
+
/**
|
|
34
|
+
* Evaluate the query as of this RFC3339 (Z offset) instant. Blank/absent uses current server time.
|
|
35
|
+
*/
|
|
36
|
+
time?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Optional hint for systems that need extra information to locate the records in question (authorization queries).
|
|
39
|
+
*/
|
|
40
|
+
locator?: string;
|
|
41
|
+
[k: string]: string | undefined;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* 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.
|
|
45
|
+
*/
|
|
46
|
+
export interface Ext {
|
|
47
|
+
[k: string]: unknown | undefined;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** Trust Task type URI. */
|
|
51
|
+
export const TYPE_URI = "https://trusttasks.org/spec/registry/authorization/0.1" as const;
|
|
52
|
+
|
|
53
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
54
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/registry/authorization/0.1#response" as const;
|