@eloxiv/contracts 0.0.0-stage → 0.1.1

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 (537) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +6 -2
  3. package/dist/Agent.d.ts +792 -0
  4. package/dist/Agent.d.ts.map +1 -0
  5. package/dist/Agent.js +610 -0
  6. package/dist/Agent.js.map +1 -0
  7. package/dist/Analytics.d.ts +46 -0
  8. package/dist/Analytics.d.ts.map +1 -0
  9. package/dist/Analytics.js +89 -0
  10. package/dist/Analytics.js.map +1 -0
  11. package/dist/Approval.d.ts +70 -0
  12. package/dist/Approval.d.ts.map +1 -0
  13. package/dist/Approval.js +127 -0
  14. package/dist/Approval.js.map +1 -0
  15. package/dist/Catalog.d.ts +238 -0
  16. package/dist/Catalog.d.ts.map +1 -0
  17. package/dist/Catalog.js +169 -0
  18. package/dist/Catalog.js.map +1 -0
  19. package/dist/Checklist.d.ts +99 -0
  20. package/dist/Checklist.d.ts.map +1 -0
  21. package/dist/Checklist.js +105 -0
  22. package/dist/Checklist.js.map +1 -0
  23. package/dist/Data.d.ts +107 -0
  24. package/dist/Data.d.ts.map +1 -0
  25. package/dist/Data.js +93 -0
  26. package/dist/Data.js.map +1 -0
  27. package/dist/Devices.d.ts +857 -0
  28. package/dist/Devices.d.ts.map +1 -0
  29. package/dist/Devices.js +590 -0
  30. package/dist/Devices.js.map +1 -0
  31. package/dist/Durable.d.ts +406 -0
  32. package/dist/Durable.d.ts.map +1 -0
  33. package/dist/Durable.js +203 -0
  34. package/dist/Durable.js.map +1 -0
  35. package/dist/Errors.d.ts +95 -0
  36. package/dist/Errors.d.ts.map +1 -0
  37. package/dist/Errors.js +72 -0
  38. package/dist/Errors.js.map +1 -0
  39. package/dist/JsonSchema.d.ts +355 -0
  40. package/dist/JsonSchema.d.ts.map +1 -0
  41. package/dist/JsonSchema.js +151 -0
  42. package/dist/JsonSchema.js.map +1 -0
  43. package/dist/Manifest.d.ts +353 -0
  44. package/dist/Manifest.d.ts.map +1 -0
  45. package/dist/Manifest.js +894 -0
  46. package/dist/Manifest.js.map +1 -0
  47. package/dist/Module.d.ts +447 -0
  48. package/dist/Module.d.ts.map +1 -0
  49. package/dist/Module.js +221 -0
  50. package/dist/Module.js.map +1 -0
  51. package/dist/Optimistic.d.ts +192 -0
  52. package/dist/Optimistic.d.ts.map +1 -0
  53. package/dist/Optimistic.js +319 -0
  54. package/dist/Optimistic.js.map +1 -0
  55. package/dist/Projection.d.ts +163 -0
  56. package/dist/Projection.d.ts.map +1 -0
  57. package/dist/Projection.js +158 -0
  58. package/dist/Projection.js.map +1 -0
  59. package/dist/Proposals.d.ts +103 -0
  60. package/dist/Proposals.d.ts.map +1 -0
  61. package/dist/Proposals.js +72 -0
  62. package/dist/Proposals.js.map +1 -0
  63. package/dist/Receipt.d.ts +243 -0
  64. package/dist/Receipt.d.ts.map +1 -0
  65. package/dist/Receipt.js +108 -0
  66. package/dist/Receipt.js.map +1 -0
  67. package/dist/Records.d.ts +297 -0
  68. package/dist/Records.d.ts.map +1 -0
  69. package/dist/Records.js +171 -0
  70. package/dist/Records.js.map +1 -0
  71. package/dist/Render.d.ts +207 -0
  72. package/dist/Render.d.ts.map +1 -0
  73. package/dist/Render.js +502 -0
  74. package/dist/Render.js.map +1 -0
  75. package/dist/Rpc.d.ts +115 -0
  76. package/dist/Rpc.d.ts.map +1 -0
  77. package/dist/Rpc.js +68 -0
  78. package/dist/Rpc.js.map +1 -0
  79. package/dist/SearchLanguages.d.ts +4 -0
  80. package/dist/SearchLanguages.d.ts.map +1 -0
  81. package/dist/SearchLanguages.js +33 -0
  82. package/dist/SearchLanguages.js.map +1 -0
  83. package/dist/Service.d.ts +59 -0
  84. package/dist/Service.d.ts.map +1 -0
  85. package/dist/Service.js +38 -0
  86. package/dist/Service.js.map +1 -0
  87. package/dist/Versions.d.ts +9 -0
  88. package/dist/Versions.d.ts.map +1 -0
  89. package/dist/Versions.js +78 -0
  90. package/dist/Versions.js.map +1 -0
  91. package/dist/contracts/ActionConsent.d.ts +189 -0
  92. package/dist/contracts/ActionConsent.d.ts.map +1 -0
  93. package/dist/contracts/ActionConsent.js +129 -0
  94. package/dist/contracts/ActionConsent.js.map +1 -0
  95. package/dist/contracts/ActionRegistry.d.ts +149 -0
  96. package/dist/contracts/ActionRegistry.d.ts.map +1 -0
  97. package/dist/contracts/ActionRegistry.js +37 -0
  98. package/dist/contracts/ActionRegistry.js.map +1 -0
  99. package/dist/contracts/Actor.d.ts +129 -0
  100. package/dist/contracts/Actor.d.ts.map +1 -0
  101. package/dist/contracts/Actor.js +47 -0
  102. package/dist/contracts/Actor.js.map +1 -0
  103. package/dist/contracts/AgentResources.d.ts +248 -0
  104. package/dist/contracts/AgentResources.d.ts.map +1 -0
  105. package/dist/contracts/AgentResources.js +158 -0
  106. package/dist/contracts/AgentResources.js.map +1 -0
  107. package/dist/contracts/AgentRuntime.d.ts +453 -0
  108. package/dist/contracts/AgentRuntime.d.ts.map +1 -0
  109. package/dist/contracts/AgentRuntime.js +117 -0
  110. package/dist/contracts/AgentRuntime.js.map +1 -0
  111. package/dist/contracts/Approvals.d.ts +303 -0
  112. package/dist/contracts/Approvals.d.ts.map +1 -0
  113. package/dist/contracts/Approvals.js +117 -0
  114. package/dist/contracts/Approvals.js.map +1 -0
  115. package/dist/contracts/Audit.d.ts +510 -0
  116. package/dist/contracts/Audit.d.ts.map +1 -0
  117. package/dist/contracts/Audit.js +139 -0
  118. package/dist/contracts/Audit.js.map +1 -0
  119. package/dist/contracts/CalendarProvider.d.ts +572 -0
  120. package/dist/contracts/CalendarProvider.d.ts.map +1 -0
  121. package/dist/contracts/CalendarProvider.js +203 -0
  122. package/dist/contracts/CalendarProvider.js.map +1 -0
  123. package/dist/contracts/Capability.d.ts +197 -0
  124. package/dist/contracts/Capability.d.ts.map +1 -0
  125. package/dist/contracts/Capability.js +189 -0
  126. package/dist/contracts/Capability.js.map +1 -0
  127. package/dist/contracts/ClientSDK.d.ts +250 -0
  128. package/dist/contracts/ClientSDK.d.ts.map +1 -0
  129. package/dist/contracts/ClientSDK.js +184 -0
  130. package/dist/contracts/ClientSDK.js.map +1 -0
  131. package/dist/contracts/CollabDocument.d.ts +781 -0
  132. package/dist/contracts/CollabDocument.d.ts.map +1 -0
  133. package/dist/contracts/CollabDocument.js +364 -0
  134. package/dist/contracts/CollabDocument.js.map +1 -0
  135. package/dist/contracts/Command.d.ts +183 -0
  136. package/dist/contracts/Command.d.ts.map +1 -0
  137. package/dist/contracts/Command.js +66 -0
  138. package/dist/contracts/Command.js.map +1 -0
  139. package/dist/contracts/Connections.d.ts +612 -0
  140. package/dist/contracts/Connections.d.ts.map +1 -0
  141. package/dist/contracts/Connections.js +323 -0
  142. package/dist/contracts/Connections.js.map +1 -0
  143. package/dist/contracts/ContextAccounting.d.ts +79 -0
  144. package/dist/contracts/ContextAccounting.d.ts.map +1 -0
  145. package/dist/contracts/ContextAccounting.js +32 -0
  146. package/dist/contracts/ContextAccounting.js.map +1 -0
  147. package/dist/contracts/Daemon.d.ts +486 -0
  148. package/dist/contracts/Daemon.d.ts.map +1 -0
  149. package/dist/contracts/Daemon.js +192 -0
  150. package/dist/contracts/Daemon.js.map +1 -0
  151. package/dist/contracts/DbTx.d.ts +149 -0
  152. package/dist/contracts/DbTx.d.ts.map +1 -0
  153. package/dist/contracts/DbTx.js +94 -0
  154. package/dist/contracts/DbTx.js.map +1 -0
  155. package/dist/contracts/Delegation.d.ts +121 -0
  156. package/dist/contracts/Delegation.d.ts.map +1 -0
  157. package/dist/contracts/Delegation.js +76 -0
  158. package/dist/contracts/Delegation.js.map +1 -0
  159. package/dist/contracts/DeviceControl.d.ts +293 -0
  160. package/dist/contracts/DeviceControl.d.ts.map +1 -0
  161. package/dist/contracts/DeviceControl.js +107 -0
  162. package/dist/contracts/DeviceControl.js.map +1 -0
  163. package/dist/contracts/Directory.d.ts +492 -0
  164. package/dist/contracts/Directory.d.ts.map +1 -0
  165. package/dist/contracts/Directory.js +225 -0
  166. package/dist/contracts/Directory.js.map +1 -0
  167. package/dist/contracts/DirectoryProvider.d.ts +214 -0
  168. package/dist/contracts/DirectoryProvider.d.ts.map +1 -0
  169. package/dist/contracts/DirectoryProvider.js +73 -0
  170. package/dist/contracts/DirectoryProvider.js.map +1 -0
  171. package/dist/contracts/DocumentSource.d.ts +190 -0
  172. package/dist/contracts/DocumentSource.d.ts.map +1 -0
  173. package/dist/contracts/DocumentSource.js +64 -0
  174. package/dist/contracts/DocumentSource.js.map +1 -0
  175. package/dist/contracts/Files.d.ts +762 -0
  176. package/dist/contracts/Files.d.ts.map +1 -0
  177. package/dist/contracts/Files.js +339 -0
  178. package/dist/contracts/Files.js.map +1 -0
  179. package/dist/contracts/Flags.d.ts +265 -0
  180. package/dist/contracts/Flags.d.ts.map +1 -0
  181. package/dist/contracts/Flags.js +197 -0
  182. package/dist/contracts/Flags.js.map +1 -0
  183. package/dist/contracts/Host.d.ts +320 -0
  184. package/dist/contracts/Host.d.ts.map +1 -0
  185. package/dist/contracts/Host.js +224 -0
  186. package/dist/contracts/Host.js.map +1 -0
  187. package/dist/contracts/HttpApi.d.ts +102 -0
  188. package/dist/contracts/HttpApi.d.ts.map +1 -0
  189. package/dist/contracts/HttpApi.js +89 -0
  190. package/dist/contracts/HttpApi.js.map +1 -0
  191. package/dist/contracts/Ingestion.d.ts +522 -0
  192. package/dist/contracts/Ingestion.d.ts.map +1 -0
  193. package/dist/contracts/Ingestion.js +275 -0
  194. package/dist/contracts/Ingestion.js.map +1 -0
  195. package/dist/contracts/Ingress.d.ts +132 -0
  196. package/dist/contracts/Ingress.d.ts.map +1 -0
  197. package/dist/contracts/Ingress.js +102 -0
  198. package/dist/contracts/Ingress.js.map +1 -0
  199. package/dist/contracts/Invocation.d.ts +361 -0
  200. package/dist/contracts/Invocation.d.ts.map +1 -0
  201. package/dist/contracts/Invocation.js +104 -0
  202. package/dist/contracts/Invocation.js.map +1 -0
  203. package/dist/contracts/LocalClient.d.ts +888 -0
  204. package/dist/contracts/LocalClient.d.ts.map +1 -0
  205. package/dist/contracts/LocalClient.js +429 -0
  206. package/dist/contracts/LocalClient.js.map +1 -0
  207. package/dist/contracts/Locale.d.ts +162 -0
  208. package/dist/contracts/Locale.d.ts.map +1 -0
  209. package/dist/contracts/Locale.js +123 -0
  210. package/dist/contracts/Locale.js.map +1 -0
  211. package/dist/contracts/MachineIdentity.d.ts +434 -0
  212. package/dist/contracts/MachineIdentity.d.ts.map +1 -0
  213. package/dist/contracts/MachineIdentity.js +223 -0
  214. package/dist/contracts/MachineIdentity.js.map +1 -0
  215. package/dist/contracts/MailProvider.d.ts +791 -0
  216. package/dist/contracts/MailProvider.d.ts.map +1 -0
  217. package/dist/contracts/MailProvider.js +237 -0
  218. package/dist/contracts/MailProvider.js.map +1 -0
  219. package/dist/contracts/Memory.d.ts +62 -0
  220. package/dist/contracts/Memory.d.ts.map +1 -0
  221. package/dist/contracts/Memory.js +43 -0
  222. package/dist/contracts/Memory.js.map +1 -0
  223. package/dist/contracts/Messaging.d.ts +154 -0
  224. package/dist/contracts/Messaging.d.ts.map +1 -0
  225. package/dist/contracts/Messaging.js +97 -0
  226. package/dist/contracts/Messaging.js.map +1 -0
  227. package/dist/contracts/Metering.d.ts +334 -0
  228. package/dist/contracts/Metering.d.ts.map +1 -0
  229. package/dist/contracts/Metering.js +202 -0
  230. package/dist/contracts/Metering.js.map +1 -0
  231. package/dist/contracts/ModelProvider.d.ts +142 -0
  232. package/dist/contracts/ModelProvider.d.ts.map +1 -0
  233. package/dist/contracts/ModelProvider.js +72 -0
  234. package/dist/contracts/ModelProvider.js.map +1 -0
  235. package/dist/contracts/ModuleManifest.d.ts +2519 -0
  236. package/dist/contracts/ModuleManifest.d.ts.map +1 -0
  237. package/dist/contracts/ModuleManifest.js +272 -0
  238. package/dist/contracts/ModuleManifest.js.map +1 -0
  239. package/dist/contracts/NotificationChannel.d.ts +378 -0
  240. package/dist/contracts/NotificationChannel.d.ts.map +1 -0
  241. package/dist/contracts/NotificationChannel.js +136 -0
  242. package/dist/contracts/NotificationChannel.js.map +1 -0
  243. package/dist/contracts/Notifications.d.ts +417 -0
  244. package/dist/contracts/Notifications.d.ts.map +1 -0
  245. package/dist/contracts/Notifications.js +267 -0
  246. package/dist/contracts/Notifications.js.map +1 -0
  247. package/dist/contracts/Outbox.d.ts +469 -0
  248. package/dist/contracts/Outbox.d.ts.map +1 -0
  249. package/dist/contracts/Outbox.js +215 -0
  250. package/dist/contracts/Outbox.js.map +1 -0
  251. package/dist/contracts/Privacy.d.ts +1029 -0
  252. package/dist/contracts/Privacy.d.ts.map +1 -0
  253. package/dist/contracts/Privacy.js +437 -0
  254. package/dist/contracts/Privacy.js.map +1 -0
  255. package/dist/contracts/Progress.d.ts +305 -0
  256. package/dist/contracts/Progress.d.ts.map +1 -0
  257. package/dist/contracts/Progress.js +174 -0
  258. package/dist/contracts/Progress.js.map +1 -0
  259. package/dist/contracts/QuerySurface.d.ts +231 -0
  260. package/dist/contracts/QuerySurface.d.ts.map +1 -0
  261. package/dist/contracts/QuerySurface.js +113 -0
  262. package/dist/contracts/QuerySurface.js.map +1 -0
  263. package/dist/contracts/Readiness.d.ts +105 -0
  264. package/dist/contracts/Readiness.d.ts.map +1 -0
  265. package/dist/contracts/Readiness.js +57 -0
  266. package/dist/contracts/Readiness.js.map +1 -0
  267. package/dist/contracts/Release.d.ts +295 -0
  268. package/dist/contracts/Release.d.ts.map +1 -0
  269. package/dist/contracts/Release.js +175 -0
  270. package/dist/contracts/Release.js.map +1 -0
  271. package/dist/contracts/ResultRendering.d.ts +533 -0
  272. package/dist/contracts/ResultRendering.d.ts.map +1 -0
  273. package/dist/contracts/ResultRendering.js +59 -0
  274. package/dist/contracts/ResultRendering.js.map +1 -0
  275. package/dist/contracts/Sandbox.d.ts +1164 -0
  276. package/dist/contracts/Sandbox.d.ts.map +1 -0
  277. package/dist/contracts/Sandbox.js +550 -0
  278. package/dist/contracts/Sandbox.js.map +1 -0
  279. package/dist/contracts/Scheduler.d.ts +814 -0
  280. package/dist/contracts/Scheduler.d.ts.map +1 -0
  281. package/dist/contracts/Scheduler.js +202 -0
  282. package/dist/contracts/Scheduler.js.map +1 -0
  283. package/dist/contracts/ScreenContext.d.ts +514 -0
  284. package/dist/contracts/ScreenContext.d.ts.map +1 -0
  285. package/dist/contracts/ScreenContext.js +272 -0
  286. package/dist/contracts/ScreenContext.js.map +1 -0
  287. package/dist/contracts/Search.d.ts +308 -0
  288. package/dist/contracts/Search.d.ts.map +1 -0
  289. package/dist/contracts/Search.js +107 -0
  290. package/dist/contracts/Search.js.map +1 -0
  291. package/dist/contracts/Secrets.d.ts +483 -0
  292. package/dist/contracts/Secrets.d.ts.map +1 -0
  293. package/dist/contracts/Secrets.js +136 -0
  294. package/dist/contracts/Secrets.js.map +1 -0
  295. package/dist/contracts/Settings.d.ts +221 -0
  296. package/dist/contracts/Settings.d.ts.map +1 -0
  297. package/dist/contracts/Settings.js +163 -0
  298. package/dist/contracts/Settings.js.map +1 -0
  299. package/dist/contracts/Sharing.d.ts +319 -0
  300. package/dist/contracts/Sharing.d.ts.map +1 -0
  301. package/dist/contracts/Sharing.js +172 -0
  302. package/dist/contracts/Sharing.js.map +1 -0
  303. package/dist/contracts/Slot.d.ts +162 -0
  304. package/dist/contracts/Slot.d.ts.map +1 -0
  305. package/dist/contracts/Slot.js +56 -0
  306. package/dist/contracts/Slot.js.map +1 -0
  307. package/dist/contracts/Space.d.ts +256 -0
  308. package/dist/contracts/Space.d.ts.map +1 -0
  309. package/dist/contracts/Space.js +133 -0
  310. package/dist/contracts/Space.js.map +1 -0
  311. package/dist/contracts/StorageAdapter.d.ts +124 -0
  312. package/dist/contracts/StorageAdapter.d.ts.map +1 -0
  313. package/dist/contracts/StorageAdapter.js +96 -0
  314. package/dist/contracts/StorageAdapter.js.map +1 -0
  315. package/dist/contracts/StorageBackend.d.ts +310 -0
  316. package/dist/contracts/StorageBackend.d.ts.map +1 -0
  317. package/dist/contracts/StorageBackend.js +196 -0
  318. package/dist/contracts/StorageBackend.js.map +1 -0
  319. package/dist/contracts/Sync.d.ts +286 -0
  320. package/dist/contracts/Sync.d.ts.map +1 -0
  321. package/dist/contracts/Sync.js +157 -0
  322. package/dist/contracts/Sync.js.map +1 -0
  323. package/dist/contracts/Telemetry.d.ts +183 -0
  324. package/dist/contracts/Telemetry.d.ts.map +1 -0
  325. package/dist/contracts/Telemetry.js +153 -0
  326. package/dist/contracts/Telemetry.js.map +1 -0
  327. package/dist/contracts/ThemeTokens.d.ts +212 -0
  328. package/dist/contracts/ThemeTokens.d.ts.map +1 -0
  329. package/dist/contracts/ThemeTokens.js +111 -0
  330. package/dist/contracts/ThemeTokens.js.map +1 -0
  331. package/dist/contracts/ToolSource.d.ts +135 -0
  332. package/dist/contracts/ToolSource.d.ts.map +1 -0
  333. package/dist/contracts/ToolSource.js +81 -0
  334. package/dist/contracts/ToolSource.js.map +1 -0
  335. package/dist/contracts/Versioning.d.ts +363 -0
  336. package/dist/contracts/Versioning.d.ts.map +1 -0
  337. package/dist/contracts/Versioning.js +201 -0
  338. package/dist/contracts/Versioning.js.map +1 -0
  339. package/dist/contracts/View.d.ts +232 -0
  340. package/dist/contracts/View.d.ts.map +1 -0
  341. package/dist/contracts/View.js +102 -0
  342. package/dist/contracts/View.js.map +1 -0
  343. package/dist/contracts/WorkItems.d.ts +242 -0
  344. package/dist/contracts/WorkItems.d.ts.map +1 -0
  345. package/dist/contracts/WorkItems.js +126 -0
  346. package/dist/contracts/WorkItems.js.map +1 -0
  347. package/dist/contracts/Workflow.d.ts +191 -0
  348. package/dist/contracts/Workflow.d.ts.map +1 -0
  349. package/dist/contracts/Workflow.js +63 -0
  350. package/dist/contracts/Workflow.js.map +1 -0
  351. package/dist/contracts/index.d.ts +75 -0
  352. package/dist/contracts/index.d.ts.map +1 -0
  353. package/dist/contracts/index.js +196 -0
  354. package/dist/contracts/index.js.map +1 -0
  355. package/dist/devices/module.d.ts +3777 -0
  356. package/dist/devices/module.d.ts.map +1 -0
  357. package/dist/devices/module.js +179 -0
  358. package/dist/devices/module.js.map +1 -0
  359. package/dist/drizzle/Entity.d.ts +148 -0
  360. package/dist/drizzle/Entity.d.ts.map +1 -0
  361. package/dist/drizzle/Entity.js +396 -0
  362. package/dist/drizzle/Entity.js.map +1 -0
  363. package/dist/index.d.ts +20 -0
  364. package/dist/index.d.ts.map +1 -0
  365. package/dist/index.js +20 -0
  366. package/dist/index.js.map +1 -0
  367. package/package.json +48 -3
  368. package/schema/Actor.json +46 -0
  369. package/schema/AuditRecord.json +403 -0
  370. package/schema/DaemonHealth.json +29 -0
  371. package/schema/InvocationError.json +257 -0
  372. package/schema/InvocationReceipt.json +253 -0
  373. package/schema/Lockfile.json +129 -0
  374. package/schema/OutboxEvent.json +36 -0
  375. package/schema/PairingConfirm.json +33 -0
  376. package/schema/PairingResult.json +18 -0
  377. package/schema/PairingStart.json +18 -0
  378. package/schema/ProvenanceEntry.json +110 -0
  379. package/schema/ReplayEnvelope.json +269 -0
  380. package/schema/Surface.json +17 -0
  381. package/schema/codegen/LocalClient.json +1298 -0
  382. package/schema/codegen/Sandbox.json +320 -0
  383. package/schema/contracts/ActionConsent.json +1930 -0
  384. package/schema/contracts/ActionRegistry.json +722 -0
  385. package/schema/contracts/Actor.json +451 -0
  386. package/schema/contracts/AgentResources.json +1400 -0
  387. package/schema/contracts/AgentRuntime.json +4017 -0
  388. package/schema/contracts/Approvals.json +2916 -0
  389. package/schema/contracts/Audit.json +3268 -0
  390. package/schema/contracts/CalendarProvider.json +5557 -0
  391. package/schema/contracts/ClientSDK.json +1400 -0
  392. package/schema/contracts/CollabDocument.json +4012 -0
  393. package/schema/contracts/Command.json +616 -0
  394. package/schema/contracts/Connections.json +6687 -0
  395. package/schema/contracts/ContextAccounting.json +685 -0
  396. package/schema/contracts/Daemon.json +4555 -0
  397. package/schema/contracts/DbTx.json +321 -0
  398. package/schema/contracts/Delegation.json +949 -0
  399. package/schema/contracts/DeviceControl.json +2626 -0
  400. package/schema/contracts/Directory.json +5168 -0
  401. package/schema/contracts/DirectoryProvider.json +2090 -0
  402. package/schema/contracts/DocumentSource.json +2044 -0
  403. package/schema/contracts/Files.json +4122 -0
  404. package/schema/contracts/Flags.json +1202 -0
  405. package/schema/contracts/Host.json +1769 -0
  406. package/schema/contracts/HttpApi.json +1615 -0
  407. package/schema/contracts/Ingestion.json +3211 -0
  408. package/schema/contracts/Ingress.json +819 -0
  409. package/schema/contracts/Invocation.json +2044 -0
  410. package/schema/contracts/LocalClient.json +6657 -0
  411. package/schema/contracts/Locale.json +654 -0
  412. package/schema/contracts/MachineIdentity.json +2303 -0
  413. package/schema/contracts/MailProvider.json +6663 -0
  414. package/schema/contracts/Memory.json +579 -0
  415. package/schema/contracts/Messaging.json +1764 -0
  416. package/schema/contracts/Metering.json +3060 -0
  417. package/schema/contracts/ModelProvider.json +1127 -0
  418. package/schema/contracts/ModuleManifest.json +9449 -0
  419. package/schema/contracts/NotificationChannel.json +986 -0
  420. package/schema/contracts/Notifications.json +4280 -0
  421. package/schema/contracts/Outbox.json +1451 -0
  422. package/schema/contracts/Privacy.json +4354 -0
  423. package/schema/contracts/Progress.json +1524 -0
  424. package/schema/contracts/QuerySurface.json +661 -0
  425. package/schema/contracts/Readiness.json +209 -0
  426. package/schema/contracts/Release.json +805 -0
  427. package/schema/contracts/ResultRendering.json +2859 -0
  428. package/schema/contracts/Sandbox.json +2286 -0
  429. package/schema/contracts/Scheduler.json +6138 -0
  430. package/schema/contracts/ScreenContext.json +1238 -0
  431. package/schema/contracts/Search.json +1058 -0
  432. package/schema/contracts/Secrets.json +2444 -0
  433. package/schema/contracts/Settings.json +654 -0
  434. package/schema/contracts/Sharing.json +2854 -0
  435. package/schema/contracts/Slot.json +537 -0
  436. package/schema/contracts/Space.json +892 -0
  437. package/schema/contracts/StorageAdapter.json +623 -0
  438. package/schema/contracts/StorageBackend.json +2421 -0
  439. package/schema/contracts/Sync.json +894 -0
  440. package/schema/contracts/Telemetry.json +696 -0
  441. package/schema/contracts/ThemeTokens.json +547 -0
  442. package/schema/contracts/ToolSource.json +1333 -0
  443. package/schema/contracts/Versioning.json +1481 -0
  444. package/schema/contracts/View.json +750 -0
  445. package/schema/contracts/WorkItems.json +1731 -0
  446. package/schema/contracts/Workflow.json +1242 -0
  447. package/src/Agent.ts +758 -0
  448. package/src/Analytics.ts +110 -0
  449. package/src/Approval.ts +131 -0
  450. package/src/Catalog.ts +192 -0
  451. package/src/Checklist.ts +162 -0
  452. package/src/Data.ts +109 -0
  453. package/src/Devices.ts +721 -0
  454. package/src/Durable.ts +240 -0
  455. package/src/Errors.ts +111 -0
  456. package/src/JsonSchema.ts +166 -0
  457. package/src/Manifest.ts +1147 -0
  458. package/src/Module.ts +640 -0
  459. package/src/Optimistic.ts +332 -0
  460. package/src/Projection.ts +207 -0
  461. package/src/Proposals.ts +89 -0
  462. package/src/Receipt.ts +125 -0
  463. package/src/Records.ts +197 -0
  464. package/src/Render.ts +515 -0
  465. package/src/Rpc.ts +113 -0
  466. package/src/SearchLanguages.ts +33 -0
  467. package/src/Service.ts +102 -0
  468. package/src/Versions.ts +69 -0
  469. package/src/contracts/ActionConsent.ts +150 -0
  470. package/src/contracts/ActionRegistry.ts +39 -0
  471. package/src/contracts/Actor.ts +53 -0
  472. package/src/contracts/AgentResources.ts +167 -0
  473. package/src/contracts/AgentRuntime.ts +154 -0
  474. package/src/contracts/Approvals.ts +133 -0
  475. package/src/contracts/Audit.ts +160 -0
  476. package/src/contracts/CalendarProvider.ts +241 -0
  477. package/src/contracts/Capability.ts +246 -0
  478. package/src/contracts/ClientSDK.ts +199 -0
  479. package/src/contracts/CollabDocument.ts +420 -0
  480. package/src/contracts/Command.ts +74 -0
  481. package/src/contracts/Connections.ts +360 -0
  482. package/src/contracts/ContextAccounting.ts +35 -0
  483. package/src/contracts/Daemon.ts +247 -0
  484. package/src/contracts/DbTx.ts +110 -0
  485. package/src/contracts/Delegation.ts +91 -0
  486. package/src/contracts/DeviceControl.ts +143 -0
  487. package/src/contracts/Directory.ts +384 -0
  488. package/src/contracts/DirectoryProvider.ts +82 -0
  489. package/src/contracts/DocumentSource.ts +71 -0
  490. package/src/contracts/Files.ts +395 -0
  491. package/src/contracts/Flags.ts +241 -0
  492. package/src/contracts/Host.ts +245 -0
  493. package/src/contracts/HttpApi.ts +100 -0
  494. package/src/contracts/Ingestion.ts +315 -0
  495. package/src/contracts/Ingress.ts +132 -0
  496. package/src/contracts/Invocation.ts +122 -0
  497. package/src/contracts/LocalClient.ts +620 -0
  498. package/src/contracts/Locale.ts +133 -0
  499. package/src/contracts/MachineIdentity.ts +305 -0
  500. package/src/contracts/MailProvider.ts +272 -0
  501. package/src/contracts/Memory.ts +47 -0
  502. package/src/contracts/Messaging.ts +108 -0
  503. package/src/contracts/Metering.ts +231 -0
  504. package/src/contracts/ModelProvider.ts +87 -0
  505. package/src/contracts/ModuleManifest.ts +310 -0
  506. package/src/contracts/NotificationChannel.ts +158 -0
  507. package/src/contracts/Notifications.ts +309 -0
  508. package/src/contracts/Outbox.ts +246 -0
  509. package/src/contracts/Privacy.ts +502 -0
  510. package/src/contracts/Progress.ts +196 -0
  511. package/src/contracts/QuerySurface.ts +134 -0
  512. package/src/contracts/Readiness.ts +67 -0
  513. package/src/contracts/Release.ts +199 -0
  514. package/src/contracts/ResultRendering.ts +65 -0
  515. package/src/contracts/Sandbox.ts +648 -0
  516. package/src/contracts/Scheduler.ts +237 -0
  517. package/src/contracts/ScreenContext.ts +316 -0
  518. package/src/contracts/Search.ts +126 -0
  519. package/src/contracts/Secrets.ts +162 -0
  520. package/src/contracts/Settings.ts +207 -0
  521. package/src/contracts/Sharing.ts +205 -0
  522. package/src/contracts/Slot.ts +61 -0
  523. package/src/contracts/Space.ts +157 -0
  524. package/src/contracts/StorageAdapter.ts +104 -0
  525. package/src/contracts/StorageBackend.ts +220 -0
  526. package/src/contracts/Sync.ts +180 -0
  527. package/src/contracts/Telemetry.ts +177 -0
  528. package/src/contracts/ThemeTokens.ts +136 -0
  529. package/src/contracts/ToolSource.ts +94 -0
  530. package/src/contracts/Versioning.ts +237 -0
  531. package/src/contracts/View.ts +116 -0
  532. package/src/contracts/WorkItems.ts +144 -0
  533. package/src/contracts/Workflow.ts +67 -0
  534. package/src/contracts/index.ts +205 -0
  535. package/src/devices/module.ts +201 -0
  536. package/src/drizzle/Entity.ts +524 -0
  537. package/src/index.ts +19 -0
