@openvtc/trust-tasks 0.16.2 → 0.16.4

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +76 -0
  2. package/dist/consent/approve-request/0.1/payload.d.ts +267 -0
  3. package/dist/consent/approve-request/0.1/payload.d.ts.map +1 -0
  4. package/dist/consent/approve-request/0.1/payload.js +138 -0
  5. package/dist/consent/approve-request/0.1/payload.js.map +1 -0
  6. package/dist/index.d.ts +9 -0
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +9 -0
  9. package/dist/index.js.map +1 -1
  10. package/dist/vault/credentials/archive/0.1/payload.d.ts +297 -0
  11. package/dist/vault/credentials/archive/0.1/payload.d.ts.map +1 -0
  12. package/dist/vault/credentials/archive/0.1/payload.js +171 -0
  13. package/dist/vault/credentials/archive/0.1/payload.js.map +1 -0
  14. package/dist/vault/credentials/delete/0.1/payload.d.ts +333 -0
  15. package/dist/vault/credentials/delete/0.1/payload.d.ts.map +1 -0
  16. package/dist/vault/credentials/delete/0.1/payload.js +185 -0
  17. package/dist/vault/credentials/delete/0.1/payload.js.map +1 -0
  18. package/dist/vault/credentials/get/0.1/payload.d.ts +244 -0
  19. package/dist/vault/credentials/get/0.1/payload.d.ts.map +1 -0
  20. package/dist/vault/credentials/get/0.1/payload.js +137 -0
  21. package/dist/vault/credentials/get/0.1/payload.js.map +1 -0
  22. package/dist/vault/credentials/purge/0.1/payload.d.ts +297 -0
  23. package/dist/vault/credentials/purge/0.1/payload.d.ts.map +1 -0
  24. package/dist/vault/credentials/purge/0.1/payload.js +171 -0
  25. package/dist/vault/credentials/purge/0.1/payload.js.map +1 -0
  26. package/dist/vault/credentials/query/0.1/payload.d.ts +689 -0
  27. package/dist/vault/credentials/query/0.1/payload.d.ts.map +1 -0
  28. package/dist/vault/credentials/query/0.1/payload.js +350 -0
  29. package/dist/vault/credentials/query/0.1/payload.js.map +1 -0
  30. package/dist/vault/credentials/receive/0.1/payload.d.ts +414 -0
  31. package/dist/vault/credentials/receive/0.1/payload.d.ts.map +1 -0
  32. package/dist/vault/credentials/receive/0.1/payload.js +226 -0
  33. package/dist/vault/credentials/receive/0.1/payload.js.map +1 -0
  34. package/dist/vault/credentials/restore/0.1/payload.d.ts +297 -0
  35. package/dist/vault/credentials/restore/0.1/payload.d.ts.map +1 -0
  36. package/dist/vault/credentials/restore/0.1/payload.js +171 -0
  37. package/dist/vault/credentials/restore/0.1/payload.js.map +1 -0
  38. package/dist/vault/credentials/unarchive/0.1/payload.d.ts +297 -0
  39. package/dist/vault/credentials/unarchive/0.1/payload.d.ts.map +1 -0
  40. package/dist/vault/credentials/unarchive/0.1/payload.js +171 -0
  41. package/dist/vault/credentials/unarchive/0.1/payload.js.map +1 -0
  42. package/package.json +1 -1
  43. package/src/consent/approve-request/0.1/payload.ts +200 -0
  44. package/src/index.ts +9 -0
  45. package/src/vault/credentials/archive/0.1/payload.ts +217 -0
  46. package/src/vault/credentials/delete/0.1/payload.ts +239 -0
  47. package/src/vault/credentials/get/0.1/payload.ts +178 -0
  48. package/src/vault/credentials/purge/0.1/payload.ts +217 -0
  49. package/src/vault/credentials/query/0.1/payload.ts +459 -0
  50. package/src/vault/credentials/receive/0.1/payload.ts +298 -0
  51. package/src/vault/credentials/restore/0.1/payload.ts +217 -0
  52. package/src/vault/credentials/unarchive/0.1/payload.ts +217 -0
