@openvtc/trust-tasks 0.21.11 → 0.21.13

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 (208) hide show
  1. package/CHANGELOG.md +76 -0
  2. package/dist/_framework/0.4/framework.d.ts +1 -1
  3. package/dist/_framework/0.4/framework.d.ts.map +1 -1
  4. package/dist/_shared/components.d.ts +371 -0
  5. package/dist/_shared/components.d.ts.map +1 -1
  6. package/dist/auth/_shared/0.1/signing-key.d.ts +16 -0
  7. package/dist/auth/_shared/0.1/signing-key.d.ts.map +1 -0
  8. package/dist/auth/_shared/0.1/signing-key.js +6 -0
  9. package/dist/auth/_shared/0.1/signing-key.js.map +1 -0
  10. package/dist/auth/signing-key/enroll/0.1/payload.d.ts +545 -0
  11. package/dist/auth/signing-key/enroll/0.1/payload.d.ts.map +1 -0
  12. package/dist/auth/signing-key/enroll/0.1/payload.js +307 -0
  13. package/dist/auth/signing-key/enroll/0.1/payload.js.map +1 -0
  14. package/dist/auth/signing-key/list/0.1/payload.d.ts +509 -0
  15. package/dist/auth/signing-key/list/0.1/payload.d.ts.map +1 -0
  16. package/dist/auth/signing-key/list/0.1/payload.js +289 -0
  17. package/dist/auth/signing-key/list/0.1/payload.js.map +1 -0
  18. package/dist/auth/signing-key/revoke/0.1/payload.d.ts +292 -0
  19. package/dist/auth/signing-key/revoke/0.1/payload.d.ts.map +1 -0
  20. package/dist/auth/signing-key/revoke/0.1/payload.js +167 -0
  21. package/dist/auth/signing-key/revoke/0.1/payload.js.map +1 -0
  22. package/dist/index.d.ts +39 -0
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +39 -0
  25. package/dist/index.js.map +1 -1
  26. package/dist/vta/contexts/update-did/1.1/payload.d.ts +388 -0
  27. package/dist/vta/contexts/update-did/1.1/payload.d.ts.map +1 -0
  28. package/dist/vta/contexts/update-did/1.1/payload.js +227 -0
  29. package/dist/vta/contexts/update-did/1.1/payload.js.map +1 -0
  30. package/dist/vtc/_shared/0.1/community-presentation.d.ts +16 -0
  31. package/dist/vtc/_shared/0.1/community-presentation.d.ts.map +1 -0
  32. package/dist/vtc/_shared/0.1/community-presentation.js +6 -0
  33. package/dist/vtc/_shared/0.1/community-presentation.js.map +1 -0
  34. package/dist/vtc/_shared/0.1/relationship-lifecycle.d.ts +16 -0
  35. package/dist/vtc/_shared/0.1/relationship-lifecycle.d.ts.map +1 -0
  36. package/dist/vtc/_shared/0.1/relationship-lifecycle.js +6 -0
  37. package/dist/vtc/_shared/0.1/relationship-lifecycle.js.map +1 -0
  38. package/dist/vtc/_shared/0.1/schema-registry.d.ts +16 -0
  39. package/dist/vtc/_shared/0.1/schema-registry.d.ts.map +1 -0
  40. package/dist/vtc/_shared/0.1/schema-registry.js +6 -0
  41. package/dist/vtc/_shared/0.1/schema-registry.js.map +1 -0
  42. package/dist/vtc/_shared/0.1/vetting-auto-grant.d.ts +16 -0
  43. package/dist/vtc/_shared/0.1/vetting-auto-grant.d.ts.map +1 -0
  44. package/dist/vtc/_shared/0.1/vetting-auto-grant.js +6 -0
  45. package/dist/vtc/_shared/0.1/vetting-auto-grant.js.map +1 -0
  46. package/dist/vtc/_shared/0.1/website-transfer.d.ts +16 -0
  47. package/dist/vtc/_shared/0.1/website-transfer.d.ts.map +1 -0
  48. package/dist/vtc/_shared/0.1/website-transfer.js +6 -0
  49. package/dist/vtc/_shared/0.1/website-transfer.js.map +1 -0
  50. package/dist/vtc/community/branding/show/0.1/payload.d.ts +319 -0
  51. package/dist/vtc/community/branding/show/0.1/payload.d.ts.map +1 -0
  52. package/dist/vtc/community/branding/show/0.1/payload.js +179 -0
  53. package/dist/vtc/community/branding/show/0.1/payload.js.map +1 -0
  54. package/dist/vtc/community/branding/update/0.1/payload.d.ts +328 -0
  55. package/dist/vtc/community/branding/update/0.1/payload.d.ts.map +1 -0
  56. package/dist/vtc/community/branding/update/0.1/payload.js +185 -0
  57. package/dist/vtc/community/branding/update/0.1/payload.js.map +1 -0
  58. package/dist/vtc/community/join-discovery/show/0.1/payload.d.ts +267 -0
  59. package/dist/vtc/community/join-discovery/show/0.1/payload.d.ts.map +1 -0
  60. package/dist/vtc/community/join-discovery/show/0.1/payload.js +157 -0
  61. package/dist/vtc/community/join-discovery/show/0.1/payload.js.map +1 -0
  62. package/dist/vtc/community/join-discovery/update/0.1/payload.d.ts +276 -0
  63. package/dist/vtc/community/join-discovery/update/0.1/payload.d.ts.map +1 -0
  64. package/dist/vtc/community/join-discovery/update/0.1/payload.js +163 -0
  65. package/dist/vtc/community/join-discovery/update/0.1/payload.js.map +1 -0
  66. package/dist/vtc/community/requested-attributes/show/0.1/payload.d.ts +339 -0
  67. package/dist/vtc/community/requested-attributes/show/0.1/payload.d.ts.map +1 -0
  68. package/dist/vtc/community/requested-attributes/show/0.1/payload.js +193 -0
  69. package/dist/vtc/community/requested-attributes/show/0.1/payload.js.map +1 -0
  70. package/dist/vtc/community/requested-attributes/update/0.1/payload.d.ts +348 -0
  71. package/dist/vtc/community/requested-attributes/update/0.1/payload.d.ts.map +1 -0
  72. package/dist/vtc/community/requested-attributes/update/0.1/payload.js +199 -0
  73. package/dist/vtc/community/requested-attributes/update/0.1/payload.js.map +1 -0
  74. package/dist/vtc/join-requests/query/0.1/payload.d.ts +412 -0
  75. package/dist/vtc/join-requests/query/0.1/payload.d.ts.map +1 -0
  76. package/dist/vtc/join-requests/query/0.1/payload.js +228 -0
  77. package/dist/vtc/join-requests/query/0.1/payload.js.map +1 -0
  78. package/dist/vtc/join-requests/vetting/show/0.1/payload.d.ts +1016 -0
  79. package/dist/vtc/join-requests/vetting/show/0.1/payload.d.ts.map +1 -0
  80. package/dist/vtc/join-requests/vetting/show/0.1/payload.js +509 -0
  81. package/dist/vtc/join-requests/vetting/show/0.1/payload.js.map +1 -0
  82. package/dist/vtc/relationships/restore/0.1/payload.d.ts +462 -0
  83. package/dist/vtc/relationships/restore/0.1/payload.d.ts.map +1 -0
  84. package/dist/vtc/relationships/restore/0.1/payload.js +270 -0
  85. package/dist/vtc/relationships/restore/0.1/payload.js.map +1 -0
  86. package/dist/vtc/relationships/suspend/0.1/payload.d.ts +462 -0
  87. package/dist/vtc/relationships/suspend/0.1/payload.d.ts.map +1 -0
  88. package/dist/vtc/relationships/suspend/0.1/payload.js +270 -0
  89. package/dist/vtc/relationships/suspend/0.1/payload.js.map +1 -0
  90. package/dist/vtc/rooms/list/0.1/payload.d.ts +653 -0
  91. package/dist/vtc/rooms/list/0.1/payload.d.ts.map +1 -0
  92. package/dist/vtc/rooms/list/0.1/payload.js +360 -0
  93. package/dist/vtc/rooms/list/0.1/payload.js.map +1 -0
  94. package/dist/vtc/schemas/accepts/delete/0.1/payload.d.ts +240 -0
  95. package/dist/vtc/schemas/accepts/delete/0.1/payload.d.ts.map +1 -0
  96. package/dist/vtc/schemas/accepts/delete/0.1/payload.js +141 -0
  97. package/dist/vtc/schemas/accepts/delete/0.1/payload.js.map +1 -0
  98. package/dist/vtc/schemas/accepts/list/0.1/payload.d.ts +1214 -0
  99. package/dist/vtc/schemas/accepts/list/0.1/payload.d.ts.map +1 -0
  100. package/dist/vtc/schemas/accepts/list/0.1/payload.js +681 -0
  101. package/dist/vtc/schemas/accepts/list/0.1/payload.js.map +1 -0
  102. package/dist/vtc/schemas/accepts/register/0.1/payload.d.ts +1165 -0
  103. package/dist/vtc/schemas/accepts/register/0.1/payload.d.ts.map +1 -0
  104. package/dist/vtc/schemas/accepts/register/0.1/payload.js +665 -0
  105. package/dist/vtc/schemas/accepts/register/0.1/payload.js.map +1 -0
  106. package/dist/vtc/schemas/accepts/show/0.1/payload.d.ts +1144 -0
  107. package/dist/vtc/schemas/accepts/show/0.1/payload.d.ts.map +1 -0
  108. package/dist/vtc/schemas/accepts/show/0.1/payload.js +655 -0
  109. package/dist/vtc/schemas/accepts/show/0.1/payload.js.map +1 -0
  110. package/dist/vtc/schemas/delete/0.1/payload.d.ts +240 -0
  111. package/dist/vtc/schemas/delete/0.1/payload.d.ts.map +1 -0
  112. package/dist/vtc/schemas/delete/0.1/payload.js +141 -0
  113. package/dist/vtc/schemas/delete/0.1/payload.js.map +1 -0
  114. package/dist/vtc/schemas/list/0.1/payload.d.ts +541 -0
  115. package/dist/vtc/schemas/list/0.1/payload.d.ts.map +1 -0
  116. package/dist/vtc/schemas/list/0.1/payload.js +300 -0
  117. package/dist/vtc/schemas/list/0.1/payload.js.map +1 -0
  118. package/dist/vtc/schemas/register/0.1/payload.d.ts +512 -0
  119. package/dist/vtc/schemas/register/0.1/payload.d.ts.map +1 -0
  120. package/dist/vtc/schemas/register/0.1/payload.js +292 -0
  121. package/dist/vtc/schemas/register/0.1/payload.js.map +1 -0
  122. package/dist/vtc/schemas/show/0.1/payload.d.ts +484 -0
  123. package/dist/vtc/schemas/show/0.1/payload.d.ts.map +1 -0
  124. package/dist/vtc/schemas/show/0.1/payload.js +279 -0
  125. package/dist/vtc/schemas/show/0.1/payload.js.map +1 -0
  126. package/dist/vtc/vetting/auto-grant/show/0.1/payload.d.ts +463 -0
  127. package/dist/vtc/vetting/auto-grant/show/0.1/payload.d.ts.map +1 -0
  128. package/dist/vtc/vetting/auto-grant/show/0.1/payload.js +269 -0
  129. package/dist/vtc/vetting/auto-grant/show/0.1/payload.js.map +1 -0
  130. package/dist/vtc/vetting/auto-grant/update/0.1/payload.d.ts +491 -0
  131. package/dist/vtc/vetting/auto-grant/update/0.1/payload.d.ts.map +1 -0
  132. package/dist/vtc/vetting/auto-grant/update/0.1/payload.js +282 -0
  133. package/dist/vtc/vetting/auto-grant/update/0.1/payload.js.map +1 -0
  134. package/dist/vtc/vetting/revocations/list/0.1/payload.d.ts +608 -0
  135. package/dist/vtc/vetting/revocations/list/0.1/payload.d.ts.map +1 -0
  136. package/dist/vtc/vetting/revocations/list/0.1/payload.js +332 -0
  137. package/dist/vtc/vetting/revocations/list/0.1/payload.js.map +1 -0
  138. package/dist/vtc/vetting/vetters/grants/list/0.1/payload.d.ts +992 -0
  139. package/dist/vtc/vetting/vetters/grants/list/0.1/payload.d.ts.map +1 -0
  140. package/dist/vtc/vetting/vetters/grants/list/0.1/payload.js +461 -0
  141. package/dist/vtc/vetting/vetters/grants/list/0.1/payload.js.map +1 -0
  142. package/dist/vtc/website/deploy/0.1/payload.d.ts +369 -0
  143. package/dist/vtc/website/deploy/0.1/payload.d.ts.map +1 -0
  144. package/dist/vtc/website/deploy/0.1/payload.js +213 -0
  145. package/dist/vtc/website/deploy/0.1/payload.js.map +1 -0
  146. package/dist/vtc/website/files/show/0.1/payload.d.ts +455 -0
  147. package/dist/vtc/website/files/show/0.1/payload.d.ts.map +1 -0
  148. package/dist/vtc/website/files/show/0.1/payload.js +247 -0
  149. package/dist/vtc/website/files/show/0.1/payload.js.map +1 -0
  150. package/dist/vtc/website/upload/abort/0.1/payload.d.ts +256 -0
  151. package/dist/vtc/website/upload/abort/0.1/payload.d.ts.map +1 -0
  152. package/dist/vtc/website/upload/abort/0.1/payload.js +149 -0
  153. package/dist/vtc/website/upload/abort/0.1/payload.js.map +1 -0
  154. package/dist/vtc/website/upload/begin/0.1/payload.d.ts +658 -0
  155. package/dist/vtc/website/upload/begin/0.1/payload.d.ts.map +1 -0
  156. package/dist/vtc/website/upload/begin/0.1/payload.js +375 -0
  157. package/dist/vtc/website/upload/begin/0.1/payload.js.map +1 -0
  158. package/dist/vtc/website/upload/chunk/0.1/payload.d.ts +447 -0
  159. package/dist/vtc/website/upload/chunk/0.1/payload.d.ts.map +1 -0
  160. package/dist/vtc/website/upload/chunk/0.1/payload.js +253 -0
  161. package/dist/vtc/website/upload/chunk/0.1/payload.js.map +1 -0
  162. package/dist/vtc/website/upload/commit/0.1/payload.d.ts +603 -0
  163. package/dist/vtc/website/upload/commit/0.1/payload.d.ts.map +1 -0
  164. package/dist/vtc/website/upload/commit/0.1/payload.js +337 -0
  165. package/dist/vtc/website/upload/commit/0.1/payload.js.map +1 -0
  166. package/package.json +1 -1
  167. package/src/_framework/0.4/framework.ts +1 -1
  168. package/src/_shared/components.ts +371 -0
  169. package/src/auth/_shared/0.1/signing-key.ts +17 -0
  170. package/src/auth/signing-key/enroll/0.1/payload.ts +349 -0
  171. package/src/auth/signing-key/list/0.1/payload.ts +323 -0
  172. package/src/auth/signing-key/revoke/0.1/payload.ts +204 -0
  173. package/src/index.ts +39 -0
  174. package/src/vta/contexts/update-did/1.1/payload.ts +256 -0
  175. package/src/vtc/_shared/0.1/community-presentation.ts +17 -0
  176. package/src/vtc/_shared/0.1/relationship-lifecycle.ts +17 -0
  177. package/src/vtc/_shared/0.1/schema-registry.ts +17 -0
  178. package/src/vtc/_shared/0.1/vetting-auto-grant.ts +17 -0
  179. package/src/vtc/_shared/0.1/website-transfer.ts +17 -0
  180. package/src/vtc/community/branding/show/0.1/payload.ts +207 -0
  181. package/src/vtc/community/branding/update/0.1/payload.ts +214 -0
  182. package/src/vtc/community/join-discovery/show/0.1/payload.ts +185 -0
  183. package/src/vtc/community/join-discovery/update/0.1/payload.ts +192 -0
  184. package/src/vtc/community/requested-attributes/show/0.1/payload.ts +221 -0
  185. package/src/vtc/community/requested-attributes/update/0.1/payload.ts +228 -0
  186. package/src/vtc/join-requests/query/0.1/payload.ts +285 -0
  187. package/src/vtc/join-requests/vetting/show/0.1/payload.ts +740 -0
  188. package/src/vtc/relationships/restore/0.1/payload.ts +307 -0
  189. package/src/vtc/relationships/suspend/0.1/payload.ts +307 -0
  190. package/src/vtc/rooms/list/0.1/payload.ts +449 -0
  191. package/src/vtc/schemas/accepts/delete/0.1/payload.ts +170 -0
  192. package/src/vtc/schemas/accepts/list/0.1/payload.ts +724 -0
  193. package/src/vtc/schemas/accepts/register/0.1/payload.ts +697 -0
  194. package/src/vtc/schemas/accepts/show/0.1/payload.ts +684 -0
  195. package/src/vtc/schemas/delete/0.1/payload.ts +170 -0
  196. package/src/vtc/schemas/list/0.1/payload.ts +344 -0
  197. package/src/vtc/schemas/register/0.1/payload.ts +325 -0
  198. package/src/vtc/schemas/show/0.1/payload.ts +308 -0
  199. package/src/vtc/vetting/auto-grant/show/0.1/payload.ts +297 -0
  200. package/src/vtc/vetting/auto-grant/update/0.1/payload.ts +316 -0
  201. package/src/vtc/vetting/revocations/list/0.1/payload.ts +416 -0
  202. package/src/vtc/vetting/vetters/grants/list/0.1/payload.ts +700 -0
  203. package/src/vtc/website/deploy/0.1/payload.ts +255 -0
  204. package/src/vtc/website/files/show/0.1/payload.ts +303 -0
  205. package/src/vtc/website/upload/abort/0.1/payload.ts +182 -0
  206. package/src/vtc/website/upload/begin/0.1/payload.ts +408 -0
  207. package/src/vtc/website/upload/chunk/0.1/payload.ts +295 -0
  208. package/src/vtc/website/upload/commit/0.1/payload.ts +385 -0
