@openvtc/trust-tasks 0.10.0 → 0.11.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 +438 -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 +235 -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 +438 -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 +235 -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 +302 -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 +302 -0
  51. package/src/vta/services/update/1.0/payload.ts +350 -0
@@ -0,0 +1,235 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/services/rollback/1.0/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/services/rollback/1.0";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/services/rollback/1.0#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/vta/services/rollback/1.0",
21
+ "title": "VTA Services — Rollback — payload",
22
+ "description": "Request payload for vta/services/rollback. Reverts a transport to its previous advertised settings by writing a NEW log entry — the history is append-only, so a rollback is a forward step that restores an earlier state, never an erasure of what happened.",
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": [
26
+ "service"
27
+ ],
28
+ "properties": {
29
+ "service": {
30
+ "$ref": "#/$defs/ServiceKind"
31
+ },
32
+ "ext": {
33
+ "$ref": "#/$defs/Ext"
34
+ }
35
+ },
36
+ "$defs": {
37
+ "Response": {
38
+ "$anchor": "response",
39
+ "title": "VTA Services — Rollback — response payload",
40
+ "description": "Success response to vta/services/rollback. Type https://trusttasks.org/spec/vta/services/rollback/1.0#response.",
41
+ "type": "object",
42
+ "additionalProperties": false,
43
+ "required": [
44
+ "result"
45
+ ],
46
+ "properties": {
47
+ "result": {
48
+ "$ref": "#/$defs/ServiceMutationResult"
49
+ },
50
+ "ext": {
51
+ "$ref": "#/$defs/Ext"
52
+ }
53
+ }
54
+ },
55
+ "Ext": {
56
+ "title": "Ext",
57
+ "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.",
58
+ "type": "object",
59
+ "minProperties": 1,
60
+ "additionalProperties": true,
61
+ "propertyNames": {
62
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
63
+ }
64
+ },
65
+ "ServiceMutationResult": {
66
+ "title": "ServiceMutationResult",
67
+ "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.",
68
+ "type": "object",
69
+ "additionalProperties": false,
70
+ "required": [
71
+ "logEntryVersionId",
72
+ "effectiveAt"
73
+ ],
74
+ "properties": {
75
+ "logEntryVersionId": {
76
+ "type": "string",
77
+ "minLength": 1,
78
+ "description": "Version id of the new did:webvh log entry this change wrote. Joins the change to the document's history."
79
+ },
80
+ "effectiveAt": {
81
+ "type": "string",
82
+ "format": "date-time",
83
+ "description": "RFC 3339 instant the change took effect — the same instant stamped on the new log entry."
84
+ },
85
+ "drainUntil": {
86
+ "type": "string",
87
+ "format": "date-time",
88
+ "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."
89
+ },
90
+ "drainingMediator": {
91
+ "type": "string",
92
+ "description": "The mediator being drained, when `drainUntil` is present."
93
+ },
94
+ "vtaDid": {
95
+ "type": "string",
96
+ "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."
97
+ },
98
+ "serverless": {
99
+ "type": "boolean",
100
+ "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.",
101
+ "default": false
102
+ },
103
+ "ext": {
104
+ "$ref": "#/$defs/Ext"
105
+ }
106
+ }
107
+ },
108
+ "ServiceKind": {
109
+ "title": "ServiceKind",
110
+ "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.",
111
+ "type": "string",
112
+ "enum": [
113
+ "didcomm",
114
+ "rest",
115
+ "tsp",
116
+ "webauthn"
117
+ ]
118
+ }
119
+ }
120
+ };
121
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
122
+ export const RESPONSE_PAYLOAD_SCHEMA = {
123
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
124
+ "$ref": "#/$defs/Response",
125
+ "$defs": {
126
+ "Response": {
127
+ "$anchor": "response",
128
+ "title": "VTA Services — Rollback — response payload",
129
+ "description": "Success response to vta/services/rollback. Type https://trusttasks.org/spec/vta/services/rollback/1.0#response.",
130
+ "type": "object",
131
+ "additionalProperties": false,
132
+ "required": [
133
+ "result"
134
+ ],
135
+ "properties": {
136
+ "result": {
137
+ "$ref": "#/$defs/ServiceMutationResult"
138
+ },
139
+ "ext": {
140
+ "$ref": "#/$defs/Ext"
141
+ }
142
+ }
143
+ },
144
+ "Ext": {
145
+ "title": "Ext",
146
+ "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.",
147
+ "type": "object",
148
+ "minProperties": 1,
149
+ "additionalProperties": true,
150
+ "propertyNames": {
151
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
152
+ }
153
+ },
154
+ "ServiceMutationResult": {
155
+ "title": "ServiceMutationResult",
156
+ "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.",
157
+ "type": "object",
158
+ "additionalProperties": false,
159
+ "required": [
160
+ "logEntryVersionId",
161
+ "effectiveAt"
162
+ ],
163
+ "properties": {
164
+ "logEntryVersionId": {
165
+ "type": "string",
166
+ "minLength": 1,
167
+ "description": "Version id of the new did:webvh log entry this change wrote. Joins the change to the document's history."
168
+ },
169
+ "effectiveAt": {
170
+ "type": "string",
171
+ "format": "date-time",
172
+ "description": "RFC 3339 instant the change took effect — the same instant stamped on the new log entry."
173
+ },
174
+ "drainUntil": {
175
+ "type": "string",
176
+ "format": "date-time",
177
+ "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."
178
+ },
179
+ "drainingMediator": {
180
+ "type": "string",
181
+ "description": "The mediator being drained, when `drainUntil` is present."
182
+ },
183
+ "vtaDid": {
184
+ "type": "string",
185
+ "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."
186
+ },
187
+ "serverless": {
188
+ "type": "boolean",
189
+ "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.",
190
+ "default": false
191
+ },
192
+ "ext": {
193
+ "$ref": "#/$defs/Ext"
194
+ }
195
+ }
196
+ },
197
+ "ServiceKind": {
198
+ "title": "ServiceKind",
199
+ "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.",
200
+ "type": "string",
201
+ "enum": [
202
+ "didcomm",
203
+ "rest",
204
+ "tsp",
205
+ "webauthn"
206
+ ]
207
+ }
208
+ }
209
+ };
210
+ /**
211
+ * SPEC.md §7.2 policy for the request variant, from this specification's
212
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
213
+ * per-specification and cannot be derived from the document alone, and
214
+ * item 2 needs the schema this carries.
215
+ */
216
+ export const SPEC = {
217
+ typeUri: TYPE_URI,
218
+ isBearer: false,
219
+ isProofRequired: true,
220
+ isRecipientRequired: true,
221
+ payloadSchema: PAYLOAD_SCHEMA,
222
+ };
223
+ /**
224
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
225
+ * tracks the *issuer* party's requirement because a response swaps the
226
+ * parties (§7.3 item 5).
227
+ */
228
+ export const RESPONSE_SPEC = {
229
+ typeUri: RESPONSE_TYPE_URI,
230
+ isBearer: false,
231
+ isProofRequired: true,
232
+ isRecipientRequired: true,
233
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
234
+ };
235
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/vta/services/rollback/1.0/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA0DH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,uDA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