@@ -0,0 +1,200 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/consent/approve-request/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Interaction kind. Present because it changes what the approver is agreeing to: consenting to an agent reading a 1:1 conversation exposes two parties, and consenting on a group exposes everyone in it, most of whom are not being asked.
11
+ */
12
+ export type ConsentKind = "dm" | "group" | "channel";
13
+ /**
14
+ * What the agent is asking to be allowed to do.
15
+ */
16
+ export type ConsentScope = "receive" | "converse";
17
+
18
+ /**
19
+ * The prompt an agent's home service sends to a designated approver, asking a human to decide whether an agent may act on one conversation. It carries no decision itself: the approver answers with a separate, separately-signed consent/decision. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
20
+ */
21
+ export interface ConsentApproveRequestPayload {
22
+ subject: ConsentSubject;
23
+ scope: ConsentScope;
24
+ /**
25
+ * Single-use, unpredictable value the approver MUST echo in the consent/decision it signs. This is what binds a decision to this request: without it a decision is a free-floating assertion that the approver consented to something, and cannot be shown to answer this prompt rather than an earlier one. Consumers MUST reject a decision whose challenge they did not issue, and MUST NOT accept the same challenge twice.
26
+ */
27
+ challenge: string;
28
+ /**
29
+ * Human-readable label for the conversation, for the approver's screen — "Signal group 'Family'". Present because conversationRef is deliberately opaque: without a hint the approver is asked to decide about an identifier that means nothing to them, and will either always allow or always deny. Advisory only. It is chosen by the requesting party, so a renderer MUST treat it as untrusted text — escape it, bound its length, and never let it displace the subject members above as the basis of the decision.
30
+ */
31
+ displayHint?: string;
32
+ /**
33
+ * Digest of the inbound message that prompted this request, when there is one, so an approver deciding on a receive scope can confirm the decision it is being asked to make corresponds to a real arriving message. A digest rather than the content: the approver is deciding whether the agent may read the conversation, and showing them the message in order to ask would disclose what the decision is meant to gate.
34
+ */
35
+ firstMessageDigest?: string;
36
+ /**
37
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
38
+ */
39
+ ext?: Ext;
40
+ }
41
+ /**
42
+ * What the decision is about: one conversation, for one agent.
43
+ */
44
+ export interface ConsentSubject {
45
+ /**
46
+ * Messaging platform the conversation lives on, as the bridge names it (for example `signal`, `whatsapp`). Opaque to the framework.
47
+ */
48
+ platform: string;
49
+ /**
50
+ * The bridge's OPAQUE handle for the conversation. MUST NOT be a raw platform address (a phone number, a handle, a group invite link). The approver identifies the conversation from displayHint; this member exists so a decision can be matched to a conversation without the matching key being personal data.
51
+ */
52
+ conversationRef: string;
53
+ kind: ConsentKind;
54
+ /**
55
+ * DID of the agent the decision is about. Consent is granted to one agent, not to the service that hosts it, so that revoking one agent's access does not revoke another's.
56
+ */
57
+ agent: string;
58
+ }
59
+
60
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
61
+ export type { Ext };
62
+
63
+ /** Trust Task type URI. */
64
+ export const TYPE_URI = "https://trusttasks.org/spec/consent/approve-request/0.1" as const;
65
+
66
+ /** Stable alias for this specification's request payload shape. */
67
+ export type Payload = ConsentApproveRequestPayload;
68
+
69
+ /**
70
+ * This specification's payload schema, as a value.
71
+ *
72
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
73
+ * rather than only as a `.json` file because TypeScript types are erased
74
+ * at runtime: without a schema a consumer has nothing to validate, and
75
+ * every REQUIRED payload member is optional in practice. Cross-file
76
+ * `$ref`s are already inlined, so it needs no resolver.
77
+ */
78
+ export const PAYLOAD_SCHEMA = {
79
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
80
+ "$id": "https://trusttasks.org/spec/consent/approve-request/0.1",
81
+ "title": "Consent — Approve Request — payload",
82
+ "description": "The prompt an agent's home service sends to a designated approver, asking a human to decide whether an agent may act on one conversation. It carries no decision itself: the approver answers with a separate, separately-signed consent/decision. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
83
+ "type": "object",
84
+ "additionalProperties": false,
85
+ "required": [
86
+ "subject",
87
+ "scope",
88
+ "challenge"
89
+ ],
90
+ "properties": {
91
+ "subject": {
92
+ "$ref": "#/$defs/ConsentSubject",
93
+ "description": "What the decision is about: one conversation, for one agent."
94
+ },
95
+ "scope": {
96
+ "$ref": "#/$defs/ConsentScope",
97
+ "description": "What the agent is asking to be allowed to do."
98
+ },
99
+ "challenge": {
100
+ "type": "string",
101
+ "minLength": 1,
102
+ "description": "Single-use, unpredictable value the approver MUST echo in the consent/decision it signs. This is what binds a decision to this request: without it a decision is a free-floating assertion that the approver consented to something, and cannot be shown to answer this prompt rather than an earlier one. Consumers MUST reject a decision whose challenge they did not issue, and MUST NOT accept the same challenge twice."
103
+ },
104
+ "displayHint": {
105
+ "type": "string",
106
+ "maxLength": 256,
107
+ "description": "Human-readable label for the conversation, for the approver's screen — \"Signal group 'Family'\". Present because conversationRef is deliberately opaque: without a hint the approver is asked to decide about an identifier that means nothing to them, and will either always allow or always deny. Advisory only. It is chosen by the requesting party, so a renderer MUST treat it as untrusted text — escape it, bound its length, and never let it displace the subject members above as the basis of the decision."
108
+ },
109
+ "firstMessageDigest": {
110
+ "type": "string",
111
+ "minLength": 1,
112
+ "description": "Digest of the inbound message that prompted this request, when there is one, so an approver deciding on a receive scope can confirm the decision it is being asked to make corresponds to a real arriving message. A digest rather than the content: the approver is deciding whether the agent may read the conversation, and showing them the message in order to ask would disclose what the decision is meant to gate."
113
+ },
114
+ "ext": {
115
+ "$ref": "#/$defs/Ext",
116
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
117
+ }
118
+ },
119
+ "$defs": {
120
+ "ConsentSubject": {
121
+ "$anchor": "consentSubject",
122
+ "title": "ConsentSubject",
123
+ "description": "Platform-agnostic identifier of what consent is about. Deliberately not a platform address: a consent record that named one would be a stored directory of who the subject talks to, readable by anyone who reaches the store.",
124
+ "type": "object",
125
+ "additionalProperties": false,
126
+ "required": [
127
+ "platform",
128
+ "conversationRef",
129
+ "kind",
130
+ "agent"
131
+ ],
132
+ "properties": {
133
+ "platform": {
134
+ "type": "string",
135
+ "minLength": 1,
136
+ "description": "Messaging platform the conversation lives on, as the bridge names it (for example `signal`, `whatsapp`). Opaque to the framework."
137
+ },
138
+ "conversationRef": {
139
+ "type": "string",
140
+ "minLength": 1,
141
+ "description": "The bridge's OPAQUE handle for the conversation. MUST NOT be a raw platform address (a phone number, a handle, a group invite link). The approver identifies the conversation from displayHint; this member exists so a decision can be matched to a conversation without the matching key being personal data."
142
+ },
143
+ "kind": {
144
+ "$ref": "#/$defs/ConsentKind"
145
+ },
146
+ "agent": {
147
+ "type": "string",
148
+ "pattern": "^did:",
149
+ "description": "DID of the agent the decision is about. Consent is granted to one agent, not to the service that hosts it, so that revoking one agent's access does not revoke another's."
150
+ }
151
+ }
152
+ },
153
+ "ConsentKind": {
154
+ "$anchor": "consentKind",
155
+ "title": "ConsentKind",
156
+ "description": "Interaction kind. Present because it changes what the approver is agreeing to: consenting to an agent reading a 1:1 conversation exposes two parties, and consenting on a group exposes everyone in it, most of whom are not being asked.",
157
+ "type": "string",
158
+ "enum": [
159
+ "dm",
160
+ "group",
161
+ "channel"
162
+ ]
163
+ },
164
+ "ConsentScope": {
165
+ "$anchor": "consentScope",
166
+ "title": "ConsentScope",
167
+ "description": "What the agent may do. `receive` is read-only: the agent sees inbound messages. `converse` additionally lets it reply, which means it can speak to the other parties as the subject — a materially different decision, and the reason the two are distinct values rather than a boolean.",
168
+ "type": "string",
169
+ "enum": [
170
+ "receive",
171
+ "converse"
172
+ ]
173
+ },
174
+ "Ext": {
175
+ "title": "Ext",
176
+ "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.",
177
+ "type": "object",
178
+ "minProperties": 1,
179
+ "additionalProperties": true,
180
+ "propertyNames": {
181
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
182
+ }
183
+ }
184
+ }
185
+ } as const;
186
+
187
+ /**
188
+ * SPEC.md §7.2 policy for the request variant, from this specification's
189
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
190
+ * per-specification and cannot be derived from the document alone, and
191
+ * item 2 needs the schema this carries.
192
+ */
193
+ export const SPEC = {
194
+ typeUri: TYPE_URI,
195
+ isBearer: false,
196
+ isProofRequired: true,
197
+ isRecipientRequired: true,
198
+ isIssuedAtRequired: false,
199
+ payloadSchema: PAYLOAD_SCHEMA,
200
+ } as const;
package/src/index.ts CHANGED
@@ -60,6 +60,7 @@ export * as ConfigShow_v0_1 from "./config/show/0.1/payload.js";
60
60
  export * as ConfirmRequest_v0_1 from "./confirm/request/0.1/payload.js";
