@openvtc/trust-tasks 0.21.4 → 0.21.5

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 (192) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/_shared/components.d.ts +210 -2
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/auth/_shared/0.1/passkey-invite.d.ts +16 -0
  5. package/dist/auth/_shared/0.1/passkey-invite.d.ts.map +1 -0
  6. package/dist/auth/_shared/0.1/passkey-invite.js +6 -0
  7. package/dist/auth/_shared/0.1/passkey-invite.js.map +1 -0
  8. package/dist/auth/passkey/enroll/invite/list/0.1/payload.d.ts +393 -0
  9. package/dist/auth/passkey/enroll/invite/list/0.1/payload.d.ts.map +1 -0
  10. package/dist/auth/passkey/enroll/invite/list/0.1/payload.js +234 -0
  11. package/dist/auth/passkey/enroll/invite/list/0.1/payload.js.map +1 -0
  12. package/dist/auth/passkey/enroll/invite/revoke/0.1/payload.d.ts +228 -0
  13. package/dist/auth/passkey/enroll/invite/revoke/0.1/payload.d.ts.map +1 -0
  14. package/dist/auth/passkey/enroll/invite/revoke/0.1/payload.js +138 -0
  15. package/dist/auth/passkey/enroll/invite/revoke/0.1/payload.js.map +1 -0
  16. package/dist/auth/passkey/enroll/invite/update/0.1/payload.d.ts +459 -0
  17. package/dist/auth/passkey/enroll/invite/update/0.1/payload.d.ts.map +1 -0
  18. package/dist/auth/passkey/enroll/invite/update/0.1/payload.js +286 -0
  19. package/dist/auth/passkey/enroll/invite/update/0.1/payload.js.map +1 -0
  20. package/dist/auth/step-up/start/0.1/payload.d.ts +420 -0
  21. package/dist/auth/step-up/start/0.1/payload.d.ts.map +1 -0
  22. package/dist/auth/step-up/start/0.1/payload.js +232 -0
  23. package/dist/auth/step-up/start/0.1/payload.js.map +1 -0
  24. package/dist/did-management/_shared/0.1/service-instance.d.ts +1 -1
  25. package/dist/did-management/_shared/0.1/service-instance.d.ts.map +1 -1
  26. package/dist/did-management/_shared/0.2/metrics-snapshot.d.ts +16 -0
  27. package/dist/did-management/_shared/0.2/metrics-snapshot.d.ts.map +1 -0
  28. package/dist/did-management/_shared/0.2/metrics-snapshot.js +6 -0
  29. package/dist/did-management/_shared/0.2/metrics-snapshot.js.map +1 -0
  30. package/dist/did-management/_shared/0.2/service-instance.d.ts +16 -0
  31. package/dist/did-management/_shared/0.2/service-instance.d.ts.map +1 -0
  32. package/dist/did-management/_shared/0.2/service-instance.js +6 -0
  33. package/dist/did-management/_shared/0.2/service-instance.js.map +1 -0
  34. package/dist/did-management/agent-name/resolve/0.1/payload.d.ts +318 -0
  35. package/dist/did-management/agent-name/resolve/0.1/payload.d.ts.map +1 -0
  36. package/dist/did-management/agent-name/resolve/0.1/payload.js +179 -0
  37. package/dist/did-management/agent-name/resolve/0.1/payload.js.map +1 -0
  38. package/dist/did-management/did/log/0.1/payload.d.ts +436 -0
  39. package/dist/did-management/did/log/0.1/payload.d.ts.map +1 -0
  40. package/dist/did-management/did/log/0.1/payload.js +228 -0
  41. package/dist/did-management/did/log/0.1/payload.js.map +1 -0
  42. package/dist/did-management/domain/list/0.1/payload.d.ts +423 -0
  43. package/dist/did-management/domain/list/0.1/payload.d.ts.map +1 -0
  44. package/dist/did-management/domain/list/0.1/payload.js +244 -0
  45. package/dist/did-management/domain/list/0.1/payload.js.map +1 -0
  46. package/dist/did-management/identity/list/0.1/payload.d.ts +494 -0
  47. package/dist/did-management/identity/list/0.1/payload.d.ts.map +1 -0
  48. package/dist/did-management/identity/list/0.1/payload.js +274 -0
  49. package/dist/did-management/identity/list/0.1/payload.js.map +1 -0
  50. package/dist/did-management/identity/retire/0.1/payload.d.ts +242 -0
  51. package/dist/did-management/identity/retire/0.1/payload.d.ts.map +1 -0
  52. package/dist/did-management/identity/retire/0.1/payload.js +142 -0
  53. package/dist/did-management/identity/retire/0.1/payload.js.map +1 -0
  54. package/dist/did-management/registry/admin-register/0.1/payload.d.ts +1 -1
  55. package/dist/did-management/registry/admin-register/0.1/payload.d.ts.map +1 -1
  56. package/dist/did-management/registry/check/0.1/payload.d.ts +639 -0
  57. package/dist/did-management/registry/check/0.1/payload.d.ts.map +1 -0
  58. package/dist/did-management/registry/check/0.1/payload.js +383 -0
  59. package/dist/did-management/registry/check/0.1/payload.js.map +1 -0
  60. package/dist/did-management/registry/get/0.1/payload.d.ts +632 -0
  61. package/dist/did-management/registry/get/0.1/payload.d.ts.map +1 -0
  62. package/dist/did-management/registry/get/0.1/payload.js +381 -0
  63. package/dist/did-management/registry/get/0.1/payload.js.map +1 -0
  64. package/dist/did-management/registry/list/0.1/payload.d.ts +661 -0
  65. package/dist/did-management/registry/list/0.1/payload.d.ts.map +1 -0
  66. package/dist/did-management/registry/list/0.1/payload.js +398 -0
  67. package/dist/did-management/registry/list/0.1/payload.js.map +1 -0
  68. package/dist/did-management/registry/purge-domain/0.1/payload.d.ts +269 -0
  69. package/dist/did-management/registry/purge-domain/0.1/payload.d.ts.map +1 -0
  70. package/dist/did-management/registry/purge-domain/0.1/payload.js +160 -0
  71. package/dist/did-management/registry/purge-domain/0.1/payload.js.map +1 -0
  72. package/dist/did-management/replica/domain/assign/0.1/payload.d.ts +233 -0
  73. package/dist/did-management/replica/domain/assign/0.1/payload.d.ts.map +1 -0
  74. package/dist/did-management/replica/domain/assign/0.1/payload.js +143 -0
  75. package/dist/did-management/replica/domain/assign/0.1/payload.js.map +1 -0
  76. package/dist/did-management/replica/domain/purge/0.1/payload.d.ts +257 -0
  77. package/dist/did-management/replica/domain/purge/0.1/payload.d.ts.map +1 -0
  78. package/dist/did-management/replica/domain/purge/0.1/payload.js +155 -0
  79. package/dist/did-management/replica/domain/purge/0.1/payload.js.map +1 -0
  80. package/dist/did-management/replica/domain/unassign/0.1/payload.d.ts +257 -0
  81. package/dist/did-management/replica/domain/unassign/0.1/payload.d.ts.map +1 -0
  82. package/dist/did-management/replica/domain/unassign/0.1/payload.js +155 -0
  83. package/dist/did-management/replica/domain/unassign/0.1/payload.js.map +1 -0
  84. package/dist/did-management/replica/domain/upsert/0.1/payload.d.ts +401 -0
  85. package/dist/did-management/replica/domain/upsert/0.1/payload.d.ts.map +1 -0
  86. package/dist/did-management/replica/domain/upsert/0.1/payload.js +241 -0
  87. package/dist/did-management/replica/domain/upsert/0.1/payload.js.map +1 -0
  88. package/dist/did-management/server/config/0.1/payload.d.ts +838 -0
  89. package/dist/did-management/server/config/0.1/payload.d.ts.map +1 -0
  90. package/dist/did-management/server/config/0.1/payload.js +444 -0
  91. package/dist/did-management/server/config/0.1/payload.js.map +1 -0
  92. package/dist/did-management/server/info/0.1/payload.d.ts +285 -0
  93. package/dist/did-management/server/info/0.1/payload.d.ts.map +1 -0
  94. package/dist/did-management/server/info/0.1/payload.js +160 -0
  95. package/dist/did-management/server/info/0.1/payload.js.map +1 -0
  96. package/dist/did-management/server/metrics/0.1/payload.d.ts +674 -0
  97. package/dist/did-management/server/metrics/0.1/payload.d.ts.map +1 -0
  98. package/dist/did-management/server/metrics/0.1/payload.js +387 -0
  99. package/dist/did-management/server/metrics/0.1/payload.js.map +1 -0
  100. package/dist/did-management/stats/get/0.1/payload.d.ts +349 -0
  101. package/dist/did-management/stats/get/0.1/payload.d.ts.map +1 -0
  102. package/dist/did-management/stats/get/0.1/payload.js +187 -0
  103. package/dist/did-management/stats/get/0.1/payload.js.map +1 -0
  104. package/dist/did-management/stats/timeseries/0.1/payload.d.ts +381 -0
  105. package/dist/did-management/stats/timeseries/0.1/payload.d.ts.map +1 -0
  106. package/dist/did-management/stats/timeseries/0.1/payload.js +227 -0
  107. package/dist/did-management/stats/timeseries/0.1/payload.js.map +1 -0
  108. package/dist/index.d.ts +34 -0
  109. package/dist/index.d.ts.map +1 -1
  110. package/dist/index.js +34 -0
  111. package/dist/index.js.map +1 -1
  112. package/dist/vtc/_shared/0.1/invite.d.ts +1 -1
  113. package/dist/vtc/_shared/0.1/invite.d.ts.map +1 -1
  114. package/dist/vtc/admin/invites/list/0.1/payload.d.ts +1 -1
  115. package/dist/vtc/admin/invites/list/0.1/payload.d.ts.map +1 -1
  116. package/dist/webvh/_shared/0.1/sync-update.d.ts +16 -0
  117. package/dist/webvh/_shared/0.1/sync-update.d.ts.map +1 -0
  118. package/dist/webvh/_shared/0.1/sync-update.js +6 -0
  119. package/dist/webvh/_shared/0.1/sync-update.js.map +1 -0
  120. package/dist/webvh/_shared/0.1/witness-key.d.ts +16 -0
  121. package/dist/webvh/_shared/0.1/witness-key.d.ts.map +1 -0
  122. package/dist/webvh/_shared/0.1/witness-key.js +6 -0
  123. package/dist/webvh/_shared/0.1/witness-key.js.map +1 -0
  124. package/dist/webvh/sync/batch/0.1/payload.d.ts +503 -0
  125. package/dist/webvh/sync/batch/0.1/payload.d.ts.map +1 -0
  126. package/dist/webvh/sync/batch/0.1/payload.js +290 -0
  127. package/dist/webvh/sync/batch/0.1/payload.js.map +1 -0
  128. package/dist/webvh/sync/delete/0.2/payload.d.ts +242 -0
  129. package/dist/webvh/sync/delete/0.2/payload.d.ts.map +1 -0
  130. package/dist/webvh/sync/delete/0.2/payload.js +148 -0
  131. package/dist/webvh/sync/delete/0.2/payload.js.map +1 -0
  132. package/dist/webvh/sync/update/0.2/payload.d.ts +315 -0
  133. package/dist/webvh/sync/update/0.2/payload.d.ts.map +1 -0
  134. package/dist/webvh/sync/update/0.2/payload.js +177 -0
  135. package/dist/webvh/sync/update/0.2/payload.js.map +1 -0
  136. package/dist/webvh/witness/key/create/0.1/payload.d.ts +346 -0
  137. package/dist/webvh/witness/key/create/0.1/payload.d.ts.map +1 -0
  138. package/dist/webvh/witness/key/create/0.1/payload.js +202 -0
  139. package/dist/webvh/witness/key/create/0.1/payload.js.map +1 -0
  140. package/dist/webvh/witness/key/delete/0.1/payload.d.ts +237 -0
  141. package/dist/webvh/witness/key/delete/0.1/payload.d.ts.map +1 -0
  142. package/dist/webvh/witness/key/delete/0.1/payload.js +141 -0
  143. package/dist/webvh/witness/key/delete/0.1/payload.js.map +1 -0
  144. package/dist/webvh/witness/key/list/0.1/payload.d.ts +349 -0
  145. package/dist/webvh/witness/key/list/0.1/payload.d.ts.map +1 -0
  146. package/dist/webvh/witness/key/list/0.1/payload.js +204 -0
  147. package/dist/webvh/witness/key/list/0.1/payload.js.map +1 -0
  148. package/dist/webvh/witness/sign/0.1/payload.d.ts +401 -0
  149. package/dist/webvh/witness/sign/0.1/payload.d.ts.map +1 -0
  150. package/dist/webvh/witness/sign/0.1/payload.js +229 -0
  151. package/dist/webvh/witness/sign/0.1/payload.js.map +1 -0
  152. package/package.json +1 -1
  153. package/src/_shared/components.ts +210 -2
  154. package/src/auth/_shared/0.1/passkey-invite.ts +17 -0
  155. package/src/auth/passkey/enroll/invite/list/0.1/payload.ts +266 -0
  156. package/src/auth/passkey/enroll/invite/revoke/0.1/payload.ts +165 -0
  157. package/src/auth/passkey/enroll/invite/update/0.1/payload.ts +327 -0
  158. package/src/auth/step-up/start/0.1/payload.ts +287 -0
  159. package/src/did-management/_shared/0.1/service-instance.ts +1 -1
  160. package/src/did-management/_shared/0.2/metrics-snapshot.ts +17 -0
  161. package/src/did-management/_shared/0.2/service-instance.ts +17 -0
  162. package/src/did-management/agent-name/resolve/0.1/payload.ts +222 -0
  163. package/src/did-management/did/log/0.1/payload.ts +295 -0
  164. package/src/did-management/domain/list/0.1/payload.ts +280 -0
  165. package/src/did-management/identity/list/0.1/payload.ts +335 -0
  166. package/src/did-management/identity/retire/0.1/payload.ts +175 -0
  167. package/src/did-management/registry/admin-register/0.1/payload.ts +1 -1
  168. package/src/did-management/registry/check/0.1/payload.ts +415 -0
  169. package/src/did-management/registry/get/0.1/payload.ts +410 -0
  170. package/src/did-management/registry/list/0.1/payload.ts +434 -0
  171. package/src/did-management/registry/purge-domain/0.1/payload.ts +198 -0
  172. package/src/did-management/replica/domain/assign/0.1/payload.ts +173 -0
  173. package/src/did-management/replica/domain/purge/0.1/payload.ts +189 -0
  174. package/src/did-management/replica/domain/unassign/0.1/payload.ts +189 -0
  175. package/src/did-management/replica/domain/upsert/0.1/payload.ts +271 -0
  176. package/src/did-management/server/config/0.1/payload.ts +545 -0
  177. package/src/did-management/server/info/0.1/payload.ts +200 -0
  178. package/src/did-management/server/metrics/0.1/payload.ts +418 -0
  179. package/src/did-management/stats/get/0.1/payload.ts +237 -0
  180. package/src/did-management/stats/timeseries/0.1/payload.ts +279 -0
  181. package/src/index.ts +34 -0
  182. package/src/vtc/_shared/0.1/invite.ts +1 -1
  183. package/src/vtc/admin/invites/list/0.1/payload.ts +1 -1
  184. package/src/webvh/_shared/0.1/sync-update.ts +17 -0
  185. package/src/webvh/_shared/0.1/witness-key.ts +17 -0
  186. package/src/webvh/sync/batch/0.1/payload.ts +336 -0
  187. package/src/webvh/sync/delete/0.2/payload.ts +181 -0
  188. package/src/webvh/sync/update/0.2/payload.ts +233 -0
  189. package/src/webvh/witness/key/create/0.1/payload.ts +231 -0
  190. package/src/webvh/witness/key/delete/0.1/payload.ts +171 -0
  191. package/src/webvh/witness/key/list/0.1/payload.ts +232 -0
  192. package/src/webvh/witness/sign/0.1/payload.ts +279 -0
