@boxrouter/sdk 0.0.0-stage → 0.12.190

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 (343) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +40 -0
  3. package/README.md +508 -2
  4. package/dist/addresses.d.ts +5 -0
  5. package/dist/addresses.js +10 -0
  6. package/dist/api-error.d.ts +62 -0
  7. package/dist/api-error.js +264 -0
  8. package/dist/boxrouter.d.ts +68 -0
  9. package/dist/boxrouter.js +291 -0
  10. package/dist/browser-session/index.d.ts +17 -0
  11. package/dist/browser-session/index.js +48 -0
  12. package/dist/browser-session/operations.gen.d.ts +272 -0
  13. package/dist/browser-session/operations.gen.js +58 -0
  14. package/dist/browser-session/responseContracts/api_keys.d.ts +2 -0
  15. package/dist/browser-session/responseContracts/api_keys.js +10 -0
  16. package/dist/browser-session/responseContracts/credits.d.ts +2 -0
  17. package/dist/browser-session/responseContracts/credits.js +8 -0
  18. package/dist/browser-session/responseContracts/github.d.ts +2 -0
  19. package/dist/browser-session/responseContracts/github.js +11 -0
  20. package/dist/browser-session/responseContracts/identity.d.ts +2 -0
  21. package/dist/browser-session/responseContracts/identity.js +30 -0
  22. package/dist/browser-session/responseContracts/organizations.d.ts +2 -0
  23. package/dist/browser-session/responseContracts/organizations.js +17 -0
  24. package/dist/browser-session/responseContracts/privacy.d.ts +2 -0
  25. package/dist/browser-session/responseContracts/privacy.js +7 -0
  26. package/dist/browser-session/responseContracts.gen.d.ts +3 -0
  27. package/dist/browser-session/responseContracts.gen.js +10 -0
  28. package/dist/browser-session/responseValidators/api_keys-diagnostics.cjs +1 -0
  29. package/dist/browser-session/responseValidators/api_keys-diagnostics.d.cts +4 -0
  30. package/dist/browser-session/responseValidators/api_keys.cjs +2 -0
  31. package/dist/browser-session/responseValidators/api_keys.d.cts +4 -0
  32. package/dist/browser-session/responseValidators/credits-diagnostics.cjs +1 -0
  33. package/dist/browser-session/responseValidators/credits-diagnostics.d.cts +3 -0
  34. package/dist/browser-session/responseValidators/credits.cjs +2 -0
  35. package/dist/browser-session/responseValidators/credits.d.cts +3 -0
  36. package/dist/browser-session/responseValidators/github-diagnostics.cjs +1 -0
  37. package/dist/browser-session/responseValidators/github-diagnostics.d.cts +3 -0
  38. package/dist/browser-session/responseValidators/github.cjs +2 -0
  39. package/dist/browser-session/responseValidators/github.d.cts +3 -0
  40. package/dist/browser-session/responseValidators/identity-diagnostics.cjs +1 -0
  41. package/dist/browser-session/responseValidators/identity-diagnostics.d.cts +23 -0
  42. package/dist/browser-session/responseValidators/identity.cjs +2 -0
  43. package/dist/browser-session/responseValidators/identity.d.cts +23 -0
  44. package/dist/browser-session/responseValidators/organizations-diagnostics.cjs +1 -0
  45. package/dist/browser-session/responseValidators/organizations-diagnostics.d.cts +15 -0
  46. package/dist/browser-session/responseValidators/organizations.cjs +2 -0
  47. package/dist/browser-session/responseValidators/organizations.d.cts +15 -0
  48. package/dist/browser-session/responseValidators/privacy-diagnostics.cjs +1 -0
  49. package/dist/browser-session/responseValidators/privacy-diagnostics.d.cts +2 -0
  50. package/dist/browser-session/responseValidators/privacy.cjs +2 -0
  51. package/dist/browser-session/responseValidators/privacy.d.cts +2 -0
  52. package/dist/client/client.gen.d.ts +2 -0
  53. package/dist/client/client.gen.js +168 -0
  54. package/dist/client/index.d.ts +10 -0
  55. package/dist/client/index.js +17 -0
  56. package/dist/client/types.gen.d.ts +120 -0
  57. package/dist/client/types.gen.js +3 -0
  58. package/dist/client/utils.gen.d.ts +37 -0
  59. package/dist/client/utils.gen.js +239 -0
  60. package/dist/client.gen.d.ts +12 -0
  61. package/dist/client.gen.js +6 -0
  62. package/dist/command-check.gen.d.ts +14 -0
  63. package/dist/command-check.gen.js +23 -0
  64. package/dist/command-input.gen.d.ts +6 -0
  65. package/dist/command-input.gen.js +45 -0
  66. package/dist/core/auth.gen.d.ts +25 -0
  67. package/dist/core/auth.gen.js +18 -0
  68. package/dist/core/binaryStream.d.ts +8 -0
  69. package/dist/core/binaryStream.js +76 -0
  70. package/dist/core/bodySerializer.gen.d.ts +25 -0
  71. package/dist/core/bodySerializer.gen.js +60 -0
  72. package/dist/core/commandValidators.cjs +1 -0
  73. package/dist/core/commandValidators.d.cts +14 -0
  74. package/dist/core/eventValidation.d.ts +17 -0
  75. package/dist/core/eventValidation.js +56 -0
  76. package/dist/core/eventValidators.cjs +1 -0
  77. package/dist/core/eventValidators.d.cts +2 -0
  78. package/dist/core/json.d.ts +3 -0
  79. package/dist/core/json.js +33 -0
  80. package/dist/core/params.gen.d.ts +43 -0
  81. package/dist/core/params.gen.js +112 -0
  82. package/dist/core/pathSerializer.gen.d.ts +33 -0
  83. package/dist/core/pathSerializer.gen.js +115 -0
  84. package/dist/core/queryKeySerializer.gen.d.ts +18 -0
  85. package/dist/core/queryKeySerializer.gen.js +98 -0
  86. package/dist/core/responseContracts/actions.d.ts +2 -0
  87. package/dist/core/responseContracts/actions.js +30 -0
  88. package/dist/core/responseContracts/agents.d.ts +2 -0
  89. package/dist/core/responseContracts/agents.js +7 -0
  90. package/dist/core/responseContracts/artifacts.d.ts +2 -0
  91. package/dist/core/responseContracts/artifacts.js +8 -0
  92. package/dist/core/responseContracts/commands.d.ts +2 -0
  93. package/dist/core/responseContracts/commands.js +6 -0
  94. package/dist/core/responseContracts/credits.d.ts +2 -0
  95. package/dist/core/responseContracts/credits.js +27 -0
  96. package/dist/core/responseContracts/files.d.ts +2 -0
  97. package/dist/core/responseContracts/files.js +15 -0
  98. package/dist/core/responseContracts/github.d.ts +2 -0
  99. package/dist/core/responseContracts/github.js +8 -0
  100. package/dist/core/responseContracts/images.d.ts +2 -0
  101. package/dist/core/responseContracts/images.js +8 -0
  102. package/dist/core/responseContracts/launchRuns.d.ts +2 -0
  103. package/dist/core/responseContracts/launchRuns.js +10 -0
  104. package/dist/core/responseContracts/launches.d.ts +2 -0
  105. package/dist/core/responseContracts/launches.js +10 -0
  106. package/dist/core/responseContracts/operations.d.ts +2 -0
  107. package/dist/core/responseContracts/operations.js +7 -0
  108. package/dist/core/responseContracts/previews.d.ts +2 -0
  109. package/dist/core/responseContracts/previews.js +8 -0
  110. package/dist/core/responseContracts/pricing.d.ts +2 -0
  111. package/dist/core/responseContracts/pricing.js +6 -0
  112. package/dist/core/responseContracts/processes.d.ts +2 -0
  113. package/dist/core/responseContracts/processes.js +11 -0
  114. package/dist/core/responseContracts/provider_accounts.d.ts +2 -0
  115. package/dist/core/responseContracts/provider_accounts.js +13 -0
  116. package/dist/core/responseContracts/providers.d.ts +2 -0
  117. package/dist/core/responseContracts/providers.js +6 -0
  118. package/dist/core/responseContracts/routing.d.ts +2 -0
  119. package/dist/core/responseContracts/routing.js +8 -0
  120. package/dist/core/responseContracts/sandboxes.d.ts +2 -0
  121. package/dist/core/responseContracts/sandboxes.js +15 -0
  122. package/dist/core/responseContracts/secrets.d.ts +2 -0
  123. package/dist/core/responseContracts/secrets.js +8 -0
  124. package/dist/core/responseContracts/spend_limits.d.ts +2 -0
  125. package/dist/core/responseContracts/spend_limits.js +8 -0
  126. package/dist/core/responseContracts/terminals.d.ts +2 -0
  127. package/dist/core/responseContracts/terminals.js +11 -0
  128. package/dist/core/responseContracts/usage.d.ts +2 -0
  129. package/dist/core/responseContracts/usage.js +7 -0
  130. package/dist/core/responseContracts/volumes.d.ts +2 -0
  131. package/dist/core/responseContracts/volumes.js +19 -0
  132. package/dist/core/responseContracts.gen.d.ts +3 -0
  133. package/dist/core/responseContracts.gen.js +27 -0
  134. package/dist/core/responseModes.d.ts +19 -0
  135. package/dist/core/responseModes.js +13 -0
  136. package/dist/core/responseValidation.d.ts +44 -0
  137. package/dist/core/responseValidation.js +174 -0
  138. package/dist/core/responseValidators/actions-diagnostics.cjs +4 -0
  139. package/dist/core/responseValidators/actions-diagnostics.d.cts +24 -0
  140. package/dist/core/responseValidators/actions.cjs +2 -0
  141. package/dist/core/responseValidators/actions.d.cts +24 -0
  142. package/dist/core/responseValidators/agents-diagnostics.cjs +1 -0
  143. package/dist/core/responseValidators/agents-diagnostics.d.cts +2 -0
  144. package/dist/core/responseValidators/agents.cjs +2 -0
  145. package/dist/core/responseValidators/agents.d.cts +2 -0
  146. package/dist/core/responseValidators/artifacts-diagnostics.cjs +1 -0
  147. package/dist/core/responseValidators/artifacts-diagnostics.d.cts +2 -0
  148. package/dist/core/responseValidators/artifacts.cjs +2 -0
  149. package/dist/core/responseValidators/artifacts.d.cts +2 -0
  150. package/dist/core/responseValidators/commands-diagnostics.cjs +1 -0
  151. package/dist/core/responseValidators/commands-diagnostics.d.cts +1 -0
  152. package/dist/core/responseValidators/commands.cjs +2 -0
  153. package/dist/core/responseValidators/commands.d.cts +1 -0
  154. package/dist/core/responseValidators/compact.cjs +122 -0
  155. package/dist/core/responseValidators/credits-diagnostics.cjs +1 -0
  156. package/dist/core/responseValidators/credits-diagnostics.d.cts +21 -0
  157. package/dist/core/responseValidators/credits.cjs +2 -0
  158. package/dist/core/responseValidators/credits.d.cts +21 -0
  159. package/dist/core/responseValidators/files-diagnostics.cjs +1 -0
  160. package/dist/core/responseValidators/files-diagnostics.d.cts +5 -0
  161. package/dist/core/responseValidators/files.cjs +2 -0
  162. package/dist/core/responseValidators/files.d.cts +5 -0
  163. package/dist/core/responseValidators/github-diagnostics.cjs +1 -0
  164. package/dist/core/responseValidators/github-diagnostics.d.cts +2 -0
  165. package/dist/core/responseValidators/github.cjs +2 -0
  166. package/dist/core/responseValidators/github.d.cts +2 -0
  167. package/dist/core/responseValidators/images-diagnostics.cjs +1 -0
  168. package/dist/core/responseValidators/images-diagnostics.d.cts +3 -0
  169. package/dist/core/responseValidators/images.cjs +2 -0
  170. package/dist/core/responseValidators/images.d.cts +3 -0
  171. package/dist/core/responseValidators/launchRuns-diagnostics.cjs +1 -0
  172. package/dist/core/responseValidators/launchRuns-diagnostics.d.cts +5 -0
  173. package/dist/core/responseValidators/launchRuns.cjs +2 -0
  174. package/dist/core/responseValidators/launchRuns.d.cts +5 -0
  175. package/dist/core/responseValidators/launches-diagnostics.cjs +10 -0
  176. package/dist/core/responseValidators/launches-diagnostics.d.cts +5 -0
  177. package/dist/core/responseValidators/launches.cjs +2 -0
  178. package/dist/core/responseValidators/launches.d.cts +5 -0
  179. package/dist/core/responseValidators/operations-diagnostics.cjs +1 -0
  180. package/dist/core/responseValidators/operations-diagnostics.d.cts +2 -0
  181. package/dist/core/responseValidators/operations.cjs +2 -0
  182. package/dist/core/responseValidators/operations.d.cts +2 -0
  183. package/dist/core/responseValidators/previews-diagnostics.cjs +1 -0
  184. package/dist/core/responseValidators/previews-diagnostics.d.cts +3 -0
  185. package/dist/core/responseValidators/previews.cjs +2 -0
  186. package/dist/core/responseValidators/previews.d.cts +3 -0
  187. package/dist/core/responseValidators/pricing-diagnostics.cjs +7 -0
  188. package/dist/core/responseValidators/pricing-diagnostics.d.cts +1 -0
  189. package/dist/core/responseValidators/pricing.cjs +2 -0
  190. package/dist/core/responseValidators/pricing.d.cts +1 -0
  191. package/dist/core/responseValidators/processes-diagnostics.cjs +1 -0
  192. package/dist/core/responseValidators/processes-diagnostics.d.cts +2 -0
  193. package/dist/core/responseValidators/processes.cjs +2 -0
  194. package/dist/core/responseValidators/processes.d.cts +2 -0
  195. package/dist/core/responseValidators/provider_accounts-diagnostics.cjs +1 -0
  196. package/dist/core/responseValidators/provider_accounts-diagnostics.d.cts +8 -0
  197. package/dist/core/responseValidators/provider_accounts.cjs +2 -0
  198. package/dist/core/responseValidators/provider_accounts.d.cts +8 -0
  199. package/dist/core/responseValidators/providers-diagnostics.cjs +1 -0
  200. package/dist/core/responseValidators/providers-diagnostics.d.cts +1 -0
  201. package/dist/core/responseValidators/providers.cjs +2 -0
  202. package/dist/core/responseValidators/providers.d.cts +1 -0
  203. package/dist/core/responseValidators/routing-diagnostics.cjs +1 -0
  204. package/dist/core/responseValidators/routing-diagnostics.d.cts +3 -0
  205. package/dist/core/responseValidators/routing.cjs +2 -0
  206. package/dist/core/responseValidators/routing.d.cts +3 -0
  207. package/dist/core/responseValidators/sandboxes-diagnostics.cjs +1 -0
  208. package/dist/core/responseValidators/sandboxes-diagnostics.d.cts +10 -0
  209. package/dist/core/responseValidators/sandboxes.cjs +2 -0
  210. package/dist/core/responseValidators/sandboxes.d.cts +10 -0
  211. package/dist/core/responseValidators/secrets-diagnostics.cjs +1 -0
  212. package/dist/core/responseValidators/secrets-diagnostics.d.cts +1 -0
  213. package/dist/core/responseValidators/secrets.cjs +2 -0
  214. package/dist/core/responseValidators/secrets.d.cts +1 -0
  215. package/dist/core/responseValidators/spend_limits-diagnostics.cjs +1 -0
  216. package/dist/core/responseValidators/spend_limits-diagnostics.d.cts +3 -0
  217. package/dist/core/responseValidators/spend_limits.cjs +2 -0
  218. package/dist/core/responseValidators/spend_limits.d.cts +3 -0
  219. package/dist/core/responseValidators/terminals-diagnostics.cjs +1 -0
  220. package/dist/core/responseValidators/terminals-diagnostics.d.cts +2 -0
  221. package/dist/core/responseValidators/terminals.cjs +2 -0
  222. package/dist/core/responseValidators/terminals.d.cts +2 -0
  223. package/dist/core/responseValidators/usage-diagnostics.cjs +1 -0
  224. package/dist/core/responseValidators/usage-diagnostics.d.cts +1 -0
  225. package/dist/core/responseValidators/usage.cjs +2 -0
  226. package/dist/core/responseValidators/usage.d.cts +1 -0
  227. package/dist/core/responseValidators/volumes-diagnostics.cjs +1 -0
  228. package/dist/core/responseValidators/volumes-diagnostics.d.cts +10 -0
  229. package/dist/core/responseValidators/volumes.cjs +2 -0
  230. package/dist/core/responseValidators/volumes.d.cts +10 -0
  231. package/dist/core/serverSentEvents.gen.d.ts +30 -0
  232. package/dist/core/serverSentEvents.gen.js +313 -0
  233. package/dist/core/streamErrors.d.ts +32 -0
  234. package/dist/core/streamErrors.js +51 -0
  235. package/dist/core/types.gen.d.ts +83 -0
  236. package/dist/core/types.gen.js +3 -0
  237. package/dist/core/utils.gen.d.ts +19 -0
  238. package/dist/core/utils.gen.js +93 -0
  239. package/dist/creation.gen.d.ts +21 -0
  240. package/dist/creation.gen.js +35 -0
  241. package/dist/data-origin.d.ts +25 -0
  242. package/dist/data-origin.js +57 -0
  243. package/dist/error-codes.gen.d.ts +2 -0
  244. package/dist/error-codes.gen.js +2 -0
  245. package/dist/idempotency.gen.d.ts +1 -0
  246. package/dist/idempotency.gen.js +60 -0
  247. package/dist/images.d.ts +74 -0
  248. package/dist/images.js +88 -0
  249. package/dist/index.d.ts +22 -0
  250. package/dist/index.js +80 -0
  251. package/dist/launch-input.gen.d.ts +9 -0
  252. package/dist/launch-input.gen.js +83 -0
  253. package/dist/launch.d.ts +28 -0
  254. package/dist/launch.js +222 -0
  255. package/dist/namespace-actions.d.mts +307 -0
  256. package/dist/namespace-actions.mjs +595 -0
  257. package/dist/namespace-agents.d.mts +33 -0
  258. package/dist/namespace-agents.mjs +40 -0
  259. package/dist/namespace-artifacts.d.mts +46 -0
  260. package/dist/namespace-artifacts.mjs +69 -0
  261. package/dist/namespace-base.d.mts +7 -0
  262. package/dist/namespace-base.mjs +7 -0
  263. package/dist/namespace-commands.d.mts +57 -0
  264. package/dist/namespace-commands.mjs +57 -0
  265. package/dist/namespace-credits.d.mts +213 -0
  266. package/dist/namespace-credits.mjs +476 -0
  267. package/dist/namespace-files.d.mts +203 -0
  268. package/dist/namespace-files.mjs +334 -0
  269. package/dist/namespace-github.d.mts +50 -0
  270. package/dist/namespace-github.mjs +68 -0
  271. package/dist/namespace-images.d.mts +52 -0
  272. package/dist/namespace-images.mjs +78 -0
  273. package/dist/namespace-launch_runs.d.mts +89 -0
  274. package/dist/namespace-launch_runs.mjs +133 -0
  275. package/dist/namespace-launches.d.mts +89 -0
  276. package/dist/namespace-launches.mjs +133 -0
  277. package/dist/namespace-operations.d.mts +45 -0
  278. package/dist/namespace-operations.mjs +52 -0
  279. package/dist/namespace-previews.d.mts +79 -0
  280. package/dist/namespace-previews.mjs +101 -0
  281. package/dist/namespace-pricing.d.mts +31 -0
  282. package/dist/namespace-pricing.mjs +22 -0
  283. package/dist/namespace-processes.d.mts +125 -0
  284. package/dist/namespace-processes.mjs +184 -0
  285. package/dist/namespace-provider_accounts.d.mts +156 -0
  286. package/dist/namespace-provider_accounts.mjs +241 -0
  287. package/dist/namespace-providers.d.mts +28 -0
  288. package/dist/namespace-providers.mjs +24 -0
  289. package/dist/namespace-routing.d.mts +64 -0
  290. package/dist/namespace-routing.mjs +86 -0
  291. package/dist/namespace-sandboxes.d.mts +287 -0
  292. package/dist/namespace-sandboxes.mjs +402 -0
  293. package/dist/namespace-secrets.d.mts +46 -0
  294. package/dist/namespace-secrets.mjs +68 -0
  295. package/dist/namespace-spend_limits.d.mts +48 -0
  296. package/dist/namespace-spend_limits.mjs +70 -0
  297. package/dist/namespace-terminals.d.mts +112 -0
  298. package/dist/namespace-terminals.mjs +177 -0
  299. package/dist/namespace-usage.d.mts +46 -0
  300. package/dist/namespace-usage.mjs +53 -0
  301. package/dist/namespace-volumes.d.mts +110 -0
  302. package/dist/namespace-volumes.mjs +269 -0
  303. package/dist/operations.d.ts +14 -0
  304. package/dist/operations.js +31 -0
  305. package/dist/retry.d.ts +8 -0
  306. package/dist/retry.js +63 -0
  307. package/dist/routing-choices.gen.d.ts +132 -0
  308. package/dist/routing-choices.gen.js +136 -0
  309. package/dist/routing.d.ts +23 -0
  310. package/dist/routing.js +38 -0
  311. package/dist/sandbox-handle.gen.d.ts +8 -0
  312. package/dist/sandbox-handle.gen.js +14 -0
  313. package/dist/sandboxes.d.ts +213 -0
  314. package/dist/sandboxes.js +507 -0
  315. package/dist/sdk.gen.d.ts +2029 -0
  316. package/dist/sdk.gen.js +3862 -0
  317. package/dist/server-timing.d.ts +19 -0
  318. package/dist/server-timing.gen.d.ts +265 -0
  319. package/dist/server-timing.gen.js +254 -0
  320. package/dist/server-timing.js +421 -0
  321. package/dist/spend-limits.d.ts +17 -0
  322. package/dist/spend-limits.js +26 -0
  323. package/dist/telemetry.d.ts +51 -0
  324. package/dist/telemetry.gen.d.ts +1 -0
  325. package/dist/telemetry.gen.js +5 -0
  326. package/dist/telemetry.js +438 -0
  327. package/dist/terminal.d.ts +61 -0
  328. package/dist/terminal.js +266 -0
  329. package/dist/transfer.d.ts +75 -0
  330. package/dist/transfer.js +389 -0
  331. package/dist/types.gen.d.ts +15016 -0
  332. package/dist/types.gen.js +3 -0
  333. package/dist/user-agent.d.ts +2 -0
  334. package/dist/user-agent.js +18 -0
  335. package/dist/version.gen.d.ts +1 -0
  336. package/dist/version.gen.js +5 -0
  337. package/dist/volumes.d.ts +33 -0
  338. package/dist/volumes.js +221 -0
  339. package/dist/waits.d.ts +31 -0
  340. package/dist/waits.js +42 -0
  341. package/dist/workflow-policy.gen.d.ts +41 -0
  342. package/dist/workflow-policy.gen.js +45 -0
  343. package/package.json +135 -4