61
61
  export * as ConfirmResponse_v0_1 from "./confirm/response/0.1/payload.js";
62
62
  export * as ConsentShared_v0_1 from "./consent/_shared/0.1/consent.js";
63
+ export * as ConsentApproveRequest_v0_1 from "./consent/approve-request/0.1/payload.js";
63
64
  export * as ConsentApproverList_v1_0 from "./consent/approver-list/1.0/payload.js";
64
65
  export * as ConsentApproverSet_v1_0 from "./consent/approver-set/1.0/payload.js";
65
66
  export * as ConsentDecision_v1_0 from "./consent/decision/1.0/payload.js";
@@ -234,6 +235,14 @@ export * as SealedEnvelopeShared_v0_3 from "./vault/_shared/0.3/sealed-envelope.
234
235
  export * as SessionBlobShared_v0_3 from "./vault/_shared/0.3/session-blob.js";
235
236
  export * as VaultEntryShared_v0_3 from "./vault/_shared/0.3/vault-entry.js";
236
237
  export * as VaultSecretShared_v0_3 from "./vault/_shared/0.3/vault-secret.js";
238
+ export * as VaultCredentialsArchive_v0_1 from "./vault/credentials/archive/0.1/payload.js";
239
+ export * as VaultCredentialsDelete_v0_1 from "./vault/credentials/delete/0.1/payload.js";
240
+ export * as VaultCredentialsGet_v0_1 from "./vault/credentials/get/0.1/payload.js";
241
+ export * as VaultCredentialsPurge_v0_1 from "./vault/credentials/purge/0.1/payload.js";
242
+ export * as VaultCredentialsQuery_v0_1 from "./vault/credentials/query/0.1/payload.js";
243
+ export * as VaultCredentialsReceive_v0_1 from "./vault/credentials/receive/0.1/payload.js";
244
+ export * as VaultCredentialsRestore_v0_1 from "./vault/credentials/restore/0.1/payload.js";
245
+ export * as VaultCredentialsUnarchive_v0_1 from "./vault/credentials/unarchive/0.1/payload.js";
237
246
  export * as VaultDelete_v0_1 from "./vault/delete/0.1/payload.js";