@@ -0,0 +1,336 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/webvh/sync/batch/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext, SyncUpdate } from "../../../../_shared/components.js";
7
+
8
+
9
+ export interface WebVHSyncBatchPayload {
10
+ /**
11
+ * Complete slot states, each applied exactly as a webvh/sync/update/0.2 carrying it would be. A mnemonic appears at most once.
12
+ *
13
+ * @minItems 1
14
+ * @maxItems 50
15
+ */
16
+ updates: [SyncUpdate, ...SyncUpdate[]];
17
+ ext?: Ext;
18
+ }
19
+ export interface WebVHSyncBatchResponsePayload {
20
+ /**
21
+ * One result per entry of `updates`, in request order.
22
+ */
23
+ results: EntryResult[];
24
+ ext?: Ext;
25
+ }
26
+ export interface EntryResult {
27
+ mnemonic: string;
28
+ /**
29
+ * `applied` and `unchanged` as in webvh/sync/update/0.2. `refused` — the entry was permanently refused; see `code`.
30
+ */
31
+ status: "applied" | "unchanged" | "refused";
32
+ /**
33
+ * Present if and only if `status` is `refused`: the webvh/sync/update/0.2 error code the entry would have received on its own (e.g. `webvh/sync/update:historyRewrite`).
34
+ */
35
+ code?: string;
36
+ }
37
+
38
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
39
+ export type { Ext, SyncUpdate };
40
+
41
+ /** Trust Task type URI. */
42
+ export const TYPE_URI = "https://trusttasks.org/spec/webvh/sync/batch/0.1" as const;
43
+
44
+ /** Stable alias for this specification's request payload shape. */
45
+ export type Payload = WebVHSyncBatchPayload;
46
+
47
+ /** Trust Task response type URI (request type URI + "#response"). */
48
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/webvh/sync/batch/0.1#response" as const;
49
+
50
+ /** Stable alias for this specification's success-response payload shape. */
51
+ export type Response = WebVHSyncBatchResponsePayload;
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/webvh/sync/batch/0.1",
65
+ "title": "WebVH Sync Batch — payload",
66
+ "type": "object",
67
+ "additionalProperties": false,
68
+ "required": [
69
+ "updates"
70
+ ],
71
+ "properties": {
72
+ "updates": {
73
+ "type": "array",
74
+ "minItems": 1,
75
+ "maxItems": 50,
76
+ "items": {
77
+ "$ref": "#/$defs/SyncUpdate"
78
+ },
79
+ "description": "Complete slot states, each applied exactly as a webvh/sync/update/0.2 carrying it would be. A mnemonic appears at most once."
80
+ },
81
+ "ext": {
82
+ "$ref": "#/$defs/Ext"
83
+ }
84
+ },
85
+ "$defs": {
86
+ "Response": {
87
+ "$anchor": "response",
88
+ "title": "WebVH Sync Batch — response payload",
89
+ "type": "object",
90
+ "additionalProperties": false,
91
+ "required": [
92
+ "results"
93
+ ],
94
+ "properties": {
95
+ "results": {
96
+ "type": "array",
97
+ "items": {
98
+ "$ref": "#/$defs/EntryResult"
99
+ },
100
+ "description": "One result per entry of `updates`, in request order."
101
+ },
102
+ "ext": {
103
+ "$ref": "#/$defs/Ext"
104
+ }
105
+ }
106
+ },
107
+ "EntryResult": {
108
+ "title": "EntryResult",
109
+ "type": "object",
110
+ "additionalProperties": false,
111
+ "required": [
112
+ "mnemonic",
113
+ "status"
114
+ ],
115
+ "properties": {
116
+ "mnemonic": {
117
+ "type": "string",
118
+ "minLength": 1
119
+ },
120
+ "status": {
121
+ "type": "string",
122
+ "enum": [
123
+ "applied",
124
+ "unchanged",
125
+ "refused"
126
+ ],
127
+ "description": "`applied` and `unchanged` as in webvh/sync/update/0.2. `refused` — the entry was permanently refused; see `code`."
128
+ },
129
+ "code": {
130
+ "type": "string",
131
+ "minLength": 1,
132
+ "description": "Present if and only if `status` is `refused`: the webvh/sync/update/0.2 error code the entry would have received on its own (e.g. `webvh/sync/update:historyRewrite`)."
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
+ "SyncUpdate": {
147
+ "title": "SyncUpdate",
148
+ "type": "object",
149
+ "additionalProperties": false,
150
+ "required": [
151
+ "mnemonic",
152
+ "didId",
153
+ "logContent",
154
+ "versionCount",
155
+ "disabled"
156
+ ],
157
+ "properties": {
158
+ "mnemonic": {
159
+ "type": "string",
160
+ "minLength": 1,
161
+ "description": "The slot path on its hosting domain (e.g. `alice`, `people/alice`, or `.well-known` for a root DID)."
162
+ },
163
+ "didId": {
164
+ "type": "string",
165
+ "minLength": 1,
166
+ "description": "The DID the log establishes. A replica MUST refuse a log that does not establish exactly this DID."
167
+ },
168
+ "logContent": {
169
+ "type": "string",
170
+ "minLength": 1,
171
+ "description": "The slot's complete did.jsonl — one log entry per line — not a delta."
172
+ },
173
+ "witnessContent": {
174
+ "type": "string",
175
+ "minLength": 1,
176
+ "description": "The slot's did-witness.json. ABSENT means the slot holds no witness proofs: the replica MUST drop any witness proofs it holds for the slot. Absence never means \"unchanged\"."
177
+ },
178
+ "versionCount": {
179
+ "type": "integer",
180
+ "minimum": 1,
181
+ "description": "Number of entries in `logContent`, as the source counts them. A replica MUST refuse an update whose `logContent` does not contain exactly this many entries."
182
+ },
183
+ "disabled": {
184
+ "type": "boolean",
185
+ "description": "Whether the source has disabled the slot. A replica MUST stop serving a disabled slot and MUST resume only on an update carrying `false`."
186
+ },
187
+ "ext": {
188
+ "$ref": "#/$defs/Ext"
189
+ }
190
+ }
191
+ }
192
+ }
193
+ } as const;
194
+
195
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
196
+ export const RESPONSE_PAYLOAD_SCHEMA = {
197
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
198
+ "$ref": "#/$defs/Response",
199
+ "$defs": {
200
+ "Response": {
201
+ "$anchor": "response",
202
+ "title": "WebVH Sync Batch — response payload",
203
+ "type": "object",
204
+ "additionalProperties": false,
205
+ "required": [
206
+ "results"
207
+ ],
208
+ "properties": {
209
+ "results": {
210
+ "type": "array",
211
+ "items": {
212
+ "$ref": "#/$defs/EntryResult"
213
+ },
214
+ "description": "One result per entry of `updates`, in request order."
215
+ },
216
+ "ext": {
217
+ "$ref": "#/$defs/Ext"
218
+ }
219
+ }
220
+ },
221
+ "EntryResult": {
222
+ "title": "EntryResult",
223
+ "type": "object",
224
+ "additionalProperties": false,
225
+ "required": [
226
+ "mnemonic",
227
+ "status"
228
+ ],
229
+ "properties": {
230
+ "mnemonic": {
231
+ "type": "string",
232
+ "minLength": 1
233
+ },
234
+ "status": {
235
+ "type": "string",
236
+ "enum": [
237
+ "applied",
238
+ "unchanged",
239
+ "refused"
240
+ ],
241
+ "description": "`applied` and `unchanged` as in webvh/sync/update/0.2. `refused` — the entry was permanently refused; see `code`."
242
+ },
243
+ "code": {
244
+ "type": "string",
245
+ "minLength": 1,
246
+ "description": "Present if and only if `status` is `refused`: the webvh/sync/update/0.2 error code the entry would have received on its own (e.g. `webvh/sync/update:historyRewrite`)."
247
+ }
248
+ }
249
+ },
250
+ "Ext": {
251
+ "title": "Ext",
252
+ "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.",
253
+ "type": "object",
254
+ "minProperties": 1,
255
+ "additionalProperties": true,
256
+ "propertyNames": {
257
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
258
+ }
259
+ },
260
+ "SyncUpdate": {
261
+ "title": "SyncUpdate",
262
+ "type": "object",
263
+ "additionalProperties": false,
264
+ "required": [
265
+ "mnemonic",
266
+ "didId",
267
+ "logContent",
268
+ "versionCount",
269
+ "disabled"
270
+ ],
271
+ "properties": {
272
+ "mnemonic": {
273
+ "type": "string",
274
+ "minLength": 1,
275
+ "description": "The slot path on its hosting domain (e.g. `alice`, `people/alice`, or `.well-known` for a root DID)."
276
+ },
277
+ "didId": {
278
+ "type": "string",
279
+ "minLength": 1,
280
+ "description": "The DID the log establishes. A replica MUST refuse a log that does not establish exactly this DID."
281
+ },
282
+ "logContent": {
283
+ "type": "string",
284
+ "minLength": 1,
285
+ "description": "The slot's complete did.jsonl — one log entry per line — not a delta."
286
+ },
287
+ "witnessContent": {
288
+ "type": "string",
289
+ "minLength": 1,
290
+ "description": "The slot's did-witness.json. ABSENT means the slot holds no witness proofs: the replica MUST drop any witness proofs it holds for the slot. Absence never means \"unchanged\"."
291
+ },
292
+ "versionCount": {
293
+ "type": "integer",
294
+ "minimum": 1,
295
+ "description": "Number of entries in `logContent`, as the source counts them. A replica MUST refuse an update whose `logContent` does not contain exactly this many entries."
296
+ },
297
+ "disabled": {
298
+ "type": "boolean",
299
+ "description": "Whether the source has disabled the slot. A replica MUST stop serving a disabled slot and MUST resume only on an update carrying `false`."
300
+ },
301
+ "ext": {
302
+ "$ref": "#/$defs/Ext"
303
+ }
304
+ }
305
+ }
306
+ }
307
+ } as const;
308
+
309
+ /**
310
+ * SPEC.md §7.2 policy for the request variant, from this specification's
311
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
312
+ * per-specification and cannot be derived from the document alone, and
313
+ * item 2 needs the schema this carries.
314
+ */
315
+ export const SPEC = {
316
+ typeUri: TYPE_URI,
317
+ isBearer: false,
318
+ isProofRequired: true,
319
+ isRecipientRequired: true,
320
+ isIssuedAtRequired: true,
321
+ payloadSchema: PAYLOAD_SCHEMA,
322
+ } as const;
323
+
324
+ /**
325
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
326
+ * tracks the *issuer* party's requirement because a response swaps the
327
+ * parties (§7.3 item 5).
328
+ */
329
+ export const RESPONSE_SPEC = {
330
+ typeUri: RESPONSE_TYPE_URI,
331
+ isBearer: false,
332
+ isProofRequired: true,
333
+ isRecipientRequired: true,
334
+ isIssuedAtRequired: true,
335
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
336
+ } as const;
@@ -0,0 +1,181 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/webvh/sync/delete/0.2/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ export interface WebVHSyncDeletePayload {
10
+ /**
11
+ * The slot path the source no longer publishes.
12
+ */
13
+ mnemonic: string;
14
+ ext?: Ext;
15
+ }
16
+ export interface WebVHSyncDeleteResponsePayload {
17
+ mnemonic: string;
18
+ /**
19
+ * `deleted` — the replica held the slot and has removed it. `absent` — it held nothing for the slot; the delete is idempotent.
20
+ */
21
+ status: "deleted" | "absent";
22
+ ext?: Ext;
23
+ }
24
+
25
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
26
+ export type { Ext };
27
+
28
+ /** Trust Task type URI. */
29
+ export const TYPE_URI = "https://trusttasks.org/spec/webvh/sync/delete/0.2" as const;
30
+
31
+ /** Stable alias for this specification's request payload shape. */
32
+ export type Payload = WebVHSyncDeletePayload;
33
+
34
+ /** Trust Task response type URI (request type URI + "#response"). */
35
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/webvh/sync/delete/0.2#response" as const;
36
+
37
+ /** Stable alias for this specification's success-response payload shape. */
38
+ export type Response = WebVHSyncDeleteResponsePayload;
39
+
40
+ /**
41
+ * This specification's payload schema, as a value.
42
+ *
43
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
44
+ * rather than only as a `.json` file because TypeScript types are erased
45
+ * at runtime: without a schema a consumer has nothing to validate, and
46
+ * every REQUIRED payload member is optional in practice. Cross-file
47
+ * `$ref`s are already inlined, so it needs no resolver.
48
+ */
49
+ export const PAYLOAD_SCHEMA = {
50
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
51
+ "$id": "https://trusttasks.org/spec/webvh/sync/delete/0.2",
52
+ "title": "WebVH Sync Delete — payload",
53
+ "type": "object",
54
+ "additionalProperties": false,
55
+ "required": [
56
+ "mnemonic"
57
+ ],
58
+ "properties": {
59
+ "mnemonic": {
60
+ "type": "string",
61
+ "minLength": 1,
62
+ "description": "The slot path the source no longer publishes."
63
+ },
64
+ "ext": {
65
+ "$ref": "#/$defs/Ext"
66
+ }
67
+ },
68
+ "$defs": {
69
+ "Response": {
70
+ "$anchor": "response",
71
+ "title": "WebVH Sync Delete — response payload",
72
+ "type": "object",
73
+ "additionalProperties": false,
74
+ "required": [
75
+ "mnemonic",
76
+ "status"
77
+ ],
78
+ "properties": {
79
+ "mnemonic": {
80
+ "type": "string",
81
+ "minLength": 1
82
+ },
83
+ "status": {
84
+ "type": "string",
85
+ "enum": [
86
+ "deleted",
87
+ "absent"
88
+ ],
89
+ "description": "`deleted` — the replica held the slot and has removed it. `absent` — it held nothing for the slot; the delete is idempotent."
90
+ },
91
+ "ext": {
92
+ "$ref": "#/$defs/Ext"
93
+ }
94
+ }
95
+ },
96
+ "Ext": {
97
+ "title": "Ext",
98
+ "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.",
99
+ "type": "object",
100
+ "minProperties": 1,
101
+ "additionalProperties": true,
102
+ "propertyNames": {
103
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
104
+ }
105
+ }
106
+ }
107
+ } as const;
108
+
109
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
110
+ export const RESPONSE_PAYLOAD_SCHEMA = {
111
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
112
+ "$ref": "#/$defs/Response",
113
+ "$defs": {
114
+ "Response": {
115
+ "$anchor": "response",
116
+ "title": "WebVH Sync Delete — response payload",
117
+ "type": "object",
118
+ "additionalProperties": false,
119
+ "required": [
120
+ "mnemonic",
121
+ "status"
122
+ ],
123
+ "properties": {
124
+ "mnemonic": {
125
+ "type": "string",
126
+ "minLength": 1
127
+ },
128
+ "status": {
129
+ "type": "string",
130
+ "enum": [
131
+ "deleted",
132
+ "absent"
133
+ ],
134
+ "description": "`deleted` — the replica held the slot and has removed it. `absent` — it held nothing for the slot; the delete is idempotent."
135
+ },
136
+ "ext": {
137
+ "$ref": "#/$defs/Ext"
138
+ }
139
+ }
140
+ },
141
+ "Ext": {
142
+ "title": "Ext",
143
+ "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.",
144
+ "type": "object",
145
+ "minProperties": 1,
146
+ "additionalProperties": true,
147
+ "propertyNames": {
148
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
149
+ }
150
+ }
151
+ }
152
+ } as const;
153
+
154
+ /**
155
+ * SPEC.md §7.2 policy for the request variant, from this specification's
156
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
157
+ * per-specification and cannot be derived from the document alone, and
158
+ * item 2 needs the schema this carries.
159
+ */
160
+ export const SPEC = {
161
+ typeUri: TYPE_URI,
162
+ isBearer: false,
163
+ isProofRequired: true,
164
+ isRecipientRequired: true,
165
+ isIssuedAtRequired: true,
166
+ payloadSchema: PAYLOAD_SCHEMA,
167
+ } as const;
168
+
169
+ /**
170
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
171
+ * tracks the *issuer* party's requirement because a response swaps the
172
+ * parties (§7.3 item 5).
173
+ */
174
+ export const RESPONSE_SPEC = {
175
+ typeUri: RESPONSE_TYPE_URI,
176
+ isBearer: false,
177
+ isProofRequired: true,
178
+ isRecipientRequired: true,
179
+ isIssuedAtRequired: true,
180
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
181
+ } as const;