@@ -0,0 +1,112 @@
1
+ import type { Client, ClientMeta, Options as Options2, RequestResult, ServerSentEventsResult, TDataShape } from './client/index.js';
2
+ import { HeyApiClient } from './namespace-base.mjs';
3
+ import type { TerminalsEventsData, TerminalsEventsResponse, TerminalsEventsResponses, TerminalsGetData, TerminalsGetErrors, TerminalsGetResponses, TerminalsKillData, TerminalsKillErrors, TerminalsKillResponses, TerminalsOpenData, TerminalsOpenErrors, TerminalsOpenResponses, TerminalsResizeData, TerminalsResizeErrors, TerminalsResizeResponses, TerminalsWriteData, TerminalsWriteErrors, TerminalsWriteResponses } from './types.gen.js';
4
+ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
5
+ /**
6
+ * You can provide a client instance returned by `createClient()` instead of
7
+ * individual options. This might be also useful if you want to implement a
8
+ * custom client.
9
+ */
10
+ client?: Client;
11
+ /**
12
+ * You can pass arbitrary values through the `meta` object. This can be
13
+ * used to access values that aren't defined as part of the SDK function.
14
+ */
15
+ meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
16
+ };
17
+ export declare class Terminals extends HeyApiClient {
18
+ /**
19
+ * Open a terminal
20
+ *
21
+ * Opens a real PTY running a Bash login shell on any active provider. A small
22
+ * Python 3 helper in the guest owns the PTY, so the sandbox image must provide
23
+ * `python3`. Opens once and returns a BoxRouter terminal handle; the shell ends at
24
+ * `timeout_seconds`, on `kill`, when it exits, or with the sandbox. Terminal
25
+ * connections and output expire on API worker loss; the durable open record still
26
+ * prevents another dispatch. No automatic recovery or replay.
27
+ *
28
+ */
29
+ open<ThrowOnError extends boolean = true>(options: Options<TerminalsOpenData, ThrowOnError>): RequestResult<TerminalsOpenResponses, TerminalsOpenErrors, ThrowOnError, 'data'>;
30
+ /**
31
+ * Get observed terminal state
32
+ *
33
+ * Reads an owned terminal record without consuming output.
34
+ */
35
+ get<ThrowOnError extends boolean = true>(options: Options<TerminalsGetData, ThrowOnError>): RequestResult<TerminalsGetResponses, TerminalsGetErrors, ThrowOnError, 'data'>;
36
+ /**
37
+ * Stream terminal output and its end
38
+ *
39
+ * You can rely on:
40
+ * - Input order is kept and output applies backpressure on PTY routes.
41
+ * - Closing an observer does not by itself end the process.
42
+ *
43
+ * You can set: input, dimensions. Observation controls where supported.
44
+ *
45
+ * Not promised: unlimited concurrent observers.
46
+ *
47
+ * Server-sent events. Each data field contains one JSON TerminalEvent; the SSE id
48
+ * is its sequence. Output events carry exact bytes as base64. An exit event follows
49
+ * all output. An error event may arrive after HTTP 200 and ends the stream without
50
+ * implying the shell stopped. EOF without an exit or error event is an incomplete
51
+ * stream, not success.
52
+ *
53
+ * Output is retained in a 1 MiB sliding window until 60 seconds after the shell
54
+ * ends. Last-Event-ID resumes after that event while it is retained; a dropped
55
+ * sequence returns 410, or an error event for a reader that falls behind, and is
56
+ * never skipped silently. Without Last-Event-ID the stream starts at the oldest
57
+ * retained event.
58
+ *
59
+ */
60
+ events<ThrowOnError extends boolean = true>(options: Options<TerminalsEventsData, ThrowOnError, TerminalsEventsResponse>): Promise<ServerSentEventsResult<TerminalsEventsResponses>>;
61
+ /**
62
+ * Write terminal input
63
+ *
64
+ * You can rely on:
65
+ * - Input order is kept and output applies backpressure on PTY routes.
66
+ * - Closing an observer does not by itself end the process.
67
+ *
68
+ * You can set: input, dimensions. Observation controls where supported.
69
+ *
70
+ * Not promised: unlimited concurrent observers.
71
+ *
72
+ * Writes exact bytes to the PTY once. Await calls sequentially to preserve order.
73
+ * Each call is one command round trip on the provider. An uncertain write must not
74
+ * be replayed with a new key. Returns 409 after the shell has ended.
75
+ *
76
+ */
77
+ write<ThrowOnError extends boolean = true>(options: Options<TerminalsWriteData, ThrowOnError>): RequestResult<TerminalsWriteResponses, TerminalsWriteErrors, ThrowOnError, 'data'>;
78
+ /**
79
+ * Resize the terminal window
80
+ *
81
+ * You can rely on:
82
+ * - Changes the terminal's window size, or is refused where the sandbox cannot resize an open terminal.
83
+ *
84
+ * You can set: columns, rows.
85
+ *
86
+ * Not promised: when the running program notices the new size.
87
+ *
88
+ * The foreground program receives SIGWINCH. Where the sandbox cannot resize an open
89
+ * terminal, the refusal is `409 capability_unavailable`; open the terminal at the size
90
+ * you need.
91
+ *
92
+ */
93
+ resize<ThrowOnError extends boolean = true>(options: Options<TerminalsResizeData, ThrowOnError>): RequestResult<TerminalsResizeResponses, TerminalsResizeErrors, ThrowOnError, 'data'>;
94
+ /**
95
+ * Hang up the terminal without destroying its sandbox
96
+ *
97
+ * You can rely on:
98
+ * - Ends the terminal's shell without destroying the sandbox, or is refused where the sandbox cannot end it from outside; ending a terminal that already ended succeeds until the terminal expires.
99
+ *
100
+ * Not promised: that the shell has already ended when the call returns (its exit event shows when it does); that the whole process group receives the hang-up.
101
+ *
102
+ * It sends a hang-up to the shell's process group where the provider allows that, and
103
+ * otherwise ends the shell process. The terminal's exit event carries the shell's exit
104
+ * code, or -1 when, after a kill, the provider ends the terminal without reporting one. Closing an
105
+ * events connection never calls this. Where the sandbox cannot end a terminal's shell from
106
+ * outside, the refusal is `409 capability_unavailable`; type `exit` in the terminal or
107
+ * destroy the sandbox. A terminal expires 60 seconds after its shell ends: until then a
108
+ * kill answers 204, afterwards `410 expired`.
109
+ *
110
+ */
111
+ kill<ThrowOnError extends boolean = true>(options: Options<TerminalsKillData, ThrowOnError>): RequestResult<TerminalsKillResponses, TerminalsKillErrors, ThrowOnError, 'data'>;
112
+ }
@@ -0,0 +1,177 @@
1
+ import { validateEvent, withEventValidators } from "./core/eventValidation.js";
2
+ import { HeyApiClient } from './namespace-base.mjs';
3
+ export class Terminals extends HeyApiClient {
4
+ /**
5
+ * Open a terminal
6
+ *
7
+ * Opens a real PTY running a Bash login shell on any active provider. A small
8
+ * Python 3 helper in the guest owns the PTY, so the sandbox image must provide
9
+ * `python3`. Opens once and returns a BoxRouter terminal handle; the shell ends at
10
+ * `timeout_seconds`, on `kill`, when it exits, or with the sandbox. Terminal
11
+ * connections and output expire on API worker loss; the durable open record still
12
+ * prevents another dispatch. No automatic recovery or replay.
13
+ *
14
+ */
15
+ open(options) {
16
+ return (options.client ?? this.client).post({
17
+ responseStyle: 'data',
18
+ security: [{ scheme: 'bearer', type: 'http' }, {
19
+ in: 'cookie',
20
+ name: '__Host-boxrouter_session',
21
+ type: 'apiKey'
22
+ }],
23
+ url: '/sandboxes/{sandbox_id}/terminals',
24
+ ...options,
25
+ headers: {
26
+ 'Content-Type': 'application/json',
27
+ ...options.headers
28
+ }
29
+ });
30
+ }
31
+ /**
32
+ * Get observed terminal state
33
+ *
34
+ * Reads an owned terminal record without consuming output.
35
+ */
36
+ get(options) {
37
+ return (options.client ?? this.client).get({
38
+ responseStyle: 'data',
39
+ security: [{ scheme: 'bearer', type: 'http' }, {
40
+ in: 'cookie',
41
+ name: '__Host-boxrouter_session',
42
+ type: 'apiKey'
43
+ }],
44
+ url: '/sandboxes/{sandbox_id}/terminals/{terminal_id}',
45
+ ...options
46
+ });
47
+ }
48
+ /**
49
+ * Stream terminal output and its end
50
+ *
51
+ * You can rely on:
52
+ * - Input order is kept and output applies backpressure on PTY routes.
53
+ * - Closing an observer does not by itself end the process.
54
+ *
55
+ * You can set: input, dimensions. Observation controls where supported.
56
+ *
57
+ * Not promised: unlimited concurrent observers.
58
+ *
59
+ * Server-sent events. Each data field contains one JSON TerminalEvent; the SSE id
60
+ * is its sequence. Output events carry exact bytes as base64. An exit event follows
61
+ * all output. An error event may arrive after HTTP 200 and ends the stream without
62
+ * implying the shell stopped. EOF without an exit or error event is an incomplete
63
+ * stream, not success.
64
+ *
65
+ * Output is retained in a 1 MiB sliding window until 60 seconds after the shell
66
+ * ends. Last-Event-ID resumes after that event while it is retained; a dropped
67
+ * sequence returns 410, or an error event for a reader that falls behind, and is
68
+ * never skipped silently. Without Last-Event-ID the stream starts at the oldest
69
+ * retained event.
70
+ *
71
+ */
72
+ events(options) {
73
+ return withEventValidators(({ signal: (options.client ?? this.client).getConfig().signal, ...options }).signal, eventValidators => (options.client ?? this.client).sse.get({
74
+ responseStyle: 'data',
75
+ security: [{ scheme: 'bearer', type: 'http' }, {
76
+ in: 'cookie',
77
+ name: '__Host-boxrouter_session',
78
+ type: 'apiKey'
79
+ }],
80
+ url: '/sandboxes/{sandbox_id}/terminals/{terminal_id}/events',
81
+ ...options,
82
+ ...validateEvent("SandboxTerminalEventSSE", eventValidators.validate0, options.responseValidator ?? (options.client ?? this.client).getConfig().responseValidator, ["exit", "error"], void 0, ["error", "exit", "output"])
83
+ }));
84
+ }
85
+ /**
86
+ * Write terminal input
87
+ *
88
+ * You can rely on:
89
+ * - Input order is kept and output applies backpressure on PTY routes.
90
+ * - Closing an observer does not by itself end the process.
91
+ *
92
+ * You can set: input, dimensions. Observation controls where supported.
93
+ *
94
+ * Not promised: unlimited concurrent observers.
95
+ *
96
+ * Writes exact bytes to the PTY once. Await calls sequentially to preserve order.
97
+ * Each call is one command round trip on the provider. An uncertain write must not
98
+ * be replayed with a new key. Returns 409 after the shell has ended.
99
+ *
100
+ */
101
+ write(options) {
102
+ return (options.client ?? this.client).post({
103
+ responseStyle: 'data',
104
+ security: [{ scheme: 'bearer', type: 'http' }, {
105
+ in: 'cookie',
106
+ name: '__Host-boxrouter_session',
107
+ type: 'apiKey'
108
+ }],
109
+ url: '/sandboxes/{sandbox_id}/terminals/{terminal_id}/input',
110
+ ...options,
111
+ headers: {
112
+ 'Content-Type': 'application/json',
113
+ ...options.headers
114
+ }
115
+ });
116
+ }
117
+ /**
118
+ * Resize the terminal window
119
+ *
120
+ * You can rely on:
121
+ * - Changes the terminal's window size, or is refused where the sandbox cannot resize an open terminal.
122
+ *
123
+ * You can set: columns, rows.
124
+ *
125
+ * Not promised: when the running program notices the new size.
126
+ *
127
+ * The foreground program receives SIGWINCH. Where the sandbox cannot resize an open
128
+ * terminal, the refusal is `409 capability_unavailable`; open the terminal at the size
129
+ * you need.
130
+ *
131
+ */
132
+ resize(options) {
133
+ return (options.client ?? this.client).post({
134
+ responseStyle: 'data',
135
+ security: [{ scheme: 'bearer', type: 'http' }, {
136
+ in: 'cookie',
137
+ name: '__Host-boxrouter_session',
138
+ type: 'apiKey'
139
+ }],
140
+ url: '/sandboxes/{sandbox_id}/terminals/{terminal_id}/resize',
141
+ ...options,
142
+ headers: {
143
+ 'Content-Type': 'application/json',
144
+ ...options.headers
145
+ }
146
+ });
147
+ }
148
+ /**
149
+ * Hang up the terminal without destroying its sandbox
150
+ *
151
+ * You can rely on:
152
+ * - Ends the terminal's shell without destroying the sandbox, or is refused where the sandbox cannot end it from outside; ending a terminal that already ended succeeds until the terminal expires.
153
+ *
154
+ * Not promised: that the shell has already ended when the call returns (its exit event shows when it does); that the whole process group receives the hang-up.
155
+ *
156
+ * It sends a hang-up to the shell's process group where the provider allows that, and
157
+ * otherwise ends the shell process. The terminal's exit event carries the shell's exit
158
+ * code, or -1 when, after a kill, the provider ends the terminal without reporting one. Closing an
159
+ * events connection never calls this. Where the sandbox cannot end a terminal's shell from
160
+ * outside, the refusal is `409 capability_unavailable`; type `exit` in the terminal or
161
+ * destroy the sandbox. A terminal expires 60 seconds after its shell ends: until then a
162
+ * kill answers 204, afterwards `410 expired`.
163
+ *
164
+ */
165
+ kill(options) {
166
+ return (options.client ?? this.client).post({
167
+ responseStyle: 'data',
168
+ security: [{ scheme: 'bearer', type: 'http' }, {
169
+ in: 'cookie',
170
+ name: '__Host-boxrouter_session',
171
+ type: 'apiKey'
172
+ }],
173
+ url: '/sandboxes/{sandbox_id}/terminals/{terminal_id}/kill',
174
+ ...options
175
+ });
176
+ }
177
+ }
@@ -0,0 +1,46 @@
1
+ import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.js';
2
+ import { HeyApiClient } from './namespace-base.mjs';
3
+ import type { UsageExportCsvData, UsageExportCsvErrors, UsageExportCsvResponses, UsageListData, UsageListErrors, UsageListResponses } from './types.gen.js';
4
+ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
5
+ /**
6
+ * You can provide a client instance returned by `createClient()` instead of
7
+ * individual options. This might be also useful if you want to implement a
8
+ * custom client.
9
+ */
10
+ client?: Client;
11
+ /**
12
+ * You can pass arbitrary values through the `meta` object. This can be
13
+ * used to access values that aren't defined as part of the SDK function.
14
+ */
15
+ meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
16
+ };
17
+ export declare class Usage extends HeyApiClient {
18
+ /**
19
+ * List grouped managed and BYOK sandbox usage
20
+ *
21
+ * Requires account-management permission; execution-only keys receive 403. Reads
22
+ * only this workspace and the configured test or live billing book. Settled managed
23
+ * charges come from verified ledger receipts and are recognized on their settlement
24
+ * date. BYOK costs come from the provider's own cost or usage records priced at
25
+ * stored list rates. byok_provider_cost_usd is that exact amount or null, never a
26
+ * local-clock cost or partial subtotal. No BYOK fee is included because its price-book policy remains
27
+ * proposed and unapproved. Current managed reservations are reported as held amounts;
28
+ * with group_by=day they appear under period and group_key `current`, outside the
29
+ * requested historical date range. Dates are inclusive UTC calendar dates and the
30
+ * range may not exceed 92 days. Unknown observations remain null and are counted in
31
+ * the corresponding unknown-sandbox field; a BYOK cost is null when any contributing
32
+ * sandbox's provider cost is unknown. The optional provider filter is applied
33
+ * before grouping to managed and BYOK history and to current managed holds. Cursors
34
+ * are scoped to workspace, billing mode and all report filters; malformed or foreign
35
+ * cursors return 400. No provider or
36
+ * payment-provider calls are made.
37
+ *
38
+ */
39
+ list<ThrowOnError extends boolean = true>(options: Options<UsageListData, ThrowOnError>): RequestResult<UsageListResponses, UsageListErrors, ThrowOnError, 'data'>;
40
+ /**
41
+ * Export grouped managed and BYOK sandbox usage as CSV
42
+ *
43
+ * Uses the same workspace, billing mode, date range, filters and page as the JSON usage report. CSV values preserve the JSON report's exact decimal strings; `X-Usage-As-Of` identifies the observation time and `X-Next-Cursor` is present when another page exists.
44
+ */
45
+ exportCsv<ThrowOnError extends boolean = true>(options: Options<UsageExportCsvData, ThrowOnError>): RequestResult<UsageExportCsvResponses, UsageExportCsvErrors, ThrowOnError, 'data'>;
46
+ }
@@ -0,0 +1,53 @@
1
+ import { HeyApiClient } from './namespace-base.mjs';
2
+ export class Usage extends HeyApiClient {
3
+ /**
4
+ * List grouped managed and BYOK sandbox usage
5
+ *
6
+ * Requires account-management permission; execution-only keys receive 403. Reads
7
+ * only this workspace and the configured test or live billing book. Settled managed
8
+ * charges come from verified ledger receipts and are recognized on their settlement
9
+ * date. BYOK costs come from the provider's own cost or usage records priced at
10
+ * stored list rates. byok_provider_cost_usd is that exact amount or null, never a
11
+ * local-clock cost or partial subtotal. No BYOK fee is included because its price-book policy remains
12
+ * proposed and unapproved. Current managed reservations are reported as held amounts;
13
+ * with group_by=day they appear under period and group_key `current`, outside the
14
+ * requested historical date range. Dates are inclusive UTC calendar dates and the
15
+ * range may not exceed 92 days. Unknown observations remain null and are counted in
16
+ * the corresponding unknown-sandbox field; a BYOK cost is null when any contributing
17
+ * sandbox's provider cost is unknown. The optional provider filter is applied
18
+ * before grouping to managed and BYOK history and to current managed holds. Cursors
19
+ * are scoped to workspace, billing mode and all report filters; malformed or foreign
20
+ * cursors return 400. No provider or
21
+ * payment-provider calls are made.
22
+ *
23
+ */
24
+ list(options) {
25
+ return (options.client ?? this.client).get({
26
+ responseStyle: 'data',
27
+ security: [{ scheme: 'bearer', type: 'http' }, {
28
+ in: 'cookie',
29
+ name: '__Host-boxrouter_session',
30
+ type: 'apiKey'
31
+ }],
32
+ url: '/usage',
33
+ ...options
34
+ });
35
+ }
36
+ /**
37
+ * Export grouped managed and BYOK sandbox usage as CSV
38
+ *
39
+ * Uses the same workspace, billing mode, date range, filters and page as the JSON usage report. CSV values preserve the JSON report's exact decimal strings; `X-Usage-As-Of` identifies the observation time and `X-Next-Cursor` is present when another page exists.
40
+ */
41
+ exportCsv(options) {
42
+ return (options.client ?? this.client).get({
43
+ responseStyle: 'data',
44
+ security: [{ scheme: 'bearer', type: 'http' }, {
45
+ in: 'cookie',
46
+ name: '__Host-boxrouter_session',
47
+ type: 'apiKey'
48
+ }],
49
+ url: '/usage.csv',
50
+ ...options
51
+ });
52
+ }
53
+ }
@@ -0,0 +1,110 @@
1
+ import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.js';
2
+ import { HeyApiClient } from './namespace-base.mjs';
3
+ import type { VolumesAbortUploadData, VolumesAbortUploadErrors, VolumesAbortUploadResponses, VolumesCompleteUploadData, VolumesCompleteUploadErrors, VolumesCompleteUploadResponses, VolumesCreateData, VolumesCreateDownloadData, VolumesCreateDownloadErrors, VolumesCreateDownloadResponses, VolumesCreateErrors, VolumesCreateResponses, VolumesCreateUploadData, VolumesCreateUploadErrors, VolumesCreateUploadResponses, VolumesDeleteCheckpointData, VolumesDeleteCheckpointErrors, VolumesDeleteCheckpointResponses, VolumesDeleteData, VolumesDeleteErrors, VolumesDeleteResponses, VolumesGetCheckpointData, VolumesGetCheckpointErrors, VolumesGetCheckpointResponses, VolumesGetData, VolumesGetErrors, VolumesGetResponses, VolumesListCheckpointsData, VolumesListCheckpointsErrors, VolumesListCheckpointsResponses, VolumesListData, VolumesListErrors, VolumesListFilesData, VolumesListFilesErrors, VolumesListFilesResponses, VolumesListResponses, VolumesReleaseData, VolumesReleaseErrors, VolumesReleaseResponses, VolumesSaveData, VolumesSaveErrors, VolumesSaveResponses } from './types.gen.js';
4
+ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
5
+ /**
6
+ * You can provide a client instance returned by `createClient()` instead of
7
+ * individual options. This might be also useful if you want to implement a
8
+ * custom client.
9
+ */
10
+ client?: Client;
11
+ /**
12
+ * You can pass arbitrary values through the `meta` object. This can be
13
+ * used to access values that aren't defined as part of the SDK function.
14
+ */
15
+ meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
16
+ };
17
+ export declare class Volumes extends HeyApiClient {
18
+ /**
19
+ * List volumes
20
+ *
21
+ * Lists volumes in the caller's workspace using cursor-based pagination. The response includes the current storage usage and live-volume policy only when those values are available.
22
+ */
23
+ list<ThrowOnError extends boolean = true>(options?: Options<VolumesListData, ThrowOnError>): RequestResult<VolumesListResponses, VolumesListErrors, ThrowOnError, 'data'>;
24
+ /**
25
+ * Create a volume
26
+ *
27
+ * The service selects its configured live backend when this workspace's live-volume policy allows creation. Backend identity is neither a request field nor a response label.
28
+ */
29
+ create<ThrowOnError extends boolean = true>(options: Options<VolumesCreateData, ThrowOnError>): RequestResult<VolumesCreateResponses, VolumesCreateErrors, ThrowOnError, 'data'>;
30
+ /**
31
+ * Delete a volume and its checkpoints
32
+ *
33
+ * Deletes a volume and all checkpoint references and stored bytes for it. When the volume's writer is ending (its destroy was accepted), the call waits for the release, at most 120 seconds, before deleting. A running writer fails at once with volume_busy (409). Reuse a supplied Idempotency-Key with the identical request to reconcile an uncertain result; a conflicting active use can return 409.
34
+ */
35
+ delete<ThrowOnError extends boolean = true>(options: Options<VolumesDeleteData, ThrowOnError>): RequestResult<VolumesDeleteResponses, VolumesDeleteErrors, ThrowOnError, 'data'>;
36
+ /**
37
+ * Get a volume
38
+ *
39
+ * Returns metadata for a BoxRouter-managed volume in the caller's workspace.
40
+ */
41
+ get<ThrowOnError extends boolean = true>(options: Options<VolumesGetData, ThrowOnError>): RequestResult<VolumesGetResponses, VolumesGetErrors, ThrowOnError, 'data'>;
42
+ /**
43
+ * List volume checkpoints
44
+ *
45
+ * Lists committed checkpoints for this volume, newest first. A checkpoint created by an in-progress save is not listed until the save commits.
46
+ */
47
+ listCheckpoints<ThrowOnError extends boolean = true>(options: Options<VolumesListCheckpointsData, ThrowOnError>): RequestResult<VolumesListCheckpointsResponses, VolumesListCheckpointsErrors, ThrowOnError, 'data'>;
48
+ /**
49
+ * Save a volume checkpoint
50
+ *
51
+ * Saves the current volume filesystem as an immutable checkpoint. The optional sandbox_id identifies the expected writer-lease holder; if omitted, the current holder is used. A mounted branch sandbox can be named to checkpoint its branch files without advancing the source volume's head. Read-only sandboxes cannot save. Reuse a supplied Idempotency-Key with the identical request to reconcile an uncertain response.
52
+ */
53
+ save<ThrowOnError extends boolean = true>(options: Options<VolumesSaveData, ThrowOnError>): RequestResult<VolumesSaveResponses, VolumesSaveErrors, ThrowOnError, 'data'>;
54
+ /**
55
+ * Delete a checkpoint
56
+ *
57
+ * Removes the checkpoint reference. Backend data is reclaimed when the volume is erased.
58
+ */
59
+ deleteCheckpoint<ThrowOnError extends boolean = true>(options: Options<VolumesDeleteCheckpointData, ThrowOnError>): RequestResult<VolumesDeleteCheckpointResponses, VolumesDeleteCheckpointErrors, ThrowOnError, 'data'>;
60
+ /**
61
+ * Get a volume checkpoint
62
+ *
63
+ * Returns an immutable committed checkpoint by its volume ID and checkpoint number.
64
+ */
65
+ getCheckpoint<ThrowOnError extends boolean = true>(options: Options<VolumesGetCheckpointData, ThrowOnError>): RequestResult<VolumesGetCheckpointResponses, VolumesGetCheckpointErrors, ThrowOnError, 'data'>;
66
+ /**
67
+ * Release a volume's writer lease
68
+ *
69
+ * Releases the volume's writer lease and advances its epoch, invalidating the former writer's lease token. Reuse a supplied Idempotency-Key with the identical request to reconcile an uncertain result.
70
+ */
71
+ release<ThrowOnError extends boolean = true>(options: Options<VolumesReleaseData, ThrowOnError>): RequestResult<VolumesReleaseResponses, VolumesReleaseErrors, ThrowOnError, 'data'>;
72
+ /**
73
+ * Create a volume file upload
74
+ *
75
+ * Creates a multipart upload for a file that will appear at
76
+ * `/workspace/<path>` in sandboxes. Upload every returned part URL with an
77
+ * HTTP PUT containing exactly that part's bytes; save the response `ETag`
78
+ * header for the completion request. Part URLs expire after six hours.
79
+ * An open upload blocks `write` sandboxes, and a live or pending `write`
80
+ * attachment blocks uploads (`volume_busy`). `read` and `shared` attachments
81
+ * may coexist, but their sandboxes may need to refresh their volume cache to
82
+ * see the new file.
83
+ *
84
+ */
85
+ createUpload<ThrowOnError extends boolean = true>(options: Options<VolumesCreateUploadData, ThrowOnError>): RequestResult<VolumesCreateUploadResponses, VolumesCreateUploadErrors, ThrowOnError, 'data'>;
86
+ /**
87
+ * Complete a volume file upload
88
+ *
89
+ * Supply each part number exactly once with the `ETag` header returned by its PUT response.
90
+ */
91
+ completeUpload<ThrowOnError extends boolean = true>(options: Options<VolumesCompleteUploadData, ThrowOnError>): RequestResult<VolumesCompleteUploadResponses, VolumesCompleteUploadErrors, ThrowOnError, 'data'>;
92
+ /**
93
+ * Abort a volume file upload
94
+ *
95
+ * Aborts an open multipart upload for this volume. Repeating an abort is safe; the uploaded file is not made visible in the volume.
96
+ */
97
+ abortUpload<ThrowOnError extends boolean = true>(options: Options<VolumesAbortUploadData, ThrowOnError>): RequestResult<VolumesAbortUploadResponses, VolumesAbortUploadErrors, ThrowOnError, 'data'>;
98
+ /**
99
+ * Create a volume file download
100
+ *
101
+ * Creates a temporary download link that expires after one hour.
102
+ */
103
+ createDownload<ThrowOnError extends boolean = true>(options: Options<VolumesCreateDownloadData, ThrowOnError>): RequestResult<VolumesCreateDownloadResponses, VolumesCreateDownloadErrors, ThrowOnError, 'data'>;
104
+ /**
105
+ * List files in a volume
106
+ *
107
+ * Recursively lists files in path order without a directory delimiter. Read and shared sandboxes may need to refresh their volume cache to see new files.
108
+ */
109
+ listFiles<ThrowOnError extends boolean = true>(options: Options<VolumesListFilesData, ThrowOnError>): RequestResult<VolumesListFilesResponses, VolumesListFilesErrors, ThrowOnError, 'data'>;
110
+ }