238
247
  export * as VaultGet_v0_1 from "./vault/get/0.1/payload.js";
239
248
  export * as VaultGet_v0_2 from "./vault/get/0.2/payload.js";
@@ -0,0 +1,217 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vault/credentials/archive/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Hide a stored credential from default query results and refuse it for presentation, reversibly.
11
+ */
12
+ export interface VaultCredentialsArchive {
13
+ /**
14
+ * Local handle from a query descriptor. Opaque; consumers must not derive or guess one.
15
+ */
16
+ id: string;
17
+ /**
18
+ * Free text recorded with the transition. Must not carry credential contents.
19
+ */
20
+ reason?: string;
21
+ /**
22
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
23
+ */
24
+ ext?: Ext;
25
+ }
26
+ export interface VaultCredentialsArchiveResponsePayload {
27
+ id: string;
28
+ /**
29
+ * State after the transition, echoed rather than left to be inferred from the verb.
30
+ */
31
+ lifecycle: "active" | "archived" | "deleted";
32
+ /**
33
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
34
+ */
35
+ ext?: Ext;
36
+ }
37
+
38
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
39
+ export type { Ext };
40
+
41
+ /** Trust Task type URI. */
42
+ export const TYPE_URI = "https://trusttasks.org/spec/vault/credentials/archive/0.1" as const;
43
+
44
+ /** Stable alias for this specification's request payload shape. */
45
+ export type Payload = VaultCredentialsArchive;
46
+
47
+ /** Trust Task response type URI (request type URI + "#response"). */
48
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vault/credentials/archive/0.1#response" as const;
49
+
50
+ /** Stable alias for this specification's success-response payload shape. */
51
+ export type Response = VaultCredentialsArchiveResponsePayload;
52
+
53
+ /**
54
+ * This specification's payload schema, as a value.
55
+ *
56
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
57
+ * rather than only as a `.json` file because TypeScript types are erased
58
+ * at runtime: without a schema a consumer has nothing to validate, and
59
+ * every REQUIRED payload member is optional in practice. Cross-file
60
+ * `$ref`s are already inlined, so it needs no resolver.
61
+ */
62
+ export const PAYLOAD_SCHEMA = {
63
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
64
+ "$id": "https://trusttasks.org/spec/vault/credentials/archive/0.1",
65
+ "title": "Vault Credentials — Archive",
66
+ "description": "Hide a stored credential from default query results and refuse it for presentation, reversibly.",
67
+ "type": "object",
68
+ "additionalProperties": false,
69
+ "required": [
70
+ "id"
71
+ ],
72
+ "properties": {
73
+ "id": {
74
+ "type": "string",
75
+ "minLength": 1,
76
+ "maxLength": 256,
77
+ "description": "Local handle from a query descriptor. Opaque; consumers must not derive or guess one."
78
+ },
79
+ "reason": {
80
+ "type": "string",
81
+ "minLength": 1,
82
+ "maxLength": 512,
83
+ "description": "Free text recorded with the transition. Must not carry credential contents."
84
+ },
85
+ "ext": {
86
+ "$ref": "#/$defs/Ext",
87
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
88
+ }
89
+ },
90
+ "$defs": {
91
+ "Response": {
92
+ "$anchor": "response",
93
+ "title": "Vault Credentials Archive — response payload",
94
+ "type": "object",
95
+ "additionalProperties": false,
96
+ "required": [
97
+ "id",
98
+ "lifecycle"
99
+ ],
100
+ "properties": {
101
+ "id": {
102
+ "type": "string",
103
+ "minLength": 1,
104
+ "maxLength": 256
105
+ },
106
+ "lifecycle": {
107
+ "$ref": "#/$defs/VaultLifecycle",
108
+ "description": "State after the transition, echoed rather than left to be inferred from the verb."
109
+ },
110
+ "ext": {
111
+ "$ref": "#/$defs/Ext",
112
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
113
+ }
114
+ }
115
+ },
116
+ "VaultLifecycle": {
117
+ "type": "string",
118
+ "enum": [
119
+ "active",
120
+ "archived",
121
+ "deleted"
122
+ ],
123
+ "description": "Archival state. Orthogonal to validity."
124
+ },
125
+ "Ext": {
126
+ "title": "Ext",
127
+ "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.",
128
+ "type": "object",
129
+ "minProperties": 1,
130
+ "additionalProperties": true,
131
+ "propertyNames": {
132
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
133
+ }
134
+ }
135
+ }
136
+ } as const;
137
+
138
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
139
+ export const RESPONSE_PAYLOAD_SCHEMA = {
140
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
141
+ "$ref": "#/$defs/Response",
142
+ "$defs": {
143
+ "Response": {
144
+ "$anchor": "response",
145
+ "title": "Vault Credentials Archive — response payload",
146
+ "type": "object",
147
+ "additionalProperties": false,
148
+ "required": [
149
+ "id",
150
+ "lifecycle"
151
+ ],
152
+ "properties": {
153
+ "id": {
154
+ "type": "string",
155
+ "minLength": 1,
156
+ "maxLength": 256
157
+ },
158
+ "lifecycle": {
159
+ "$ref": "#/$defs/VaultLifecycle",
160
+ "description": "State after the transition, echoed rather than left to be inferred from the verb."
161
+ },
162
+ "ext": {
163
+ "$ref": "#/$defs/Ext",
164
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
165
+ }
166
+ }
167
+ },
168
+ "VaultLifecycle": {
169
+ "type": "string",
170
+ "enum": [
171
+ "active",
172
+ "archived",
173
+ "deleted"
174
+ ],
175
+ "description": "Archival state. Orthogonal to validity."
176
+ },
177
+ "Ext": {
178
+ "title": "Ext",
179
+ "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.",
180
+ "type": "object",
181
+ "minProperties": 1,
182
+ "additionalProperties": true,
183
+ "propertyNames": {
184
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
185
+ }
186
+ }
187
+ }
188
+ } as const;
189
+
190
+ /**
191
+ * SPEC.md §7.2 policy for the request variant, from this specification's
192
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
193
+ * per-specification and cannot be derived from the document alone, and
194
+ * item 2 needs the schema this carries.
195
+ */
196
+ export const SPEC = {
197
+ typeUri: TYPE_URI,
198
+ isBearer: false,
199
+ isProofRequired: true,
200
+ isRecipientRequired: true,
201
+ isIssuedAtRequired: true,
202
+ payloadSchema: PAYLOAD_SCHEMA,
203
+ } as const;
204
+
205
+ /**
206
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
207
+ * tracks the *issuer* party's requirement because a response swaps the
208
+ * parties (§7.3 item 5).
209
+ */
210
+ export const RESPONSE_SPEC = {
211
+ typeUri: RESPONSE_TYPE_URI,
212
+ isBearer: false,
213
+ isProofRequired: true,
214
+ isRecipientRequired: true,
215
+ isIssuedAtRequired: true,
216
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
217
+ } as const;
@@ -0,0 +1,239 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vault/credentials/delete/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Move a stored credential to a recoverable tombstone, or erase it outright.
11
+ */
12
+ export interface VaultCredentialsDelete {
13
+ /**
14
+ * Local handle from a query descriptor. Opaque; consumers must not derive or guess one.
15
+ */
16
+ id: string;
17
+ /**
18
+ * Free text recorded with the transition. Must not carry credential contents.
19
+ */
20
+ reason?: string;
21
+ /**
22
+ * Erase immediately rather than tombstoning. Irrecoverable. Absent means false.
23
+ */
24
+ force?: boolean;
25
+ /**
26
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
27
+ */
28
+ ext?: Ext;
29
+ }
30
+ export interface VaultCredentialsDeleteResponsePayload {
31
+ id: string;
32
+ /**
33
+ * State after the transition, echoed rather than left to be inferred from the verb.
34
+ */
35
+ lifecycle: "active" | "archived" | "deleted";
36
+ /**
37
+ * Restore deadline. Present on the default path; absent when `force` was set, and its absence is how a consumer knows nothing can be restored.
38
+ */
39
+ graceUntil?: string;
40
+ /**
41
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
42
+ */
43
+ ext?: Ext;
44
+ }
45
+
46
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
47
+ export type { Ext };
48
+
49
+ /** Trust Task type URI. */
50
+ export const TYPE_URI = "https://trusttasks.org/spec/vault/credentials/delete/0.1" as const;
51
+
52
+ /** Stable alias for this specification's request payload shape. */
53
+ export type Payload = VaultCredentialsDelete;
54
+
55
+ /** Trust Task response type URI (request type URI + "#response"). */
56
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vault/credentials/delete/0.1#response" as const;
57
+
58
+ /** Stable alias for this specification's success-response payload shape. */
59
+ export type Response = VaultCredentialsDeleteResponsePayload;
60
+
61
+ /**
62
+ * This specification's payload schema, as a value.
63
+ *
64
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
65
+ * rather than only as a `.json` file because TypeScript types are erased
66
+ * at runtime: without a schema a consumer has nothing to validate, and
67
+ * every REQUIRED payload member is optional in practice. Cross-file
68
+ * `$ref`s are already inlined, so it needs no resolver.
69
+ */
70
+ export const PAYLOAD_SCHEMA = {
71
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
72
+ "$id": "https://trusttasks.org/spec/vault/credentials/delete/0.1",
73
+ "title": "Vault Credentials — Delete",
74
+ "description": "Move a stored credential to a recoverable tombstone, or erase it outright.",
75
+ "type": "object",
76
+ "additionalProperties": false,
77
+ "required": [
78
+ "id"
79
+ ],
80
+ "properties": {
81
+ "id": {
82
+ "type": "string",
83
+ "minLength": 1,
84
+ "maxLength": 256,
85
+ "description": "Local handle from a query descriptor. Opaque; consumers must not derive or guess one."
86
+ },
87
+ "reason": {
88
+ "type": "string",
89
+ "minLength": 1,
90
+ "maxLength": 512,
91
+ "description": "Free text recorded with the transition. Must not carry credential contents."
92
+ },
93
+ "force": {
94
+ "type": "boolean",
95
+ "description": "Erase immediately rather than tombstoning. Irrecoverable. Absent means false."
96
+ },
97
+ "ext": {
98
+ "$ref": "#/$defs/Ext",
99
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
100
+ }
101
+ },
102
+ "$defs": {
103
+ "Response": {
104
+ "$anchor": "response",
105
+ "title": "Vault Credentials Delete — response payload",
106
+ "type": "object",
107
+ "additionalProperties": false,
108
+ "required": [
109
+ "id",
110
+ "lifecycle"
111
+ ],
112
+ "properties": {
113
+ "id": {
114
+ "type": "string",
115
+ "minLength": 1,
116
+ "maxLength": 256
117
+ },
118
+ "lifecycle": {
119
+ "$ref": "#/$defs/VaultLifecycle",
120
+ "description": "State after the transition, echoed rather than left to be inferred from the verb."
121
+ },
122
+ "graceUntil": {
123
+ "type": "string",
124
+ "format": "date-time",
125
+ "description": "Restore deadline. Present on the default path; absent when `force` was set, and its absence is how a consumer knows nothing can be restored."
126
+ },
127
+ "ext": {
128
+ "$ref": "#/$defs/Ext",
129
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
130
+ }
131
+ }
132
+ },
133
+ "VaultLifecycle": {
134
+ "type": "string",
135
+ "enum": [
136
+ "active",
137
+ "archived",
138
+ "deleted"
139
+ ],
140
+ "description": "Archival state. Orthogonal to validity."
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
+ }
153
+ } as const;
154
+
155
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
156
+ export const RESPONSE_PAYLOAD_SCHEMA = {
157
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
158
+ "$ref": "#/$defs/Response",
159
+ "$defs": {
160
+ "Response": {
161
+ "$anchor": "response",
162
+ "title": "Vault Credentials Delete — response payload",
163
+ "type": "object",
164
+ "additionalProperties": false,
165
+ "required": [
166
+ "id",
167
+ "lifecycle"
168
+ ],
169
+ "properties": {
170
+ "id": {
171
+ "type": "string",
172
+ "minLength": 1,
173
+ "maxLength": 256
174
+ },
175
+ "lifecycle": {
176
+ "$ref": "#/$defs/VaultLifecycle",
177
+ "description": "State after the transition, echoed rather than left to be inferred from the verb."
178
+ },
179
+ "graceUntil": {
180
+ "type": "string",
181
+ "format": "date-time",
182
+ "description": "Restore deadline. Present on the default path; absent when `force` was set, and its absence is how a consumer knows nothing can be restored."
183
+ },
184
+ "ext": {
185
+ "$ref": "#/$defs/Ext",
186
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
187
+ }
188
+ }
189
+ },
190
+ "VaultLifecycle": {
191
+ "type": "string",
192
+ "enum": [
193
+ "active",
194
+ "archived",
195
+ "deleted"
196
+ ],
197
+ "description": "Archival state. Orthogonal to validity."
198
+ },
199
+ "Ext": {
200
+ "title": "Ext",
201
+ "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.",
202
+ "type": "object",
203
+ "minProperties": 1,
204
+ "additionalProperties": true,
205
+ "propertyNames": {
206
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
207
+ }
208
+ }
209
+ }
210
+ } as const;
211
+
212
+ /**
213
+ * SPEC.md §7.2 policy for the request variant, from this specification's
214
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
215
+ * per-specification and cannot be derived from the document alone, and
216
+ * item 2 needs the schema this carries.
217
+ */
218
+ export const SPEC = {
219
+ typeUri: TYPE_URI,
220
+ isBearer: false,
221
+ isProofRequired: true,
222
+ isRecipientRequired: true,
223
+ isIssuedAtRequired: true,
224
+ payloadSchema: PAYLOAD_SCHEMA,
225
+ } as const;
226
+
227
+ /**
228
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
229
+ * tracks the *issuer* party's requirement because a response swaps the
230
+ * parties (§7.3 item 5).
231
+ */
232
+ export const RESPONSE_SPEC = {
233
+ typeUri: RESPONSE_TYPE_URI,
234
+ isBearer: false,
235
+ isProofRequired: true,
236
+ isRecipientRequired: true,
237
+ isIssuedAtRequired: true,
238
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
239
+ } as const;