@openvtc/trust-tasks 0.10.0 → 0.12.0

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 (51) hide show
  1. package/dist/index.d.ts +9 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +9 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/vta/_shared/0.1/service.d.ts +11 -0
  6. package/dist/vta/_shared/0.1/service.d.ts.map +1 -0
  7. package/dist/vta/_shared/0.1/service.js +6 -0
  8. package/dist/vta/_shared/0.1/service.js.map +1 -0
  9. package/dist/vta/services/disable/1.0/payload.d.ts +452 -0
  10. package/dist/vta/services/disable/1.0/payload.d.ts.map +1 -0
  11. package/dist/vta/services/disable/1.0/payload.js +240 -0
  12. package/dist/vta/services/disable/1.0/payload.js.map +1 -0
  13. package/dist/vta/services/drain/cancel/1.0/payload.d.ts +234 -0
  14. package/dist/vta/services/drain/cancel/1.0/payload.d.ts.map +1 -0
  15. package/dist/vta/services/drain/cancel/1.0/payload.js +131 -0
  16. package/dist/vta/services/drain/cancel/1.0/payload.js.map +1 -0
  17. package/dist/vta/services/drain/list/1.0/payload.d.ts +352 -0
  18. package/dist/vta/services/drain/list/1.0/payload.d.ts.map +1 -0
  19. package/dist/vta/services/drain/list/1.0/payload.js +189 -0
  20. package/dist/vta/services/drain/list/1.0/payload.js.map +1 -0
  21. package/dist/vta/services/enable/1.0/payload.d.ts +511 -0
  22. package/dist/vta/services/enable/1.0/payload.d.ts.map +1 -0
  23. package/dist/vta/services/enable/1.0/payload.js +262 -0
  24. package/dist/vta/services/enable/1.0/payload.js.map +1 -0
  25. package/dist/vta/services/get/1.0/payload.d.ts +399 -0
  26. package/dist/vta/services/get/1.0/payload.d.ts.map +1 -0
  27. package/dist/vta/services/get/1.0/payload.js +219 -0
  28. package/dist/vta/services/get/1.0/payload.js.map +1 -0
  29. package/dist/vta/services/list/1.0/payload.d.ts +409 -0
  30. package/dist/vta/services/list/1.0/payload.d.ts.map +1 -0
  31. package/dist/vta/services/list/1.0/payload.js +221 -0
  32. package/dist/vta/services/list/1.0/payload.js.map +1 -0
  33. package/dist/vta/services/rollback/1.0/payload.d.ts +458 -0
  34. package/dist/vta/services/rollback/1.0/payload.d.ts.map +1 -0
  35. package/dist/vta/services/rollback/1.0/payload.js +251 -0
  36. package/dist/vta/services/rollback/1.0/payload.js.map +1 -0
  37. package/dist/vta/services/update/1.0/payload.d.ts +511 -0
  38. package/dist/vta/services/update/1.0/payload.d.ts.map +1 -0
  39. package/dist/vta/services/update/1.0/payload.js +262 -0
  40. package/dist/vta/services/update/1.0/payload.js.map +1 -0
  41. package/package.json +1 -1
  42. package/src/index.ts +9 -0
  43. package/src/vta/_shared/0.1/service.ts +11 -0
  44. package/src/vta/services/disable/1.0/payload.ts +311 -0
  45. package/src/vta/services/drain/cancel/1.0/payload.ts +169 -0
  46. package/src/vta/services/drain/list/1.0/payload.ts +241 -0
  47. package/src/vta/services/enable/1.0/payload.ts +350 -0
  48. package/src/vta/services/get/1.0/payload.ts +279 -0
  49. package/src/vta/services/list/1.0/payload.ts +283 -0
  50. package/src/vta/services/rollback/1.0/payload.ts +322 -0
  51. package/src/vta/services/update/1.0/payload.ts +350 -0
