@openvtc/trust-tasks 0.21.5 → 0.21.7

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 CHANGED
@@ -11,6 +11,95 @@ The package versions over **its own API** — what a consumer compiles against
11
11
  not over `SPEC.md`. Below 1.0 a breaking change bumps the leading non-zero
12
12
  component.
13
13
 
14
+ ## 0.21.7 — 2026-09-27
15
+
16
+
17
+ ### Fixed
18
+
19
+ - **codegen**: Generate usable types for oneOf branches that use not (#665)
20
+
21
+ typify (0.6) merges a `oneOf` branch's own keywords into the untagged
22
+ enum variant it synthesizes for that branch. A bare `not: {"required":
23
+ ["x"]}` is a shape it handles directly — property `x` is simply absent
24
+ from that variant. Wrap the same exclusion in `anyOf` (the shape a
25
+ 3-way mutual-exclusion group needs, e.g.
26
+ auth/passkey/enroll/invite/update/0.1's role/expiresAt/extendBy) and
27
+ typify's merge instead produces an uninhabited `pub enum
28
+ PayloadVariant0 {}` for that branch, so a payload carrying only `role`
29
+ (plus `inviteId`) could never deserialize — and silently drops a
30
+ property required only by that branch from every *other* branch's
31
+ variant too, so `role` + `expiresAt` together also failed to
32
+ round-trip. auth/revoke-session/0.2 has the same three-way `not:
33
+ {anyOf: [...]}` shape and produced the same uninhabited nested type,
34
+ though there it never broke a valid document (no shared field to
35
+ drop).
36
+
37
+ Only conformance example exercised extendBy alone, which is why this
38
+ was never caught. Added role-only, expiresAt-only and role+expiresAt
39
+ examples to auth/passkey/enroll/invite/update/0.1's spec.md, one per
40
+ oneOf branch plus their combination.
41
+
42
+ Fixed with a new preprocessing pass in trust-tasks-codegen,
43
+ desugar_oneof_with_compound_not, which drops a oneOf combinator from
44
+ the copy of the schema handed to typify whenever any branch's not is
45
+ more than a single {"required": ["x"]} guard. Re-expressing the oneOf
46
+ as anyOf (at least one) plus a pairwise not (no two at once) -
47
+ oneOf's own JSON Schema definition - was tried first and does not
48
+ help: typify applies the identical broken merge to a not wrapping
49
+ anyOf/allOf regardless of which combinator carries it. The wire
50
+ schema (SCHEMA_JSON / ValidatedPayload::validate_value, and the
51
+ TypeScript/Go/Dart bindings, generated independently of typify) is
52
+ captured before this pass runs and is unaffected, so the actual
53
+ mutual-exclusion constraint is still enforced at runtime; only the
54
+ Rust type for the two affected specs becomes fully permissive, matching
55
+ what the other three languages already generate for this schema. A
56
+ plain discriminated oneOf (every branch's not, if any, a single
57
+ {"required": ["x"]}) is untouched and still renders as a clean Rust
58
+ enum.
59
+
60
+ Scanned every schema under specs/ for a oneOf/anyOf branch using not.
61
+ Only these two combine it with oneOf; the rest (auth/revoke-session/0.1,
62
+ vta/app-state/put/1.0, vta/app-state/put-many/1.0,
63
+ vtc/registry/sync-jobs/retry/0.1, credential-exchange/issue/0.1, and a
64
+ few uses of not outside any oneOf) were unaffected and are unchanged
65
+ after regenerating.
66
+
67
+ Regenerated all four bindings; only the two affected Rust modules
68
+ changed.
69
+
70
+ ## 0.21.6 — 2026-09-27
71
+
72
+
73
+ ### Added
74
+
75
+ - **vta**: Trust Tasks for the VTA's REST-only health, restore-status, session-revocation and wrapping-key routes (#663)
76
+
77
+ * feat(vta): Trust Tasks for the VTA's REST-only health, session-revocation and wrapping-key routes
78
+
79
+ Three Verifiable Trust Agent routes were reachable only over REST. Each
80
+ gets a Trust Task, so an agent serves it identically over TSP, DIDComm
81
+ and HTTPS.
82
+
83
+ - vta/health/details/0.1 replaces GET /health/details: version,
84
+ mediator, seal and at-rest encryption state, TEE status, TSP
85
+ advertisement, and the restore the agent's state derives from.
86
+ Public, anonymous, request proof OPTIONAL and response proof
87
+ REQUIRED, like vta/attestation/status/0.1.
88
+ - auth/revoke-session/0.2 replaces DELETE /auth/sessions?did=: adds a
89
+ `subject` form ending every session of a subject the producer could
90
+ withdraw the access of (a scoped administrator cannot reach an
91
+ unrestricted one), answers a refusal with permissionDenied, and drops
92
+ 0.1's `notOwner`, which contradicted 0.1's own non-disclosure rule.
93
+ Backwards-compatible: every 0.1 payload is a valid 0.2 payload.
94
+ - keys/import-wrapping-key/0.1 replaces GET /keys/import/wrapping-key:
95
+ a fresh, single-use, minutes-long key a producer seals a private key
96
+ to for keys/import's privateKeySealed carrier over a transport that
97
+ is not end to end. Returned as an Ed25519 did:key; the response proof
98
+ is REQUIRED because the TLS terminator the task routes around could
99
+ otherwise substitute its own key.
100
+
101
+ Rust, TypeScript, Go and Dart bindings regenerated.
102
+
14
103
  ## 0.21.5 — 2026-09-27
15
104
 
16
105
 
@@ -0,0 +1,347 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/auth/revoke-session/0.2/payload.schema.json
4
+ */
5
+ import type { Ext } from "../../../_shared/components.js";
6
+ /**
7
+ * Invalidate one named session, every session of the producer, or every session of a named subject the producer may manage. The auth service drops the targeted session(s); any future use of their access or refresh tokens MUST fail. Exactly one of `sessionId`, `all` and `subject` is present.
8
+ */
9
+ export type AuthRevokeSession = {
10
+ /**
11
+ * The session to revoke. Mutually exclusive with `all` and `subject`.
12
+ */
13
+ sessionId?: string;
14
+ /**
15
+ * When true, revoke every active session the consumer holds for the producer's own subject — equivalent to `subject` naming the producer. `false` targets nothing and is refused as malformedRequest; it stays schema-valid only because 0.1 admitted it. Mutually exclusive with `sessionId` and `subject`.
16
+ */
17
+ all?: boolean;
18
+ /**
19
+ * Revoke every active session the consumer holds for this subject. The producer's own identifier, or a subject whose access the producer could withdraw under the consumer's access-control policy — see Authorization. Mutually exclusive with `sessionId` and `all`.
20
+ */
21
+ subject?: string;
22
+ /**
23
+ * Optional human-readable rationale (e.g. "logout", "device-lost", "access-withdrawn"). Surfaced in audit logs; the framework imposes no vocabulary.
24
+ */
25
+ reason?: string;
26
+ /**
27
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
28
+ */
29
+ ext?: Ext;
30
+ } & {
31
+ [k: string]: unknown | undefined;
32
+ };
33
+ /**
34
+ * Acknowledgement carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/revoke-session/0.2#response.
35
+ */
36
+ export interface AuthRevokeSessionResponsePayload {
37
+ /**
38
+ * Number of sessions this request invalidated. Zero is a valid outcome: the named session was already gone, or the subject held no active sessions.
39
+ */
40
+ revokedCount: number;
41
+ /**
42
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
43
+ */
44
+ ext?: Ext;
45
+ }
46
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
47
+ export type { Ext };
48
+ /** Trust Task type URI. */
49
+ export declare const TYPE_URI: "https://trusttasks.org/spec/auth/revoke-session/0.2";
50
+ /** Stable alias for this specification's request payload shape. */
51
+ export type Payload = AuthRevokeSession;
52
+ /** Trust Task response type URI (request type URI + "#response"). */
53
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/auth/revoke-session/0.2#response";
54
+ /** Stable alias for this specification's success-response payload shape. */
55
+ export type Response = AuthRevokeSessionResponsePayload;
56
+ /**
57
+ * This specification's payload schema, as a value.
58
+ *
59
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
60
+ * rather than only as a `.json` file because TypeScript types are erased
61
+ * at runtime: without a schema a consumer has nothing to validate, and
62
+ * every REQUIRED payload member is optional in practice. Cross-file
63
+ * `$ref`s are already inlined, so it needs no resolver.
64
+ */
65
+ export declare const PAYLOAD_SCHEMA: {
66
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
67
+ readonly $id: "https://trusttasks.org/spec/auth/revoke-session/0.2";
68
+ readonly title: "Auth — Revoke Session";
69
+ readonly description: "Invalidate one named session, every session of the producer, or every session of a named subject the producer may manage. The auth service drops the targeted session(s); any future use of their access or refresh tokens MUST fail. Exactly one of `sessionId`, `all` and `subject` is present.";
70
+ readonly type: "object";
71
+ readonly additionalProperties: false;
72
+ readonly properties: {
73
+ readonly sessionId: {
74
+ readonly type: "string";
75
+ readonly minLength: 1;
76
+ readonly description: "The session to revoke. Mutually exclusive with `all` and `subject`.";
77
+ };
78
+ readonly all: {
79
+ readonly type: "boolean";
80
+ readonly description: "When true, revoke every active session the consumer holds for the producer's own subject — equivalent to `subject` naming the producer. `false` targets nothing and is refused as malformedRequest; it stays schema-valid only because 0.1 admitted it. Mutually exclusive with `sessionId` and `subject`.";
81
+ };
82
+ readonly subject: {
83
+ readonly type: "string";
84
+ readonly pattern: "^did:";
85
+ readonly maxLength: 2048;
86
+ readonly description: "Revoke every active session the consumer holds for this subject. The producer's own identifier, or a subject whose access the producer could withdraw under the consumer's access-control policy — see Authorization. Mutually exclusive with `sessionId` and `all`.";
87
+ };
88
+ readonly reason: {
89
+ readonly type: "string";
90
+ readonly maxLength: 1024;
91
+ readonly description: "Optional human-readable rationale (e.g. \"logout\", \"device-lost\", \"access-withdrawn\"). Surfaced in audit logs; the framework imposes no vocabulary.";
92
+ };
93
+ readonly ext: {
94
+ readonly $ref: "#/$defs/Ext";
95
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
96
+ };
97
+ };
98
+ readonly oneOf: readonly [{
99
+ readonly required: readonly ["sessionId"];
100
+ readonly not: {
101
+ readonly anyOf: readonly [{
102
+ readonly required: readonly ["all"];
103
+ }, {
104
+ readonly required: readonly ["subject"];
105
+ }];
106
+ };
107
+ }, {
108
+ readonly required: readonly ["all"];
109
+ readonly not: {
110
+ readonly anyOf: readonly [{
111
+ readonly required: readonly ["sessionId"];
112
+ }, {
113
+ readonly required: readonly ["subject"];
114
+ }];
115
+ };
116
+ }, {
117
+ readonly required: readonly ["subject"];
118
+ readonly not: {
119
+ readonly anyOf: readonly [{
120
+ readonly required: readonly ["sessionId"];
121
+ }, {
122
+ readonly required: readonly ["all"];
123
+ }];
124
+ };
125
+ }];
126
+ readonly $defs: {
127
+ readonly Response: {
128
+ readonly $anchor: "response";
129
+ readonly title: "Auth Revoke Session — response payload";
130
+ readonly description: "Acknowledgement carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/revoke-session/0.2#response.";
131
+ readonly type: "object";
132
+ readonly additionalProperties: false;
133
+ readonly required: readonly ["revokedCount"];
134
+ readonly properties: {
135
+ readonly revokedCount: {
136
+ readonly type: "integer";
137
+ readonly minimum: 0;
138
+ readonly description: "Number of sessions this request invalidated. Zero is a valid outcome: the named session was already gone, or the subject held no active sessions.";
139
+ };
140
+ readonly ext: {
141
+ readonly $ref: "#/$defs/Ext";
142
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
143
+ };
144
+ };
145
+ };
146
+ readonly Ext: {
147
+ readonly title: "Ext";
148
+ readonly 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.";
149
+ readonly type: "object";
150
+ readonly minProperties: 1;
151
+ readonly additionalProperties: true;
152
+ readonly propertyNames: {
153
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
154
+ };
155
+ };
156
+ };
157
+ };
158
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
159
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
160
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
161
+ readonly $ref: "#/$defs/Response";
162
+ readonly $defs: {
163
+ readonly Response: {
164
+ readonly $anchor: "response";
165
+ readonly title: "Auth Revoke Session — response payload";
166
+ readonly description: "Acknowledgement carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/revoke-session/0.2#response.";
167
+ readonly type: "object";
168
+ readonly additionalProperties: false;
169
+ readonly required: readonly ["revokedCount"];
170
+ readonly properties: {
171
+ readonly revokedCount: {
172
+ readonly type: "integer";
173
+ readonly minimum: 0;
174
+ readonly description: "Number of sessions this request invalidated. Zero is a valid outcome: the named session was already gone, or the subject held no active sessions.";
175
+ };
176
+ readonly ext: {
177
+ readonly $ref: "#/$defs/Ext";
178
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
179
+ };
180
+ };
181
+ };
182
+ readonly Ext: {
183
+ readonly title: "Ext";
184
+ readonly 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.";
185
+ readonly type: "object";
186
+ readonly minProperties: 1;
187
+ readonly additionalProperties: true;
188
+ readonly propertyNames: {
189
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
190
+ };
191
+ };
192
+ };
193
+ };
194
+ /**
195
+ * SPEC.md §7.2 policy for the request variant, from this specification's
196
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
197
+ * per-specification and cannot be derived from the document alone, and
198
+ * item 2 needs the schema this carries.
199
+ */
200
+ export declare const SPEC: {
201
+ readonly typeUri: "https://trusttasks.org/spec/auth/revoke-session/0.2";
202
+ readonly isBearer: false;
203
+ readonly isProofRequired: true;
204
+ readonly isRecipientRequired: true;
205
+ readonly isIssuedAtRequired: true;
206
+ readonly payloadSchema: {
207
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
208
+ readonly $id: "https://trusttasks.org/spec/auth/revoke-session/0.2";
209
+ readonly title: "Auth — Revoke Session";
210
+ readonly description: "Invalidate one named session, every session of the producer, or every session of a named subject the producer may manage. The auth service drops the targeted session(s); any future use of their access or refresh tokens MUST fail. Exactly one of `sessionId`, `all` and `subject` is present.";
211
+ readonly type: "object";
212
+ readonly additionalProperties: false;
213
+ readonly properties: {
214
+ readonly sessionId: {
215
+ readonly type: "string";
216
+ readonly minLength: 1;
217
+ readonly description: "The session to revoke. Mutually exclusive with `all` and `subject`.";
218
+ };
219
+ readonly all: {
220
+ readonly type: "boolean";
221
+ readonly description: "When true, revoke every active session the consumer holds for the producer's own subject — equivalent to `subject` naming the producer. `false` targets nothing and is refused as malformedRequest; it stays schema-valid only because 0.1 admitted it. Mutually exclusive with `sessionId` and `subject`.";
222
+ };
223
+ readonly subject: {
224
+ readonly type: "string";
225
+ readonly pattern: "^did:";
226
+ readonly maxLength: 2048;
227
+ readonly description: "Revoke every active session the consumer holds for this subject. The producer's own identifier, or a subject whose access the producer could withdraw under the consumer's access-control policy — see Authorization. Mutually exclusive with `sessionId` and `all`.";
228
+ };
229
+ readonly reason: {
230
+ readonly type: "string";
231
+ readonly maxLength: 1024;
232
+ readonly description: "Optional human-readable rationale (e.g. \"logout\", \"device-lost\", \"access-withdrawn\"). Surfaced in audit logs; the framework imposes no vocabulary.";
233
+ };
234
+ readonly ext: {
235
+ readonly $ref: "#/$defs/Ext";
236
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
237
+ };
238
+ };
239
+ readonly oneOf: readonly [{
240
+ readonly required: readonly ["sessionId"];
241
+ readonly not: {
242
+ readonly anyOf: readonly [{
243
+ readonly required: readonly ["all"];
244
+ }, {
245
+ readonly required: readonly ["subject"];
246
+ }];
247
+ };
248
+ }, {
249
+ readonly required: readonly ["all"];
250
+ readonly not: {
251
+ readonly anyOf: readonly [{
252
+ readonly required: readonly ["sessionId"];
253
+ }, {
254
+ readonly required: readonly ["subject"];
255
+ }];
256
+ };
257
+ }, {
258
+ readonly required: readonly ["subject"];
259
+ readonly not: {
260
+ readonly anyOf: readonly [{
261
+ readonly required: readonly ["sessionId"];
262
+ }, {
263
+ readonly required: readonly ["all"];
264
+ }];
265
+ };
266
+ }];
267
+ readonly $defs: {
268
+ readonly Response: {
269
+ readonly $anchor: "response";
270
+ readonly title: "Auth Revoke Session — response payload";
271
+ readonly description: "Acknowledgement carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/revoke-session/0.2#response.";
272
+ readonly type: "object";
273
+ readonly additionalProperties: false;
274
+ readonly required: readonly ["revokedCount"];
275
+ readonly properties: {
276
+ readonly revokedCount: {
277
+ readonly type: "integer";
278
+ readonly minimum: 0;
279
+ readonly description: "Number of sessions this request invalidated. Zero is a valid outcome: the named session was already gone, or the subject held no active sessions.";
280
+ };
281
+ readonly ext: {
282
+ readonly $ref: "#/$defs/Ext";
283
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
284
+ };
285
+ };
286
+ };
287
+ readonly Ext: {
288
+ readonly title: "Ext";
289
+ readonly 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.";
290
+ readonly type: "object";
291
+ readonly minProperties: 1;
292
+ readonly additionalProperties: true;
293
+ readonly propertyNames: {
294
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
295
+ };
296
+ };
297
+ };
298
+ };
299
+ };
300
+ /**
301
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
302
+ * tracks the *issuer* party's requirement because a response swaps the
303
+ * parties (§7.3 item 5).
304
+ */
305
+ export declare const RESPONSE_SPEC: {
306
+ readonly typeUri: "https://trusttasks.org/spec/auth/revoke-session/0.2#response";
307
+ readonly isBearer: false;
308
+ readonly isProofRequired: true;
309
+ readonly isRecipientRequired: true;
310
+ readonly isIssuedAtRequired: true;
311
+ readonly payloadSchema: {
312
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
313
+ readonly $ref: "#/$defs/Response";
314
+ readonly $defs: {
315
+ readonly Response: {
316
+ readonly $anchor: "response";
317
+ readonly title: "Auth Revoke Session — response payload";
318
+ readonly description: "Acknowledgement carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/revoke-session/0.2#response.";
319
+ readonly type: "object";
320
+ readonly additionalProperties: false;
321
+ readonly required: readonly ["revokedCount"];
322
+ readonly properties: {
323
+ readonly revokedCount: {
324
+ readonly type: "integer";
325
+ readonly minimum: 0;
326
+ readonly description: "Number of sessions this request invalidated. Zero is a valid outcome: the named session was already gone, or the subject held no active sessions.";
327
+ };
328
+ readonly ext: {
329
+ readonly $ref: "#/$defs/Ext";
330
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
331
+ };
332
+ };
333
+ };
334
+ readonly Ext: {
335
+ readonly title: "Ext";
336
+ readonly 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.";
337
+ readonly type: "object";
338
+ readonly minProperties: 1;
339
+ readonly additionalProperties: true;
340
+ readonly propertyNames: {
341
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
342
+ };
343
+ };
344
+ };
345
+ };
346
+ };
347
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../src/auth/revoke-session/0.2/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AAG1D;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX,GAAG;IACF,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,GAAG,EAAE,CAAC;AAEpB,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,qDAA8D,CAAC;AAEvF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,iBAAiB,CAAC;AAExC,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,8DAAuE,CAAC;AAEzG,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AAExD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6HjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoC1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
@@ -0,0 +1,209 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/auth/revoke-session/0.2/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/auth/revoke-session/0.2";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/auth/revoke-session/0.2#response";
9
+ /**
10
+ * This specification's payload schema, as a value.
11
+ *
12
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
13
+ * rather than only as a `.json` file because TypeScript types are erased
14
+ * at runtime: without a schema a consumer has nothing to validate, and
15
+ * every REQUIRED payload member is optional in practice. Cross-file
16
+ * `$ref`s are already inlined, so it needs no resolver.
17
+ */
18
+ export const PAYLOAD_SCHEMA = {
19
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
20
+ "$id": "https://trusttasks.org/spec/auth/revoke-session/0.2",
21
+ "title": "Auth — Revoke Session",
22
+ "description": "Invalidate one named session, every session of the producer, or every session of a named subject the producer may manage. The auth service drops the targeted session(s); any future use of their access or refresh tokens MUST fail. Exactly one of `sessionId`, `all` and `subject` is present.",
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "properties": {
26
+ "sessionId": {
27
+ "type": "string",
28
+ "minLength": 1,
29
+ "description": "The session to revoke. Mutually exclusive with `all` and `subject`."
30
+ },
31
+ "all": {
32
+ "type": "boolean",
33
+ "description": "When true, revoke every active session the consumer holds for the producer's own subject — equivalent to `subject` naming the producer. `false` targets nothing and is refused as malformedRequest; it stays schema-valid only because 0.1 admitted it. Mutually exclusive with `sessionId` and `subject`."
34
+ },
35
+ "subject": {
36
+ "type": "string",
37
+ "pattern": "^did:",
38
+ "maxLength": 2048,
39
+ "description": "Revoke every active session the consumer holds for this subject. The producer's own identifier, or a subject whose access the producer could withdraw under the consumer's access-control policy — see Authorization. Mutually exclusive with `sessionId` and `all`."
40
+ },
41
+ "reason": {
42
+ "type": "string",
43
+ "maxLength": 1024,
44
+ "description": "Optional human-readable rationale (e.g. \"logout\", \"device-lost\", \"access-withdrawn\"). Surfaced in audit logs; the framework imposes no vocabulary."
45
+ },
46
+ "ext": {
47
+ "$ref": "#/$defs/Ext",
48
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
49
+ }
50
+ },
51
+ "oneOf": [
52
+ {
53
+ "required": [
54
+ "sessionId"
55
+ ],
56
+ "not": {
57
+ "anyOf": [
58
+ {
59
+ "required": [
60
+ "all"
61
+ ]
62
+ },
63
+ {
64
+ "required": [
65
+ "subject"
66
+ ]
67
+ }
68
+ ]
69
+ }
70
+ },
71
+ {
72
+ "required": [
73
+ "all"
74
+ ],
75
+ "not": {
76
+ "anyOf": [
77
+ {
78
+ "required": [
79
+ "sessionId"
80
+ ]
81
+ },
82
+ {
83
+ "required": [
84
+ "subject"
85
+ ]
86
+ }
87
+ ]
88
+ }
89
+ },
90
+ {
91
+ "required": [
92
+ "subject"
93
+ ],
94
+ "not": {
95
+ "anyOf": [
96
+ {
97
+ "required": [
98
+ "sessionId"
99
+ ]
100
+ },
101
+ {
102
+ "required": [
103
+ "all"
104
+ ]
105
+ }
106
+ ]
107
+ }
108
+ }
109
+ ],
110
+ "$defs": {
111
+ "Response": {
112
+ "$anchor": "response",
113
+ "title": "Auth Revoke Session — response payload",
114
+ "description": "Acknowledgement carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/revoke-session/0.2#response.",
115
+ "type": "object",
116
+ "additionalProperties": false,
117
+ "required": [
118
+ "revokedCount"
119
+ ],
120
+ "properties": {
121
+ "revokedCount": {
122
+ "type": "integer",
123
+ "minimum": 0,
124
+ "description": "Number of sessions this request invalidated. Zero is a valid outcome: the named session was already gone, or the subject held no active sessions."
125
+ },
126
+ "ext": {
127
+ "$ref": "#/$defs/Ext",
128
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
129
+ }
130
+ }
131
+ },
132
+ "Ext": {
133
+ "title": "Ext",
134
+ "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.",
135
+ "type": "object",
136
+ "minProperties": 1,
137
+ "additionalProperties": true,
138
+ "propertyNames": {
139
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
140
+ }
141
+ }
142
+ }
143
+ };
144
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
145
+ export const RESPONSE_PAYLOAD_SCHEMA = {
146
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
147
+ "$ref": "#/$defs/Response",
148
+ "$defs": {
149
+ "Response": {
150
+ "$anchor": "response",
151
+ "title": "Auth Revoke Session — response payload",
152
+ "description": "Acknowledgement carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/revoke-session/0.2#response.",
153
+ "type": "object",
154
+ "additionalProperties": false,
155
+ "required": [
156
+ "revokedCount"
157
+ ],
158
+ "properties": {
159
+ "revokedCount": {
160
+ "type": "integer",
161
+ "minimum": 0,
162
+ "description": "Number of sessions this request invalidated. Zero is a valid outcome: the named session was already gone, or the subject held no active sessions."
163
+ },
164
+ "ext": {
165
+ "$ref": "#/$defs/Ext",
166
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
167
+ }
168
+ }
169
+ },
170
+ "Ext": {
171
+ "title": "Ext",
172
+ "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.",
173
+ "type": "object",
174
+ "minProperties": 1,
175
+ "additionalProperties": true,
176
+ "propertyNames": {
177
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
178
+ }
179
+ }
180
+ }
181
+ };
182
+ /**
183
+ * SPEC.md §7.2 policy for the request variant, from this specification's
184
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
185
+ * per-specification and cannot be derived from the document alone, and
186
+ * item 2 needs the schema this carries.
187
+ */
188
+ export const SPEC = {
189
+ typeUri: TYPE_URI,
190
+ isBearer: false,
191
+ isProofRequired: true,
192
+ isRecipientRequired: true,
193
+ isIssuedAtRequired: true,
194
+ payloadSchema: PAYLOAD_SCHEMA,
195
+ };
196
+ /**
197
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
198
+ * tracks the *issuer* party's requirement because a response swaps the
199
+ * parties (§7.3 item 5).
200
+ */
201
+ export const RESPONSE_SPEC = {
202
+ typeUri: RESPONSE_TYPE_URI,
203
+ isBearer: false,
204
+ isProofRequired: true,
205
+ isRecipientRequired: true,
206
+ isIssuedAtRequired: true,
207
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
208
+ };
209
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../src/auth/revoke-session/0.2/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkDH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,qDAA8D,CAAC;AAKvF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,8DAAuE,CAAC;AAKzG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,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