@openvtc/trust-tasks 0.12.0 → 0.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/vta/_shared/0.1/app-state-record.d.ts +17 -0
- package/dist/vta/_shared/0.1/app-state-record.d.ts.map +1 -0
- package/dist/vta/_shared/0.1/app-state-record.js +6 -0
- package/dist/vta/_shared/0.1/app-state-record.js.map +1 -0
- package/dist/vta/app-state/delete/1.0/payload.d.ts +488 -0
- package/dist/vta/app-state/delete/1.0/payload.d.ts.map +1 -0
- package/dist/vta/app-state/delete/1.0/payload.js +248 -0
- package/dist/vta/app-state/delete/1.0/payload.js.map +1 -0
- package/dist/vta/app-state/get/1.0/payload.d.ts +611 -0
- package/dist/vta/app-state/get/1.0/payload.d.ts.map +1 -0
- package/dist/vta/app-state/get/1.0/payload.js +306 -0
- package/dist/vta/app-state/get/1.0/payload.js.map +1 -0
- package/dist/vta/app-state/get-many/1.0/payload.d.ts +716 -0
- package/dist/vta/app-state/get-many/1.0/payload.d.ts.map +1 -0
- package/dist/vta/app-state/get-many/1.0/payload.js +350 -0
- package/dist/vta/app-state/get-many/1.0/payload.js.map +1 -0
- package/dist/vta/app-state/list/1.0/payload.d.ts +778 -0
- package/dist/vta/app-state/list/1.0/payload.d.ts.map +1 -0
- package/dist/vta/app-state/list/1.0/payload.js +368 -0
- package/dist/vta/app-state/list/1.0/payload.js.map +1 -0
- package/dist/vta/app-state/put/1.0/payload.d.ts +560 -0
- package/dist/vta/app-state/put/1.0/payload.d.ts.map +1 -0
- package/dist/vta/app-state/put/1.0/payload.js +291 -0
- package/dist/vta/app-state/put/1.0/payload.js.map +1 -0
- package/dist/vta/app-state/put-many/1.0/payload.d.ts +856 -0
- package/dist/vta/app-state/put-many/1.0/payload.d.ts.map +1 -0
- package/dist/vta/app-state/put-many/1.0/payload.js +455 -0
- package/dist/vta/app-state/put-many/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/servers/retire-orphan/0.1/payload.d.ts +317 -0
- package/dist/vta/webvh/servers/retire-orphan/0.1/payload.d.ts.map +1 -0
- package/dist/vta/webvh/servers/retire-orphan/0.1/payload.js +170 -0
- package/dist/vta/webvh/servers/retire-orphan/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +8 -0
- package/src/vta/_shared/0.1/app-state-record.ts +17 -0
- package/src/vta/app-state/delete/1.0/payload.ts +323 -0
- package/src/vta/app-state/get/1.0/payload.ts +404 -0
- package/src/vta/app-state/get-many/1.0/payload.ts +469 -0
- package/src/vta/app-state/list/1.0/payload.ts +509 -0
- package/src/vta/app-state/put/1.0/payload.ts +382 -0
- package/src/vta/app-state/put-many/1.0/payload.ts +584 -0
- package/src/vta/webvh/servers/retire-orphan/0.1/payload.ts +223 -0
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/webvh/servers/retire-orphan/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface VTAWebVHServersRetireOrphanPayload {
|
|
7
|
+
/**
|
|
8
|
+
* The hosting server holding the orphaned slot, as the agent has it registered.
|
|
9
|
+
*/
|
|
10
|
+
serverId: string;
|
|
11
|
+
/**
|
|
12
|
+
* The slot to retire, as reported in a reconcile response's hostOnly. The slot identifier rather than the DID, because a slot reserved but never published to has no DID and is exactly as orphaned.
|
|
13
|
+
*/
|
|
14
|
+
slotId: string;
|
|
15
|
+
/**
|
|
16
|
+
* The DID the producer believes the slot serves. When present the agent MUST refuse unless it matches, so a slotId that has been reused since the report was taken cannot retire something else. Absent for a slot that was never published to.
|
|
17
|
+
*/
|
|
18
|
+
expectedDid?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Operator rationale, recorded in the agent's audit trail. The act has no undo, so why it was done outlives the record of what was done.
|
|
21
|
+
*/
|
|
22
|
+
reason?: string;
|
|
23
|
+
ext?: Ext;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* 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.
|
|
27
|
+
*/
|
|
28
|
+
export interface Ext {
|
|
29
|
+
[k: string]: unknown | undefined;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Success response to vta/webvh/servers/retire-orphan. Type https://trusttasks.org/spec/vta/webvh/servers/retire-orphan/0.1#response.
|
|
33
|
+
*/
|
|
34
|
+
export interface VTAWebVHServersRetireOrphanResponsePayload {
|
|
35
|
+
serverId: string;
|
|
36
|
+
slotId: string;
|
|
37
|
+
/**
|
|
38
|
+
* Whether the slot is no longer served. False is reported, not inferred: an agent that could not confirm removal with the host MUST NOT claim it.
|
|
39
|
+
*/
|
|
40
|
+
retired: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* The DID the slot was serving, echoed so the record of what was retired survives the slot's disappearance. Absent where the slot was never published to.
|
|
43
|
+
*/
|
|
44
|
+
did?: string;
|
|
45
|
+
ext?: Ext;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** Trust Task type URI. */
|
|
49
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/webvh/servers/retire-orphan/0.1" as const;
|
|
50
|
+
|
|
51
|
+
/** Stable alias for this specification's request payload shape. */
|
|
52
|
+
export type Payload = VTAWebVHServersRetireOrphanPayload;
|
|
53
|
+
|
|
54
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
55
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/webvh/servers/retire-orphan/0.1#response" as const;
|
|
56
|
+
|
|
57
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
58
|
+
export type Response = VTAWebVHServersRetireOrphanResponsePayload;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* This specification's payload schema, as a value.
|
|
62
|
+
*
|
|
63
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
64
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
65
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
66
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
67
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
68
|
+
*/
|
|
69
|
+
export const PAYLOAD_SCHEMA = {
|
|
70
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
71
|
+
"$id": "https://trusttasks.org/spec/vta/webvh/servers/retire-orphan/0.1",
|
|
72
|
+
"title": "VTA WebVH Servers Retire Orphan — payload",
|
|
73
|
+
"type": "object",
|
|
74
|
+
"additionalProperties": false,
|
|
75
|
+
"required": [
|
|
76
|
+
"serverId",
|
|
77
|
+
"slotId"
|
|
78
|
+
],
|
|
79
|
+
"properties": {
|
|
80
|
+
"serverId": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"minLength": 1,
|
|
83
|
+
"description": "The hosting server holding the orphaned slot, as the agent has it registered."
|
|
84
|
+
},
|
|
85
|
+
"slotId": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"minLength": 1,
|
|
88
|
+
"description": "The slot to retire, as reported in a reconcile response's hostOnly. The slot identifier rather than the DID, because a slot reserved but never published to has no DID and is exactly as orphaned."
|
|
89
|
+
},
|
|
90
|
+
"expectedDid": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"minLength": 1,
|
|
93
|
+
"description": "The DID the producer believes the slot serves. When present the agent MUST refuse unless it matches, so a slotId that has been reused since the report was taken cannot retire something else. Absent for a slot that was never published to."
|
|
94
|
+
},
|
|
95
|
+
"reason": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"maxLength": 1024,
|
|
98
|
+
"description": "Operator rationale, recorded in the agent's audit trail. The act has no undo, so why it was done outlives the record of what was done."
|
|
99
|
+
},
|
|
100
|
+
"ext": {
|
|
101
|
+
"$ref": "#/$defs/Ext"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"$defs": {
|
|
105
|
+
"Response": {
|
|
106
|
+
"$anchor": "response",
|
|
107
|
+
"title": "VTA WebVH Servers Retire Orphan — response payload",
|
|
108
|
+
"description": "Success response to vta/webvh/servers/retire-orphan. Type https://trusttasks.org/spec/vta/webvh/servers/retire-orphan/0.1#response.",
|
|
109
|
+
"type": "object",
|
|
110
|
+
"additionalProperties": false,
|
|
111
|
+
"required": [
|
|
112
|
+
"serverId",
|
|
113
|
+
"slotId",
|
|
114
|
+
"retired"
|
|
115
|
+
],
|
|
116
|
+
"properties": {
|
|
117
|
+
"serverId": {
|
|
118
|
+
"type": "string"
|
|
119
|
+
},
|
|
120
|
+
"slotId": {
|
|
121
|
+
"type": "string"
|
|
122
|
+
},
|
|
123
|
+
"retired": {
|
|
124
|
+
"type": "boolean",
|
|
125
|
+
"description": "Whether the slot is no longer served. False is reported, not inferred: an agent that could not confirm removal with the host MUST NOT claim it."
|
|
126
|
+
},
|
|
127
|
+
"did": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"description": "The DID the slot was serving, echoed so the record of what was retired survives the slot's disappearance. Absent where the slot was never published to."
|
|
130
|
+
},
|
|
131
|
+
"ext": {
|
|
132
|
+
"$ref": "#/$defs/Ext"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"Ext": {
|
|
137
|
+
"title": "Ext",
|
|
138
|
+
"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.",
|
|
139
|
+
"type": "object",
|
|
140
|
+
"minProperties": 1,
|
|
141
|
+
"additionalProperties": true,
|
|
142
|
+
"propertyNames": {
|
|
143
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
} as const;
|
|
148
|
+
|
|
149
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
150
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
151
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
152
|
+
"$ref": "#/$defs/Response",
|
|
153
|
+
"$defs": {
|
|
154
|
+
"Response": {
|
|
155
|
+
"$anchor": "response",
|
|
156
|
+
"title": "VTA WebVH Servers Retire Orphan — response payload",
|
|
157
|
+
"description": "Success response to vta/webvh/servers/retire-orphan. Type https://trusttasks.org/spec/vta/webvh/servers/retire-orphan/0.1#response.",
|
|
158
|
+
"type": "object",
|
|
159
|
+
"additionalProperties": false,
|
|
160
|
+
"required": [
|
|
161
|
+
"serverId",
|
|
162
|
+
"slotId",
|
|
163
|
+
"retired"
|
|
164
|
+
],
|
|
165
|
+
"properties": {
|
|
166
|
+
"serverId": {
|
|
167
|
+
"type": "string"
|
|
168
|
+
},
|
|
169
|
+
"slotId": {
|
|
170
|
+
"type": "string"
|
|
171
|
+
},
|
|
172
|
+
"retired": {
|
|
173
|
+
"type": "boolean",
|
|
174
|
+
"description": "Whether the slot is no longer served. False is reported, not inferred: an agent that could not confirm removal with the host MUST NOT claim it."
|
|
175
|
+
},
|
|
176
|
+
"did": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"description": "The DID the slot was serving, echoed so the record of what was retired survives the slot's disappearance. Absent where the slot was never published to."
|
|
179
|
+
},
|
|
180
|
+
"ext": {
|
|
181
|
+
"$ref": "#/$defs/Ext"
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
"Ext": {
|
|
186
|
+
"title": "Ext",
|
|
187
|
+
"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.",
|
|
188
|
+
"type": "object",
|
|
189
|
+
"minProperties": 1,
|
|
190
|
+
"additionalProperties": true,
|
|
191
|
+
"propertyNames": {
|
|
192
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
} as const;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
200
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
201
|
+
* per-specification and cannot be derived from the document alone, and
|
|
202
|
+
* item 2 needs the schema this carries.
|
|
203
|
+
*/
|
|
204
|
+
export const SPEC = {
|
|
205
|
+
typeUri: TYPE_URI,
|
|
206
|
+
isBearer: false,
|
|
207
|
+
isProofRequired: true,
|
|
208
|
+
isRecipientRequired: true,
|
|
209
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
210
|
+
} as const;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
214
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
215
|
+
* parties (§7.3 item 5).
|
|
216
|
+
*/
|
|
217
|
+
export const RESPONSE_SPEC = {
|
|
218
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
219
|
+
isBearer: false,
|
|
220
|
+
isProofRequired: true,
|
|
221
|
+
isRecipientRequired: true,
|
|
222
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
223
|
+
} as const;
|