@@ -0,0 +1,255 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/website/deploy/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { ExpectedSha256, ExpectedSizeBytes, Ext, UploadId } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Publish a staged bundle upload. The outer document members are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface VTCWebsiteDeployPayload {
13
+ uploadId: UploadId;
14
+ ext?: Ext;
15
+ }
16
+ export interface VTCWebsiteDeployResponsePayload {
17
+ /**
18
+ * How the site was replaced.
19
+ */
20
+ deployMode: "live" | "managed";
21
+ bundleSha256: ExpectedSha256;
22
+ bundleSizeBytes: ExpectedSizeBytes;
23
+ /**
24
+ * The generation created; 0 in live mode.
25
+ */
26
+ targetGeneration: number;
27
+ /**
28
+ * Old generations removed; 0 in live mode.
29
+ */
30
+ prunedGenerations: number;
31
+ ext?: Ext;
32
+ }
33
+
34
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
35
+ export type { ExpectedSha256, ExpectedSizeBytes, Ext, UploadId };
36
+
37
+ /** Trust Task type URI. */
38
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/website/deploy/0.1" as const;
39
+
40
+ /** Stable alias for this specification's request payload shape. */
41
+ export type Payload = VTCWebsiteDeployPayload;
42
+
43
+ /** Trust Task response type URI (request type URI + "#response"). */
44
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/website/deploy/0.1#response" as const;
45
+
46
+ /** Stable alias for this specification's success-response payload shape. */
47
+ export type Response = VTCWebsiteDeployResponsePayload;
48
+
49
+ /**
50
+ * This specification's payload schema, as a value.
51
+ *
52
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
53
+ * rather than only as a `.json` file because TypeScript types are erased
54
+ * at runtime: without a schema a consumer has nothing to validate, and
55
+ * every REQUIRED payload member is optional in practice. Cross-file
56
+ * `$ref`s are already inlined, so it needs no resolver.
57
+ */
58
+ export const PAYLOAD_SCHEMA = {
59
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
60
+ "$id": "https://trusttasks.org/spec/vtc/website/deploy/0.1",
61
+ "title": "VTC Website — Deploy — payload",
62
+ "description": "Publish a staged bundle upload. The outer document members are owned by the framework — SPEC §6.3.",
63
+ "type": "object",
64
+ "additionalProperties": false,
65
+ "required": [
66
+ "uploadId"
67
+ ],
68
+ "properties": {
69
+ "uploadId": {
70
+ "$ref": "#/$defs/UploadId"
71
+ },
72
+ "ext": {
73
+ "$ref": "#/$defs/Ext"
74
+ }
75
+ },
76
+ "$defs": {
77
+ "Response": {
78
+ "$anchor": "response",
79
+ "title": "VTC Website — Deploy — response payload",
80
+ "type": "object",
81
+ "additionalProperties": false,
82
+ "required": [
83
+ "deployMode",
84
+ "bundleSha256",
85
+ "bundleSizeBytes",
86
+ "targetGeneration",
87
+ "prunedGenerations"
88
+ ],
89
+ "properties": {
90
+ "deployMode": {
91
+ "type": "string",
92
+ "enum": [
93
+ "live",
94
+ "managed"
95
+ ],
96
+ "description": "How the site was replaced."
97
+ },
98
+ "bundleSha256": {
99
+ "$ref": "#/$defs/ExpectedSha256"
100
+ },
101
+ "bundleSizeBytes": {
102
+ "$ref": "#/$defs/ExpectedSizeBytes"
103
+ },
104
+ "targetGeneration": {
105
+ "type": "integer",
106
+ "minimum": 0,
107
+ "description": "The generation created; 0 in live mode."
108
+ },
109
+ "prunedGenerations": {
110
+ "type": "integer",
111
+ "minimum": 0,
112
+ "description": "Old generations removed; 0 in live mode."
113
+ },
114
+ "ext": {
115
+ "$ref": "#/$defs/Ext"
116
+ }
117
+ }
118
+ },
119
+ "Ext": {
120
+ "title": "Ext",
121
+ "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.",
122
+ "type": "object",
123
+ "minProperties": 1,
124
+ "additionalProperties": true,
125
+ "propertyNames": {
126
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
127
+ }
128
+ },
129
+ "ExpectedSizeBytes": {
130
+ "title": "ExpectedSizeBytes",
131
+ "description": "Total byte count of the bundle. A zero-length bundle is not a degenerate success — nothing was serialized — so the floor is 1.",
132
+ "type": "integer",
133
+ "minimum": 1
134
+ },
135
+ "ExpectedSha256": {
136
+ "title": "ExpectedSha256",
137
+ "description": "Lowercase hex SHA-256 of the whole bundle's bytes. Kept in the hex form the 1.0 descriptor published rather than moved to DigestMultibase, because it is an unchanged member of an existing descriptor and re-encoding it would break every stream producer for no gain in what it checks. For a chunked transfer it is the check over the reassembled bundle, applied after every chunk has verified individually, so that a correct set of chunks assembled in the wrong order is still caught.",
138
+ "type": "string",
139
+ "pattern": "^[0-9a-f]{64}$"
140
+ },
141
+ "UploadId": {
142
+ "title": "UploadId",
143
+ "type": "string",
144
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
145
+ "description": "Handle for one upload across begin, chunk, commit and abort, and — for a bundle — deploy. Recipient-generated and unguessable, which is what lets a reference to somebody else's upload be answered as not-found without confirming it exists. Opaque: a producer quotes what it was given."
146
+ }
147
+ }
148
+ } as const;
149
+
150
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
151
+ export const RESPONSE_PAYLOAD_SCHEMA = {
152
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
153
+ "$ref": "#/$defs/Response",
154
+ "$defs": {
155
+ "Response": {
156
+ "$anchor": "response",
157
+ "title": "VTC Website — Deploy — response payload",
158
+ "type": "object",
159
+ "additionalProperties": false,
160
+ "required": [
161
+ "deployMode",
162
+ "bundleSha256",
163
+ "bundleSizeBytes",
164
+ "targetGeneration",
165
+ "prunedGenerations"
166
+ ],
167
+ "properties": {
168
+ "deployMode": {
169
+ "type": "string",
170
+ "enum": [
171
+ "live",
172
+ "managed"
173
+ ],
174
+ "description": "How the site was replaced."
175
+ },
176
+ "bundleSha256": {
177
+ "$ref": "#/$defs/ExpectedSha256"
178
+ },
179
+ "bundleSizeBytes": {
180
+ "$ref": "#/$defs/ExpectedSizeBytes"
181
+ },
182
+ "targetGeneration": {
183
+ "type": "integer",
184
+ "minimum": 0,
185
+ "description": "The generation created; 0 in live mode."
186
+ },
187
+ "prunedGenerations": {
188
+ "type": "integer",
189
+ "minimum": 0,
190
+ "description": "Old generations removed; 0 in live mode."
191
+ },
192
+ "ext": {
193
+ "$ref": "#/$defs/Ext"
194
+ }
195
+ }
196
+ },
197
+ "Ext": {
198
+ "title": "Ext",
199
+ "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.",
200
+ "type": "object",
201
+ "minProperties": 1,
202
+ "additionalProperties": true,
203
+ "propertyNames": {
204
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
205
+ }
206
+ },
207
+ "ExpectedSizeBytes": {
208
+ "title": "ExpectedSizeBytes",
209
+ "description": "Total byte count of the bundle. A zero-length bundle is not a degenerate success — nothing was serialized — so the floor is 1.",
210
+ "type": "integer",
211
+ "minimum": 1
212
+ },
213
+ "ExpectedSha256": {
214
+ "title": "ExpectedSha256",
215
+ "description": "Lowercase hex SHA-256 of the whole bundle's bytes. Kept in the hex form the 1.0 descriptor published rather than moved to DigestMultibase, because it is an unchanged member of an existing descriptor and re-encoding it would break every stream producer for no gain in what it checks. For a chunked transfer it is the check over the reassembled bundle, applied after every chunk has verified individually, so that a correct set of chunks assembled in the wrong order is still caught.",
216
+ "type": "string",
217
+ "pattern": "^[0-9a-f]{64}$"
218
+ },
219
+ "UploadId": {
220
+ "title": "UploadId",
221
+ "type": "string",
222
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
223
+ "description": "Handle for one upload across begin, chunk, commit and abort, and — for a bundle — deploy. Recipient-generated and unguessable, which is what lets a reference to somebody else's upload be answered as not-found without confirming it exists. Opaque: a producer quotes what it was given."
224
+ }
225
+ }
226
+ } as const;
227
+
228
+ /**
229
+ * SPEC.md §7.2 policy for the request variant, from this specification's
230
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
231
+ * per-specification and cannot be derived from the document alone, and
232
+ * item 2 needs the schema this carries.
233
+ */
234
+ export const SPEC = {
235
+ typeUri: TYPE_URI,
236
+ isBearer: false,
237
+ isProofRequired: true,
238
+ isRecipientRequired: true,
239
+ isIssuedAtRequired: true,
240
+ payloadSchema: PAYLOAD_SCHEMA,
241
+ } as const;
242
+
243
+ /**
244
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
245
+ * tracks the *issuer* party's requirement because a response swaps the
246
+ * parties (§7.3 item 5).
247
+ */
248
+ export const RESPONSE_SPEC = {
249
+ typeUri: RESPONSE_TYPE_URI,
250
+ isBearer: false,
251
+ isProofRequired: true,
252
+ isRecipientRequired: true,
253
+ isIssuedAtRequired: true,
254
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
255
+ } as const;
@@ -0,0 +1,303 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/website/files/show/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext, FileData, WebsiteEtag, WebsitePath } from "../../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Read a range of one website file. The outer document members are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface VTCWebsiteFilesShowPayload {
13
+ path: WebsitePath;
14
+ /**
15
+ * Byte offset to read from; 0 when absent.
16
+ */
17
+ offset?: number;
18
+ /**
19
+ * Bytes to read; 262144 when absent.
20
+ */
21
+ length?: number;
22
+ ifMatch?: WebsiteEtag;
23
+ ext?: Ext;
24
+ }
25
+ export interface VTCWebsiteFilesShowResponsePayload {
26
+ path: WebsitePath;
27
+ etag: WebsiteEtag;
28
+ /**
29
+ * The whole file's size.
30
+ */
31
+ sizeBytes: number;
32
+ /**
33
+ * The media type the site serves the file as, guessed from its extension; `application/octet-stream` when unknown.
34
+ */
35
+ contentType: string;
36
+ /**
37
+ * Echoed.
38
+ */
39
+ offset: number;
40
+ data: FileData;
41
+ /**
42
+ * Whether this range reached the end of the file.
43
+ */
44
+ complete: boolean;
45
+ ext?: Ext;
46
+ }
47
+
48
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
49
+ export type { Ext, FileData, WebsiteEtag, WebsitePath };
50
+
51
+ /** Trust Task type URI. */
52
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/website/files/show/0.1" as const;
53
+
54
+ /** Stable alias for this specification's request payload shape. */
55
+ export type Payload = VTCWebsiteFilesShowPayload;
56
+
57
+ /** Trust Task response type URI (request type URI + "#response"). */
58
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/website/files/show/0.1#response" as const;
59
+
60
+ /** Stable alias for this specification's success-response payload shape. */
61
+ export type Response = VTCWebsiteFilesShowResponsePayload;
62
+
63
+ /**
64
+ * This specification's payload schema, as a value.
65
+ *
66
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
67
+ * rather than only as a `.json` file because TypeScript types are erased
68
+ * at runtime: without a schema a consumer has nothing to validate, and
69
+ * every REQUIRED payload member is optional in practice. Cross-file
70
+ * `$ref`s are already inlined, so it needs no resolver.
71
+ */
72
+ export const PAYLOAD_SCHEMA = {
73
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
74
+ "$id": "https://trusttasks.org/spec/vtc/website/files/show/0.1",
75
+ "title": "VTC Website — Files — Show — payload",
76
+ "description": "Read a range of one website file. The outer document members are owned by the framework — SPEC §6.3.",
77
+ "type": "object",
78
+ "additionalProperties": false,
79
+ "required": [
80
+ "path"
81
+ ],
82
+ "properties": {
83
+ "path": {
84
+ "$ref": "#/$defs/WebsitePath"
85
+ },
86
+ "offset": {
87
+ "type": "integer",
88
+ "minimum": 0,
89
+ "description": "Byte offset to read from; 0 when absent."
90
+ },
91
+ "length": {
92
+ "type": "integer",
93
+ "minimum": 1,
94
+ "maximum": 262144,
95
+ "description": "Bytes to read; 262144 when absent."
96
+ },
97
+ "ifMatch": {
98
+ "$ref": "#/$defs/WebsiteEtag"
99
+ },
100
+ "ext": {
101
+ "$ref": "#/$defs/Ext"
102
+ }
103
+ },
104
+ "$defs": {
105
+ "Response": {
106
+ "$anchor": "response",
107
+ "title": "VTC Website — Files — Show — response payload",
108
+ "type": "object",
109
+ "additionalProperties": false,
110
+ "required": [
111
+ "path",
112
+ "etag",
113
+ "sizeBytes",
114
+ "contentType",
115
+ "offset",
116
+ "data",
117
+ "complete"
118
+ ],
119
+ "properties": {
120
+ "path": {
121
+ "$ref": "#/$defs/WebsitePath"
122
+ },
123
+ "etag": {
124
+ "$ref": "#/$defs/WebsiteEtag"
125
+ },
126
+ "sizeBytes": {
127
+ "type": "integer",
128
+ "minimum": 0,
129
+ "description": "The whole file's size."
130
+ },
131
+ "contentType": {
132
+ "type": "string",
133
+ "minLength": 1,
134
+ "maxLength": 255,
135
+ "description": "The media type the site serves the file as, guessed from its extension; `application/octet-stream` when unknown."
136
+ },
137
+ "offset": {
138
+ "type": "integer",
139
+ "minimum": 0,
140
+ "description": "Echoed."
141
+ },
142
+ "data": {
143
+ "$ref": "#/$defs/FileData"
144
+ },
145
+ "complete": {
146
+ "type": "boolean",
147
+ "description": "Whether this range reached the end of the file."
148
+ },
149
+ "ext": {
150
+ "$ref": "#/$defs/Ext"
151
+ }
152
+ }
153
+ },
154
+ "Ext": {
155
+ "title": "Ext",
156
+ "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.",
157
+ "type": "object",
158
+ "minProperties": 1,
159
+ "additionalProperties": true,
160
+ "propertyNames": {
161
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
162
+ }
163
+ },
164
+ "FileData": {
165
+ "title": "FileData",
166
+ "type": "string",
167
+ "maxLength": 349526,
168
+ "pattern": "^[A-Za-z0-9_-]*$",
169
+ "description": "A range of a file's bytes, base64url-encoded without padding (RFC 4648 §5). Empty for an empty range. Bounded at 349526 characters, the unpadded encoding of the 262144-byte range ceiling."
170
+ },
171
+ "WebsiteEtag": {
172
+ "title": "WebsiteEtag",
173
+ "type": "string",
174
+ "pattern": "^[0-9a-f]{64}$",
175
+ "description": "A file's content hash: the lowercase hex SHA-256 of its bytes — the `etag` vtc/website/files/list reports, and the `ETag` a direct read of the path returns, without the HTTP quotes."
176
+ },
177
+ "WebsitePath": {
178
+ "title": "WebsitePath",
179
+ "type": "string",
180
+ "minLength": 1,
181
+ "maxLength": 1024,
182
+ "pattern": "^[^\\\\]+$",
183
+ "description": "A file's path relative to the site root, `/`-separated, with or without a leading `/`. The community resolves it inside the site root and refuses one that escapes the root (`..`), names a hidden file or directory (a segment beginning `.`), carries a blocklisted extension, or contains a control character — the same rules the public read handler applies, so nothing can be written that the site would refuse to serve, and nothing can be read that it would not."
184
+ }
185
+ }
186
+ } as const;
187
+
188
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
189
+ export const RESPONSE_PAYLOAD_SCHEMA = {
190
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
191
+ "$ref": "#/$defs/Response",
192
+ "$defs": {
193
+ "Response": {
194
+ "$anchor": "response",
195
+ "title": "VTC Website — Files — Show — response payload",
196
+ "type": "object",
197
+ "additionalProperties": false,
198
+ "required": [
199
+ "path",
200
+ "etag",
201
+ "sizeBytes",
202
+ "contentType",
203
+ "offset",
204
+ "data",
205
+ "complete"
206
+ ],
207
+ "properties": {
208
+ "path": {
209
+ "$ref": "#/$defs/WebsitePath"
210
+ },
211
+ "etag": {
212
+ "$ref": "#/$defs/WebsiteEtag"
213
+ },
214
+ "sizeBytes": {
215
+ "type": "integer",
216
+ "minimum": 0,
217
+ "description": "The whole file's size."
218
+ },
219
+ "contentType": {
220
+ "type": "string",
221
+ "minLength": 1,
222
+ "maxLength": 255,
223
+ "description": "The media type the site serves the file as, guessed from its extension; `application/octet-stream` when unknown."
224
+ },
225
+ "offset": {
226
+ "type": "integer",
227
+ "minimum": 0,
228
+ "description": "Echoed."
229
+ },
230
+ "data": {
231
+ "$ref": "#/$defs/FileData"
232
+ },
233
+ "complete": {
234
+ "type": "boolean",
235
+ "description": "Whether this range reached the end of the file."
236
+ },
237
+ "ext": {
238
+ "$ref": "#/$defs/Ext"
239
+ }
240
+ }
241
+ },
242
+ "Ext": {
243
+ "title": "Ext",
244
+ "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.",
245
+ "type": "object",
246
+ "minProperties": 1,
247
+ "additionalProperties": true,
248
+ "propertyNames": {
249
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
250
+ }
251
+ },
252
+ "FileData": {
253
+ "title": "FileData",
254
+ "type": "string",
255
+ "maxLength": 349526,
256
+ "pattern": "^[A-Za-z0-9_-]*$",
257
+ "description": "A range of a file's bytes, base64url-encoded without padding (RFC 4648 §5). Empty for an empty range. Bounded at 349526 characters, the unpadded encoding of the 262144-byte range ceiling."
258
+ },
259
+ "WebsiteEtag": {
260
+ "title": "WebsiteEtag",
261
+ "type": "string",
262
+ "pattern": "^[0-9a-f]{64}$",
263
+ "description": "A file's content hash: the lowercase hex SHA-256 of its bytes — the `etag` vtc/website/files/list reports, and the `ETag` a direct read of the path returns, without the HTTP quotes."
264
+ },
265
+ "WebsitePath": {
266
+ "title": "WebsitePath",
267
+ "type": "string",
268
+ "minLength": 1,
269
+ "maxLength": 1024,
270
+ "pattern": "^[^\\\\]+$",
271
+ "description": "A file's path relative to the site root, `/`-separated, with or without a leading `/`. The community resolves it inside the site root and refuses one that escapes the root (`..`), names a hidden file or directory (a segment beginning `.`), carries a blocklisted extension, or contains a control character — the same rules the public read handler applies, so nothing can be written that the site would refuse to serve, and nothing can be read that it would not."
272
+ }
273
+ }
274
+ } as const;
275
+
276
+ /**
277
+ * SPEC.md §7.2 policy for the request variant, from this specification's
278
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
279
+ * per-specification and cannot be derived from the document alone, and
280
+ * item 2 needs the schema this carries.
281
+ */
282
+ export const SPEC = {
283
+ typeUri: TYPE_URI,
284
+ isBearer: false,
285
+ isProofRequired: false,
286
+ isRecipientRequired: true,
287
+ isIssuedAtRequired: false,
288
+ payloadSchema: PAYLOAD_SCHEMA,
289
+ } as const;
290
+
291
+ /**
292
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
293
+ * tracks the *issuer* party's requirement because a response swaps the
294
+ * parties (§7.3 item 5).
295
+ */
296
+ export const RESPONSE_SPEC = {
297
+ typeUri: RESPONSE_TYPE_URI,
298
+ isBearer: false,
299
+ isProofRequired: false,
300
+ isRecipientRequired: true,
301
+ isIssuedAtRequired: false,
302
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
303
+ } as const;