@@ -0,0 +1,4122 @@
1
+ {
2
+ "title": "Files",
3
+ "kind": "kernel",
4
+ "version": "1.1.0",
5
+ "description": "File records owned by modules and attached to their records by reference; the bytes in the deployment's StorageBackend. Uploads are multipart and resumable over single-use signed part URLs that never write the file's object, checked against the deployment's and the entity's size and type limits and the organisation's storage quota (Metering) before anything is stored, then inspected (exact size, content type sniffed from the bytes, SHA-256) and passed through the virus-scan hook in a durable workflow before they are readable. A file is readable only when its record is (the entity's read policy, checked at every read), downloads are short-lived signed URLs issued after that check and checked again when used (only the object verified is served, markup only as an attachment of application/octet-stream), and deletion respects retention holds. Every operation is an audited action on every surface; file metadata syncs to each replica through the same rule.",
6
+ "operations": {
7
+ "beginUpload": {
8
+ "description": "Start an upload: checks the size and declared type against the limits (the entity's when `attachTo` names a record, which the caller must be allowed to `attach` to), reserves its size in the organisation's quota, and returns a URL per part.",
9
+ "input": {
10
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
11
+ "type": "object",
12
+ "properties": {
13
+ "name": {
14
+ "type": "string",
15
+ "minLength": 1,
16
+ "maxLength": 255
17
+ },
18
+ "contentType": {
19
+ "type": "string",
20
+ "maxLength": 255
21
+ },
22
+ "size": {
23
+ "type": "integer",
24
+ "maximum": 9007199254740991,
25
+ "exclusiveMinimum": 0
26
+ },
27
+ "attachTo": {
28
+ "type": "object",
29
+ "properties": {
30
+ "entity": {
31
+ "type": "string"
32
+ },
33
+ "id": {
34
+ "type": "string"
35
+ }
36
+ },
37
+ "required": [
38
+ "entity",
39
+ "id"
40
+ ],
41
+ "additionalProperties": true
42
+ }
43
+ },
44
+ "required": [
45
+ "name",
46
+ "contentType",
47
+ "size"
48
+ ],
49
+ "additionalProperties": true
50
+ },
51
+ "output": {
52
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
53
+ "type": "object",
54
+ "properties": {
55
+ "fileId": {
56
+ "type": "string"
57
+ },
58
+ "partSize": {
59
+ "anyOf": [
60
+ {
61
+ "type": "number"
62
+ },
63
+ {
64
+ "type": "string",
65
+ "enum": [
66
+ "Infinity",
67
+ "-Infinity",
68
+ "NaN"
69
+ ]
70
+ }
71
+ ]
72
+ },
73
+ "parts": {
74
+ "type": "array",
75
+ "items": {
76
+ "type": "object",
77
+ "properties": {
78
+ "partNumber": {
79
+ "type": "integer",
80
+ "minimum": -9007199254740991,
81
+ "maximum": 9007199254740991
82
+ },
83
+ "size": {
84
+ "anyOf": [
85
+ {
86
+ "type": "number"
87
+ },
88
+ {
89
+ "type": "string",
90
+ "enum": [
91
+ "Infinity",
92
+ "-Infinity",
93
+ "NaN"
94
+ ]
95
+ }
96
+ ]
97
+ },
98
+ "url": {
99
+ "type": "string"
100
+ },
101
+ "headers": {
102
+ "type": "object",
103
+ "additionalProperties": {
104
+ "type": "string"
105
+ }
106
+ }
107
+ },
108
+ "required": [
109
+ "partNumber",
110
+ "size",
111
+ "url",
112
+ "headers"
113
+ ],
114
+ "additionalProperties": true
115
+ }
116
+ },
117
+ "received": {
118
+ "type": "array",
119
+ "items": {
120
+ "type": "integer",
121
+ "minimum": -9007199254740991,
122
+ "maximum": 9007199254740991
123
+ }
124
+ },
125
+ "urlsExpireAt": {
126
+ "type": "string"
127
+ },
128
+ "uploadExpiresAt": {
129
+ "type": "string"
130
+ }
131
+ },
132
+ "required": [
133
+ "fileId",
134
+ "partSize",
135
+ "parts",
136
+ "received",
137
+ "urlsExpireAt",
138
+ "uploadExpiresAt"
139
+ ],
140
+ "additionalProperties": true
141
+ },
142
+ "errors": {
143
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
144
+ "anyOf": [
145
+ {
146
+ "$ref": "#/$defs/UnauthenticatedEncoded"
147
+ },
148
+ {
149
+ "$ref": "#/$defs/ForbiddenEncoded"
150
+ },
151
+ {
152
+ "$ref": "#/$defs/InvalidInputEncoded"
153
+ }
154
+ ],
155
+ "$defs": {
156
+ "UnauthenticatedEncoded": {
157
+ "type": "object",
158
+ "properties": {
159
+ "_tag": {
160
+ "type": "string",
161
+ "enum": [
162
+ "Unauthenticated"
163
+ ]
164
+ },
165
+ "message": {
166
+ "type": "string"
167
+ }
168
+ },
169
+ "required": [
170
+ "_tag",
171
+ "message"
172
+ ],
173
+ "additionalProperties": true
174
+ },
175
+ "ForbiddenEncoded": {
176
+ "type": "object",
177
+ "properties": {
178
+ "_tag": {
179
+ "type": "string",
180
+ "enum": [
181
+ "Forbidden"
182
+ ]
183
+ },
184
+ "message": {
185
+ "type": "string"
186
+ },
187
+ "action": {
188
+ "type": "string"
189
+ }
190
+ },
191
+ "required": [
192
+ "_tag",
193
+ "message",
194
+ "action"
195
+ ],
196
+ "additionalProperties": true
197
+ },
198
+ "InvalidInputEncoded": {
199
+ "type": "object",
200
+ "properties": {
201
+ "_tag": {
202
+ "type": "string",
203
+ "enum": [
204
+ "InvalidInput"
205
+ ]
206
+ },
207
+ "message": {
208
+ "type": "string"
209
+ }
210
+ },
211
+ "required": [
212
+ "_tag",
213
+ "message"
214
+ ],
215
+ "additionalProperties": true
216
+ }
217
+ }
218
+ }
219
+ },
220
+ "resumeUpload": {
221
+ "description": "Fresh URLs for the parts not yet received, and the parts already received: how an interrupted upload resumes. The uploader only.",
222
+ "input": {
223
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
224
+ "type": "object",
225
+ "properties": {
226
+ "fileId": {
227
+ "type": "string"
228
+ }
229
+ },
230
+ "required": [
231
+ "fileId"
232
+ ],
233
+ "additionalProperties": true
234
+ },
235
+ "output": {
236
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
237
+ "type": "object",
238
+ "properties": {
239
+ "fileId": {
240
+ "type": "string"
241
+ },
242
+ "partSize": {
243
+ "anyOf": [
244
+ {
245
+ "type": "number"
246
+ },
247
+ {
248
+ "type": "string",
249
+ "enum": [
250
+ "Infinity",
251
+ "-Infinity",
252
+ "NaN"
253
+ ]
254
+ }
255
+ ]
256
+ },
257
+ "parts": {
258
+ "type": "array",
259
+ "items": {
260
+ "type": "object",
261
+ "properties": {
262
+ "partNumber": {
263
+ "type": "integer",
264
+ "minimum": -9007199254740991,
265
+ "maximum": 9007199254740991
266
+ },
267
+ "size": {
268
+ "anyOf": [
269
+ {
270
+ "type": "number"
271
+ },
272
+ {
273
+ "type": "string",
274
+ "enum": [
275
+ "Infinity",
276
+ "-Infinity",
277
+ "NaN"
278
+ ]
279
+ }
280
+ ]
281
+ },
282
+ "url": {
283
+ "type": "string"
284
+ },
285
+ "headers": {
286
+ "type": "object",
287
+ "additionalProperties": {
288
+ "type": "string"
289
+ }
290
+ }
291
+ },
292
+ "required": [
293
+ "partNumber",
294
+ "size",
295
+ "url",
296
+ "headers"
297
+ ],
298
+ "additionalProperties": true
299
+ }
300
+ },
301
+ "received": {
302
+ "type": "array",
303
+ "items": {
304
+ "type": "integer",
305
+ "minimum": -9007199254740991,
306
+ "maximum": 9007199254740991
307
+ }
308
+ },
309
+ "urlsExpireAt": {
310
+ "type": "string"
311
+ },
312
+ "uploadExpiresAt": {
313
+ "type": "string"
314
+ }
315
+ },
316
+ "required": [
317
+ "fileId",
318
+ "partSize",
319
+ "parts",
320
+ "received",
321
+ "urlsExpireAt",
322
+ "uploadExpiresAt"
323
+ ],
324
+ "additionalProperties": true
325
+ },
326
+ "errors": {
327
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
328
+ "anyOf": [
329
+ {
330
+ "$ref": "#/$defs/UnauthenticatedEncoded"
331
+ },
332
+ {
333
+ "$ref": "#/$defs/ForbiddenEncoded"
334
+ },
335
+ {
336
+ "$ref": "#/$defs/InvalidInputEncoded"
337
+ }
338
+ ],
339
+ "$defs": {
340
+ "UnauthenticatedEncoded": {
341
+ "type": "object",
342
+ "properties": {
343
+ "_tag": {
344
+ "type": "string",
345
+ "enum": [
346
+ "Unauthenticated"
347
+ ]
348
+ },
349
+ "message": {
350
+ "type": "string"
351
+ }
352
+ },
353
+ "required": [
354
+ "_tag",
355
+ "message"
356
+ ],
357
+ "additionalProperties": true
358
+ },
359
+ "ForbiddenEncoded": {
360
+ "type": "object",
361
+ "properties": {
362
+ "_tag": {
363
+ "type": "string",
364
+ "enum": [
365
+ "Forbidden"
366
+ ]
367
+ },
368
+ "message": {
369
+ "type": "string"
370
+ },
371
+ "action": {
372
+ "type": "string"
373
+ }
374
+ },
375
+ "required": [
376
+ "_tag",
377
+ "message",
378
+ "action"
379
+ ],
380
+ "additionalProperties": true
381
+ },
382
+ "InvalidInputEncoded": {
383
+ "type": "object",
384
+ "properties": {
385
+ "_tag": {
386
+ "type": "string",
387
+ "enum": [
388
+ "InvalidInput"
389
+ ]
390
+ },
391
+ "message": {
392
+ "type": "string"
393
+ }
394
+ },
395
+ "required": [
396
+ "_tag",
397
+ "message"
398
+ ],
399
+ "additionalProperties": true
400
+ }
401
+ }
402
+ }
403
+ },
404
+ "completeUpload": {
405
+ "description": "Finish an upload once every part arrived: the file moves to `processing`, and a durable workflow inspects it (exact size, sniffed content type checked against the limits, SHA-256), scans it, and makes it `available` (attached, when the upload named a record) or rejects or quarantines it, deleting the bytes. The uploader only.",
406
+ "input": {
407
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
408
+ "type": "object",
409
+ "properties": {
410
+ "fileId": {
411
+ "type": "string"
412
+ }
413
+ },
414
+ "required": [
415
+ "fileId"
416
+ ],
417
+ "additionalProperties": true
418
+ },
419
+ "output": {
420
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
421
+ "type": "object",
422
+ "properties": {
423
+ "id": {
424
+ "type": "string"
425
+ },
426
+ "orgId": {
427
+ "type": "string"
428
+ },
429
+ "name": {
430
+ "type": "string"
431
+ },
432
+ "declaredType": {
433
+ "type": "string"
434
+ },
435
+ "contentType": {
436
+ "anyOf": [
437
+ {
438
+ "type": "string"
439
+ },
440
+ {
441
+ "type": "null"
442
+ }
443
+ ]
444
+ },
445
+ "size": {
446
+ "anyOf": [
447
+ {
448
+ "type": "number"
449
+ },
450
+ {
451
+ "type": "string",
452
+ "enum": [
453
+ "Infinity",
454
+ "-Infinity",
455
+ "NaN"
456
+ ]
457
+ }
458
+ ]
459
+ },
460
+ "sha256": {
461
+ "anyOf": [
462
+ {
463
+ "type": "string"
464
+ },
465
+ {
466
+ "type": "null"
467
+ }
468
+ ]
469
+ },
470
+ "state": {
471
+ "type": "string",
472
+ "enum": [
473
+ "uploading",
474
+ "processing",
475
+ "available",
476
+ "quarantined",
477
+ "rejected",
478
+ "deleted"
479
+ ]
480
+ },
481
+ "stateReason": {
482
+ "anyOf": [
483
+ {
484
+ "type": "string"
485
+ },
486
+ {
487
+ "type": "null"
488
+ }
489
+ ]
490
+ },
491
+ "scan": {
492
+ "anyOf": [
493
+ {
494
+ "type": "string",
495
+ "enum": [
496
+ "clean",
497
+ "infected",
498
+ "skipped",
499
+ "error"
500
+ ]
501
+ },
502
+ {
503
+ "type": "null"
504
+ }
505
+ ]
506
+ },
507
+ "attachedTo": {
508
+ "anyOf": [
509
+ {
510
+ "type": "object",
511
+ "properties": {
512
+ "entity": {
513
+ "type": "string"
514
+ },
515
+ "id": {
516
+ "type": "string"
517
+ }
518
+ },
519
+ "required": [
520
+ "entity",
521
+ "id"
522
+ ],
523
+ "additionalProperties": true
524
+ },
525
+ {
526
+ "type": "null"
527
+ }
528
+ ]
529
+ },
530
+ "uploadedBy": {
531
+ "type": "string"
532
+ },
533
+ "createdAt": {
534
+ "type": "string"
535
+ },
536
+ "completedAt": {
537
+ "anyOf": [
538
+ {
539
+ "type": "string"
540
+ },
541
+ {
542
+ "type": "null"
543
+ }
544
+ ]
545
+ },
546
+ "deletedAt": {
547
+ "anyOf": [
548
+ {
549
+ "type": "string"
550
+ },
551
+ {
552
+ "type": "null"
553
+ }
554
+ ]
555
+ },
556
+ "retainUntil": {
557
+ "anyOf": [
558
+ {
559
+ "type": "string"
560
+ },
561
+ {
562
+ "type": "null"
563
+ }
564
+ ]
565
+ }
566
+ },
567
+ "required": [
568
+ "id",
569
+ "orgId",
570
+ "name",
571
+ "declaredType",
572
+ "contentType",
573
+ "size",
574
+ "sha256",
575
+ "state",
576
+ "stateReason",
577
+ "scan",
578
+ "attachedTo",
579
+ "uploadedBy",
580
+ "createdAt",
581
+ "completedAt",
582
+ "deletedAt",
583
+ "retainUntil"
584
+ ],
585
+ "additionalProperties": true
586
+ },
587
+ "errors": {
588
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
589
+ "anyOf": [
590
+ {
591
+ "$ref": "#/$defs/UnauthenticatedEncoded"
592
+ },
593
+ {
594
+ "$ref": "#/$defs/ForbiddenEncoded"
595
+ },
596
+ {
597
+ "$ref": "#/$defs/InvalidInputEncoded"
598
+ }
599
+ ],
600
+ "$defs": {
601
+ "UnauthenticatedEncoded": {
602
+ "type": "object",
603
+ "properties": {
604
+ "_tag": {
605
+ "type": "string",
606
+ "enum": [
607
+ "Unauthenticated"
608
+ ]
609
+ },
610
+ "message": {
611
+ "type": "string"
612
+ }
613
+ },
614
+ "required": [
615
+ "_tag",
616
+ "message"
617
+ ],
618
+ "additionalProperties": true
619
+ },
620
+ "ForbiddenEncoded": {
621
+ "type": "object",
622
+ "properties": {
623
+ "_tag": {
624
+ "type": "string",
625
+ "enum": [
626
+ "Forbidden"
627
+ ]
628
+ },
629
+ "message": {
630
+ "type": "string"
631
+ },
632
+ "action": {
633
+ "type": "string"
634
+ }
635
+ },
636
+ "required": [
637
+ "_tag",
638
+ "message",
639
+ "action"
640
+ ],
641
+ "additionalProperties": true
642
+ },
643
+ "InvalidInputEncoded": {
644
+ "type": "object",
645
+ "properties": {
646
+ "_tag": {
647
+ "type": "string",
648
+ "enum": [
649
+ "InvalidInput"
650
+ ]
651
+ },
652
+ "message": {
653
+ "type": "string"
654
+ }
655
+ },
656
+ "required": [
657
+ "_tag",
658
+ "message"
659
+ ],
660
+ "additionalProperties": true
661
+ }
662
+ }
663
+ }
664
+ },
665
+ "abortUpload": {
666
+ "description": "Abandon an upload: its parts are deleted and its quota reservation released. The uploader only.",
667
+ "input": {
668
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
669
+ "type": "object",
670
+ "properties": {
671
+ "fileId": {
672
+ "type": "string"
673
+ }
674
+ },
675
+ "required": [
676
+ "fileId"
677
+ ],
678
+ "additionalProperties": true
679
+ },
680
+ "output": {
681
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
682
+ "type": "object",
683
+ "properties": {
684
+ "id": {
685
+ "type": "string"
686
+ },
687
+ "orgId": {
688
+ "type": "string"
689
+ },
690
+ "name": {
691
+ "type": "string"
692
+ },
693
+ "declaredType": {
694
+ "type": "string"
695
+ },
696
+ "contentType": {
697
+ "anyOf": [
698
+ {
699
+ "type": "string"
700
+ },
701
+ {
702
+ "type": "null"
703
+ }
704
+ ]
705
+ },
706
+ "size": {
707
+ "anyOf": [
708
+ {
709
+ "type": "number"
710
+ },
711
+ {
712
+ "type": "string",
713
+ "enum": [
714
+ "Infinity",
715
+ "-Infinity",
716
+ "NaN"
717
+ ]
718
+ }
719
+ ]
720
+ },
721
+ "sha256": {
722
+ "anyOf": [
723
+ {
724
+ "type": "string"
725
+ },
726
+ {
727
+ "type": "null"
728
+ }
729
+ ]
730
+ },
731
+ "state": {
732
+ "type": "string",
733
+ "enum": [
734
+ "uploading",
735
+ "processing",
736
+ "available",
737
+ "quarantined",
738
+ "rejected",
739
+ "deleted"
740
+ ]
741
+ },
742
+ "stateReason": {
743
+ "anyOf": [
744
+ {
745
+ "type": "string"
746
+ },
747
+ {
748
+ "type": "null"
749
+ }
750
+ ]
751
+ },
752
+ "scan": {
753
+ "anyOf": [
754
+ {
755
+ "type": "string",
756
+ "enum": [
757
+ "clean",
758
+ "infected",
759
+ "skipped",
760
+ "error"
761
+ ]
762
+ },
763
+ {
764
+ "type": "null"
765
+ }
766
+ ]
767
+ },
768
+ "attachedTo": {
769
+ "anyOf": [
770
+ {
771
+ "type": "object",
772
+ "properties": {
773
+ "entity": {
774
+ "type": "string"
775
+ },
776
+ "id": {
777
+ "type": "string"
778
+ }
779
+ },
780
+ "required": [
781
+ "entity",
782
+ "id"
783
+ ],
784
+ "additionalProperties": true
785
+ },
786
+ {
787
+ "type": "null"
788
+ }
789
+ ]
790
+ },
791
+ "uploadedBy": {
792
+ "type": "string"
793
+ },
794
+ "createdAt": {
795
+ "type": "string"
796
+ },
797
+ "completedAt": {
798
+ "anyOf": [
799
+ {
800
+ "type": "string"
801
+ },
802
+ {
803
+ "type": "null"
804
+ }
805
+ ]
806
+ },
807
+ "deletedAt": {
808
+ "anyOf": [
809
+ {
810
+ "type": "string"
811
+ },
812
+ {
813
+ "type": "null"
814
+ }
815
+ ]
816
+ },
817
+ "retainUntil": {
818
+ "anyOf": [
819
+ {
820
+ "type": "string"
821
+ },
822
+ {
823
+ "type": "null"
824
+ }
825
+ ]
826
+ }
827
+ },
828
+ "required": [
829
+ "id",
830
+ "orgId",
831
+ "name",
832
+ "declaredType",
833
+ "contentType",
834
+ "size",
835
+ "sha256",
836
+ "state",
837
+ "stateReason",
838
+ "scan",
839
+ "attachedTo",
840
+ "uploadedBy",
841
+ "createdAt",
842
+ "completedAt",
843
+ "deletedAt",
844
+ "retainUntil"
845
+ ],
846
+ "additionalProperties": true
847
+ },
848
+ "errors": {
849
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
850
+ "anyOf": [
851
+ {
852
+ "$ref": "#/$defs/UnauthenticatedEncoded"
853
+ },
854
+ {
855
+ "$ref": "#/$defs/ForbiddenEncoded"
856
+ },
857
+ {
858
+ "$ref": "#/$defs/InvalidInputEncoded"
859
+ }
860
+ ],
861
+ "$defs": {
862
+ "UnauthenticatedEncoded": {
863
+ "type": "object",
864
+ "properties": {
865
+ "_tag": {
866
+ "type": "string",
867
+ "enum": [
868
+ "Unauthenticated"
869
+ ]
870
+ },
871
+ "message": {
872
+ "type": "string"
873
+ }
874
+ },
875
+ "required": [
876
+ "_tag",
877
+ "message"
878
+ ],
879
+ "additionalProperties": true
880
+ },
881
+ "ForbiddenEncoded": {
882
+ "type": "object",
883
+ "properties": {
884
+ "_tag": {
885
+ "type": "string",
886
+ "enum": [
887
+ "Forbidden"
888
+ ]
889
+ },
890
+ "message": {
891
+ "type": "string"
892
+ },
893
+ "action": {
894
+ "type": "string"
895
+ }
896
+ },
897
+ "required": [
898
+ "_tag",
899
+ "message",
900
+ "action"
901
+ ],
902
+ "additionalProperties": true
903
+ },
904
+ "InvalidInputEncoded": {
905
+ "type": "object",
906
+ "properties": {
907
+ "_tag": {
908
+ "type": "string",
909
+ "enum": [
910
+ "InvalidInput"
911
+ ]
912
+ },
913
+ "message": {
914
+ "type": "string"
915
+ }
916
+ },
917
+ "required": [
918
+ "_tag",
919
+ "message"
920
+ ],
921
+ "additionalProperties": true
922
+ }
923
+ }
924
+ }
925
+ },
926
+ "attach": {
927
+ "description": "Attach a staged file (uploaded by the caller, not yet attached) to a record the caller may `attach` to, within that entity's limits. A file is attached once; it is never moved.",
928
+ "input": {
929
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
930
+ "type": "object",
931
+ "properties": {
932
+ "fileId": {
933
+ "type": "string"
934
+ },
935
+ "to": {
936
+ "type": "object",
937
+ "properties": {
938
+ "entity": {
939
+ "type": "string"
940
+ },
941
+ "id": {
942
+ "type": "string"
943
+ }
944
+ },
945
+ "required": [
946
+ "entity",
947
+ "id"
948
+ ],
949
+ "additionalProperties": true
950
+ }
951
+ },
952
+ "required": [
953
+ "fileId",
954
+ "to"
955
+ ],
956
+ "additionalProperties": true
957
+ },
958
+ "output": {
959
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
960
+ "type": "object",
961
+ "properties": {
962
+ "id": {
963
+ "type": "string"
964
+ },
965
+ "orgId": {
966
+ "type": "string"
967
+ },
968
+ "name": {
969
+ "type": "string"
970
+ },
971
+ "declaredType": {
972
+ "type": "string"
973
+ },
974
+ "contentType": {
975
+ "anyOf": [
976
+ {
977
+ "type": "string"
978
+ },
979
+ {
980
+ "type": "null"
981
+ }
982
+ ]
983
+ },
984
+ "size": {
985
+ "anyOf": [
986
+ {
987
+ "type": "number"
988
+ },
989
+ {
990
+ "type": "string",
991
+ "enum": [
992
+ "Infinity",
993
+ "-Infinity",
994
+ "NaN"
995
+ ]
996
+ }
997
+ ]
998
+ },
999
+ "sha256": {
1000
+ "anyOf": [
1001
+ {
1002
+ "type": "string"
1003
+ },
1004
+ {
1005
+ "type": "null"
1006
+ }
1007
+ ]
1008
+ },
1009
+ "state": {
1010
+ "type": "string",
1011
+ "enum": [
1012
+ "uploading",
1013
+ "processing",
1014
+ "available",
1015
+ "quarantined",
1016
+ "rejected",
1017
+ "deleted"
1018
+ ]
1019
+ },
1020
+ "stateReason": {
1021
+ "anyOf": [
1022
+ {
1023
+ "type": "string"
1024
+ },
1025
+ {
1026
+ "type": "null"
1027
+ }
1028
+ ]
1029
+ },
1030
+ "scan": {
1031
+ "anyOf": [
1032
+ {
1033
+ "type": "string",
1034
+ "enum": [
1035
+ "clean",
1036
+ "infected",
1037
+ "skipped",
1038
+ "error"
1039
+ ]
1040
+ },
1041
+ {
1042
+ "type": "null"
1043
+ }
1044
+ ]
1045
+ },
1046
+ "attachedTo": {
1047
+ "anyOf": [
1048
+ {
1049
+ "type": "object",
1050
+ "properties": {
1051
+ "entity": {
1052
+ "type": "string"
1053
+ },
1054
+ "id": {
1055
+ "type": "string"
1056
+ }
1057
+ },
1058
+ "required": [
1059
+ "entity",
1060
+ "id"
1061
+ ],
1062
+ "additionalProperties": true
1063
+ },
1064
+ {
1065
+ "type": "null"
1066
+ }
1067
+ ]
1068
+ },
1069
+ "uploadedBy": {
1070
+ "type": "string"
1071
+ },
1072
+ "createdAt": {
1073
+ "type": "string"
1074
+ },
1075
+ "completedAt": {
1076
+ "anyOf": [
1077
+ {
1078
+ "type": "string"
1079
+ },
1080
+ {
1081
+ "type": "null"
1082
+ }
1083
+ ]
1084
+ },
1085
+ "deletedAt": {
1086
+ "anyOf": [
1087
+ {
1088
+ "type": "string"
1089
+ },
1090
+ {
1091
+ "type": "null"
1092
+ }
1093
+ ]
1094
+ },
1095
+ "retainUntil": {
1096
+ "anyOf": [
1097
+ {
1098
+ "type": "string"
1099
+ },
1100
+ {
1101
+ "type": "null"
1102
+ }
1103
+ ]
1104
+ }
1105
+ },
1106
+ "required": [
1107
+ "id",
1108
+ "orgId",
1109
+ "name",
1110
+ "declaredType",
1111
+ "contentType",
1112
+ "size",
1113
+ "sha256",
1114
+ "state",
1115
+ "stateReason",
1116
+ "scan",
1117
+ "attachedTo",
1118
+ "uploadedBy",
1119
+ "createdAt",
1120
+ "completedAt",
1121
+ "deletedAt",
1122
+ "retainUntil"
1123
+ ],
1124
+ "additionalProperties": true
1125
+ },
1126
+ "errors": {
1127
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1128
+ "anyOf": [
1129
+ {
1130
+ "$ref": "#/$defs/UnauthenticatedEncoded"
1131
+ },
1132
+ {
1133
+ "$ref": "#/$defs/ForbiddenEncoded"
1134
+ },
1135
+ {
1136
+ "$ref": "#/$defs/InvalidInputEncoded"
1137
+ }
1138
+ ],
1139
+ "$defs": {
1140
+ "UnauthenticatedEncoded": {
1141
+ "type": "object",
1142
+ "properties": {
1143
+ "_tag": {
1144
+ "type": "string",
1145
+ "enum": [
1146
+ "Unauthenticated"
1147
+ ]
1148
+ },
1149
+ "message": {
1150
+ "type": "string"
1151
+ }
1152
+ },
1153
+ "required": [
1154
+ "_tag",
1155
+ "message"
1156
+ ],
1157
+ "additionalProperties": true
1158
+ },
1159
+ "ForbiddenEncoded": {
1160
+ "type": "object",
1161
+ "properties": {
1162
+ "_tag": {
1163
+ "type": "string",
1164
+ "enum": [
1165
+ "Forbidden"
1166
+ ]
1167
+ },
1168
+ "message": {
1169
+ "type": "string"
1170
+ },
1171
+ "action": {
1172
+ "type": "string"
1173
+ }
1174
+ },
1175
+ "required": [
1176
+ "_tag",
1177
+ "message",
1178
+ "action"
1179
+ ],
1180
+ "additionalProperties": true
1181
+ },
1182
+ "InvalidInputEncoded": {
1183
+ "type": "object",
1184
+ "properties": {
1185
+ "_tag": {
1186
+ "type": "string",
1187
+ "enum": [
1188
+ "InvalidInput"
1189
+ ]
1190
+ },
1191
+ "message": {
1192
+ "type": "string"
1193
+ }
1194
+ },
1195
+ "required": [
1196
+ "_tag",
1197
+ "message"
1198
+ ],
1199
+ "additionalProperties": true
1200
+ }
1201
+ }
1202
+ }
1203
+ },
1204
+ "get": {
1205
+ "description": "A file's metadata, if the caller may read it: its record's read policy, or for a staged file its uploader. A file the caller may not read and one that does not exist get the same answer.",
1206
+ "input": {
1207
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1208
+ "type": "object",
1209
+ "properties": {
1210
+ "fileId": {
1211
+ "type": "string"
1212
+ }
1213
+ },
1214
+ "required": [
1215
+ "fileId"
1216
+ ],
1217
+ "additionalProperties": true
1218
+ },
1219
+ "output": {
1220
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1221
+ "type": "object",
1222
+ "properties": {
1223
+ "id": {
1224
+ "type": "string"
1225
+ },
1226
+ "orgId": {
1227
+ "type": "string"
1228
+ },
1229
+ "name": {
1230
+ "type": "string"
1231
+ },
1232
+ "declaredType": {
1233
+ "type": "string"
1234
+ },
1235
+ "contentType": {
1236
+ "anyOf": [
1237
+ {
1238
+ "type": "string"
1239
+ },
1240
+ {
1241
+ "type": "null"
1242
+ }
1243
+ ]
1244
+ },
1245
+ "size": {
1246
+ "anyOf": [
1247
+ {
1248
+ "type": "number"
1249
+ },
1250
+ {
1251
+ "type": "string",
1252
+ "enum": [
1253
+ "Infinity",
1254
+ "-Infinity",
1255
+ "NaN"
1256
+ ]
1257
+ }
1258
+ ]
1259
+ },
1260
+ "sha256": {
1261
+ "anyOf": [
1262
+ {
1263
+ "type": "string"
1264
+ },
1265
+ {
1266
+ "type": "null"
1267
+ }
1268
+ ]
1269
+ },
1270
+ "state": {
1271
+ "type": "string",
1272
+ "enum": [
1273
+ "uploading",
1274
+ "processing",
1275
+ "available",
1276
+ "quarantined",
1277
+ "rejected",
1278
+ "deleted"
1279
+ ]
1280
+ },
1281
+ "stateReason": {
1282
+ "anyOf": [
1283
+ {
1284
+ "type": "string"
1285
+ },
1286
+ {
1287
+ "type": "null"
1288
+ }
1289
+ ]
1290
+ },
1291
+ "scan": {
1292
+ "anyOf": [
1293
+ {
1294
+ "type": "string",
1295
+ "enum": [
1296
+ "clean",
1297
+ "infected",
1298
+ "skipped",
1299
+ "error"
1300
+ ]
1301
+ },
1302
+ {
1303
+ "type": "null"
1304
+ }
1305
+ ]
1306
+ },
1307
+ "attachedTo": {
1308
+ "anyOf": [
1309
+ {
1310
+ "type": "object",
1311
+ "properties": {
1312
+ "entity": {
1313
+ "type": "string"
1314
+ },
1315
+ "id": {
1316
+ "type": "string"
1317
+ }
1318
+ },
1319
+ "required": [
1320
+ "entity",
1321
+ "id"
1322
+ ],
1323
+ "additionalProperties": true
1324
+ },
1325
+ {
1326
+ "type": "null"
1327
+ }
1328
+ ]
1329
+ },
1330
+ "uploadedBy": {
1331
+ "type": "string"
1332
+ },
1333
+ "createdAt": {
1334
+ "type": "string"
1335
+ },
1336
+ "completedAt": {
1337
+ "anyOf": [
1338
+ {
1339
+ "type": "string"
1340
+ },
1341
+ {
1342
+ "type": "null"
1343
+ }
1344
+ ]
1345
+ },
1346
+ "deletedAt": {
1347
+ "anyOf": [
1348
+ {
1349
+ "type": "string"
1350
+ },
1351
+ {
1352
+ "type": "null"
1353
+ }
1354
+ ]
1355
+ },
1356
+ "retainUntil": {
1357
+ "anyOf": [
1358
+ {
1359
+ "type": "string"
1360
+ },
1361
+ {
1362
+ "type": "null"
1363
+ }
1364
+ ]
1365
+ }
1366
+ },
1367
+ "required": [
1368
+ "id",
1369
+ "orgId",
1370
+ "name",
1371
+ "declaredType",
1372
+ "contentType",
1373
+ "size",
1374
+ "sha256",
1375
+ "state",
1376
+ "stateReason",
1377
+ "scan",
1378
+ "attachedTo",
1379
+ "uploadedBy",
1380
+ "createdAt",
1381
+ "completedAt",
1382
+ "deletedAt",
1383
+ "retainUntil"
1384
+ ],
1385
+ "additionalProperties": true
1386
+ },
1387
+ "errors": {
1388
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1389
+ "anyOf": [
1390
+ {
1391
+ "$ref": "#/$defs/UnauthenticatedEncoded"
1392
+ },
1393
+ {
1394
+ "$ref": "#/$defs/ForbiddenEncoded"
1395
+ },
1396
+ {
1397
+ "$ref": "#/$defs/InvalidInputEncoded"
1398
+ }
1399
+ ],
1400
+ "$defs": {
1401
+ "UnauthenticatedEncoded": {
1402
+ "type": "object",
1403
+ "properties": {
1404
+ "_tag": {
1405
+ "type": "string",
1406
+ "enum": [
1407
+ "Unauthenticated"
1408
+ ]
1409
+ },
1410
+ "message": {
1411
+ "type": "string"
1412
+ }
1413
+ },
1414
+ "required": [
1415
+ "_tag",
1416
+ "message"
1417
+ ],
1418
+ "additionalProperties": true
1419
+ },
1420
+ "ForbiddenEncoded": {
1421
+ "type": "object",
1422
+ "properties": {
1423
+ "_tag": {
1424
+ "type": "string",
1425
+ "enum": [
1426
+ "Forbidden"
1427
+ ]
1428
+ },
1429
+ "message": {
1430
+ "type": "string"
1431
+ },
1432
+ "action": {
1433
+ "type": "string"
1434
+ }
1435
+ },
1436
+ "required": [
1437
+ "_tag",
1438
+ "message",
1439
+ "action"
1440
+ ],
1441
+ "additionalProperties": true
1442
+ },
1443
+ "InvalidInputEncoded": {
1444
+ "type": "object",
1445
+ "properties": {
1446
+ "_tag": {
1447
+ "type": "string",
1448
+ "enum": [
1449
+ "InvalidInput"
1450
+ ]
1451
+ },
1452
+ "message": {
1453
+ "type": "string"
1454
+ }
1455
+ },
1456
+ "required": [
1457
+ "_tag",
1458
+ "message"
1459
+ ],
1460
+ "additionalProperties": true
1461
+ }
1462
+ }
1463
+ }
1464
+ },
1465
+ "list": {
1466
+ "description": "The files attached to a record the caller may read (not deleted), oldest first.",
1467
+ "input": {
1468
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1469
+ "type": "object",
1470
+ "properties": {
1471
+ "entity": {
1472
+ "type": "string"
1473
+ },
1474
+ "id": {
1475
+ "type": "string"
1476
+ }
1477
+ },
1478
+ "required": [
1479
+ "entity",
1480
+ "id"
1481
+ ],
1482
+ "additionalProperties": true
1483
+ },
1484
+ "output": {
1485
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1486
+ "type": "object",
1487
+ "properties": {
1488
+ "files": {
1489
+ "type": "array",
1490
+ "items": {
1491
+ "type": "object",
1492
+ "properties": {
1493
+ "id": {
1494
+ "type": "string"
1495
+ },
1496
+ "orgId": {
1497
+ "type": "string"
1498
+ },
1499
+ "name": {
1500
+ "type": "string"
1501
+ },
1502
+ "declaredType": {
1503
+ "type": "string"
1504
+ },
1505
+ "contentType": {
1506
+ "anyOf": [
1507
+ {
1508
+ "type": "string"
1509
+ },
1510
+ {
1511
+ "type": "null"
1512
+ }
1513
+ ]
1514
+ },
1515
+ "size": {
1516
+ "anyOf": [
1517
+ {
1518
+ "type": "number"
1519
+ },
1520
+ {
1521
+ "type": "string",
1522
+ "enum": [
1523
+ "Infinity",
1524
+ "-Infinity",
1525
+ "NaN"
1526
+ ]
1527
+ }
1528
+ ]
1529
+ },
1530
+ "sha256": {
1531
+ "anyOf": [
1532
+ {
1533
+ "type": "string"
1534
+ },
1535
+ {
1536
+ "type": "null"
1537
+ }
1538
+ ]
1539
+ },
1540
+ "state": {
1541
+ "type": "string",
1542
+ "enum": [
1543
+ "uploading",
1544
+ "processing",
1545
+ "available",
1546
+ "quarantined",
1547
+ "rejected",
1548
+ "deleted"
1549
+ ]
1550
+ },
1551
+ "stateReason": {
1552
+ "anyOf": [
1553
+ {
1554
+ "type": "string"
1555
+ },
1556
+ {
1557
+ "type": "null"
1558
+ }
1559
+ ]
1560
+ },
1561
+ "scan": {
1562
+ "anyOf": [
1563
+ {
1564
+ "type": "string",
1565
+ "enum": [
1566
+ "clean",
1567
+ "infected",
1568
+ "skipped",
1569
+ "error"
1570
+ ]
1571
+ },
1572
+ {
1573
+ "type": "null"
1574
+ }
1575
+ ]
1576
+ },
1577
+ "attachedTo": {
1578
+ "anyOf": [
1579
+ {
1580
+ "type": "object",
1581
+ "properties": {
1582
+ "entity": {
1583
+ "type": "string"
1584
+ },
1585
+ "id": {
1586
+ "type": "string"
1587
+ }
1588
+ },
1589
+ "required": [
1590
+ "entity",
1591
+ "id"
1592
+ ],
1593
+ "additionalProperties": true
1594
+ },
1595
+ {
1596
+ "type": "null"
1597
+ }
1598
+ ]
1599
+ },
1600
+ "uploadedBy": {
1601
+ "type": "string"
1602
+ },
1603
+ "createdAt": {
1604
+ "type": "string"
1605
+ },
1606
+ "completedAt": {
1607
+ "anyOf": [
1608
+ {
1609
+ "type": "string"
1610
+ },
1611
+ {
1612
+ "type": "null"
1613
+ }
1614
+ ]
1615
+ },
1616
+ "deletedAt": {
1617
+ "anyOf": [
1618
+ {
1619
+ "type": "string"
1620
+ },
1621
+ {
1622
+ "type": "null"
1623
+ }
1624
+ ]
1625
+ },
1626
+ "retainUntil": {
1627
+ "anyOf": [
1628
+ {
1629
+ "type": "string"
1630
+ },
1631
+ {
1632
+ "type": "null"
1633
+ }
1634
+ ]
1635
+ }
1636
+ },
1637
+ "required": [
1638
+ "id",
1639
+ "orgId",
1640
+ "name",
1641
+ "declaredType",
1642
+ "contentType",
1643
+ "size",
1644
+ "sha256",
1645
+ "state",
1646
+ "stateReason",
1647
+ "scan",
1648
+ "attachedTo",
1649
+ "uploadedBy",
1650
+ "createdAt",
1651
+ "completedAt",
1652
+ "deletedAt",
1653
+ "retainUntil"
1654
+ ],
1655
+ "additionalProperties": true
1656
+ }
1657
+ }
1658
+ },
1659
+ "required": [
1660
+ "files"
1661
+ ],
1662
+ "additionalProperties": true
1663
+ },
1664
+ "errors": {
1665
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1666
+ "anyOf": [
1667
+ {
1668
+ "$ref": "#/$defs/UnauthenticatedEncoded"
1669
+ },
1670
+ {
1671
+ "$ref": "#/$defs/ForbiddenEncoded"
1672
+ },
1673
+ {
1674
+ "$ref": "#/$defs/InvalidInputEncoded"
1675
+ }
1676
+ ],
1677
+ "$defs": {
1678
+ "UnauthenticatedEncoded": {
1679
+ "type": "object",
1680
+ "properties": {
1681
+ "_tag": {
1682
+ "type": "string",
1683
+ "enum": [
1684
+ "Unauthenticated"
1685
+ ]
1686
+ },
1687
+ "message": {
1688
+ "type": "string"
1689
+ }
1690
+ },
1691
+ "required": [
1692
+ "_tag",
1693
+ "message"
1694
+ ],
1695
+ "additionalProperties": true
1696
+ },
1697
+ "ForbiddenEncoded": {
1698
+ "type": "object",
1699
+ "properties": {
1700
+ "_tag": {
1701
+ "type": "string",
1702
+ "enum": [
1703
+ "Forbidden"
1704
+ ]
1705
+ },
1706
+ "message": {
1707
+ "type": "string"
1708
+ },
1709
+ "action": {
1710
+ "type": "string"
1711
+ }
1712
+ },
1713
+ "required": [
1714
+ "_tag",
1715
+ "message",
1716
+ "action"
1717
+ ],
1718
+ "additionalProperties": true
1719
+ },
1720
+ "InvalidInputEncoded": {
1721
+ "type": "object",
1722
+ "properties": {
1723
+ "_tag": {
1724
+ "type": "string",
1725
+ "enum": [
1726
+ "InvalidInput"
1727
+ ]
1728
+ },
1729
+ "message": {
1730
+ "type": "string"
1731
+ }
1732
+ },
1733
+ "required": [
1734
+ "_tag",
1735
+ "message"
1736
+ ],
1737
+ "additionalProperties": true
1738
+ }
1739
+ }
1740
+ }
1741
+ },
1742
+ "download": {
1743
+ "description": "A short-lived signed URL for an available file the caller may read, served with the sniffed content type, `nosniff`, and as an attachment unless `inline` is asked for a type safe to render. Audited.",
1744
+ "input": {
1745
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1746
+ "type": "object",
1747
+ "properties": {
1748
+ "fileId": {
1749
+ "type": "string"
1750
+ },
1751
+ "disposition": {
1752
+ "type": "string",
1753
+ "enum": [
1754
+ "attachment",
1755
+ "inline"
1756
+ ]
1757
+ }
1758
+ },
1759
+ "required": [
1760
+ "fileId"
1761
+ ],
1762
+ "additionalProperties": true
1763
+ },
1764
+ "output": {
1765
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1766
+ "type": "object",
1767
+ "properties": {
1768
+ "url": {
1769
+ "type": "string"
1770
+ },
1771
+ "expiresAt": {
1772
+ "type": "string"
1773
+ },
1774
+ "contentType": {
1775
+ "type": "string"
1776
+ },
1777
+ "size": {
1778
+ "anyOf": [
1779
+ {
1780
+ "type": "number"
1781
+ },
1782
+ {
1783
+ "type": "string",
1784
+ "enum": [
1785
+ "Infinity",
1786
+ "-Infinity",
1787
+ "NaN"
1788
+ ]
1789
+ }
1790
+ ]
1791
+ }
1792
+ },
1793
+ "required": [
1794
+ "url",
1795
+ "expiresAt",
1796
+ "contentType",
1797
+ "size"
1798
+ ],
1799
+ "additionalProperties": true
1800
+ },
1801
+ "errors": {
1802
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1803
+ "anyOf": [
1804
+ {
1805
+ "$ref": "#/$defs/UnauthenticatedEncoded"
1806
+ },
1807
+ {
1808
+ "$ref": "#/$defs/ForbiddenEncoded"
1809
+ },
1810
+ {
1811
+ "$ref": "#/$defs/InvalidInputEncoded"
1812
+ }
1813
+ ],
1814
+ "$defs": {
1815
+ "UnauthenticatedEncoded": {
1816
+ "type": "object",
1817
+ "properties": {
1818
+ "_tag": {
1819
+ "type": "string",
1820
+ "enum": [
1821
+ "Unauthenticated"
1822
+ ]
1823
+ },
1824
+ "message": {
1825
+ "type": "string"
1826
+ }
1827
+ },
1828
+ "required": [
1829
+ "_tag",
1830
+ "message"
1831
+ ],
1832
+ "additionalProperties": true
1833
+ },
1834
+ "ForbiddenEncoded": {
1835
+ "type": "object",
1836
+ "properties": {
1837
+ "_tag": {
1838
+ "type": "string",
1839
+ "enum": [
1840
+ "Forbidden"
1841
+ ]
1842
+ },
1843
+ "message": {
1844
+ "type": "string"
1845
+ },
1846
+ "action": {
1847
+ "type": "string"
1848
+ }
1849
+ },
1850
+ "required": [
1851
+ "_tag",
1852
+ "message",
1853
+ "action"
1854
+ ],
1855
+ "additionalProperties": true
1856
+ },
1857
+ "InvalidInputEncoded": {
1858
+ "type": "object",
1859
+ "properties": {
1860
+ "_tag": {
1861
+ "type": "string",
1862
+ "enum": [
1863
+ "InvalidInput"
1864
+ ]
1865
+ },
1866
+ "message": {
1867
+ "type": "string"
1868
+ }
1869
+ },
1870
+ "required": [
1871
+ "_tag",
1872
+ "message"
1873
+ ],
1874
+ "additionalProperties": true
1875
+ }
1876
+ }
1877
+ }
1878
+ },
1879
+ "read": {
1880
+ "description": "A page of a readable file's extracted text (the Ingestion contract), for agents: up to `limit` characters from `offset`, with the next offset.",
1881
+ "input": {
1882
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1883
+ "type": "object",
1884
+ "properties": {
1885
+ "fileId": {
1886
+ "type": "string"
1887
+ },
1888
+ "offset": {
1889
+ "type": "integer",
1890
+ "minimum": 0,
1891
+ "maximum": 9007199254740991
1892
+ },
1893
+ "limit": {
1894
+ "type": "integer",
1895
+ "minimum": 1,
1896
+ "maximum": 20000
1897
+ }
1898
+ },
1899
+ "required": [
1900
+ "fileId"
1901
+ ],
1902
+ "additionalProperties": true
1903
+ },
1904
+ "output": {
1905
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1906
+ "type": "object",
1907
+ "properties": {
1908
+ "fileId": {
1909
+ "type": "string"
1910
+ },
1911
+ "text": {
1912
+ "type": "string"
1913
+ },
1914
+ "offset": {
1915
+ "anyOf": [
1916
+ {
1917
+ "type": "number"
1918
+ },
1919
+ {
1920
+ "type": "string",
1921
+ "enum": [
1922
+ "Infinity",
1923
+ "-Infinity",
1924
+ "NaN"
1925
+ ]
1926
+ }
1927
+ ]
1928
+ },
1929
+ "total": {
1930
+ "anyOf": [
1931
+ {
1932
+ "type": "number"
1933
+ },
1934
+ {
1935
+ "type": "string",
1936
+ "enum": [
1937
+ "Infinity",
1938
+ "-Infinity",
1939
+ "NaN"
1940
+ ]
1941
+ }
1942
+ ]
1943
+ },
1944
+ "nextOffset": {
1945
+ "anyOf": [
1946
+ {
1947
+ "type": "number"
1948
+ },
1949
+ {
1950
+ "type": "string",
1951
+ "enum": [
1952
+ "Infinity",
1953
+ "-Infinity",
1954
+ "NaN"
1955
+ ]
1956
+ },
1957
+ {
1958
+ "type": "null"
1959
+ }
1960
+ ]
1961
+ },
1962
+ "extraction": {
1963
+ "type": "string"
1964
+ },
1965
+ "truncated": {
1966
+ "type": "boolean"
1967
+ }
1968
+ },
1969
+ "required": [
1970
+ "fileId",
1971
+ "text",
1972
+ "offset",
1973
+ "total",
1974
+ "nextOffset",
1975
+ "extraction",
1976
+ "truncated"
1977
+ ],
1978
+ "additionalProperties": true
1979
+ },
1980
+ "errors": {
1981
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1982
+ "anyOf": [
1983
+ {
1984
+ "$ref": "#/$defs/UnauthenticatedEncoded"
1985
+ },
1986
+ {
1987
+ "$ref": "#/$defs/ForbiddenEncoded"
1988
+ },
1989
+ {
1990
+ "$ref": "#/$defs/InvalidInputEncoded"
1991
+ }
1992
+ ],
1993
+ "$defs": {
1994
+ "UnauthenticatedEncoded": {
1995
+ "type": "object",
1996
+ "properties": {
1997
+ "_tag": {
1998
+ "type": "string",
1999
+ "enum": [
2000
+ "Unauthenticated"
2001
+ ]
2002
+ },
2003
+ "message": {
2004
+ "type": "string"
2005
+ }
2006
+ },
2007
+ "required": [
2008
+ "_tag",
2009
+ "message"
2010
+ ],
2011
+ "additionalProperties": true
2012
+ },
2013
+ "ForbiddenEncoded": {
2014
+ "type": "object",
2015
+ "properties": {
2016
+ "_tag": {
2017
+ "type": "string",
2018
+ "enum": [
2019
+ "Forbidden"
2020
+ ]
2021
+ },
2022
+ "message": {
2023
+ "type": "string"
2024
+ },
2025
+ "action": {
2026
+ "type": "string"
2027
+ }
2028
+ },
2029
+ "required": [
2030
+ "_tag",
2031
+ "message",
2032
+ "action"
2033
+ ],
2034
+ "additionalProperties": true
2035
+ },
2036
+ "InvalidInputEncoded": {
2037
+ "type": "object",
2038
+ "properties": {
2039
+ "_tag": {
2040
+ "type": "string",
2041
+ "enum": [
2042
+ "InvalidInput"
2043
+ ]
2044
+ },
2045
+ "message": {
2046
+ "type": "string"
2047
+ }
2048
+ },
2049
+ "required": [
2050
+ "_tag",
2051
+ "message"
2052
+ ],
2053
+ "additionalProperties": true
2054
+ }
2055
+ }
2056
+ }
2057
+ },
2058
+ "delete": {
2059
+ "description": "Delete a file: a staged file by its uploader, an attached one by whoever may `attach` to its record. Refused while a retention hold lasts. Its quota is released at once and its bytes purged after the deployment's retention period. Deleting a record deletes its files the same way.",
2060
+ "input": {
2061
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2062
+ "type": "object",
2063
+ "properties": {
2064
+ "fileId": {
2065
+ "type": "string"
2066
+ }
2067
+ },
2068
+ "required": [
2069
+ "fileId"
2070
+ ],
2071
+ "additionalProperties": true
2072
+ },
2073
+ "output": {
2074
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2075
+ "type": "object",
2076
+ "properties": {
2077
+ "id": {
2078
+ "type": "string"
2079
+ },
2080
+ "orgId": {
2081
+ "type": "string"
2082
+ },
2083
+ "name": {
2084
+ "type": "string"
2085
+ },
2086
+ "declaredType": {
2087
+ "type": "string"
2088
+ },
2089
+ "contentType": {
2090
+ "anyOf": [
2091
+ {
2092
+ "type": "string"
2093
+ },
2094
+ {
2095
+ "type": "null"
2096
+ }
2097
+ ]
2098
+ },
2099
+ "size": {
2100
+ "anyOf": [
2101
+ {
2102
+ "type": "number"
2103
+ },
2104
+ {
2105
+ "type": "string",
2106
+ "enum": [
2107
+ "Infinity",
2108
+ "-Infinity",
2109
+ "NaN"
2110
+ ]
2111
+ }
2112
+ ]
2113
+ },
2114
+ "sha256": {
2115
+ "anyOf": [
2116
+ {
2117
+ "type": "string"
2118
+ },
2119
+ {
2120
+ "type": "null"
2121
+ }
2122
+ ]
2123
+ },
2124
+ "state": {
2125
+ "type": "string",
2126
+ "enum": [
2127
+ "uploading",
2128
+ "processing",
2129
+ "available",
2130
+ "quarantined",
2131
+ "rejected",
2132
+ "deleted"
2133
+ ]
2134
+ },
2135
+ "stateReason": {
2136
+ "anyOf": [
2137
+ {
2138
+ "type": "string"
2139
+ },
2140
+ {
2141
+ "type": "null"
2142
+ }
2143
+ ]
2144
+ },
2145
+ "scan": {
2146
+ "anyOf": [
2147
+ {
2148
+ "type": "string",
2149
+ "enum": [
2150
+ "clean",
2151
+ "infected",
2152
+ "skipped",
2153
+ "error"
2154
+ ]
2155
+ },
2156
+ {
2157
+ "type": "null"
2158
+ }
2159
+ ]
2160
+ },
2161
+ "attachedTo": {
2162
+ "anyOf": [
2163
+ {
2164
+ "type": "object",
2165
+ "properties": {
2166
+ "entity": {
2167
+ "type": "string"
2168
+ },
2169
+ "id": {
2170
+ "type": "string"
2171
+ }
2172
+ },
2173
+ "required": [
2174
+ "entity",
2175
+ "id"
2176
+ ],
2177
+ "additionalProperties": true
2178
+ },
2179
+ {
2180
+ "type": "null"
2181
+ }
2182
+ ]
2183
+ },
2184
+ "uploadedBy": {
2185
+ "type": "string"
2186
+ },
2187
+ "createdAt": {
2188
+ "type": "string"
2189
+ },
2190
+ "completedAt": {
2191
+ "anyOf": [
2192
+ {
2193
+ "type": "string"
2194
+ },
2195
+ {
2196
+ "type": "null"
2197
+ }
2198
+ ]
2199
+ },
2200
+ "deletedAt": {
2201
+ "anyOf": [
2202
+ {
2203
+ "type": "string"
2204
+ },
2205
+ {
2206
+ "type": "null"
2207
+ }
2208
+ ]
2209
+ },
2210
+ "retainUntil": {
2211
+ "anyOf": [
2212
+ {
2213
+ "type": "string"
2214
+ },
2215
+ {
2216
+ "type": "null"
2217
+ }
2218
+ ]
2219
+ }
2220
+ },
2221
+ "required": [
2222
+ "id",
2223
+ "orgId",
2224
+ "name",
2225
+ "declaredType",
2226
+ "contentType",
2227
+ "size",
2228
+ "sha256",
2229
+ "state",
2230
+ "stateReason",
2231
+ "scan",
2232
+ "attachedTo",
2233
+ "uploadedBy",
2234
+ "createdAt",
2235
+ "completedAt",
2236
+ "deletedAt",
2237
+ "retainUntil"
2238
+ ],
2239
+ "additionalProperties": true
2240
+ },
2241
+ "errors": {
2242
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2243
+ "anyOf": [
2244
+ {
2245
+ "$ref": "#/$defs/UnauthenticatedEncoded"
2246
+ },
2247
+ {
2248
+ "$ref": "#/$defs/ForbiddenEncoded"
2249
+ },
2250
+ {
2251
+ "$ref": "#/$defs/InvalidInputEncoded"
2252
+ }
2253
+ ],
2254
+ "$defs": {
2255
+ "UnauthenticatedEncoded": {
2256
+ "type": "object",
2257
+ "properties": {
2258
+ "_tag": {
2259
+ "type": "string",
2260
+ "enum": [
2261
+ "Unauthenticated"
2262
+ ]
2263
+ },
2264
+ "message": {
2265
+ "type": "string"
2266
+ }
2267
+ },
2268
+ "required": [
2269
+ "_tag",
2270
+ "message"
2271
+ ],
2272
+ "additionalProperties": true
2273
+ },
2274
+ "ForbiddenEncoded": {
2275
+ "type": "object",
2276
+ "properties": {
2277
+ "_tag": {
2278
+ "type": "string",
2279
+ "enum": [
2280
+ "Forbidden"
2281
+ ]
2282
+ },
2283
+ "message": {
2284
+ "type": "string"
2285
+ },
2286
+ "action": {
2287
+ "type": "string"
2288
+ }
2289
+ },
2290
+ "required": [
2291
+ "_tag",
2292
+ "message",
2293
+ "action"
2294
+ ],
2295
+ "additionalProperties": true
2296
+ },
2297
+ "InvalidInputEncoded": {
2298
+ "type": "object",
2299
+ "properties": {
2300
+ "_tag": {
2301
+ "type": "string",
2302
+ "enum": [
2303
+ "InvalidInput"
2304
+ ]
2305
+ },
2306
+ "message": {
2307
+ "type": "string"
2308
+ }
2309
+ },
2310
+ "required": [
2311
+ "_tag",
2312
+ "message"
2313
+ ],
2314
+ "additionalProperties": true
2315
+ }
2316
+ }
2317
+ }
2318
+ },
2319
+ "retain": {
2320
+ "description": "Set or lift a retention hold: deletion is refused until `until` (administrators with eloxiv.files.manage).",
2321
+ "input": {
2322
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2323
+ "type": "object",
2324
+ "properties": {
2325
+ "fileId": {
2326
+ "type": "string"
2327
+ },
2328
+ "until": {
2329
+ "anyOf": [
2330
+ {
2331
+ "type": "string"
2332
+ },
2333
+ {
2334
+ "type": "null"
2335
+ }
2336
+ ]
2337
+ }
2338
+ },
2339
+ "required": [
2340
+ "fileId",
2341
+ "until"
2342
+ ],
2343
+ "additionalProperties": true
2344
+ },
2345
+ "output": {
2346
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2347
+ "type": "object",
2348
+ "properties": {
2349
+ "id": {
2350
+ "type": "string"
2351
+ },
2352
+ "orgId": {
2353
+ "type": "string"
2354
+ },
2355
+ "name": {
2356
+ "type": "string"
2357
+ },
2358
+ "declaredType": {
2359
+ "type": "string"
2360
+ },
2361
+ "contentType": {
2362
+ "anyOf": [
2363
+ {
2364
+ "type": "string"
2365
+ },
2366
+ {
2367
+ "type": "null"
2368
+ }
2369
+ ]
2370
+ },
2371
+ "size": {
2372
+ "anyOf": [
2373
+ {
2374
+ "type": "number"
2375
+ },
2376
+ {
2377
+ "type": "string",
2378
+ "enum": [
2379
+ "Infinity",
2380
+ "-Infinity",
2381
+ "NaN"
2382
+ ]
2383
+ }
2384
+ ]
2385
+ },
2386
+ "sha256": {
2387
+ "anyOf": [
2388
+ {
2389
+ "type": "string"
2390
+ },
2391
+ {
2392
+ "type": "null"
2393
+ }
2394
+ ]
2395
+ },
2396
+ "state": {
2397
+ "type": "string",
2398
+ "enum": [
2399
+ "uploading",
2400
+ "processing",
2401
+ "available",
2402
+ "quarantined",
2403
+ "rejected",
2404
+ "deleted"
2405
+ ]
2406
+ },
2407
+ "stateReason": {
2408
+ "anyOf": [
2409
+ {
2410
+ "type": "string"
2411
+ },
2412
+ {
2413
+ "type": "null"
2414
+ }
2415
+ ]
2416
+ },
2417
+ "scan": {
2418
+ "anyOf": [
2419
+ {
2420
+ "type": "string",
2421
+ "enum": [
2422
+ "clean",
2423
+ "infected",
2424
+ "skipped",
2425
+ "error"
2426
+ ]
2427
+ },
2428
+ {
2429
+ "type": "null"
2430
+ }
2431
+ ]
2432
+ },
2433
+ "attachedTo": {
2434
+ "anyOf": [
2435
+ {
2436
+ "type": "object",
2437
+ "properties": {
2438
+ "entity": {
2439
+ "type": "string"
2440
+ },
2441
+ "id": {
2442
+ "type": "string"
2443
+ }
2444
+ },
2445
+ "required": [
2446
+ "entity",
2447
+ "id"
2448
+ ],
2449
+ "additionalProperties": true
2450
+ },
2451
+ {
2452
+ "type": "null"
2453
+ }
2454
+ ]
2455
+ },
2456
+ "uploadedBy": {
2457
+ "type": "string"
2458
+ },
2459
+ "createdAt": {
2460
+ "type": "string"
2461
+ },
2462
+ "completedAt": {
2463
+ "anyOf": [
2464
+ {
2465
+ "type": "string"
2466
+ },
2467
+ {
2468
+ "type": "null"
2469
+ }
2470
+ ]
2471
+ },
2472
+ "deletedAt": {
2473
+ "anyOf": [
2474
+ {
2475
+ "type": "string"
2476
+ },
2477
+ {
2478
+ "type": "null"
2479
+ }
2480
+ ]
2481
+ },
2482
+ "retainUntil": {
2483
+ "anyOf": [
2484
+ {
2485
+ "type": "string"
2486
+ },
2487
+ {
2488
+ "type": "null"
2489
+ }
2490
+ ]
2491
+ }
2492
+ },
2493
+ "required": [
2494
+ "id",
2495
+ "orgId",
2496
+ "name",
2497
+ "declaredType",
2498
+ "contentType",
2499
+ "size",
2500
+ "sha256",
2501
+ "state",
2502
+ "stateReason",
2503
+ "scan",
2504
+ "attachedTo",
2505
+ "uploadedBy",
2506
+ "createdAt",
2507
+ "completedAt",
2508
+ "deletedAt",
2509
+ "retainUntil"
2510
+ ],
2511
+ "additionalProperties": true
2512
+ },
2513
+ "errors": {
2514
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2515
+ "anyOf": [
2516
+ {
2517
+ "$ref": "#/$defs/UnauthenticatedEncoded"
2518
+ },
2519
+ {
2520
+ "$ref": "#/$defs/ForbiddenEncoded"
2521
+ },
2522
+ {
2523
+ "$ref": "#/$defs/InvalidInputEncoded"
2524
+ }
2525
+ ],
2526
+ "$defs": {
2527
+ "UnauthenticatedEncoded": {
2528
+ "type": "object",
2529
+ "properties": {
2530
+ "_tag": {
2531
+ "type": "string",
2532
+ "enum": [
2533
+ "Unauthenticated"
2534
+ ]
2535
+ },
2536
+ "message": {
2537
+ "type": "string"
2538
+ }
2539
+ },
2540
+ "required": [
2541
+ "_tag",
2542
+ "message"
2543
+ ],
2544
+ "additionalProperties": true
2545
+ },
2546
+ "ForbiddenEncoded": {
2547
+ "type": "object",
2548
+ "properties": {
2549
+ "_tag": {
2550
+ "type": "string",
2551
+ "enum": [
2552
+ "Forbidden"
2553
+ ]
2554
+ },
2555
+ "message": {
2556
+ "type": "string"
2557
+ },
2558
+ "action": {
2559
+ "type": "string"
2560
+ }
2561
+ },
2562
+ "required": [
2563
+ "_tag",
2564
+ "message",
2565
+ "action"
2566
+ ],
2567
+ "additionalProperties": true
2568
+ },
2569
+ "InvalidInputEncoded": {
2570
+ "type": "object",
2571
+ "properties": {
2572
+ "_tag": {
2573
+ "type": "string",
2574
+ "enum": [
2575
+ "InvalidInput"
2576
+ ]
2577
+ },
2578
+ "message": {
2579
+ "type": "string"
2580
+ }
2581
+ },
2582
+ "required": [
2583
+ "_tag",
2584
+ "message"
2585
+ ],
2586
+ "additionalProperties": true
2587
+ }
2588
+ }
2589
+ }
2590
+ },
2591
+ "usage": {
2592
+ "description": "The organisation's stored bytes and its quota.",
2593
+ "input": {
2594
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2595
+ "not": {
2596
+ "type": "null"
2597
+ }
2598
+ },
2599
+ "output": {
2600
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2601
+ "type": "object",
2602
+ "properties": {
2603
+ "orgId": {
2604
+ "type": "string"
2605
+ },
2606
+ "usedBytes": {
2607
+ "anyOf": [
2608
+ {
2609
+ "type": "number"
2610
+ },
2611
+ {
2612
+ "type": "string",
2613
+ "enum": [
2614
+ "Infinity",
2615
+ "-Infinity",
2616
+ "NaN"
2617
+ ]
2618
+ }
2619
+ ]
2620
+ },
2621
+ "limitBytes": {
2622
+ "anyOf": [
2623
+ {
2624
+ "type": "number"
2625
+ },
2626
+ {
2627
+ "type": "string",
2628
+ "enum": [
2629
+ "Infinity",
2630
+ "-Infinity",
2631
+ "NaN"
2632
+ ]
2633
+ },
2634
+ {
2635
+ "type": "null"
2636
+ }
2637
+ ]
2638
+ }
2639
+ },
2640
+ "required": [
2641
+ "orgId",
2642
+ "usedBytes",
2643
+ "limitBytes"
2644
+ ],
2645
+ "additionalProperties": true
2646
+ },
2647
+ "errors": {
2648
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2649
+ "anyOf": [
2650
+ {
2651
+ "$ref": "#/$defs/UnauthenticatedEncoded"
2652
+ },
2653
+ {
2654
+ "$ref": "#/$defs/ForbiddenEncoded"
2655
+ },
2656
+ {
2657
+ "$ref": "#/$defs/InvalidInputEncoded"
2658
+ }
2659
+ ],
2660
+ "$defs": {
2661
+ "UnauthenticatedEncoded": {
2662
+ "type": "object",
2663
+ "properties": {
2664
+ "_tag": {
2665
+ "type": "string",
2666
+ "enum": [
2667
+ "Unauthenticated"
2668
+ ]
2669
+ },
2670
+ "message": {
2671
+ "type": "string"
2672
+ }
2673
+ },
2674
+ "required": [
2675
+ "_tag",
2676
+ "message"
2677
+ ],
2678
+ "additionalProperties": true
2679
+ },
2680
+ "ForbiddenEncoded": {
2681
+ "type": "object",
2682
+ "properties": {
2683
+ "_tag": {
2684
+ "type": "string",
2685
+ "enum": [
2686
+ "Forbidden"
2687
+ ]
2688
+ },
2689
+ "message": {
2690
+ "type": "string"
2691
+ },
2692
+ "action": {
2693
+ "type": "string"
2694
+ }
2695
+ },
2696
+ "required": [
2697
+ "_tag",
2698
+ "message",
2699
+ "action"
2700
+ ],
2701
+ "additionalProperties": true
2702
+ },
2703
+ "InvalidInputEncoded": {
2704
+ "type": "object",
2705
+ "properties": {
2706
+ "_tag": {
2707
+ "type": "string",
2708
+ "enum": [
2709
+ "InvalidInput"
2710
+ ]
2711
+ },
2712
+ "message": {
2713
+ "type": "string"
2714
+ }
2715
+ },
2716
+ "required": [
2717
+ "_tag",
2718
+ "message"
2719
+ ],
2720
+ "additionalProperties": true
2721
+ }
2722
+ }
2723
+ }
2724
+ },
2725
+ "setQuota": {
2726
+ "description": "Set the organisation's storage quota in bytes, or null for the deployment's default (administrators with eloxiv.files.manage). Uploads that would pass it are refused when they begin.",
2727
+ "input": {
2728
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2729
+ "type": "object",
2730
+ "properties": {
2731
+ "limitBytes": {
2732
+ "anyOf": [
2733
+ {
2734
+ "type": "integer",
2735
+ "minimum": 0,
2736
+ "maximum": 9007199254740991
2737
+ },
2738
+ {
2739
+ "type": "null"
2740
+ }
2741
+ ]
2742
+ }
2743
+ },
2744
+ "required": [
2745
+ "limitBytes"
2746
+ ],
2747
+ "additionalProperties": true
2748
+ },
2749
+ "output": {
2750
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2751
+ "type": "object",
2752
+ "properties": {
2753
+ "orgId": {
2754
+ "type": "string"
2755
+ },
2756
+ "usedBytes": {
2757
+ "anyOf": [
2758
+ {
2759
+ "type": "number"
2760
+ },
2761
+ {
2762
+ "type": "string",
2763
+ "enum": [
2764
+ "Infinity",
2765
+ "-Infinity",
2766
+ "NaN"
2767
+ ]
2768
+ }
2769
+ ]
2770
+ },
2771
+ "limitBytes": {
2772
+ "anyOf": [
2773
+ {
2774
+ "type": "number"
2775
+ },
2776
+ {
2777
+ "type": "string",
2778
+ "enum": [
2779
+ "Infinity",
2780
+ "-Infinity",
2781
+ "NaN"
2782
+ ]
2783
+ },
2784
+ {
2785
+ "type": "null"
2786
+ }
2787
+ ]
2788
+ }
2789
+ },
2790
+ "required": [
2791
+ "orgId",
2792
+ "usedBytes",
2793
+ "limitBytes"
2794
+ ],
2795
+ "additionalProperties": true
2796
+ },
2797
+ "errors": {
2798
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2799
+ "anyOf": [
2800
+ {
2801
+ "$ref": "#/$defs/UnauthenticatedEncoded"
2802
+ },
2803
+ {
2804
+ "$ref": "#/$defs/ForbiddenEncoded"
2805
+ },
2806
+ {
2807
+ "$ref": "#/$defs/InvalidInputEncoded"
2808
+ }
2809
+ ],
2810
+ "$defs": {
2811
+ "UnauthenticatedEncoded": {
2812
+ "type": "object",
2813
+ "properties": {
2814
+ "_tag": {
2815
+ "type": "string",
2816
+ "enum": [
2817
+ "Unauthenticated"
2818
+ ]
2819
+ },
2820
+ "message": {
2821
+ "type": "string"
2822
+ }
2823
+ },
2824
+ "required": [
2825
+ "_tag",
2826
+ "message"
2827
+ ],
2828
+ "additionalProperties": true
2829
+ },
2830
+ "ForbiddenEncoded": {
2831
+ "type": "object",
2832
+ "properties": {
2833
+ "_tag": {
2834
+ "type": "string",
2835
+ "enum": [
2836
+ "Forbidden"
2837
+ ]
2838
+ },
2839
+ "message": {
2840
+ "type": "string"
2841
+ },
2842
+ "action": {
2843
+ "type": "string"
2844
+ }
2845
+ },
2846
+ "required": [
2847
+ "_tag",
2848
+ "message",
2849
+ "action"
2850
+ ],
2851
+ "additionalProperties": true
2852
+ },
2853
+ "InvalidInputEncoded": {
2854
+ "type": "object",
2855
+ "properties": {
2856
+ "_tag": {
2857
+ "type": "string",
2858
+ "enum": [
2859
+ "InvalidInput"
2860
+ ]
2861
+ },
2862
+ "message": {
2863
+ "type": "string"
2864
+ }
2865
+ },
2866
+ "required": [
2867
+ "_tag",
2868
+ "message"
2869
+ ],
2870
+ "additionalProperties": true
2871
+ }
2872
+ }
2873
+ }
2874
+ },
2875
+ "setStorage": {
2876
+ "description": "Keep new files in an S3-compatible store of the organisation's (administrators with eloxiv.files.manage) or the caller's own: checked to answer before it is saved, its secret kept as a secret, never returned. Files already stored stay where they are, read from there.",
2877
+ "input": {
2878
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2879
+ "type": "object",
2880
+ "properties": {
2881
+ "scope": {
2882
+ "type": "string",
2883
+ "enum": [
2884
+ "org",
2885
+ "personal"
2886
+ ]
2887
+ },
2888
+ "endpoint": {
2889
+ "type": "string",
2890
+ "maxLength": 500
2891
+ },
2892
+ "region": {
2893
+ "type": "string",
2894
+ "minLength": 1,
2895
+ "maxLength": 100
2896
+ },
2897
+ "bucket": {
2898
+ "type": "string",
2899
+ "minLength": 1,
2900
+ "maxLength": 255
2901
+ },
2902
+ "prefix": {
2903
+ "type": "string",
2904
+ "maxLength": 200
2905
+ },
2906
+ "forcePathStyle": {
2907
+ "type": "boolean"
2908
+ },
2909
+ "accessKeyId": {
2910
+ "type": "string",
2911
+ "minLength": 1,
2912
+ "maxLength": 200
2913
+ },
2914
+ "secret": {
2915
+ "type": "string",
2916
+ "minLength": 1,
2917
+ "maxLength": 200
2918
+ }
2919
+ },
2920
+ "required": [
2921
+ "scope",
2922
+ "endpoint",
2923
+ "region",
2924
+ "bucket",
2925
+ "accessKeyId",
2926
+ "secret"
2927
+ ],
2928
+ "additionalProperties": true
2929
+ },
2930
+ "output": {
2931
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2932
+ "type": "object",
2933
+ "properties": {
2934
+ "id": {
2935
+ "type": "string"
2936
+ },
2937
+ "scope": {
2938
+ "type": "string",
2939
+ "enum": [
2940
+ "org",
2941
+ "personal"
2942
+ ]
2943
+ },
2944
+ "endpoint": {
2945
+ "type": "string"
2946
+ },
2947
+ "region": {
2948
+ "type": "string"
2949
+ },
2950
+ "bucket": {
2951
+ "type": "string"
2952
+ },
2953
+ "prefix": {
2954
+ "type": "string"
2955
+ }
2956
+ },
2957
+ "required": [
2958
+ "id",
2959
+ "scope",
2960
+ "endpoint",
2961
+ "region",
2962
+ "bucket",
2963
+ "prefix"
2964
+ ],
2965
+ "additionalProperties": true
2966
+ },
2967
+ "errors": {
2968
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2969
+ "anyOf": [
2970
+ {
2971
+ "$ref": "#/$defs/UnauthenticatedEncoded"
2972
+ },
2973
+ {
2974
+ "$ref": "#/$defs/ForbiddenEncoded"
2975
+ },
2976
+ {
2977
+ "$ref": "#/$defs/InvalidInputEncoded"
2978
+ }
2979
+ ],
2980
+ "$defs": {
2981
+ "UnauthenticatedEncoded": {
2982
+ "type": "object",
2983
+ "properties": {
2984
+ "_tag": {
2985
+ "type": "string",
2986
+ "enum": [
2987
+ "Unauthenticated"
2988
+ ]
2989
+ },
2990
+ "message": {
2991
+ "type": "string"
2992
+ }
2993
+ },
2994
+ "required": [
2995
+ "_tag",
2996
+ "message"
2997
+ ],
2998
+ "additionalProperties": true
2999
+ },
3000
+ "ForbiddenEncoded": {
3001
+ "type": "object",
3002
+ "properties": {
3003
+ "_tag": {
3004
+ "type": "string",
3005
+ "enum": [
3006
+ "Forbidden"
3007
+ ]
3008
+ },
3009
+ "message": {
3010
+ "type": "string"
3011
+ },
3012
+ "action": {
3013
+ "type": "string"
3014
+ }
3015
+ },
3016
+ "required": [
3017
+ "_tag",
3018
+ "message",
3019
+ "action"
3020
+ ],
3021
+ "additionalProperties": true
3022
+ },
3023
+ "InvalidInputEncoded": {
3024
+ "type": "object",
3025
+ "properties": {
3026
+ "_tag": {
3027
+ "type": "string",
3028
+ "enum": [
3029
+ "InvalidInput"
3030
+ ]
3031
+ },
3032
+ "message": {
3033
+ "type": "string"
3034
+ }
3035
+ },
3036
+ "required": [
3037
+ "_tag",
3038
+ "message"
3039
+ ],
3040
+ "additionalProperties": true
3041
+ }
3042
+ }
3043
+ }
3044
+ },
3045
+ "clearStorage": {
3046
+ "description": "Stop using the organisation's (administrators) or the caller's own store for new files: they go to the next one (the organisation's, then the deployment's). Files already there are still read from it.",
3047
+ "input": {
3048
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3049
+ "type": "object",
3050
+ "properties": {
3051
+ "scope": {
3052
+ "type": "string",
3053
+ "enum": [
3054
+ "org",
3055
+ "personal"
3056
+ ]
3057
+ }
3058
+ },
3059
+ "required": [
3060
+ "scope"
3061
+ ],
3062
+ "additionalProperties": true
3063
+ },
3064
+ "output": {
3065
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3066
+ "type": "object",
3067
+ "properties": {
3068
+ "org": {
3069
+ "anyOf": [
3070
+ {
3071
+ "type": "object",
3072
+ "properties": {
3073
+ "id": {
3074
+ "type": "string"
3075
+ },
3076
+ "scope": {
3077
+ "type": "string",
3078
+ "enum": [
3079
+ "org",
3080
+ "personal"
3081
+ ]
3082
+ },
3083
+ "endpoint": {
3084
+ "type": "string"
3085
+ },
3086
+ "region": {
3087
+ "type": "string"
3088
+ },
3089
+ "bucket": {
3090
+ "type": "string"
3091
+ },
3092
+ "prefix": {
3093
+ "type": "string"
3094
+ }
3095
+ },
3096
+ "required": [
3097
+ "id",
3098
+ "scope",
3099
+ "endpoint",
3100
+ "region",
3101
+ "bucket",
3102
+ "prefix"
3103
+ ],
3104
+ "additionalProperties": true
3105
+ },
3106
+ {
3107
+ "type": "null"
3108
+ }
3109
+ ]
3110
+ },
3111
+ "personal": {
3112
+ "anyOf": [
3113
+ {
3114
+ "type": "object",
3115
+ "properties": {
3116
+ "id": {
3117
+ "type": "string"
3118
+ },
3119
+ "scope": {
3120
+ "type": "string",
3121
+ "enum": [
3122
+ "org",
3123
+ "personal"
3124
+ ]
3125
+ },
3126
+ "endpoint": {
3127
+ "type": "string"
3128
+ },
3129
+ "region": {
3130
+ "type": "string"
3131
+ },
3132
+ "bucket": {
3133
+ "type": "string"
3134
+ },
3135
+ "prefix": {
3136
+ "type": "string"
3137
+ }
3138
+ },
3139
+ "required": [
3140
+ "id",
3141
+ "scope",
3142
+ "endpoint",
3143
+ "region",
3144
+ "bucket",
3145
+ "prefix"
3146
+ ],
3147
+ "additionalProperties": true
3148
+ },
3149
+ {
3150
+ "type": "null"
3151
+ }
3152
+ ]
3153
+ },
3154
+ "current": {
3155
+ "type": "string",
3156
+ "enum": [
3157
+ "personal",
3158
+ "org",
3159
+ "deployment"
3160
+ ]
3161
+ }
3162
+ },
3163
+ "required": [
3164
+ "org",
3165
+ "personal",
3166
+ "current"
3167
+ ],
3168
+ "additionalProperties": true
3169
+ },
3170
+ "errors": {
3171
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3172
+ "anyOf": [
3173
+ {
3174
+ "$ref": "#/$defs/UnauthenticatedEncoded"
3175
+ },
3176
+ {
3177
+ "$ref": "#/$defs/ForbiddenEncoded"
3178
+ },
3179
+ {
3180
+ "$ref": "#/$defs/InvalidInputEncoded"
3181
+ }
3182
+ ],
3183
+ "$defs": {
3184
+ "UnauthenticatedEncoded": {
3185
+ "type": "object",
3186
+ "properties": {
3187
+ "_tag": {
3188
+ "type": "string",
3189
+ "enum": [
3190
+ "Unauthenticated"
3191
+ ]
3192
+ },
3193
+ "message": {
3194
+ "type": "string"
3195
+ }
3196
+ },
3197
+ "required": [
3198
+ "_tag",
3199
+ "message"
3200
+ ],
3201
+ "additionalProperties": true
3202
+ },
3203
+ "ForbiddenEncoded": {
3204
+ "type": "object",
3205
+ "properties": {
3206
+ "_tag": {
3207
+ "type": "string",
3208
+ "enum": [
3209
+ "Forbidden"
3210
+ ]
3211
+ },
3212
+ "message": {
3213
+ "type": "string"
3214
+ },
3215
+ "action": {
3216
+ "type": "string"
3217
+ }
3218
+ },
3219
+ "required": [
3220
+ "_tag",
3221
+ "message",
3222
+ "action"
3223
+ ],
3224
+ "additionalProperties": true
3225
+ },
3226
+ "InvalidInputEncoded": {
3227
+ "type": "object",
3228
+ "properties": {
3229
+ "_tag": {
3230
+ "type": "string",
3231
+ "enum": [
3232
+ "InvalidInput"
3233
+ ]
3234
+ },
3235
+ "message": {
3236
+ "type": "string"
3237
+ }
3238
+ },
3239
+ "required": [
3240
+ "_tag",
3241
+ "message"
3242
+ ],
3243
+ "additionalProperties": true
3244
+ }
3245
+ }
3246
+ }
3247
+ },
3248
+ "storage": {
3249
+ "description": "Where the caller's new files go: their own store, their organisation's, or the deployment's.",
3250
+ "input": {
3251
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3252
+ "not": {
3253
+ "type": "null"
3254
+ }
3255
+ },
3256
+ "output": {
3257
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3258
+ "type": "object",
3259
+ "properties": {
3260
+ "org": {
3261
+ "anyOf": [
3262
+ {
3263
+ "type": "object",
3264
+ "properties": {
3265
+ "id": {
3266
+ "type": "string"
3267
+ },
3268
+ "scope": {
3269
+ "type": "string",
3270
+ "enum": [
3271
+ "org",
3272
+ "personal"
3273
+ ]
3274
+ },
3275
+ "endpoint": {
3276
+ "type": "string"
3277
+ },
3278
+ "region": {
3279
+ "type": "string"
3280
+ },
3281
+ "bucket": {
3282
+ "type": "string"
3283
+ },
3284
+ "prefix": {
3285
+ "type": "string"
3286
+ }
3287
+ },
3288
+ "required": [
3289
+ "id",
3290
+ "scope",
3291
+ "endpoint",
3292
+ "region",
3293
+ "bucket",
3294
+ "prefix"
3295
+ ],
3296
+ "additionalProperties": true
3297
+ },
3298
+ {
3299
+ "type": "null"
3300
+ }
3301
+ ]
3302
+ },
3303
+ "personal": {
3304
+ "anyOf": [
3305
+ {
3306
+ "type": "object",
3307
+ "properties": {
3308
+ "id": {
3309
+ "type": "string"
3310
+ },
3311
+ "scope": {
3312
+ "type": "string",
3313
+ "enum": [
3314
+ "org",
3315
+ "personal"
3316
+ ]
3317
+ },
3318
+ "endpoint": {
3319
+ "type": "string"
3320
+ },
3321
+ "region": {
3322
+ "type": "string"
3323
+ },
3324
+ "bucket": {
3325
+ "type": "string"
3326
+ },
3327
+ "prefix": {
3328
+ "type": "string"
3329
+ }
3330
+ },
3331
+ "required": [
3332
+ "id",
3333
+ "scope",
3334
+ "endpoint",
3335
+ "region",
3336
+ "bucket",
3337
+ "prefix"
3338
+ ],
3339
+ "additionalProperties": true
3340
+ },
3341
+ {
3342
+ "type": "null"
3343
+ }
3344
+ ]
3345
+ },
3346
+ "current": {
3347
+ "type": "string",
3348
+ "enum": [
3349
+ "personal",
3350
+ "org",
3351
+ "deployment"
3352
+ ]
3353
+ }
3354
+ },
3355
+ "required": [
3356
+ "org",
3357
+ "personal",
3358
+ "current"
3359
+ ],
3360
+ "additionalProperties": true
3361
+ },
3362
+ "errors": {
3363
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3364
+ "anyOf": [
3365
+ {
3366
+ "$ref": "#/$defs/UnauthenticatedEncoded"
3367
+ },
3368
+ {
3369
+ "$ref": "#/$defs/ForbiddenEncoded"
3370
+ },
3371
+ {
3372
+ "$ref": "#/$defs/InvalidInputEncoded"
3373
+ }
3374
+ ],
3375
+ "$defs": {
3376
+ "UnauthenticatedEncoded": {
3377
+ "type": "object",
3378
+ "properties": {
3379
+ "_tag": {
3380
+ "type": "string",
3381
+ "enum": [
3382
+ "Unauthenticated"
3383
+ ]
3384
+ },
3385
+ "message": {
3386
+ "type": "string"
3387
+ }
3388
+ },
3389
+ "required": [
3390
+ "_tag",
3391
+ "message"
3392
+ ],
3393
+ "additionalProperties": true
3394
+ },
3395
+ "ForbiddenEncoded": {
3396
+ "type": "object",
3397
+ "properties": {
3398
+ "_tag": {
3399
+ "type": "string",
3400
+ "enum": [
3401
+ "Forbidden"
3402
+ ]
3403
+ },
3404
+ "message": {
3405
+ "type": "string"
3406
+ },
3407
+ "action": {
3408
+ "type": "string"
3409
+ }
3410
+ },
3411
+ "required": [
3412
+ "_tag",
3413
+ "message",
3414
+ "action"
3415
+ ],
3416
+ "additionalProperties": true
3417
+ },
3418
+ "InvalidInputEncoded": {
3419
+ "type": "object",
3420
+ "properties": {
3421
+ "_tag": {
3422
+ "type": "string",
3423
+ "enum": [
3424
+ "InvalidInput"
3425
+ ]
3426
+ },
3427
+ "message": {
3428
+ "type": "string"
3429
+ }
3430
+ },
3431
+ "required": [
3432
+ "_tag",
3433
+ "message"
3434
+ ],
3435
+ "additionalProperties": true
3436
+ }
3437
+ }
3438
+ }
3439
+ },
3440
+ "scan": {
3441
+ "description": "The virus-scan hook (in process, `FileScanner`): given a file's metadata and a way to read its bytes, answer clean, infected or error. A deployment that requires scanning refuses to start without one; `error` leaves the file unavailable.",
3442
+ "input": {
3443
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3444
+ "type": "object",
3445
+ "properties": {
3446
+ "fileId": {
3447
+ "type": "string"
3448
+ },
3449
+ "contentType": {
3450
+ "type": "string"
3451
+ },
3452
+ "size": {
3453
+ "anyOf": [
3454
+ {
3455
+ "type": "number"
3456
+ },
3457
+ {
3458
+ "type": "string",
3459
+ "enum": [
3460
+ "Infinity",
3461
+ "-Infinity",
3462
+ "NaN"
3463
+ ]
3464
+ }
3465
+ ]
3466
+ }
3467
+ },
3468
+ "required": [
3469
+ "fileId",
3470
+ "contentType",
3471
+ "size"
3472
+ ],
3473
+ "additionalProperties": true
3474
+ },
3475
+ "output": {
3476
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3477
+ "type": "object",
3478
+ "properties": {
3479
+ "verdict": {
3480
+ "type": "string",
3481
+ "enum": [
3482
+ "clean",
3483
+ "infected",
3484
+ "error"
3485
+ ]
3486
+ },
3487
+ "detail": {
3488
+ "anyOf": [
3489
+ {
3490
+ "type": "string"
3491
+ },
3492
+ {
3493
+ "type": "null"
3494
+ }
3495
+ ]
3496
+ }
3497
+ },
3498
+ "required": [
3499
+ "verdict",
3500
+ "detail"
3501
+ ],
3502
+ "additionalProperties": true
3503
+ },
3504
+ "errors": {
3505
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3506
+ "not": {}
3507
+ }
3508
+ }
3509
+ },
3510
+ "types": {
3511
+ "FileRecord": {
3512
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3513
+ "type": "object",
3514
+ "properties": {
3515
+ "id": {
3516
+ "type": "string"
3517
+ },
3518
+ "orgId": {
3519
+ "type": "string"
3520
+ },
3521
+ "name": {
3522
+ "type": "string"
3523
+ },
3524
+ "declaredType": {
3525
+ "type": "string"
3526
+ },
3527
+ "contentType": {
3528
+ "anyOf": [
3529
+ {
3530
+ "type": "string"
3531
+ },
3532
+ {
3533
+ "type": "null"
3534
+ }
3535
+ ]
3536
+ },
3537
+ "size": {
3538
+ "anyOf": [
3539
+ {
3540
+ "type": "number"
3541
+ },
3542
+ {
3543
+ "type": "string",
3544
+ "enum": [
3545
+ "Infinity",
3546
+ "-Infinity",
3547
+ "NaN"
3548
+ ]
3549
+ }
3550
+ ]
3551
+ },
3552
+ "sha256": {
3553
+ "anyOf": [
3554
+ {
3555
+ "type": "string"
3556
+ },
3557
+ {
3558
+ "type": "null"
3559
+ }
3560
+ ]
3561
+ },
3562
+ "state": {
3563
+ "type": "string",
3564
+ "enum": [
3565
+ "uploading",
3566
+ "processing",
3567
+ "available",
3568
+ "quarantined",
3569
+ "rejected",
3570
+ "deleted"
3571
+ ]
3572
+ },
3573
+ "stateReason": {
3574
+ "anyOf": [
3575
+ {
3576
+ "type": "string"
3577
+ },
3578
+ {
3579
+ "type": "null"
3580
+ }
3581
+ ]
3582
+ },
3583
+ "scan": {
3584
+ "anyOf": [
3585
+ {
3586
+ "type": "string",
3587
+ "enum": [
3588
+ "clean",
3589
+ "infected",
3590
+ "skipped",
3591
+ "error"
3592
+ ]
3593
+ },
3594
+ {
3595
+ "type": "null"
3596
+ }
3597
+ ]
3598
+ },
3599
+ "attachedTo": {
3600
+ "anyOf": [
3601
+ {
3602
+ "type": "object",
3603
+ "properties": {
3604
+ "entity": {
3605
+ "type": "string"
3606
+ },
3607
+ "id": {
3608
+ "type": "string"
3609
+ }
3610
+ },
3611
+ "required": [
3612
+ "entity",
3613
+ "id"
3614
+ ],
3615
+ "additionalProperties": true
3616
+ },
3617
+ {
3618
+ "type": "null"
3619
+ }
3620
+ ]
3621
+ },
3622
+ "uploadedBy": {
3623
+ "type": "string"
3624
+ },
3625
+ "createdAt": {
3626
+ "type": "string"
3627
+ },
3628
+ "completedAt": {
3629
+ "anyOf": [
3630
+ {
3631
+ "type": "string"
3632
+ },
3633
+ {
3634
+ "type": "null"
3635
+ }
3636
+ ]
3637
+ },
3638
+ "deletedAt": {
3639
+ "anyOf": [
3640
+ {
3641
+ "type": "string"
3642
+ },
3643
+ {
3644
+ "type": "null"
3645
+ }
3646
+ ]
3647
+ },
3648
+ "retainUntil": {
3649
+ "anyOf": [
3650
+ {
3651
+ "type": "string"
3652
+ },
3653
+ {
3654
+ "type": "null"
3655
+ }
3656
+ ]
3657
+ }
3658
+ },
3659
+ "required": [
3660
+ "id",
3661
+ "orgId",
3662
+ "name",
3663
+ "declaredType",
3664
+ "contentType",
3665
+ "size",
3666
+ "sha256",
3667
+ "state",
3668
+ "stateReason",
3669
+ "scan",
3670
+ "attachedTo",
3671
+ "uploadedBy",
3672
+ "createdAt",
3673
+ "completedAt",
3674
+ "deletedAt",
3675
+ "retainUntil"
3676
+ ],
3677
+ "additionalProperties": true
3678
+ },
3679
+ "FileState": {
3680
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3681
+ "type": "string",
3682
+ "enum": [
3683
+ "uploading",
3684
+ "processing",
3685
+ "available",
3686
+ "quarantined",
3687
+ "rejected",
3688
+ "deleted"
3689
+ ]
3690
+ },
3691
+ "ScanVerdict": {
3692
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3693
+ "type": "string",
3694
+ "enum": [
3695
+ "clean",
3696
+ "infected",
3697
+ "skipped",
3698
+ "error"
3699
+ ]
3700
+ },
3701
+ "RecordRef": {
3702
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3703
+ "type": "object",
3704
+ "properties": {
3705
+ "entity": {
3706
+ "type": "string"
3707
+ },
3708
+ "id": {
3709
+ "type": "string"
3710
+ }
3711
+ },
3712
+ "required": [
3713
+ "entity",
3714
+ "id"
3715
+ ],
3716
+ "additionalProperties": true
3717
+ },
3718
+ "UploadPlan": {
3719
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3720
+ "type": "object",
3721
+ "properties": {
3722
+ "fileId": {
3723
+ "type": "string"
3724
+ },
3725
+ "partSize": {
3726
+ "anyOf": [
3727
+ {
3728
+ "type": "number"
3729
+ },
3730
+ {
3731
+ "type": "string",
3732
+ "enum": [
3733
+ "Infinity",
3734
+ "-Infinity",
3735
+ "NaN"
3736
+ ]
3737
+ }
3738
+ ]
3739
+ },
3740
+ "parts": {
3741
+ "type": "array",
3742
+ "items": {
3743
+ "type": "object",
3744
+ "properties": {
3745
+ "partNumber": {
3746
+ "type": "integer",
3747
+ "minimum": -9007199254740991,
3748
+ "maximum": 9007199254740991
3749
+ },
3750
+ "size": {
3751
+ "anyOf": [
3752
+ {
3753
+ "type": "number"
3754
+ },
3755
+ {
3756
+ "type": "string",
3757
+ "enum": [
3758
+ "Infinity",
3759
+ "-Infinity",
3760
+ "NaN"
3761
+ ]
3762
+ }
3763
+ ]
3764
+ },
3765
+ "url": {
3766
+ "type": "string"
3767
+ },
3768
+ "headers": {
3769
+ "type": "object",
3770
+ "additionalProperties": {
3771
+ "type": "string"
3772
+ }
3773
+ }
3774
+ },
3775
+ "required": [
3776
+ "partNumber",
3777
+ "size",
3778
+ "url",
3779
+ "headers"
3780
+ ],
3781
+ "additionalProperties": true
3782
+ }
3783
+ },
3784
+ "received": {
3785
+ "type": "array",
3786
+ "items": {
3787
+ "type": "integer",
3788
+ "minimum": -9007199254740991,
3789
+ "maximum": 9007199254740991
3790
+ }
3791
+ },
3792
+ "urlsExpireAt": {
3793
+ "type": "string"
3794
+ },
3795
+ "uploadExpiresAt": {
3796
+ "type": "string"
3797
+ }
3798
+ },
3799
+ "required": [
3800
+ "fileId",
3801
+ "partSize",
3802
+ "parts",
3803
+ "received",
3804
+ "urlsExpireAt",
3805
+ "uploadExpiresAt"
3806
+ ],
3807
+ "additionalProperties": true
3808
+ },
3809
+ "PartUrl": {
3810
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3811
+ "type": "object",
3812
+ "properties": {
3813
+ "partNumber": {
3814
+ "type": "integer",
3815
+ "minimum": -9007199254740991,
3816
+ "maximum": 9007199254740991
3817
+ },
3818
+ "size": {
3819
+ "anyOf": [
3820
+ {
3821
+ "type": "number"
3822
+ },
3823
+ {
3824
+ "type": "string",
3825
+ "enum": [
3826
+ "Infinity",
3827
+ "-Infinity",
3828
+ "NaN"
3829
+ ]
3830
+ }
3831
+ ]
3832
+ },
3833
+ "url": {
3834
+ "type": "string"
3835
+ },
3836
+ "headers": {
3837
+ "type": "object",
3838
+ "additionalProperties": {
3839
+ "type": "string"
3840
+ }
3841
+ }
3842
+ },
3843
+ "required": [
3844
+ "partNumber",
3845
+ "size",
3846
+ "url",
3847
+ "headers"
3848
+ ],
3849
+ "additionalProperties": true
3850
+ },
3851
+ "DownloadUrl": {
3852
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3853
+ "type": "object",
3854
+ "properties": {
3855
+ "url": {
3856
+ "type": "string"
3857
+ },
3858
+ "expiresAt": {
3859
+ "type": "string"
3860
+ },
3861
+ "contentType": {
3862
+ "type": "string"
3863
+ },
3864
+ "size": {
3865
+ "anyOf": [
3866
+ {
3867
+ "type": "number"
3868
+ },
3869
+ {
3870
+ "type": "string",
3871
+ "enum": [
3872
+ "Infinity",
3873
+ "-Infinity",
3874
+ "NaN"
3875
+ ]
3876
+ }
3877
+ ]
3878
+ }
3879
+ },
3880
+ "required": [
3881
+ "url",
3882
+ "expiresAt",
3883
+ "contentType",
3884
+ "size"
3885
+ ],
3886
+ "additionalProperties": true
3887
+ },
3888
+ "TextPage": {
3889
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3890
+ "type": "object",
3891
+ "properties": {
3892
+ "fileId": {
3893
+ "type": "string"
3894
+ },
3895
+ "text": {
3896
+ "type": "string"
3897
+ },
3898
+ "offset": {
3899
+ "anyOf": [
3900
+ {
3901
+ "type": "number"
3902
+ },
3903
+ {
3904
+ "type": "string",
3905
+ "enum": [
3906
+ "Infinity",
3907
+ "-Infinity",
3908
+ "NaN"
3909
+ ]
3910
+ }
3911
+ ]
3912
+ },
3913
+ "total": {
3914
+ "anyOf": [
3915
+ {
3916
+ "type": "number"
3917
+ },
3918
+ {
3919
+ "type": "string",
3920
+ "enum": [
3921
+ "Infinity",
3922
+ "-Infinity",
3923
+ "NaN"
3924
+ ]
3925
+ }
3926
+ ]
3927
+ },
3928
+ "nextOffset": {
3929
+ "anyOf": [
3930
+ {
3931
+ "type": "number"
3932
+ },
3933
+ {
3934
+ "type": "string",
3935
+ "enum": [
3936
+ "Infinity",
3937
+ "-Infinity",
3938
+ "NaN"
3939
+ ]
3940
+ },
3941
+ {
3942
+ "type": "null"
3943
+ }
3944
+ ]
3945
+ },
3946
+ "extraction": {
3947
+ "type": "string"
3948
+ },
3949
+ "truncated": {
3950
+ "type": "boolean"
3951
+ }
3952
+ },
3953
+ "required": [
3954
+ "fileId",
3955
+ "text",
3956
+ "offset",
3957
+ "total",
3958
+ "nextOffset",
3959
+ "extraction",
3960
+ "truncated"
3961
+ ],
3962
+ "additionalProperties": true
3963
+ },
3964
+ "StorageUsage": {
3965
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3966
+ "type": "object",
3967
+ "properties": {
3968
+ "orgId": {
3969
+ "type": "string"
3970
+ },
3971
+ "usedBytes": {
3972
+ "anyOf": [
3973
+ {
3974
+ "type": "number"
3975
+ },
3976
+ {
3977
+ "type": "string",
3978
+ "enum": [
3979
+ "Infinity",
3980
+ "-Infinity",
3981
+ "NaN"
3982
+ ]
3983
+ }
3984
+ ]
3985
+ },
3986
+ "limitBytes": {
3987
+ "anyOf": [
3988
+ {
3989
+ "type": "number"
3990
+ },
3991
+ {
3992
+ "type": "string",
3993
+ "enum": [
3994
+ "Infinity",
3995
+ "-Infinity",
3996
+ "NaN"
3997
+ ]
3998
+ },
3999
+ {
4000
+ "type": "null"
4001
+ }
4002
+ ]
4003
+ }
4004
+ },
4005
+ "required": [
4006
+ "orgId",
4007
+ "usedBytes",
4008
+ "limitBytes"
4009
+ ],
4010
+ "additionalProperties": true
4011
+ },
4012
+ "EntityFilesDeclaration": {
4013
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4014
+ "type": "object",
4015
+ "properties": {
4016
+ "maxBytes": {
4017
+ "anyOf": [
4018
+ {
4019
+ "type": "number"
4020
+ },
4021
+ {
4022
+ "type": "string",
4023
+ "enum": [
4024
+ "Infinity",
4025
+ "-Infinity",
4026
+ "NaN"
4027
+ ]
4028
+ }
4029
+ ]
4030
+ },
4031
+ "types": {
4032
+ "type": "array",
4033
+ "items": {
4034
+ "type": "string"
4035
+ }
4036
+ },
4037
+ "ingest": {
4038
+ "type": "boolean"
4039
+ }
4040
+ },
4041
+ "additionalProperties": true
4042
+ },
4043
+ "ScanResult": {
4044
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4045
+ "type": "object",
4046
+ "properties": {
4047
+ "verdict": {
4048
+ "type": "string",
4049
+ "enum": [
4050
+ "clean",
4051
+ "infected",
4052
+ "error"
4053
+ ]
4054
+ },
4055
+ "detail": {
4056
+ "anyOf": [
4057
+ {
4058
+ "type": "string"
4059
+ },
4060
+ {
4061
+ "type": "null"
4062
+ }
4063
+ ]
4064
+ }
4065
+ },
4066
+ "required": [
4067
+ "verdict",
4068
+ "detail"
4069
+ ],
4070
+ "additionalProperties": true
4071
+ },
4072
+ "FileEventPayload": {
4073
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4074
+ "type": "object",
4075
+ "properties": {
4076
+ "fileId": {
4077
+ "type": "string"
4078
+ },
4079
+ "attachedTo": {
4080
+ "anyOf": [
4081
+ {
4082
+ "type": "object",
4083
+ "properties": {
4084
+ "entity": {
4085
+ "type": "string"
4086
+ },
4087
+ "id": {
4088
+ "type": "string"
4089
+ }
4090
+ },
4091
+ "required": [
4092
+ "entity",
4093
+ "id"
4094
+ ],
4095
+ "additionalProperties": true
4096
+ },
4097
+ {
4098
+ "type": "null"
4099
+ }
4100
+ ]
4101
+ },
4102
+ "state": {
4103
+ "type": "string",
4104
+ "enum": [
4105
+ "uploading",
4106
+ "processing",
4107
+ "available",
4108
+ "quarantined",
4109
+ "rejected",
4110
+ "deleted"
4111
+ ]
4112
+ }
4113
+ },
4114
+ "required": [
4115
+ "fileId",
4116
+ "attachedTo",
4117
+ "state"
4118
+ ],
4119
+ "additionalProperties": true
4120
+ }
4121
+ }
4122
+ }