@@ -0,0 +1,511 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/services/update/1.0/payload.schema.json
4
+ */
5
+ /**
6
+ * Which transport a task is acting on. This is the discriminator: it selects which member of `config` is meaningful, and a payload naming one kind with another's config is malformed rather than merely ignored.
7
+ */
8
+ export type ServiceKind = "didcomm" | "rest" | "tsp" | "webauthn";
9
+ /**
10
+ * Request payload for vta/services/update. Replaces the settings on a transport that is already advertised. Refused when the transport is not currently enabled — that case is `enable`, and conflating the two would let a typo silently advertise a service the operator meant to change.
11
+ */
12
+ export interface VTAServicesUpdatePayload {
13
+ service: ServiceKind;
14
+ /**
15
+ * Kind-specific settings. Which member applies is decided by `service`, and the two must agree — a `rest` request carrying `mediatorDid` is malformed, not a request with an ignored field. `didcomm` and `tsp` take `mediatorDid`; `rest` and `webauthn` take `url`.
16
+ */
17
+ config: {
18
+ /**
19
+ * Mediator to route through. Applies to `didcomm` and `tsp`.
20
+ */
21
+ mediatorDid?: string;
22
+ /**
23
+ * Endpoint to advertise. Applies to `rest` and `webauthn`. MUST be `https://`, with no fragment and no userinfo — the agent refuses anything else, because this value ends up in a signed DID document that clients will fetch.
24
+ */
25
+ url?: string;
26
+ /**
27
+ * `didcomm` only: skip the mediator handshake except for DID resolution. Absent means the handshake runs, which is the safe reading — this carries no schema-level default on purpose, because a default would materialise the field into a `rest` or `webauthn` config where it has no meaning. The handshake is what proves the mediator is reachable and willing, so forcing past it can advertise a mediator that cannot actually deliver.
28
+ */
29
+ force?: boolean;
30
+ /**
31
+ * `didcomm` only: trust-ping round-trip budget. Default 10.
32
+ */
33
+ handshakeTimeoutSecs?: number;
34
+ };
35
+ ext?: Ext;
36
+ }
37
+ /**
38
+ * 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.
39
+ */
40
+ export interface Ext {
41
+ [k: string]: unknown | undefined;
42
+ }
43
+ /**
44
+ * Success response to vta/services/update. Type https://trusttasks.org/spec/vta/services/update/1.0#response.
45
+ */
46
+ export interface VTAServicesUpdateResponsePayload {
47
+ result: ServiceMutationResult;
48
+ ext?: Ext;
49
+ }
50
+ /**
51
+ * The outcome of a change to an advertised service. Every member describes the **log entry the change produced**, because that is what the change actually is: the agent's DID document is the record, and a consumer that treats the response as a mere acknowledgement will miss that a redeploy may be required.
52
+ */
53
+ export interface ServiceMutationResult {
54
+ /**
55
+ * Version id of the new did:webvh log entry this change wrote. Joins the change to the document's history.
56
+ */
57
+ logEntryVersionId: string;
58
+ /**
59
+ * RFC 3339 instant the change took effect — the same instant stamped on the new log entry.
60
+ */
61
+ effectiveAt: string;
62
+ /**
63
+ * Present when the change scheduled a DIDComm drain. Its absence means no drain was scheduled, NOT that a drain finished instantly: a consumer reporting 'done' on an absent value would be right, and one reporting it on a present value would be wrong.
64
+ */
65
+ drainUntil?: string;
66
+ /**
67
+ * The mediator being drained, when `drainUntil` is present.
68
+ */
69
+ drainingMediator?: string;
70
+ /**
71
+ * The agent's own DID — subject of the log entry this change wrote. Carried so a caller can follow up without a second round trip.
72
+ */
73
+ vtaDid?: string;
74
+ /**
75
+ * True when the agent's DID is self-hosted. **The change is persisted locally but NOT published**: the operator must fetch the updated `did.jsonl` and redeploy before any verifier sees it. A consumer that ignores this reports success for a change no one else can observe yet.
76
+ */
77
+ serverless?: boolean;
78
+ ext?: Ext;
79
+ }
80
+ /** Trust Task type URI. */
81
+ export declare const TYPE_URI: "https://trusttasks.org/spec/vta/services/update/1.0";
82
+ /** Stable alias for this specification's request payload shape. */
83
+ export type Payload = VTAServicesUpdatePayload;
84
+ /** Trust Task response type URI (request type URI + "#response"). */
85
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vta/services/update/1.0#response";
86
+ /** Stable alias for this specification's success-response payload shape. */
87
+ export type Response = VTAServicesUpdateResponsePayload;
88
+ /**
89
+ * This specification's payload schema, as a value.
90
+ *
91
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
92
+ * rather than only as a `.json` file because TypeScript types are erased
93
+ * at runtime: without a schema a consumer has nothing to validate, and
94
+ * every REQUIRED payload member is optional in practice. Cross-file
95
+ * `$ref`s are already inlined, so it needs no resolver.
96
+ */
97
+ export declare const PAYLOAD_SCHEMA: {
98
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
99
+ readonly $id: "https://trusttasks.org/spec/vta/services/update/1.0";
100
+ readonly title: "VTA Services — Update — payload";
101
+ readonly description: "Request payload for vta/services/update. Replaces the settings on a transport that is already advertised. Refused when the transport is not currently enabled — that case is `enable`, and conflating the two would let a typo silently advertise a service the operator meant to change.";
102
+ readonly type: "object";
103
+ readonly additionalProperties: false;
104
+ readonly required: readonly ["service", "config"];
105
+ readonly properties: {
106
+ readonly service: {
107
+ readonly $ref: "#/$defs/ServiceKind";
108
+ };
109
+ readonly config: {
110
+ readonly type: "object";
111
+ readonly additionalProperties: false;
112
+ readonly description: "Kind-specific settings. Which member applies is decided by `service`, and the two must agree — a `rest` request carrying `mediatorDid` is malformed, not a request with an ignored field. `didcomm` and `tsp` take `mediatorDid`; `rest` and `webauthn` take `url`.";
113
+ readonly properties: {
114
+ readonly mediatorDid: {
115
+ readonly type: "string";
116
+ readonly minLength: 1;
117
+ readonly description: "Mediator to route through. Applies to `didcomm` and `tsp`.";
118
+ };
119
+ readonly url: {
120
+ readonly type: "string";
121
+ readonly minLength: 1;
122
+ readonly description: "Endpoint to advertise. Applies to `rest` and `webauthn`. MUST be `https://`, with no fragment and no userinfo — the agent refuses anything else, because this value ends up in a signed DID document that clients will fetch.";
123
+ };
124
+ readonly force: {
125
+ readonly type: "boolean";
126
+ readonly description: "`didcomm` only: skip the mediator handshake except for DID resolution. Absent means the handshake runs, which is the safe reading — this carries no schema-level default on purpose, because a default would materialise the field into a `rest` or `webauthn` config where it has no meaning. The handshake is what proves the mediator is reachable and willing, so forcing past it can advertise a mediator that cannot actually deliver.";
127
+ };
128
+ readonly handshakeTimeoutSecs: {
129
+ readonly type: "integer";
130
+ readonly minimum: 1;
131
+ readonly description: "`didcomm` only: trust-ping round-trip budget. Default 10.";
132
+ };
133
+ };
134
+ };
135
+ readonly ext: {
136
+ readonly $ref: "#/$defs/Ext";
137
+ };
138
+ };
139
+ readonly $defs: {
140
+ readonly Response: {
141
+ readonly $anchor: "response";
142
+ readonly title: "VTA Services — Update — response payload";
143
+ readonly description: "Success response to vta/services/update. Type https://trusttasks.org/spec/vta/services/update/1.0#response.";
144
+ readonly type: "object";
145
+ readonly additionalProperties: false;
146
+ readonly required: readonly ["result"];
147
+ readonly properties: {
148
+ readonly result: {
149
+ readonly $ref: "#/$defs/ServiceMutationResult";
150
+ };
151
+ readonly ext: {
152
+ readonly $ref: "#/$defs/Ext";
153
+ };
154
+ };
155
+ };
156
+ readonly Ext: {
157
+ readonly title: "Ext";
158
+ 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.";
159
+ readonly type: "object";
160
+ readonly minProperties: 1;
161
+ readonly additionalProperties: true;
162
+ readonly propertyNames: {
163
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
164
+ };
165
+ };
166
+ readonly ServiceMutationResult: {
167
+ readonly title: "ServiceMutationResult";
168
+ readonly description: "The outcome of a change to an advertised service. Every member describes the **log entry the change produced**, because that is what the change actually is: the agent's DID document is the record, and a consumer that treats the response as a mere acknowledgement will miss that a redeploy may be required.";
169
+ readonly type: "object";
170
+ readonly additionalProperties: false;
171
+ readonly required: readonly ["logEntryVersionId", "effectiveAt"];
172
+ readonly properties: {
173
+ readonly logEntryVersionId: {
174
+ readonly type: "string";
175
+ readonly minLength: 1;
176
+ readonly description: "Version id of the new did:webvh log entry this change wrote. Joins the change to the document's history.";
177
+ };
178
+ readonly effectiveAt: {
179
+ readonly type: "string";
180
+ readonly format: "date-time";
181
+ readonly description: "RFC 3339 instant the change took effect — the same instant stamped on the new log entry.";
182
+ };
183
+ readonly drainUntil: {
184
+ readonly type: "string";
185
+ readonly format: "date-time";
186
+ readonly description: "Present when the change scheduled a DIDComm drain. Its absence means no drain was scheduled, NOT that a drain finished instantly: a consumer reporting 'done' on an absent value would be right, and one reporting it on a present value would be wrong.";
187
+ };
188
+ readonly drainingMediator: {
189
+ readonly type: "string";
190
+ readonly description: "The mediator being drained, when `drainUntil` is present.";
191
+ };
192
+ readonly vtaDid: {
193
+ readonly type: "string";
194
+ readonly description: "The agent's own DID — subject of the log entry this change wrote. Carried so a caller can follow up without a second round trip.";
195
+ };
196
+ readonly serverless: {
197
+ readonly type: "boolean";
198
+ readonly description: "True when the agent's DID is self-hosted. **The change is persisted locally but NOT published**: the operator must fetch the updated `did.jsonl` and redeploy before any verifier sees it. A consumer that ignores this reports success for a change no one else can observe yet.";
199
+ readonly default: false;
200
+ };
201
+ readonly ext: {
202
+ readonly $ref: "#/$defs/Ext";
203
+ };
204
+ };
205
+ };
206
+ readonly ServiceKind: {
207
+ readonly title: "ServiceKind";
208
+ readonly description: "Which transport a task is acting on. This is the discriminator: it selects which member of `config` is meaningful, and a payload naming one kind with another's config is malformed rather than merely ignored.";
209
+ readonly type: "string";
210
+ readonly enum: readonly ["didcomm", "rest", "tsp", "webauthn"];
211
+ };
212
+ };
213
+ };
214
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
215
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
216
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
217
+ readonly $ref: "#/$defs/Response";
218
+ readonly $defs: {
219
+ readonly Response: {
220
+ readonly $anchor: "response";
221
+ readonly title: "VTA Services — Update — response payload";
222
+ readonly description: "Success response to vta/services/update. Type https://trusttasks.org/spec/vta/services/update/1.0#response.";
223
+ readonly type: "object";
224
+ readonly additionalProperties: false;
225
+ readonly required: readonly ["result"];
226
+ readonly properties: {
227
+ readonly result: {
228
+ readonly $ref: "#/$defs/ServiceMutationResult";
229
+ };
230
+ readonly ext: {
231
+ readonly $ref: "#/$defs/Ext";
232
+ };
233
+ };
234
+ };
235
+ readonly Ext: {
236
+ readonly title: "Ext";
237
+ 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.";
238
+ readonly type: "object";
239
+ readonly minProperties: 1;
240
+ readonly additionalProperties: true;
241
+ readonly propertyNames: {
242
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
243
+ };
244
+ };
245
+ readonly ServiceMutationResult: {
246
+ readonly title: "ServiceMutationResult";
247
+ readonly description: "The outcome of a change to an advertised service. Every member describes the **log entry the change produced**, because that is what the change actually is: the agent's DID document is the record, and a consumer that treats the response as a mere acknowledgement will miss that a redeploy may be required.";
248
+ readonly type: "object";
249
+ readonly additionalProperties: false;
250
+ readonly required: readonly ["logEntryVersionId", "effectiveAt"];
251
+ readonly properties: {
252
+ readonly logEntryVersionId: {
253
+ readonly type: "string";
254
+ readonly minLength: 1;
255
+ readonly description: "Version id of the new did:webvh log entry this change wrote. Joins the change to the document's history.";
256
+ };
257
+ readonly effectiveAt: {
258
+ readonly type: "string";
259
+ readonly format: "date-time";
260
+ readonly description: "RFC 3339 instant the change took effect — the same instant stamped on the new log entry.";
261
+ };
262
+ readonly drainUntil: {
263
+ readonly type: "string";
264
+ readonly format: "date-time";
265
+ readonly description: "Present when the change scheduled a DIDComm drain. Its absence means no drain was scheduled, NOT that a drain finished instantly: a consumer reporting 'done' on an absent value would be right, and one reporting it on a present value would be wrong.";
266
+ };
267
+ readonly drainingMediator: {
268
+ readonly type: "string";
269
+ readonly description: "The mediator being drained, when `drainUntil` is present.";
270
+ };
271
+ readonly vtaDid: {
272
+ readonly type: "string";
273
+ readonly description: "The agent's own DID — subject of the log entry this change wrote. Carried so a caller can follow up without a second round trip.";
274
+ };
275
+ readonly serverless: {
276
+ readonly type: "boolean";
277
+ readonly description: "True when the agent's DID is self-hosted. **The change is persisted locally but NOT published**: the operator must fetch the updated `did.jsonl` and redeploy before any verifier sees it. A consumer that ignores this reports success for a change no one else can observe yet.";
278
+ readonly default: false;
279
+ };
280
+ readonly ext: {
281
+ readonly $ref: "#/$defs/Ext";
282
+ };
283
+ };
284
+ };
285
+ readonly ServiceKind: {
286
+ readonly title: "ServiceKind";
287
+ readonly description: "Which transport a task is acting on. This is the discriminator: it selects which member of `config` is meaningful, and a payload naming one kind with another's config is malformed rather than merely ignored.";
288
+ readonly type: "string";
289
+ readonly enum: readonly ["didcomm", "rest", "tsp", "webauthn"];
290
+ };
291
+ };
292
+ };
293
+ /**
294
+ * SPEC.md §7.2 policy for the request variant, from this specification's
295
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
296
+ * per-specification and cannot be derived from the document alone, and
297
+ * item 2 needs the schema this carries.
298
+ */
299
+ export declare const SPEC: {
300
+ readonly typeUri: "https://trusttasks.org/spec/vta/services/update/1.0";
301
+ readonly isBearer: false;
302
+ readonly isProofRequired: true;
303
+ readonly isRecipientRequired: true;
304
+ readonly payloadSchema: {
305
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
306
+ readonly $id: "https://trusttasks.org/spec/vta/services/update/1.0";
307
+ readonly title: "VTA Services — Update — payload";
308
+ readonly description: "Request payload for vta/services/update. Replaces the settings on a transport that is already advertised. Refused when the transport is not currently enabled — that case is `enable`, and conflating the two would let a typo silently advertise a service the operator meant to change.";
309
+ readonly type: "object";
310
+ readonly additionalProperties: false;
311
+ readonly required: readonly ["service", "config"];
312
+ readonly properties: {
313
+ readonly service: {
314
+ readonly $ref: "#/$defs/ServiceKind";
315
+ };
316
+ readonly config: {
317
+ readonly type: "object";
318
+ readonly additionalProperties: false;
319
+ readonly description: "Kind-specific settings. Which member applies is decided by `service`, and the two must agree — a `rest` request carrying `mediatorDid` is malformed, not a request with an ignored field. `didcomm` and `tsp` take `mediatorDid`; `rest` and `webauthn` take `url`.";
320
+ readonly properties: {
321
+ readonly mediatorDid: {
322
+ readonly type: "string";
323
+ readonly minLength: 1;
324
+ readonly description: "Mediator to route through. Applies to `didcomm` and `tsp`.";
325
+ };
326
+ readonly url: {
327
+ readonly type: "string";
328
+ readonly minLength: 1;
329
+ readonly description: "Endpoint to advertise. Applies to `rest` and `webauthn`. MUST be `https://`, with no fragment and no userinfo — the agent refuses anything else, because this value ends up in a signed DID document that clients will fetch.";
330
+ };
331
+ readonly force: {
332
+ readonly type: "boolean";
333
+ readonly description: "`didcomm` only: skip the mediator handshake except for DID resolution. Absent means the handshake runs, which is the safe reading — this carries no schema-level default on purpose, because a default would materialise the field into a `rest` or `webauthn` config where it has no meaning. The handshake is what proves the mediator is reachable and willing, so forcing past it can advertise a mediator that cannot actually deliver.";
334
+ };
335
+ readonly handshakeTimeoutSecs: {
336
+ readonly type: "integer";
337
+ readonly minimum: 1;
338
+ readonly description: "`didcomm` only: trust-ping round-trip budget. Default 10.";
339
+ };
340
+ };
341
+ };
342
+ readonly ext: {
343
+ readonly $ref: "#/$defs/Ext";
344
+ };
345
+ };
346
+ readonly $defs: {
347
+ readonly Response: {
348
+ readonly $anchor: "response";
349
+ readonly title: "VTA Services — Update — response payload";
350
+ readonly description: "Success response to vta/services/update. Type https://trusttasks.org/spec/vta/services/update/1.0#response.";
351
+ readonly type: "object";
352
+ readonly additionalProperties: false;
353
+ readonly required: readonly ["result"];
354
+ readonly properties: {
355
+ readonly result: {
356
+ readonly $ref: "#/$defs/ServiceMutationResult";
357
+ };
358
+ readonly ext: {
359
+ readonly $ref: "#/$defs/Ext";
360
+ };
361
+ };
362
+ };
363
+ readonly Ext: {
364
+ readonly title: "Ext";
365
+ 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.";
366
+ readonly type: "object";
367
+ readonly minProperties: 1;
368
+ readonly additionalProperties: true;
369
+ readonly propertyNames: {
370
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
371
+ };
372
+ };
373
+ readonly ServiceMutationResult: {
374
+ readonly title: "ServiceMutationResult";
375
+ readonly description: "The outcome of a change to an advertised service. Every member describes the **log entry the change produced**, because that is what the change actually is: the agent's DID document is the record, and a consumer that treats the response as a mere acknowledgement will miss that a redeploy may be required.";
376
+ readonly type: "object";
377
+ readonly additionalProperties: false;
378
+ readonly required: readonly ["logEntryVersionId", "effectiveAt"];
379
+ readonly properties: {
380
+ readonly logEntryVersionId: {
381
+ readonly type: "string";
382
+ readonly minLength: 1;
383
+ readonly description: "Version id of the new did:webvh log entry this change wrote. Joins the change to the document's history.";
384
+ };
385
+ readonly effectiveAt: {
386
+ readonly type: "string";
387
+ readonly format: "date-time";
388
+ readonly description: "RFC 3339 instant the change took effect — the same instant stamped on the new log entry.";
389
+ };
390
+ readonly drainUntil: {
391
+ readonly type: "string";
392
+ readonly format: "date-time";
393
+ readonly description: "Present when the change scheduled a DIDComm drain. Its absence means no drain was scheduled, NOT that a drain finished instantly: a consumer reporting 'done' on an absent value would be right, and one reporting it on a present value would be wrong.";
394
+ };
395
+ readonly drainingMediator: {
396
+ readonly type: "string";
397
+ readonly description: "The mediator being drained, when `drainUntil` is present.";
398
+ };
399
+ readonly vtaDid: {
400
+ readonly type: "string";
401
+ readonly description: "The agent's own DID — subject of the log entry this change wrote. Carried so a caller can follow up without a second round trip.";
402
+ };
403
+ readonly serverless: {
404
+ readonly type: "boolean";
405
+ readonly description: "True when the agent's DID is self-hosted. **The change is persisted locally but NOT published**: the operator must fetch the updated `did.jsonl` and redeploy before any verifier sees it. A consumer that ignores this reports success for a change no one else can observe yet.";
406
+ readonly default: false;
407
+ };
408
+ readonly ext: {
409
+ readonly $ref: "#/$defs/Ext";
410
+ };
411
+ };
412
+ };
413
+ readonly ServiceKind: {
414
+ readonly title: "ServiceKind";
415
+ readonly description: "Which transport a task is acting on. This is the discriminator: it selects which member of `config` is meaningful, and a payload naming one kind with another's config is malformed rather than merely ignored.";
416
+ readonly type: "string";
417
+ readonly enum: readonly ["didcomm", "rest", "tsp", "webauthn"];
418
+ };
419
+ };
420
+ };
421
+ };
422
+ /**
423
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
424
+ * tracks the *issuer* party's requirement because a response swaps the
425
+ * parties (§7.3 item 5).
426
+ */
427
+ export declare const RESPONSE_SPEC: {
428
+ readonly typeUri: "https://trusttasks.org/spec/vta/services/update/1.0#response";
429
+ readonly isBearer: false;
430
+ readonly isProofRequired: true;
431
+ readonly isRecipientRequired: true;
432
+ readonly payloadSchema: {
433
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
434
+ readonly $ref: "#/$defs/Response";
435
+ readonly $defs: {
436
+ readonly Response: {
437
+ readonly $anchor: "response";
438
+ readonly title: "VTA Services — Update — response payload";
439
+ readonly description: "Success response to vta/services/update. Type https://trusttasks.org/spec/vta/services/update/1.0#response.";
440
+ readonly type: "object";
441
+ readonly additionalProperties: false;
442
+ readonly required: readonly ["result"];
443
+ readonly properties: {
444
+ readonly result: {
445
+ readonly $ref: "#/$defs/ServiceMutationResult";
446
+ };
447
+ readonly ext: {
448
+ readonly $ref: "#/$defs/Ext";
449
+ };
450
+ };
451
+ };
452
+ readonly Ext: {
453
+ readonly title: "Ext";
454
+ 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.";
455
+ readonly type: "object";
456
+ readonly minProperties: 1;
457
+ readonly additionalProperties: true;
458
+ readonly propertyNames: {
459
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
460
+ };
461
+ };
462
+ readonly ServiceMutationResult: {
463
+ readonly title: "ServiceMutationResult";
464
+ readonly description: "The outcome of a change to an advertised service. Every member describes the **log entry the change produced**, because that is what the change actually is: the agent's DID document is the record, and a consumer that treats the response as a mere acknowledgement will miss that a redeploy may be required.";
465
+ readonly type: "object";
466
+ readonly additionalProperties: false;
467
+ readonly required: readonly ["logEntryVersionId", "effectiveAt"];
468
+ readonly properties: {
469
+ readonly logEntryVersionId: {
470
+ readonly type: "string";
471
+ readonly minLength: 1;
472
+ readonly description: "Version id of the new did:webvh log entry this change wrote. Joins the change to the document's history.";
473
+ };
474
+ readonly effectiveAt: {
475
+ readonly type: "string";
476
+ readonly format: "date-time";
477
+ readonly description: "RFC 3339 instant the change took effect — the same instant stamped on the new log entry.";
478
+ };
479
+ readonly drainUntil: {
480
+ readonly type: "string";
481
+ readonly format: "date-time";
482
+ readonly description: "Present when the change scheduled a DIDComm drain. Its absence means no drain was scheduled, NOT that a drain finished instantly: a consumer reporting 'done' on an absent value would be right, and one reporting it on a present value would be wrong.";
483
+ };
484
+ readonly drainingMediator: {
485
+ readonly type: "string";
486
+ readonly description: "The mediator being drained, when `drainUntil` is present.";
487
+ };
488
+ readonly vtaDid: {
489
+ readonly type: "string";
490
+ readonly description: "The agent's own DID — subject of the log entry this change wrote. Carried so a caller can follow up without a second round trip.";
491
+ };
492
+ readonly serverless: {
493
+ readonly type: "boolean";
494
+ readonly description: "True when the agent's DID is self-hosted. **The change is persisted locally but NOT published**: the operator must fetch the updated `did.jsonl` and redeploy before any verifier sees it. A consumer that ignores this reports success for a change no one else can observe yet.";
495
+ readonly default: false;
496
+ };
497
+ readonly ext: {
498
+ readonly $ref: "#/$defs/Ext";
499
+ };
500
+ };
501
+ };
502
+ readonly ServiceKind: {
503
+ readonly title: "ServiceKind";
504
+ readonly description: "Which transport a task is acting on. This is the discriminator: it selects which member of `config` is meaningful, and a payload naming one kind with another's config is malformed rather than merely ignored.";
505
+ readonly type: "string";
506
+ readonly enum: readonly ["didcomm", "rest", "tsp", "webauthn"];
507
+ };
508
+ };
509
+ };
510
+ };
511
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/vta/services/update/1.0/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,MAAM,GAAG,KAAK,GAAG,UAAU,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,WAAW,CAAC;IACrB;;OAEG;IACH,MAAM,EAAE;QACN;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;QACb;;WAEG;QACH,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB;;WAEG;QACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;KAC/B,CAAC;IACF,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AACD;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,MAAM,EAAE,qBAAqB,CAAC;IAC9B,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,qDAA8D,CAAC;AAEvF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,wBAAwB,CAAC;AAE/C,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,8DAAuE,CAAC;AAEzG,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AAExD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiIjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuF1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMhB,CAAC"}