@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,2029 @@
1
+ import type { BinaryStreamResponses } from "./core/binaryStream";
2
+ import type { Client, ClientMeta, Options as Options2, RequestResult, ServerSentEventsResult, TDataShape } from './client';
3
+ import type { ActionsJobsGetData, ActionsJobsGetErrors, ActionsJobsGetLogsData, ActionsJobsGetLogsErrors, ActionsJobsGetLogsResponses, ActionsJobsGetResponses, ActionsJobsGetStepLogsData, ActionsJobsGetStepLogsErrors, ActionsJobsGetStepLogsResponses, ActionsJobsGetStepsData, ActionsJobsGetStepsErrors, ActionsJobsGetStepsResponses, ActionsJobsListEventsData, ActionsJobsListEventsErrors, ActionsJobsListEventsResponses, ActionsPlacementsGetData, ActionsPlacementsGetErrors, ActionsPlacementsGetResponses, ActionsPoliciesCreateData, ActionsPoliciesCreateErrors, ActionsPoliciesCreateResponses, ActionsPoliciesDeleteData, ActionsPoliciesDeleteErrors, ActionsPoliciesDeleteResponses, ActionsPoliciesGetData, ActionsPoliciesGetErrors, ActionsPoliciesGetResponses, ActionsPoliciesListData, ActionsPoliciesListErrors, ActionsPoliciesListResponses, ActionsPoliciesUpdateData, ActionsPoliciesUpdateErrors, ActionsPoliciesUpdateResponses, ActionsPoolIdleTimeGetData, ActionsPoolIdleTimeGetErrors, ActionsPoolIdleTimeGetResponses, ActionsPreviewData, ActionsPreviewErrors, ActionsPreviewResponses, ActionsReadinessData, ActionsReadinessErrors, ActionsReadinessResponses, ActionsRepositoriesGetData, ActionsRepositoriesGetErrors, ActionsRepositoriesGetResponses, ActionsRepositoriesUpdateData, ActionsRepositoriesUpdateErrors, ActionsRepositoriesUpdateResponses, ActionsRunnerCatalogData, ActionsRunnerCatalogErrors, ActionsRunnerCatalogResponses, ActionsRunsCancelData, ActionsRunsCancelErrors, ActionsRunsCancelResponses, ActionsRunsGetData, ActionsRunsGetErrors, ActionsRunsGetResponses, ActionsRunsListData, ActionsRunsListErrors, ActionsRunsListFacetsData, ActionsRunsListFacetsErrors, ActionsRunsListFacetsResponses, ActionsRunsListJobsData, ActionsRunsListJobsErrors, ActionsRunsListJobsResponses, ActionsRunsListPlacementsData, ActionsRunsListPlacementsErrors, ActionsRunsListPlacementsResponses, ActionsRunsListResponses, ActionsRunsRerunData, ActionsRunsRerunErrors, ActionsRunsRerunFailedJobsData, ActionsRunsRerunFailedJobsErrors, ActionsRunsRerunFailedJobsResponses, ActionsRunsRerunResponses, AgentsGetData, AgentsGetErrors, AgentsGetResponses, AgentsListData, AgentsListErrors, AgentsListResponses, ArtifactsDeleteData, ArtifactsDeleteErrors, ArtifactsDeleteResponses, ArtifactsGetData, ArtifactsGetErrors, ArtifactsGetResponses, ArtifactsUploadData, ArtifactsUploadErrors, ArtifactsUploadResponses, CommandsRunData, CommandsRunErrors, CommandsRunResponses, CreditsAlertsData, CreditsAlertsErrors, CreditsAlertsResponses, CreditsAutoTopUpData, CreditsAutoTopUpErrors, CreditsAutoTopUpResponses, CreditsBalanceData, CreditsBalanceErrors, CreditsBalanceResponses, CreditsBillingDetailsData, CreditsBillingDetailsErrors, CreditsBillingDetailsResponses, CreditsCancelPurchaseData, CreditsCancelPurchaseErrors, CreditsCancelPurchaseResponses, CreditsDeletePaymentMethodData, CreditsDeletePaymentMethodErrors, CreditsDeletePaymentMethodResponses, CreditsGetPaymentMethodSetupData, CreditsGetPaymentMethodSetupErrors, CreditsGetPaymentMethodSetupResponses, CreditsGetPurchaseData, CreditsGetPurchaseErrors, CreditsGetPurchaseResponses, CreditsPaymentMethodsData, CreditsPaymentMethodsErrors, CreditsPaymentMethodsResponses, CreditsPromotionsData, CreditsPromotionsErrors, CreditsPromotionsResponses, CreditsPurchaseData, CreditsPurchaseErrors, CreditsPurchaseResponses, CreditsPurchasesData, CreditsPurchasesErrors, CreditsPurchasesResponses, CreditsQuotePurchaseData, CreditsQuotePurchaseErrors, CreditsQuotePurchaseResponses, CreditsRedeemData, CreditsRedeemErrors, CreditsRedeemResponses, CreditsReorderPaymentMethodsData, CreditsReorderPaymentMethodsErrors, CreditsReorderPaymentMethodsResponses, CreditsSetDefaultPaymentMethodData, CreditsSetDefaultPaymentMethodErrors, CreditsSetDefaultPaymentMethodResponses, CreditsSetupPaymentMethodData, CreditsSetupPaymentMethodErrors, CreditsSetupPaymentMethodIntentData, CreditsSetupPaymentMethodIntentErrors, CreditsSetupPaymentMethodIntentResponses, CreditsSetupPaymentMethodResponses, CreditsUpdateAlertsData, CreditsUpdateAlertsErrors, CreditsUpdateAlertsResponses, CreditsUpdateAutoTopUpData, CreditsUpdateAutoTopUpErrors, CreditsUpdateAutoTopUpResponses, CreditsUpdateBillingDetailsData, CreditsUpdateBillingDetailsErrors, CreditsUpdateBillingDetailsResponses, CreditsUsageData, CreditsUsageErrors, CreditsUsageResponses, FilesAbortUploadData, FilesAbortUploadErrors, FilesAbortUploadResponses, FilesCompleteUploadData, FilesCompleteUploadErrors, FilesCompleteUploadResponses, FilesCreateDownloadData, FilesCreateDownloadErrors, FilesCreateDownloadResponses, FilesCreateUploadData, FilesCreateUploadErrors, FilesCreateUploadResponses, FilesExistsData, FilesExistsErrors, FilesExistsResponses, FilesListData, FilesListErrors, FilesListResponses, FilesMkdirData, FilesMkdirErrors, FilesMkdirResponses, FilesReadData, FilesReadErrors, FilesReadResponses, FilesRemoveData, FilesRemoveErrors, FilesRemoveResponses, FilesWriteData, FilesWriteErrors, FilesWriteResponses, GithubListInstallationsData, GithubListInstallationsErrors, GithubListInstallationsResponses, GithubListRepositoriesData, GithubListRepositoriesErrors, GithubListRepositoriesResponses, GithubUnlinkInstallationData, GithubUnlinkInstallationErrors, GithubUnlinkInstallationResponses, ImagesPrepareData, ImagesPrepareErrors, ImagesPrepareResponses, ImagesStatusData, ImagesStatusErrors, ImagesStatusResponses, ImagesUnprepareData, ImagesUnprepareErrors, ImagesUnprepareResponses, LaunchesCheckRepositoryAccessData, LaunchesCheckRepositoryAccessErrors, LaunchesCheckRepositoryAccessResponses, LaunchesCreateData, LaunchesCreateErrors, LaunchesCreateResponses, LaunchesGetCommandData, LaunchesGetCommandErrors, LaunchesGetCommandResponses, LaunchesGetOperationData, LaunchesGetOperationErrors, LaunchesGetOperationResponses, LaunchesGetSettingsData, LaunchesGetSettingsErrors, LaunchesGetSettingsResponses, LaunchRunsCreateData, LaunchRunsCreateErrors, LaunchRunsCreateResponses, LaunchRunsDestroyCopyData, LaunchRunsDestroyCopyErrors, LaunchRunsDestroyCopyResponses, LaunchRunsGetData, LaunchRunsGetErrors, LaunchRunsGetResponses, LaunchRunsListData, LaunchRunsListErrors, LaunchRunsListResponses, LaunchRunsStopData, LaunchRunsStopErrors, LaunchRunsStopResponses, OperationsGetData, OperationsGetErrors, OperationsGetResponses, OperationsListData, OperationsListErrors, OperationsListResponses, PreviewsListData, PreviewsListErrors, PreviewsListResponses, PreviewsOpenData, PreviewsOpenErrors, PreviewsOpenResponses, PreviewsRevokeData, PreviewsRevokeErrors, PreviewsRevokeResponses, PricingVersionsData, PricingVersionsErrors, PricingVersionsResponses, ProcessesCancelData, ProcessesCancelErrors, ProcessesCancelResponses, ProcessesCloseStdinData, ProcessesCloseStdinErrors, ProcessesCloseStdinResponses, ProcessesReadData, ProcessesReadErrors, ProcessesReadResponses, ProcessesRemoveData, ProcessesRemoveErrors, ProcessesRemoveResponses, ProcessesStartData, ProcessesStartErrors, ProcessesStartResponses, ProcessesWriteStdinData, ProcessesWriteStdinErrors, ProcessesWriteStdinResponses, ProviderAccountsConnectData, ProviderAccountsConnectErrors, ProviderAccountsConnectResponses, ProviderAccountsDisconnectData, ProviderAccountsDisconnectErrors, ProviderAccountsDisconnectResponses, ProviderAccountsGetData, ProviderAccountsGetErrors, ProviderAccountsGetResponses, ProviderAccountsListData, ProviderAccountsListErrors, ProviderAccountsListResponses, ProviderAccountsReplaceCredentialsData, ProviderAccountsReplaceCredentialsErrors, ProviderAccountsReplaceCredentialsResponses, ProviderAccountsSetupStandardImageData, ProviderAccountsSetupStandardImageErrors, ProviderAccountsSetupStandardImageResponses, ProviderAccountsTestCredentialsData, ProviderAccountsTestCredentialsErrors, ProviderAccountsTestCredentialsResponses, ProviderAccountsTestData, ProviderAccountsTestErrors, ProviderAccountsTestResponses, ProvidersListData, ProvidersListErrors, ProvidersListResponses, RoutingPreviewData, RoutingPreviewErrors, RoutingPreviewResponses, RoutingSettingsData, RoutingSettingsErrors, RoutingSettingsResponses, RoutingUpdateSettingsData, RoutingUpdateSettingsErrors, RoutingUpdateSettingsResponses, SandboxesBrowserData, SandboxesBrowserErrors, SandboxesBrowserResponses, SandboxesCreateData, SandboxesCreateErrors, SandboxesCreateResponses, SandboxesDestroyData, SandboxesDestroyErrors, SandboxesDestroyResponses, SandboxesExtendData, SandboxesExtendErrors, SandboxesExtendResponses, SandboxesGetData, SandboxesGetErrors, SandboxesGetResponses, SandboxesListData, SandboxesListErrors, SandboxesListResponses, SandboxesMatchData, SandboxesMatchErrors, SandboxesMatchResponses, SandboxesPauseData, SandboxesPauseErrors, SandboxesPauseResponses, SandboxesResumeData, SandboxesResumeErrors, SandboxesResumeResponses, SandboxesUpdateNetworkPolicyData, SandboxesUpdateNetworkPolicyErrors, SandboxesUpdateNetworkPolicyResponses, SecretsDeleteData, SecretsDeleteErrors, SecretsDeleteResponses, SecretsListData, SecretsListErrors, SecretsListResponses, SecretsPutData, SecretsPutErrors, SecretsPutResponses, SpendLimitsClearData, SpendLimitsClearErrors, SpendLimitsClearResponses, SpendLimitsListData, SpendLimitsListErrors, SpendLimitsListResponses, SpendLimitsSetData, SpendLimitsSetErrors, SpendLimitsSetResponses, TerminalsEventsData, TerminalsEventsResponse, TerminalsEventsResponses, TerminalsGetData, TerminalsGetErrors, TerminalsGetResponses, TerminalsKillData, TerminalsKillErrors, TerminalsKillResponses, TerminalsOpenData, TerminalsOpenErrors, TerminalsOpenResponses, TerminalsResizeData, TerminalsResizeErrors, TerminalsResizeResponses, TerminalsWriteData, TerminalsWriteErrors, TerminalsWriteResponses, UsageExportCsvData, UsageExportCsvErrors, UsageExportCsvResponses, UsageListData, UsageListErrors, UsageListResponses, 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';
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
+ declare class HeyApiClient {
18
+ protected client: Client;
19
+ constructor(args?: {
20
+ client?: Client;
21
+ });
22
+ }
23
+ declare class HeyApiRegistry<T> {
24
+ private readonly defaultKey;
25
+ private readonly instances;
26
+ get(key?: string): T;
27
+ set(value: T, key?: string): void;
28
+ }
29
+ export declare class Agents extends HeyApiClient {
30
+ /**
31
+ * List launch agents
32
+ *
33
+ * List the launch manifests available to this workspace. The response includes
34
+ * names, descriptions, declared secret names and preview ports. It never includes
35
+ * commands, file contents or secret values.
36
+ *
37
+ */
38
+ list<ThrowOnError extends boolean = true>(options?: Options<AgentsListData, ThrowOnError>): RequestResult<AgentsListResponses, AgentsListErrors, ThrowOnError, 'data'>;
39
+ /**
40
+ * Get a launch agent manifest
41
+ *
42
+ * Returns a workspace-available manifest. Unknown names return agent_not_found.
43
+ */
44
+ get<ThrowOnError extends boolean = true>(options: Options<AgentsGetData, ThrowOnError>): RequestResult<AgentsGetResponses, AgentsGetErrors, ThrowOnError, 'data'>;
45
+ }
46
+ export declare class Launches extends HeyApiClient {
47
+ /**
48
+ * Create an agent launch
49
+ *
50
+ * Create one workspace-owned sandbox and prepare it from a catalog agent or inline
51
+ * manifest. `overrides.lifetime_seconds` requests a lifetime in seconds in place of
52
+ * the manifest value. The required Idempotency-Key identifies one logical launch; retry an
53
+ * uncertain request with the same key and body. BoxRouter validates the manifest,
54
+ * the secrets, the routes and the funding first and answers 400, 402 or 409 with outcome
55
+ * `not_started` for a launch it cannot start; it returns 202 only after the launch
56
+ * operation is durably accepted. Poll the operation URL from Location for
57
+ * queued/running status and phase progress. A matching key returns the same operation,
58
+ * including the original result. New requests and matching retries both return HTTP 202.
59
+ * A key used with different input returns 409 and does not start another launch.
60
+ * Setup, file, background and preview preparation failures destroy the newly created
61
+ * sandbox before the operation becomes failed.
62
+ *
63
+ * Secret values supplied in secret_values are used only for this request and are
64
+ * never stored or returned. Names declared by the manifest can instead resolve from
65
+ * the workspace secret store. The successful operation contains the sandbox ID,
66
+ * phase results, preview URLs and enforced expiry in result.
67
+ *
68
+ */
69
+ create<ThrowOnError extends boolean = true>(options: Options<LaunchesCreateData, ThrowOnError>): RequestResult<LaunchesCreateResponses, LaunchesCreateErrors, ThrowOnError, 'data'>;
70
+ /**
71
+ * Get launch status and phase progress
72
+ *
73
+ * Returns the durable status of one launch operation owned by the caller's workspace.
74
+ * Poll while status is queued or running, respecting Retry-After when present. A
75
+ * succeeded operation includes result; a failed operation includes the original
76
+ * structured API error and its HTTP status. Secret values are never included.
77
+ *
78
+ */
79
+ getOperation<ThrowOnError extends boolean = true>(options: Options<LaunchesGetOperationData, ThrowOnError>): RequestResult<LaunchesGetOperationResponses, LaunchesGetOperationErrors, ThrowOnError, 'data'>;
80
+ /**
81
+ * Get what a launch asked for
82
+ *
83
+ * Returns the choices one launch was created with: the catalog agent or the caller's own
84
+ * source, whether BoxRouter picked the provider or the caller chose one, and the names of
85
+ * the secrets it used. Every client that creates a launch (the dashboard, the CLI, the
86
+ * SDKs) is recorded the same way, so any of them can show or repeat it. Secret values are
87
+ * never recorded or returned. A launch created before settings were recorded is 404.
88
+ *
89
+ */
90
+ getSettings<ThrowOnError extends boolean = true>(options: Options<LaunchesGetSettingsData, ThrowOnError>): RequestResult<LaunchesGetSettingsResponses, LaunchesGetSettingsErrors, ThrowOnError, 'data'>;
91
+ /**
92
+ * Get unattended command state
93
+ *
94
+ * Returns the observed state of the unattended command attached to a launch owned by the
95
+ * caller's workspace. Observation waits up to five seconds. While the command is running,
96
+ * call this endpoint again to observe its state. `unknown` means the outcome could not be
97
+ * confirmed; it is never inferred from a missing sandbox or an observation failure.
98
+ * A launch with no recorded unattended command returns 404. This response never contains
99
+ * command text, environment variables, process identity, stdout, stderr or other output.
100
+ * `timed_out` with exit code 124 means the armed command timer was observed to expire; an
101
+ * ordinary command exit with code 124 remains `exited`.
102
+ *
103
+ */
104
+ getCommand<ThrowOnError extends boolean = true>(options: Options<LaunchesGetCommandData, ThrowOnError>): RequestResult<LaunchesGetCommandResponses, LaunchesGetCommandErrors, ThrowOnError, 'data'>;
105
+ /**
106
+ * Check whether this workspace can read a repository
107
+ *
108
+ * Answers, without launching anything, whether the caller's workspace can read the
109
+ * repository: public repositories directly, private ones through the workspace's linked
110
+ * GitHub App installation. A repository that cannot be read is a 200 with readable false
111
+ * and the refusal's code, message and fix. When readable, the answer also names the commit
112
+ * the default branch (or the requested ref) points at, the repository's top-level entries
113
+ * (directories end in a slash) and the recipe a launch would use. Results are cached per
114
+ * commit and never stored in a response cache.
115
+ *
116
+ */
117
+ checkRepositoryAccess<ThrowOnError extends boolean = true>(options: Options<LaunchesCheckRepositoryAccessData, ThrowOnError>): RequestResult<LaunchesCheckRepositoryAccessResponses, LaunchesCheckRepositoryAccessErrors, ThrowOnError, 'data'>;
118
+ }
119
+ export declare class LaunchRuns extends HeyApiClient {
120
+ /**
121
+ * List launch runs
122
+ *
123
+ * List the authenticated workspace's launch runs, newest first, as lightweight summaries.
124
+ * Rows contain no copy items, specs, command data or outputs; read getLaunchRun for one
125
+ * run's copies. `total_copies` and `live_copies` cover every run in the workspace, not
126
+ * only the returned page. A live copy is one whose sandbox has not been confirmed absent,
127
+ * including copies that are stopping. The read uses stored metadata only and makes no
128
+ * provider calls. Responses are private to the workspace and must not be cached.
129
+ *
130
+ * If launch-run copies are not available to you, the read still answers 200, with `available`
131
+ * false, no runs and zero totals.
132
+ *
133
+ * `next_cursor` is an opaque, workspace-scoped value for the next page and is null on the
134
+ * last page. A cursor from another workspace or a malformed cursor is invalid_request.
135
+ *
136
+ */
137
+ list<ThrowOnError extends boolean = true>(options?: Options<LaunchRunsListData, ThrowOnError>): RequestResult<LaunchRunsListResponses, LaunchRunsListErrors, ThrowOnError, 'data'>;
138
+ /**
139
+ * Start an unattended launch run
140
+ *
141
+ * Reserve one workspace-owned run and all requested copies atomically. The existing
142
+ * launch request fields select exactly one catalog agent or inline manifest; `copies`
143
+ * is required. Acceptance returns 202 with a Location for metadata polling and makes
144
+ * no provider create before the executor claims each copy. Reuse the same
145
+ * Idempotency-Key and identical body to recover an uncertain acceptance; a changed
146
+ * body conflicts and never creates another run.
147
+ *
148
+ * Credential selectors are resolved at each copy claim. Secret values and provider
149
+ * tokens are never stored. Saved secrets are re-read by name, so rotation can affect
150
+ * later copies. Inline secret_values, interactive launches, and unsupported manifest
151
+ * features are refused before reservation. The feature remains opt-in until compatible
152
+ * clients are released.
153
+ *
154
+ */
155
+ create<ThrowOnError extends boolean = true>(options: Options<LaunchRunsCreateData, ThrowOnError>): RequestResult<LaunchRunsCreateResponses, LaunchRunsCreateErrors, ThrowOnError, 'data'>;
156
+ /**
157
+ * Read launch run metadata
158
+ *
159
+ * Read the stored run row and copy rows only. This response excludes command data and
160
+ * output fields and makes no provider calls. `include=command` opts into bounded state
161
+ * and exit-code observations for active copies; the server uses at most eight
162
+ * observations at once and one five-second response deadline. Unknown, hung, saturated,
163
+ * or failed observations return `unknown`. Neither variant exposes command text,
164
+ * outputs, process handles, or credentials. Foreign and missing IDs have the same 404
165
+ * response.
166
+ *
167
+ */
168
+ get<ThrowOnError extends boolean = true>(options: Options<LaunchRunsGetData, ThrowOnError>): RequestResult<LaunchRunsGetResponses, LaunchRunsGetErrors, ThrowOnError, 'data'>;
169
+ /**
170
+ * Stop a launch run
171
+ *
172
+ * Set the workspace-owned run's desired state to stopped and request copy cancellation. The request is idempotent; repeating stop returns the original stop timestamp. This does not imply that the provider sandbox was destroyed. Foreign and missing IDs have the same 404 response.
173
+ */
174
+ stop<ThrowOnError extends boolean = true>(options: Options<LaunchRunsStopData, ThrowOnError>): RequestResult<LaunchRunsStopResponses, LaunchRunsStopErrors, ThrowOnError, 'data'>;
175
+ /**
176
+ * Destroy one launch-run copy
177
+ *
178
+ * Durably request cleanup of one copy of a workspace-owned run; the run and its other
179
+ * copies keep running. Acceptance records the request only: no provider call is made
180
+ * during the request, and `stopping` does not mean the sandbox is gone. The copy's
181
+ * status in getLaunchRun becomes `stopped` only after its absence is confirmed; a queued
182
+ * copy that was never dispatched has no sandbox and stops at once.
183
+ *
184
+ * The request is idempotent. Retrying it, or destroying a copy that is already stopping
185
+ * or stopped, returns the same 202 and leaves the copy's state and timestamps unchanged.
186
+ * Foreign and missing run IDs and copy indexes have the same 404 response. Responses are
187
+ * private and must not be cached.
188
+ *
189
+ */
190
+ destroyCopy<ThrowOnError extends boolean = true>(options: Options<LaunchRunsDestroyCopyData, ThrowOnError>): RequestResult<LaunchRunsDestroyCopyResponses, LaunchRunsDestroyCopyErrors, ThrowOnError, 'data'>;
191
+ }
192
+ export declare class Github extends HeyApiClient {
193
+ /**
194
+ * List GitHub App installations linked to this workspace
195
+ *
196
+ * Requires read authority in the authenticated workspace. Results include only
197
+ * installations linked to that workspace; an installation ID supplied by a caller
198
+ * is not authority. Empty workspaces return an empty page. This is a read and never
199
+ * installs, uninstalls or relinks the App.
200
+ *
201
+ */
202
+ listInstallations<ThrowOnError extends boolean = true>(options?: Options<GithubListInstallationsData, ThrowOnError>): RequestResult<GithubListInstallationsResponses, GithubListInstallationsErrors, ThrowOnError, 'data'>;
203
+ /**
204
+ * Unlink a GitHub App installation from this workspace
205
+ *
206
+ * Requires workspace administrator authority. Browser-session calls require the CSRF
207
+ * token and configured Origin. An Idempotency-Key identifies this one unlink request;
208
+ * an identical replay returns its recorded result, a changed request under that key
209
+ * conflicts, and an unknown GitHub or storage outcome is reconciled without replay.
210
+ * Unlinking prevents new Actions work and does not uninstall the shared App from
211
+ * GitHub or cancel already accepted workflow runs.
212
+ *
213
+ */
214
+ unlinkInstallation<ThrowOnError extends boolean = true>(options: Options<GithubUnlinkInstallationData, ThrowOnError>): RequestResult<GithubUnlinkInstallationResponses, GithubUnlinkInstallationErrors, ThrowOnError, 'data'>;
215
+ /**
216
+ * List repositories visible through a linked installation
217
+ *
218
+ * Requires read authority in the authenticated workspace. The installation must be
219
+ * linked to that workspace and its current GitHub permissions are revalidated; names
220
+ * are descriptive while stable repository IDs bind settings and work. Results contain
221
+ * no installation access credentials. Empty installations return an empty page.
222
+ *
223
+ */
224
+ listRepositories<ThrowOnError extends boolean = true>(options: Options<GithubListRepositoriesData, ThrowOnError>): RequestResult<GithubListRepositoriesResponses, GithubListRepositoriesErrors, ThrowOnError, 'data'>;
225
+ }
226
+ export declare class Repositories extends HeyApiClient {
227
+ /**
228
+ * Get Actions enablement and defaults for a repository
229
+ *
230
+ * Requires read authority in the authenticated workspace. The repository must have
231
+ * a currently linked, verified GitHub installation. The returned ETag identifies
232
+ * this settings revision. A missing settings record is represented as `exists: false`,
233
+ * disabled with no required policy; it is not silently enabled by reading it. For
234
+ * `exists: false`, omit If-Match on the first write; for `exists: true`, send the
235
+ * returned ETag to update the existing record safely.
236
+ *
237
+ */
238
+ get<ThrowOnError extends boolean = true>(options: Options<ActionsRepositoriesGetData, ThrowOnError>): RequestResult<ActionsRepositoriesGetResponses, ActionsRepositoriesGetErrors, ThrowOnError, 'data'>;
239
+ /**
240
+ * Enable or update Actions defaults for a repository
241
+ *
242
+ * Requires workspace administrator authority. Browser-session calls require the CSRF
243
+ * token and configured Origin. The minimal enable request is `{"enabled":true}`;
244
+ * Actions creates its safe default settings and begins automatic image preparation
245
+ * without requiring a named policy, provider key, runner registration or YAML change.
246
+ * `policy_id` is optional and, when null, selects the workspace's current safe
247
+ * defaults. When the preceding read returned `exists: false`, omit If-Match to create
248
+ * the settings record; when it returned `exists: true`, send its ETag to update. The
249
+ * server rejects a write if that existence state changed after the read. An
250
+ * Idempotency-Key records
251
+ * the logical mutation: identical uncertain retries return the recorded outcome,
252
+ * changed input under the same key conflicts, and unknown effects are reconciled
253
+ * without automatic redispatch. Disabling stops new admission; it does not cancel
254
+ * accepted GitHub workflow runs or change their funding binding.
255
+ *
256
+ */
257
+ update<ThrowOnError extends boolean = true>(options: Options<ActionsRepositoriesUpdateData, ThrowOnError>): RequestResult<ActionsRepositoriesUpdateResponses, ActionsRepositoriesUpdateErrors, ThrowOnError, 'data'>;
258
+ }
259
+ export declare class Policies extends HeyApiClient {
260
+ /**
261
+ * List workspace Actions policies
262
+ *
263
+ * Requires workspace read authority. Stable ID-ordered pages may be empty; listing never changes policy or starts compute.
264
+ */
265
+ list<ThrowOnError extends boolean = true>(options?: Options<ActionsPoliciesListData, ThrowOnError>): RequestResult<ActionsPoliciesListResponses, ActionsPoliciesListErrors, ThrowOnError, 'data'>;
266
+ /**
267
+ * Create a named workspace Actions policy
268
+ *
269
+ * Requires workspace administrator authority. Browser-session calls require the CSRF
270
+ * token and configured Origin. Policy settings can only narrow workspace and
271
+ * repository guardrails. The workspace funding choice decides the logical authority
272
+ * (workspace BYOK or platform managed); the actual provider, account and payer binding
273
+ * is confirmed separately for each attempt and is never taken from a policy. A policy
274
+ * cannot change supply or add accounts. Idempotency-Key replays the recorded
275
+ * outcome for identical input; changed input conflicts. An unknown outcome is
276
+ * reconciled without creating a second policy.
277
+ *
278
+ */
279
+ create<ThrowOnError extends boolean = true>(options: Options<ActionsPoliciesCreateData, ThrowOnError>): RequestResult<ActionsPoliciesCreateResponses, ActionsPoliciesCreateErrors, ThrowOnError, 'data'>;
280
+ /**
281
+ * Delete an unused workspace Actions policy
282
+ *
283
+ * Requires workspace administrator authority. Browser-session calls require CSRF and
284
+ * the configured Origin. If-Match is required. A policy referenced by repository
285
+ * defaults or accepted work cannot be deleted and returns 409. Idempotency-Key
286
+ * returns the recorded delete result for identical retries; changed input conflicts. Unknown outcomes are
287
+ * reconciled without repeating the deletion.
288
+ *
289
+ */
290
+ delete<ThrowOnError extends boolean = true>(options: Options<ActionsPoliciesDeleteData, ThrowOnError>): RequestResult<ActionsPoliciesDeleteResponses, ActionsPoliciesDeleteErrors, ThrowOnError, 'data'>;
291
+ /**
292
+ * Get a workspace Actions policy
293
+ *
294
+ * Requires workspace read authority. The policy ID is workspace-scoped; foreign and unknown IDs both return 404.
295
+ */
296
+ get<ThrowOnError extends boolean = true>(options: Options<ActionsPoliciesGetData, ThrowOnError>): RequestResult<ActionsPoliciesGetResponses, ActionsPoliciesGetErrors, ThrowOnError, 'data'>;
297
+ /**
298
+ * Replace a workspace Actions policy
299
+ *
300
+ * Requires workspace administrator authority. Browser-session calls require CSRF and
301
+ * the configured Origin. If-Match is required and must equal the latest ETag. Policy
302
+ * changes only narrow workspace/repository guardrails and do not mutate accepted jobs
303
+ * or change their supply, accounts or logical funding authority. Idempotency-Key replays an identical recorded update;
304
+ * changed input conflicts. A stale ETag returns 409 without writing. Unknown outcomes
305
+ * are reconciled, never automatically redispatched.
306
+ *
307
+ */
308
+ update<ThrowOnError extends boolean = true>(options: Options<ActionsPoliciesUpdateData, ThrowOnError>): RequestResult<ActionsPoliciesUpdateResponses, ActionsPoliciesUpdateErrors, ThrowOnError, 'data'>;
309
+ }
310
+ export declare class Runs extends HeyApiClient {
311
+ /**
312
+ * List workspace Actions workflow-run projections
313
+ *
314
+ * Requires workspace read authority. Pages may be empty and default to newest-first
315
+ * by creation time; `sort` also supports oldest-first by creation time and longest
316
+ * first by duration. Equal sort values retain a stable run ID order, including
317
+ * across pages. A run's status and cost are BoxRouter's latest recorded evidence;
318
+ * this read does not poll GitHub, change a run, start a job or retry an uncertain
319
+ * effect.
320
+ *
321
+ */
322
+ list<ThrowOnError extends boolean = true>(options?: Options<ActionsRunsListData, ThrowOnError>): RequestResult<ActionsRunsListResponses, ActionsRunsListErrors, ThrowOnError, 'data'>;
323
+ /**
324
+ * Count the values each run filter offers
325
+ *
326
+ * For each filter of `listActionsRuns`, its values with the number of runs in the whole
327
+ * workspace that have the value, ignoring any active filters. A run counts once for each
328
+ * value it has. Requires workspace read authority; it does not poll GitHub.
329
+ *
330
+ */
331
+ listFacets<ThrowOnError extends boolean = true>(options?: Options<ActionsRunsListFacetsData, ThrowOnError>): RequestResult<ActionsRunsListFacetsResponses, ActionsRunsListFacetsErrors, ThrowOnError, 'data'>;
332
+ /**
333
+ * Get a workflow-run projection and aggregate billing evidence
334
+ *
335
+ * Requires workspace read authority. Foreign and unknown run IDs both return 404; state and costs are not inferred from missing observations.
336
+ */
337
+ get<ThrowOnError extends boolean = true>(options: Options<ActionsRunsGetData, ThrowOnError>): RequestResult<ActionsRunsGetResponses, ActionsRunsGetErrors, ThrowOnError, 'data'>;
338
+ /**
339
+ * List GitHub jobs projected for a workflow run
340
+ *
341
+ * Requires workspace read authority. Job assignment is tied to the runner GitHub actually assigns, not the job a JIT label initially requested.
342
+ */
343
+ listJobs<ThrowOnError extends boolean = true>(options: Options<ActionsRunsListJobsData, ThrowOnError>): RequestResult<ActionsRunsListJobsResponses, ActionsRunsListJobsErrors, ThrowOnError, 'data'>;
344
+ /**
345
+ * List placements attempted for a workflow run
346
+ *
347
+ * Requires workspace read authority. Placement state, outcome, cleanup and billing evidence remain separate; uncertain effects are never replayed by this read.
348
+ */
349
+ listPlacements<ThrowOnError extends boolean = true>(options: Options<ActionsRunsListPlacementsData, ThrowOnError>): RequestResult<ActionsRunsListPlacementsResponses, ActionsRunsListPlacementsErrors, ThrowOnError, 'data'>;
350
+ /**
351
+ * Ask GitHub to cancel the entire workflow run
352
+ *
353
+ * Requires workspace execute authority. This explicitly cancels the whole GitHub
354
+ * workflow run, including its other jobs; it cannot cancel only one job. GitHub
355
+ * remains authoritative for cancellation. A 202 means GitHub acknowledged the
356
+ * request, not that every job or sandbox has ended. Idempotency-Key identifies this
357
+ * user-authorized mutation. An identical replay returns the recorded result; changed
358
+ * input conflicts. Unknown outcomes are reconciled against GitHub without repeating
359
+ * the cancellation automatically. BoxRouter never cancels as a side effect of a
360
+ * read, timeout or cleanup failure.
361
+ *
362
+ */
363
+ cancel<ThrowOnError extends boolean = true>(options: Options<ActionsRunsCancelData, ThrowOnError>): RequestResult<ActionsRunsCancelResponses, ActionsRunsCancelErrors, ThrowOnError, 'data'>;
364
+ /**
365
+ * Ask GitHub to rerun the entire workflow
366
+ *
367
+ * Requires workspace execute authority. This explicitly asks GitHub to rerun the
368
+ * entire workflow run, not one job or only failed jobs. GitHub creates and owns the
369
+ * new attempt. A 202 means GitHub acknowledged the request; it does not mean the new
370
+ * jobs have started. Idempotency-Key identifies this user-authorized mutation. An
371
+ * identical replay returns the recorded result; changed input conflicts. An unknown
372
+ * outcome is reconciled against GitHub and never automatically submitted again.
373
+ * Actions admission still rechecks repository binding, policy, trust and the
374
+ * immutable workspace/account/payer before creating any new placement.
375
+ *
376
+ */
377
+ rerun<ThrowOnError extends boolean = true>(options: Options<ActionsRunsRerunData, ThrowOnError>): RequestResult<ActionsRunsRerunResponses, ActionsRunsRerunErrors, ThrowOnError, 'data'>;
378
+ /**
379
+ * Ask GitHub to rerun failed jobs and their dependents
380
+ *
381
+ * Requires workspace execute authority. This explicitly asks GitHub to rerun the failed
382
+ * jobs of the entire workflow run and the jobs that depend on them in a new attempt.
383
+ * Passed jobs rerun only when they depend on a failed job. GitHub creates and owns the new attempt. A 202 means
384
+ * GitHub acknowledged the request; it does not mean the new jobs have started.
385
+ * Idempotency-Key identifies this user-authorized mutation. An identical replay returns
386
+ * the recorded result; changed input conflicts. An unknown outcome is reconciled against
387
+ * GitHub and never automatically submitted again. A run with no failed job is refused
388
+ * with 409. Actions admission still rechecks repository binding, policy, trust and the
389
+ * immutable workspace/account/payer before creating any new placement.
390
+ *
391
+ */
392
+ rerunFailedJobs<ThrowOnError extends boolean = true>(options: Options<ActionsRunsRerunFailedJobsData, ThrowOnError>): RequestResult<ActionsRunsRerunFailedJobsResponses, ActionsRunsRerunFailedJobsErrors, ThrowOnError, 'data'>;
393
+ }
394
+ export declare class PoolIdleTime extends HeyApiClient {
395
+ /**
396
+ * Get the billed time of runners that served no job
397
+ *
398
+ * Requires workspace read authority. A pooled runner can cost money while no GitHub job
399
+ * shows it: it sat idle until the pool drained it, or its pickup was foreign or revoked,
400
+ * or it failed after its sandbox existed. That time is charged to the payer and shown
401
+ * here, apart from every run and job. The read counts the runners that started in
402
+ * `[since, until)`, in total and per pool, with the same `billing` object a run carries.
403
+ * `idle_seconds` is each runner's lifetime from creation to its end (to now for a runner
404
+ * that is still alive). `until` defaults to now, `since` to 30 days before `until`, and the
405
+ * range may not exceed 92 days; a longer or empty range returns 400. It does not poll
406
+ * GitHub or a provider and does not change a runner.
407
+ *
408
+ */
409
+ get<ThrowOnError extends boolean = true>(options?: Options<ActionsPoolIdleTimeGetData, ThrowOnError>): RequestResult<ActionsPoolIdleTimeGetResponses, ActionsPoolIdleTimeGetErrors, ThrowOnError, 'data'>;
410
+ }
411
+ export declare class Jobs extends HeyApiClient {
412
+ /**
413
+ * Get an Actions job projection
414
+ *
415
+ * Requires workspace read authority. The GitHub assignment is authoritative; a requested job ID is not treated as runner reservation.
416
+ */
417
+ get<ThrowOnError extends boolean = true>(options: Options<ActionsJobsGetData, ThrowOnError>): RequestResult<ActionsJobsGetResponses, ActionsJobsGetErrors, ThrowOnError, 'data'>;
418
+ /**
419
+ * Get GitHub workflow steps for an Actions job
420
+ *
421
+ * Requires workspace execute authority. Resolves the selected workspace-owned
422
+ * job and its exact historical run attempt before reading the assigned GitHub
423
+ * workflow job. Steps preserve GitHub source order and original step numbers;
424
+ * position is the zero-based display order. Pending, unavailable, forbidden and
425
+ * removed are explicit source states. Step output is not included.
426
+ *
427
+ */
428
+ getSteps<ThrowOnError extends boolean = true>(options: Options<ActionsJobsGetStepsData, ThrowOnError>): RequestResult<ActionsJobsGetStepsResponses, ActionsJobsGetStepsErrors, ThrowOnError, 'data'>;
429
+ /**
430
+ * Read a bounded prefix of the selected GitHub job log
431
+ *
432
+ * Requires workspace execute authority. Resolves the workspace-owned job,
433
+ * current repository binding, assigned GitHub job and exact historical attempt
434
+ * before fetching only that native whole-job log. At most 1 MiB is returned;
435
+ * partial indicates a bounded prefix. Output is transient and is not retained.
436
+ * Individual step log availability depends on the GitHub App/repository source.
437
+ *
438
+ */
439
+ getLogs<ThrowOnError extends boolean = true>(options: Options<ActionsJobsGetLogsData, ThrowOnError>): RequestResult<ActionsJobsGetLogsResponses, ActionsJobsGetLogsErrors, ThrowOnError, 'data'>;
440
+ /**
441
+ * Read a bounded prefix of one GitHub step log
442
+ *
443
+ * Requires workspace execute authority. step_position is zero-based and is
444
+ * verified against the selected fresh GitHub job before this endpoint is read.
445
+ * GitHub may report individual step logs unavailable for an App/repository;
446
+ * this is returned explicitly without synthesizing output from the whole-job log.
447
+ * At most 1 MiB is returned and partial indicates a bounded prefix.
448
+ *
449
+ */
450
+ getStepLogs<ThrowOnError extends boolean = true>(options: Options<ActionsJobsGetStepLogsData, ThrowOnError>): RequestResult<ActionsJobsGetStepLogsResponses, ActionsJobsGetStepLogsErrors, ThrowOnError, 'data'>;
451
+ /**
452
+ * List Actions step events for a job
453
+ *
454
+ * Requires workspace execute authority. Returns durable step events recorded for
455
+ * this workspace-owned Actions job, ordered by event time and ID. Use the
456
+ * continuation cursor to retrieve the next page; the list is empty when no
457
+ * events are available.
458
+ *
459
+ */
460
+ listEvents<ThrowOnError extends boolean = true>(options: Options<ActionsJobsListEventsData, ThrowOnError>): RequestResult<ActionsJobsListEventsResponses, ActionsJobsListEventsErrors, ThrowOnError, 'data'>;
461
+ }
462
+ export declare class Placements extends HeyApiClient {
463
+ /**
464
+ * Get an Actions placement and its cost and cleanup evidence
465
+ *
466
+ * Requires workspace read authority. A completed workflow job does not prove sandbox cleanup or final charge; pending and unknown remain explicit.
467
+ */
468
+ get<ThrowOnError extends boolean = true>(options: Options<ActionsPlacementsGetData, ThrowOnError>): RequestResult<ActionsPlacementsGetResponses, ActionsPlacementsGetErrors, ThrowOnError, 'data'>;
469
+ }
470
+ export declare class Actions extends HeyApiClient {
471
+ /**
472
+ * Read Actions runner and workspace funding readiness
473
+ *
474
+ * Requires workspace read authority. This read-only view uses the workspace's
475
+ * existing provider accounts and credits. Unknown source facts remain unknown;
476
+ * link targets appear only when an existing page can address the reported issue.
477
+ * When `repository_id` is supplied, readiness is scoped to that repository's saved
478
+ * software profile. The profile is resolved from workspace-owned settings; callers
479
+ * cannot select a profile through this parameter.
480
+ *
481
+ */
482
+ readiness<ThrowOnError extends boolean = true>(options?: Options<ActionsReadinessData, ThrowOnError>): RequestResult<ActionsReadinessResponses, ActionsReadinessErrors, ThrowOnError, 'data'>;
483
+ /**
484
+ * Read the recommended Actions runner labels and resource floors
485
+ *
486
+ * Requires workspace read authority. The catalog is fixed for a server release and does not
487
+ * depend on the workspace, so clients and caches may reuse it until its ETag changes. It does not assert live route availability or
488
+ * verified software; use readiness for that. Readiness still carries `runner_catalog` for
489
+ * older clients, but new clients should read this operation instead.
490
+ *
491
+ */
492
+ runnerCatalog<ThrowOnError extends boolean = true>(options?: Options<ActionsRunnerCatalogData, ThrowOnError>): RequestResult<ActionsRunnerCatalogResponses, ActionsRunnerCatalogErrors, ThrowOnError, 'data'>;
493
+ /**
494
+ * Preview Actions label and policy eligibility
495
+ *
496
+ * Requires read authority for the linked repository in the authenticated workspace.
497
+ * This is a read-only evaluation of the same resolved policy and route matcher used
498
+ * for dispatch. It creates no runner, sandbox, reservation or billing hold. Refused
499
+ * and unknown results remain explicit; the preview never relaxes a requirement or
500
+ * claims an unverified route is eligible. It does not verify runner images. Runner image readiness is checked separately before dispatch.
501
+ *
502
+ */
503
+ preview<ThrowOnError extends boolean = true>(options: Options<ActionsPreviewData, ThrowOnError>): RequestResult<ActionsPreviewResponses, ActionsPreviewErrors, ThrowOnError, 'data'>;
504
+ private _repositories?;
505
+ get repositories(): Repositories;
506
+ private _policies?;
507
+ get policies(): Policies;
508
+ private _runs?;
509
+ get runs(): Runs;
510
+ private _poolIdleTime?;
511
+ get poolIdleTime(): PoolIdleTime;
512
+ private _jobs?;
513
+ get jobs(): Jobs;
514
+ private _placements?;
515
+ get placements(): Placements;
516
+ }
517
+ export declare class Routing extends HeyApiClient {
518
+ /**
519
+ * Read workspace routing and provider funding
520
+ *
521
+ * Workspace read authority required. Returns each independently versioned section
522
+ * and its opaque ETag in section_etags. Never returns credentials. The GET itself
523
+ * has no whole-document validator; send a chosen section's token in If-Match to
524
+ * guard a write to that section.
525
+ * On a workspace's first read, the server atomically creates sections from its
526
+ * legacy funding state. Concurrent first reads return the same persisted sections
527
+ * and ETags. Later reads do not change settings unless a supported provider,
528
+ * managed offer or connected account changed and needs reconciliation; only a
529
+ * section that actually changes advances its ETag. The saved Prevent Overrides
530
+ * switch is retained across reads.
531
+ *
532
+ */
533
+ settings<ThrowOnError extends boolean = true>(options?: Options<RoutingSettingsData, ThrowOnError>): RequestResult<RoutingSettingsResponses, RoutingSettingsErrors, ThrowOnError, 'data'>;
534
+ /**
535
+ * Update one workspace routing section
536
+ *
537
+ * Workspace admin (or provider-accounts:manage for provider funding) required;
538
+ * browser mutations also require Origin and X-CSRF-Token. The body names exactly
539
+ * one section: routing fields or one provider funding section. Send only the fields
540
+ * to change; every omitted field keeps its stored value, and the merged section is
541
+ * validated as a complete section before it is written. If-Match is optional. When
542
+ * sent, it must be the opaque token returned for THAT section by GET or the call
543
+ * fails 412 with no write; when omitted, the named fields are written to the
544
+ * current section. Atomically update only the named section and advance only its
545
+ * ETag. A stale token for that same section returns 412 with no write; a concurrent
546
+ * Routing edit cannot conflict with provider funding, and edits to distinct
547
+ * providers cannot conflict with one another. Reject duplicate account IDs,
548
+ * foreign/wrong-provider accounts and newly enabled Credits on unavailable managed
549
+ * providers before writing. Adding a key does not change provider exclusion.
550
+ * Identical idempotency replay returns the previously recorded response, not a
551
+ * second write.
552
+ *
553
+ */
554
+ updateSettings<ThrowOnError extends boolean = true>(options: Options<RoutingUpdateSettingsData, ThrowOnError>): RequestResult<RoutingUpdateSettingsResponses, RoutingUpdateSettingsErrors, ThrowOnError, 'data'>;
555
+ /**
556
+ * Preview workspace route availability without dispatch
557
+ *
558
+ * Workspace read authority required. Side-effect-free current eligibility and
559
+ * versioned hold quotes from admission. No next-job prediction, workspace spend
560
+ * cap or promise that a later create can start. No secret or foreign balance.
561
+ *
562
+ */
563
+ preview<ThrowOnError extends boolean = true>(options?: Options<RoutingPreviewData, ThrowOnError>): RequestResult<RoutingPreviewResponses, RoutingPreviewErrors, ThrowOnError, 'data'>;
564
+ }
565
+ export declare class Operations extends HeyApiClient {
566
+ /**
567
+ * List recorded workspace operations
568
+ *
569
+ * Stable ID-ordered pagination over authoritative mutation records. Observed time is the lookup time, not the original execution timestamp. Listing never reconciles or retries work.
570
+ */
571
+ list<ThrowOnError extends boolean = true>(options?: Options<OperationsListData, ThrowOnError>): RequestResult<OperationsListResponses, OperationsListErrors, ThrowOnError, 'data'>;
572
+ /**
573
+ * Get a mutation's known outcome
574
+ *
575
+ * Read the workspace-owned mutation record identified in an error response.
576
+ * This lookup never repeats the mutation. Unknown remains unknown until
577
+ * reconciliation establishes an outcome.
578
+ *
579
+ * If a creation response was lost, explicitly resubmitting POST /sandboxes
580
+ * in the original workspace with the original Idempotency-Key and identical
581
+ * effective request body recovers a retained creation record. Completed
582
+ * creation returns the original sandbox or an error retaining its operation
583
+ * ID if observing the sandbox's current state fails. An unresolved record
584
+ * returns 409 with its operation ID without dispatching creation again.
585
+ * Different input returns 409. This POST can create a sandbox if no record
586
+ * exists; it is not a read-only lookup. Unknown records remain until resolved;
587
+ * completed records remain for at least 24 hours. Without the original key and request,
588
+ * or beyond guaranteed retention, inspect owned resources or use support
589
+ * before creating more work. Never change the key to bypass uncertainty.
590
+ *
591
+ */
592
+ get<ThrowOnError extends boolean = true>(options: Options<OperationsGetData, ThrowOnError>): RequestResult<OperationsGetResponses, OperationsGetErrors, ThrowOnError, 'data'>;
593
+ }
594
+ export declare class Artifacts extends HeyApiClient {
595
+ /**
596
+ * Upload a staged input
597
+ *
598
+ * Stream opaque source bytes to workspace-scoped temporary storage. Enforce
599
+ * workspace upload quotas without buffering the entire request in memory.
600
+ * Compute the digest server-side; return a handle only after the full upload
601
+ * succeeds. A failed upload is not a usable artifact. Do not execute or import
602
+ * uploaded code. Artifact references stay workspace-scoped and can be used across routes.
603
+ *
604
+ */
605
+ upload<ThrowOnError extends boolean = true>(options: Options<ArtifactsUploadData, ThrowOnError>): RequestResult<ArtifactsUploadResponses, ArtifactsUploadErrors, ThrowOnError, 'data'>;
606
+ /**
607
+ * Remove a staged artifact
608
+ *
609
+ * Delete source storage without deleting resulting provider images. Reject with
610
+ * 409 while a submitted build, file transfer or credential-factory activation
611
+ * still needs these bytes. An activated factory uses its retained encrypted
612
+ * copy; deleting staging bytes does not revoke that credential version. Successful deletion is
613
+ * idempotent for a known owned record; unowned IDs remain 404.
614
+ *
615
+ */
616
+ delete<ThrowOnError extends boolean = true>(options: Options<ArtifactsDeleteData, ThrowOnError>): RequestResult<ArtifactsDeleteResponses, ArtifactsDeleteErrors, ThrowOnError, 'data'>;
617
+ /**
618
+ * Inspect a staged artifact
619
+ *
620
+ * Return metadata only. Unknown, unowned and expired artifacts return 404.
621
+ */
622
+ get<ThrowOnError extends boolean = true>(options: Options<ArtifactsGetData, ThrowOnError>): RequestResult<ArtifactsGetResponses, ArtifactsGetErrors, ThrowOnError, 'data'>;
623
+ }
624
+ export declare class Images extends HeyApiClient {
625
+ /**
626
+ * Prepare an image on selected providers
627
+ *
628
+ * Start background preparation using this workspace's payer-account rules, on the named
629
+ * `providers` or on the `top` providers a create with the `match` body would pick now.
630
+ * A named provider that cannot run the image reports its fit reason immediately; a
631
+ * `match` body that no route can run is refused as that create would be. With `match`,
632
+ * the response lists the picked providers in rank order, and each reason says how it
633
+ * was ranked. A ready result means a usable copy existed when preparation completed;
634
+ * it does not keep the copy awake afterward. Read progress from GET /images/preparations.
635
+ * OCI and Dockerfile inputs use the same declared preparation capabilities as a create.
636
+ * A Dockerfile response returns a content selector for status and unprepare. If no selected
637
+ * offering declares prepared Dockerfile/context support, it is refused before reading the
638
+ * context or starting provider work. Existing provider artifacts are already prepared.
639
+ * The request JSON is limited to 64 KiB; uploaded contexts retain the artifacts API limits.
640
+ *
641
+ */
642
+ prepare<ThrowOnError extends boolean = true>(options: Options<ImagesPrepareData, ThrowOnError>): RequestResult<ImagesPrepareResponses, ImagesPrepareErrors, ThrowOnError, 'data'>;
643
+ /**
644
+ * Read image preparation status
645
+ *
646
+ * Reads preparation state recorded for the requested image in this workspace. The providers query can limit the result; omitted returns every recorded provider. A content selector reads the workspace's recorded copy without contacting a registry.
647
+ */
648
+ status<ThrowOnError extends boolean = true>(options: Options<ImagesStatusData, ThrowOnError>): RequestResult<ImagesStatusResponses, ImagesStatusErrors, ThrowOnError, 'data'>;
649
+ /**
650
+ * Remove this workspace's prepared image copies
651
+ *
652
+ * Remove only copies Cloud recorded for this workspace. Copies on managed accounts
653
+ * that other workspaces still use remain available, while this workspace's use is
654
+ * dropped. The image itself is not deleted. A provider reports gone only after it
655
+ * confirms removal. A later sandbox create may prepare the image again.
656
+ *
657
+ */
658
+ unprepare<ThrowOnError extends boolean = true>(options: Options<ImagesUnprepareData, ThrowOnError>): RequestResult<ImagesUnprepareResponses, ImagesUnprepareErrors, ThrowOnError, 'data'>;
659
+ }
660
+ export declare class Processes extends HeyApiClient {
661
+ /**
662
+ * Start a durable background command
663
+ *
664
+ * Runs a command in the background in a Bash login shell and returns a process ID. The
665
+ * process keeps running between your calls: read its output, write to its input, or cancel
666
+ * it later, from any client. The sandbox's lifetime bounds how long it can run; cancel it to
667
+ * end it sooner.
668
+ *
669
+ * The sandbox image needs Linux `/proc`, Bash, and a few standard tools (`setsid`, `nohup`,
670
+ * `tail`, `base64`). If one is missing, the call fails with `unsupported_feature` before
671
+ * anything starts.
672
+ *
673
+ * `stdin` defaults to `false`. Setting it to `true`, to write to the process later, needs a
674
+ * sandbox created with the `processes.input` requirement and a route that supports writing to
675
+ * the process after it reconnects (`reattached_stdin`). To check ahead of time which routes
676
+ * qualify, send the same requirements to `POST /sandboxes/match`.
677
+ *
678
+ * With `wait_for_port`, the call returns once that port accepts TCP connections inside the
679
+ * sandbox. If the process exits first, or the port is still closed after 30 seconds, the
680
+ * process is ended and the call fails with `409 port_not_listening`. `details` carries
681
+ * `port`, `stdout_tail`, `stderr_tail` and, when the process exited, `exit_code`.
682
+ *
683
+ */
684
+ start<ThrowOnError extends boolean = true>(options: Options<ProcessesStartData, ThrowOnError>): RequestResult<ProcessesStartResponses, ProcessesStartErrors, ThrowOnError, 'data'>;
685
+ /**
686
+ * Delete a finished process's retained output
687
+ *
688
+ * Deletes the retained output and metadata for a finished process in the addressed sandbox. It does not stop a running process; that request returns 409. The SDK generates an Idempotency-Key when omitted; reuse a supplied key with the identical request to reconcile an uncertain result.
689
+ */
690
+ remove<ThrowOnError extends boolean = true>(options: Options<ProcessesRemoveData, ThrowOnError>): RequestResult<ProcessesRemoveResponses, ProcessesRemoveErrors, ThrowOnError, 'data'>;
691
+ /**
692
+ * Read process output from byte offsets
693
+ *
694
+ * **Process observation**
695
+ *
696
+ * You can rely on:
697
+ * - A completed result carries the exact exit status and the complete output; otherwise the call reports lost observation or incomplete output.
698
+ * - Output bytes are exact on every route (commands in byte mode stay exact everywhere).
699
+ *
700
+ * You can set: observation deadline. Reattach where the route supports it.
701
+ *
702
+ * Not promised: chunk sizes; immediate status visibility; output kept beyond the retained history.
703
+ *
704
+ * **Process wait**
705
+ *
706
+ * You can rely on:
707
+ * - Returns the exact observed exit status.
708
+ * - An observation deadline does not claim the process stopped.
709
+ *
710
+ * You can set: observation deadline.
711
+ *
712
+ * Returns up to 256 KiB per stream from the requested byte offsets. Pass the
713
+ * returned next offsets to continue without gaps or repeats. `exit_code` is set
714
+ * only after the process ended and both streams were read to their ends. Reads
715
+ * are non-blocking. If the provider replaced the guest session, the answer is
716
+ * 410 `expired`; the command is never run again.
717
+ *
718
+ */
719
+ read<ThrowOnError extends boolean = true>(options: Options<ProcessesReadData, ThrowOnError>): RequestResult<ProcessesReadResponses, ProcessesReadErrors, ThrowOnError, 'data'>;
720
+ /**
721
+ * Write process input
722
+ *
723
+ * You can rely on:
724
+ * - Input is delivered in order.
725
+ * - EOF is explicit.
726
+ * - Uncertain delivery is never resent.
727
+ * - Input is UTF-8 text on every route.
728
+ *
729
+ * You can set: data (text), EOF.
730
+ *
731
+ * Not promised: chunking on the wire.
732
+ *
733
+ * Append text to a process started with `stdin: true`. Calls from one client
734
+ * must be awaited sequentially to preserve input order. The selected route must
735
+ * support both `processes.input` and input after process reconnection
736
+ * (`reattached_stdin`); otherwise writes and EOF are refused as `unsupported_feature`
737
+ * before dispatch. Use `POST /sandboxes/match` with `requirements.processes.input`
738
+ * set to true to inspect eligible routes before create. If stdin is closed, return 409.
739
+ *
740
+ */
741
+ writeStdin<ThrowOnError extends boolean = true>(options: Options<ProcessesWriteStdinData, ThrowOnError>): RequestResult<ProcessesWriteStdinResponses, ProcessesWriteStdinErrors, ThrowOnError, 'data'>;
742
+ /**
743
+ * Send stdin EOF
744
+ *
745
+ * You can rely on:
746
+ * - Input is delivered in order.
747
+ * - EOF is explicit.
748
+ * - Uncertain delivery is never resent.
749
+ * - Input is UTF-8 text on every route.
750
+ *
751
+ * You can set: data (text), EOF.
752
+ *
753
+ * Not promised: chunking on the wire.
754
+ *
755
+ * Close only the input stream of a process started with stdin enabled; unsupported providers refuse before dispatch.
756
+ *
757
+ */
758
+ closeStdin<ThrowOnError extends boolean = true>(options: Options<ProcessesCloseStdinData, ThrowOnError>): RequestResult<ProcessesCloseStdinResponses, ProcessesCloseStdinErrors, ThrowOnError, 'data'>;
759
+ /**
760
+ * Cancel a durable process
761
+ *
762
+ * Ends the process and everything it started. This works on every sandbox; it needs no
763
+ * `processes.cancel` requirement. Cancelling a process that has already finished succeeds and
764
+ * changes nothing.
765
+ *
766
+ */
767
+ cancel<ThrowOnError extends boolean = true>(options: Options<ProcessesCancelData, ThrowOnError>): RequestResult<ProcessesCancelResponses, ProcessesCancelErrors, ThrowOnError, 'data'>;
768
+ }
769
+ export declare class Credits extends HeyApiClient {
770
+ /**
771
+ * Get the workspace credit balance
772
+ *
773
+ * Requires account-management permission; execution keys receive 403. Returns 503
774
+ * payments_unavailable while credit purchases are not configured. BYOK work never
775
+ * depends on this balance.
776
+ *
777
+ */
778
+ balance<ThrowOnError extends boolean = true>(options?: Options<CreditsBalanceData, ThrowOnError>): RequestResult<CreditsBalanceResponses, CreditsBalanceErrors, ThrowOnError, 'data'>;
779
+ /**
780
+ * List recent credit purchases
781
+ *
782
+ * Workspace-owned purchases in every state, ordered by creation time and ID descending. Invoice and receipt links appear only after confirmed payment. New purchases do not shift subsequent pages. Invalid or another workspace's cursor is a 400.
783
+ */
784
+ purchases<ThrowOnError extends boolean = true>(options?: Options<CreditsPurchasesData, ThrowOnError>): RequestResult<CreditsPurchasesResponses, CreditsPurchasesErrors, ThrowOnError, 'data'>;
785
+ /**
786
+ * Start a credit purchase through Checkout or a saved card
787
+ *
788
+ * Without payment_method_id, records a pending purchase and returns the hosted
789
+ * Checkout page; success_url and cancel_url are required for this path. The response
790
+ * reports fee_minor and total_minor before redirect: Checkout charges total_minor
791
+ * (amount_minor plus BoxRouter's purchase fee, before tax) in two line items, and only
792
+ * amount_minor is added as credit. A refund returns credit only; the fee is not
793
+ * refunded. With a
794
+ * workspace-owned payment_method_id, creates and pays a
795
+ * Stripe invoice using that card. A verified paid invoice returns confirmed; when
796
+ * payer authentication is required, returns pending with the hosted invoice
797
+ * authentication_url. Send the payer there, then poll this purchase after they
798
+ * return to the dashboard. Credit is added only after BoxRouter fetches and validates
799
+ * the paid invoice. A definitive card decline returns payment_declined with the
800
+ * purchase ID and a short safe decline reason in error details, outcome not_started;
801
+ * the failed purchase remains in history. Repeating a request with the same
802
+ * Idempotency-Key returns its original result; a different amount or card under that
803
+ * key is a 409. After a payment_provider_unavailable response with outcome unknown,
804
+ * retry with the same key.
805
+ *
806
+ */
807
+ purchase<ThrowOnError extends boolean = true>(options: Options<CreditsPurchaseData, ThrowOnError>): RequestResult<CreditsPurchaseResponses, CreditsPurchaseErrors, ThrowOnError, 'data'>;
808
+ /**
809
+ * Preview a credit purchase and its tax
810
+ *
811
+ * Returns Stripe's current tax preview for the requested top-up amount. Requires account-management permission and is available only when in-page card purchases are enabled.
812
+ */
813
+ quotePurchase<ThrowOnError extends boolean = true>(options: Options<CreditsQuotePurchaseData, ThrowOnError>): RequestResult<CreditsQuotePurchaseResponses, CreditsQuotePurchaseErrors, ThrowOnError, 'data'>;
814
+ /**
815
+ * List managed-compute credit movements
816
+ *
817
+ * Requires account-management permission; execution keys receive 403. Returns
818
+ * confirmed, nonzero charges from the configured test or live billing book, the later
819
+ * corrections to them, reservations still held, and reservations released with no
820
+ * charge, newest first. Results are limited to the calling workspace. BYOK work,
821
+ * supplier costs, provider account identities, API-key digests and raw usage evidence
822
+ * are not returned; a row's `key_id` names the workspace API key it belongs to. A
823
+ * cursor belongs to this workspace and billing mode; invalid or foreign cursors
824
+ * return 400. New rows do not shift subsequent pages. No provider or payment-provider
825
+ * calls are made.
826
+ *
827
+ */
828
+ usage<ThrowOnError extends boolean = true>(options?: Options<CreditsUsageData, ThrowOnError>): RequestResult<CreditsUsageResponses, CreditsUsageErrors, ThrowOnError, 'data'>;
829
+ /**
830
+ * Get one credit purchase
831
+ *
832
+ * The authoritative state to poll after the payer returns from Checkout. Another workspace's purchase is a 404.
833
+ */
834
+ getPurchase<ThrowOnError extends boolean = true>(options: Options<CreditsGetPurchaseData, ThrowOnError>): RequestResult<CreditsGetPurchaseResponses, CreditsGetPurchaseErrors, ThrowOnError, 'data'>;
835
+ /**
836
+ * Close an unpaid Checkout session
837
+ *
838
+ * Expires a known open Checkout session for this workspace-owned purchase. A
839
+ * completed payment is reconciled and remains confirmed. If Checkout creation
840
+ * had an unknown outcome and no session ID was recorded, the same stable Stripe
841
+ * idempotency key recovers that request before BoxRouter expires the session.
842
+ * Repeating this request is safe. The request needs no body: the return URLs are
843
+ * optional and unused when closing a purchase.
844
+ *
845
+ */
846
+ cancelPurchase<ThrowOnError extends boolean = true>(options: Options<CreditsCancelPurchaseData, ThrowOnError>): RequestResult<CreditsCancelPurchaseResponses, CreditsCancelPurchaseErrors, ThrowOnError, 'data'>;
847
+ /**
848
+ * List redeemed promotion codes
849
+ *
850
+ * Promotion codes this workspace redeemed, newest first.
851
+ */
852
+ promotions<ThrowOnError extends boolean = true>(options?: Options<CreditsPromotionsData, ThrowOnError>): RequestResult<CreditsPromotionsResponses, CreditsPromotionsErrors, ThrowOnError, 'data'>;
853
+ /**
854
+ * Redeem a promotion code for free credit
855
+ *
856
+ * Adds the code's credit to the workspace balance, once per workspace. Codes are
857
+ * case-insensitive and surrounding spaces are ignored. An unknown, expired, disabled
858
+ * or fully used code is 404 promotion_code_invalid; these cases are not told apart.
859
+ * A new redemption answers 201. A code this workspace already redeemed is refused
860
+ * with 409 promotion_already_redeemed and details.redemption containing the original redemption;
861
+ * its message names the redemption date. No credit is granted again. Promotional
862
+ * credit does not expire. Requires account-management permission; 503 payments_unavailable while
863
+ * credits are not configured.
864
+ *
865
+ */
866
+ redeem<ThrowOnError extends boolean = true>(options: Options<CreditsRedeemData, ThrowOnError>): RequestResult<CreditsRedeemResponses, CreditsRedeemErrors, ThrowOnError, 'data'>;
867
+ /**
868
+ * Get workspace billing details
869
+ *
870
+ * Requires account-management permission. Reads the workspace Stripe customer. When multiple customer tax IDs exist, tax_id is the newest by creation time (ID breaks ties). Unset details are null.
871
+ */
872
+ billingDetails<ThrowOnError extends boolean = true>(options?: Options<CreditsBillingDetailsData, ThrowOnError>): RequestResult<CreditsBillingDetailsResponses, CreditsBillingDetailsErrors, ThrowOnError, 'data'>;
873
+ /**
874
+ * Replace workspace billing details
875
+ *
876
+ * Stores legal name, invoice email, address and one tax ID on the workspace Stripe customer, creating it when absent. Details apply to future invoices. PUT replaces all customer tax IDs with the supplied single ID, adding the replacement before deleting old IDs so a rejected replacement preserves them. Stripe tax ID verification can be pending or unsuccessful. Repeat an uncertain update with the same Idempotency-Key; a changed body under that key returns 409. Stripe rejection returns 502; the update can have partially completed, so read current details before correcting it.
877
+ */
878
+ updateBillingDetails<ThrowOnError extends boolean = true>(options: Options<CreditsUpdateBillingDetailsData, ThrowOnError>): RequestResult<CreditsUpdateBillingDetailsResponses, CreditsUpdateBillingDetailsErrors, ThrowOnError, 'data'>;
879
+ /**
880
+ * Get workspace credit alert settings
881
+ *
882
+ * Requires account-management permission. Returns workspace-owned settings only.
883
+ */
884
+ alerts<ThrowOnError extends boolean = true>(options?: Options<CreditsAlertsData, ThrowOnError>): RequestResult<CreditsAlertsResponses, CreditsAlertsErrors, ThrowOnError, 'data'>;
885
+ /**
886
+ * Replace workspace credit alert settings
887
+ *
888
+ * Atomically replaces the optional trigger level and evaluates the current available balance. Repeating identical settings is idempotent and requires no Idempotency-Key. Sends the owner one alert per crossing below the trigger level and one when available credit is zero or negative; a repeated evaluation does not resend. Re-arms at or above the trigger level and above zero respectively. BYOK work is unaffected by credit balance.
889
+ */
890
+ updateAlerts<ThrowOnError extends boolean = true>(options: Options<CreditsUpdateAlertsData, ThrowOnError>): RequestResult<CreditsUpdateAlertsResponses, CreditsUpdateAlertsErrors, ThrowOnError, 'data'>;
891
+ /**
892
+ * List saved workspace payment methods
893
+ *
894
+ * Returns masked card details only. Saved methods can be charged for a workspace member's purchase or immediately when enabling auto top-up with a trigger level above the current balance.
895
+ */
896
+ paymentMethods<ThrowOnError extends boolean = true>(options?: Options<CreditsPaymentMethodsData, ThrowOnError>): RequestResult<CreditsPaymentMethodsResponses, CreditsPaymentMethodsErrors, ThrowOnError, 'data'>;
897
+ /**
898
+ * Start hosted setup for a saved payment method
899
+ *
900
+ * Creates a Stripe-hosted setup page and returns its URL. Setup does not charge the
901
+ * payer. The completed method can be charged for a later user-initiated purchase or immediately when enabling auto top-up with a trigger level above the current balance.
902
+ * Repeating the request with the same Idempotency-Key returns the same page.
903
+ *
904
+ */
905
+ setupPaymentMethod<ThrowOnError extends boolean = true>(options: Options<CreditsSetupPaymentMethodData, ThrowOnError>): RequestResult<CreditsSetupPaymentMethodResponses, CreditsSetupPaymentMethodErrors, ThrowOnError, 'data'>;
906
+ /**
907
+ * Start in-page saved card setup
908
+ *
909
+ * Creates a Stripe SetupIntent for in-page card collection. Requires account-management permission and the in-page cards feature.
910
+ */
911
+ setupPaymentMethodIntent<ThrowOnError extends boolean = true>(options?: Options<CreditsSetupPaymentMethodIntentData, ThrowOnError>): RequestResult<CreditsSetupPaymentMethodIntentResponses, CreditsSetupPaymentMethodIntentErrors, ThrowOnError, 'data'>;
912
+ /**
913
+ * Set saved card charge order
914
+ *
915
+ * Replaces the order of every saved card and Link method for automatic top-up. Requires account-management permission and the multi-card top-up feature.
916
+ */
917
+ reorderPaymentMethods<ThrowOnError extends boolean = true>(options: Options<CreditsReorderPaymentMethodsData, ThrowOnError>): RequestResult<CreditsReorderPaymentMethodsResponses, CreditsReorderPaymentMethodsErrors, ThrowOnError, 'data'>;
918
+ /**
919
+ * Get a saved payment method setup status
920
+ *
921
+ * Reads Stripe's current setup state after the payer returns. Another workspace's setup is a 404.
922
+ */
923
+ getPaymentMethodSetup<ThrowOnError extends boolean = true>(options: Options<CreditsGetPaymentMethodSetupData, ThrowOnError>): RequestResult<CreditsGetPaymentMethodSetupResponses, CreditsGetPaymentMethodSetupErrors, ThrowOnError, 'data'>;
924
+ /**
925
+ * Remove a saved workspace payment method
926
+ *
927
+ * Detaches a saved card. Another workspace's payment method is a 404. If the card
928
+ * was the default, the next saved card becomes default; removing the last card
929
+ * disables auto top-up with disabled_reason payment_method_required.
930
+ *
931
+ */
932
+ deletePaymentMethod<ThrowOnError extends boolean = true>(options: Options<CreditsDeletePaymentMethodData, ThrowOnError>): RequestResult<CreditsDeletePaymentMethodResponses, CreditsDeletePaymentMethodErrors, ThrowOnError, 'data'>;
933
+ /**
934
+ * Set the workspace's default saved card
935
+ *
936
+ * Makes this workspace-owned saved card the only default card. The first saved
937
+ * card becomes default automatically. This local setting is used by one-click
938
+ * purchases and auto top-up; repeating the request is safe. Another workspace's
939
+ * card is a 404.
940
+ *
941
+ */
942
+ setDefaultPaymentMethod<ThrowOnError extends boolean = true>(options: Options<CreditsSetDefaultPaymentMethodData, ThrowOnError>): RequestResult<CreditsSetDefaultPaymentMethodResponses, CreditsSetDefaultPaymentMethodErrors, ThrowOnError, 'data'>;
943
+ /**
944
+ * Get automatic credit top-up settings
945
+ *
946
+ * Requires account-management permission. Auto top-up is off until explicitly enabled.
947
+ */
948
+ autoTopUp<ThrowOnError extends boolean = true>(options?: Options<CreditsAutoTopUpData, ThrowOnError>): RequestResult<CreditsAutoTopUpResponses, CreditsAutoTopUpErrors, ThrowOnError, 'data'>;
949
+ /**
950
+ * Replace automatic credit top-up settings
951
+ *
952
+ * Stores the enabled state, trigger level and purchase amount. The amount must be
953
+ * within current purchase_bounds_minor and the trigger level must be zero or greater.
954
+ * Enabling requires a default saved card. Enabling with a trigger level above current
955
+ * available credit evaluates and attempts one top-up immediately. An attempt is
956
+ * made once per crossing below the trigger level and is never retried automatically. A
957
+ * decline or required authentication disables auto top-up and records the reason.
958
+ * Repeating the same settings is idempotent and does not start a second attempt for
959
+ * the same balance crossing. After a 503 with outcome unknown, retry the identical
960
+ * settings or GET the settings; inspect last_attempt.purchase_id and poll that
961
+ * purchase to reconcile the original attempt.
962
+ *
963
+ */
964
+ updateAutoTopUp<ThrowOnError extends boolean = true>(options: Options<CreditsUpdateAutoTopUpData, ThrowOnError>): RequestResult<CreditsUpdateAutoTopUpResponses, CreditsUpdateAutoTopUpErrors, ThrowOnError, 'data'>;
965
+ }
966
+ export declare class SpendLimits extends HeyApiClient {
967
+ /**
968
+ * List managed-compute spend limits
969
+ *
970
+ * Requires account-management permission; execution keys receive 403. Returns the
971
+ * workspace cap and every key's cap; a scope with no cap has `spend_limit: null`.
972
+ * Each capped scope also carries `spent` so far in its current period, holds included:
973
+ * `workspace_spent_nanodollars` for the workspace and `spent_nanodollars` per key.
974
+ * Limits and usage are scoped to the configured test or live billing book. BYOK usage
975
+ * is excluded.
976
+ *
977
+ */
978
+ list<ThrowOnError extends boolean = true>(options?: Options<SpendLimitsListData, ThrowOnError>): RequestResult<SpendLimitsListResponses, SpendLimitsListErrors, ThrowOnError, 'data'>;
979
+ /**
980
+ * Clear a managed-compute spend cap
981
+ *
982
+ * Requires account-management permission. Removes the scope's cap. Clearing a scope
983
+ * with no cap succeeds and returns `spend_limit: null`.
984
+ *
985
+ */
986
+ clear<ThrowOnError extends boolean = true>(options: Options<SpendLimitsClearData, ThrowOnError>): RequestResult<SpendLimitsClearResponses, SpendLimitsClearErrors, ThrowOnError, 'data'>;
987
+ /**
988
+ * Set a managed-compute spend cap
989
+ *
990
+ * Requires account-management permission. The cap applies to the scope's settled
991
+ * managed charges and open managed holds. `limit_period` sets when it resets: `daily`
992
+ * and `monthly` at 00:00 UTC (monthly on the first of the month), `total` never.
993
+ * Replaces any cap the scope already has. BYOK usage is excluded.
994
+ *
995
+ */
996
+ set<ThrowOnError extends boolean = true>(options: Options<SpendLimitsSetData, ThrowOnError>): RequestResult<SpendLimitsSetResponses, SpendLimitsSetErrors, ThrowOnError, 'data'>;
997
+ }
998
+ export declare class Usage extends HeyApiClient {
999
+ /**
1000
+ * List grouped managed and BYOK sandbox usage
1001
+ *
1002
+ * Requires account-management permission; execution-only keys receive 403. Reads
1003
+ * only this workspace and the configured test or live billing book. Settled managed
1004
+ * charges come from verified ledger receipts and are recognized on their settlement
1005
+ * date. BYOK costs come from the provider's own cost or usage records priced at
1006
+ * stored list rates. byok_provider_cost_usd is that exact amount or null, never a
1007
+ * local-clock cost or partial subtotal. No BYOK fee is included because its price-book policy remains
1008
+ * proposed and unapproved. Current managed reservations are reported as held amounts;
1009
+ * with group_by=day they appear under period and group_key `current`, outside the
1010
+ * requested historical date range. Dates are inclusive UTC calendar dates and the
1011
+ * range may not exceed 92 days. Unknown observations remain null and are counted in
1012
+ * the corresponding unknown-sandbox field; a BYOK cost is null when any contributing
1013
+ * sandbox's provider cost is unknown. The optional provider filter is applied
1014
+ * before grouping to managed and BYOK history and to current managed holds. Cursors
1015
+ * are scoped to workspace, billing mode and all report filters; malformed or foreign
1016
+ * cursors return 400. No provider or
1017
+ * payment-provider calls are made.
1018
+ *
1019
+ */
1020
+ list<ThrowOnError extends boolean = true>(options: Options<UsageListData, ThrowOnError>): RequestResult<UsageListResponses, UsageListErrors, ThrowOnError, 'data'>;
1021
+ /**
1022
+ * Export grouped managed and BYOK sandbox usage as CSV
1023
+ *
1024
+ * 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.
1025
+ */
1026
+ exportCsv<ThrowOnError extends boolean = true>(options: Options<UsageExportCsvData, ThrowOnError>): RequestResult<UsageExportCsvResponses, UsageExportCsvErrors, ThrowOnError, 'data'>;
1027
+ }
1028
+ export declare class Terminals extends HeyApiClient {
1029
+ /**
1030
+ * Open a terminal
1031
+ *
1032
+ * Opens a real PTY running a Bash login shell on any active provider. A small
1033
+ * Python 3 helper in the guest owns the PTY, so the sandbox image must provide
1034
+ * `python3`. Opens once and returns a BoxRouter terminal handle; the shell ends at
1035
+ * `timeout_seconds`, on `kill`, when it exits, or with the sandbox. Terminal
1036
+ * connections and output expire on API worker loss; the durable open record still
1037
+ * prevents another dispatch. No automatic recovery or replay.
1038
+ *
1039
+ */
1040
+ open<ThrowOnError extends boolean = true>(options: Options<TerminalsOpenData, ThrowOnError>): RequestResult<TerminalsOpenResponses, TerminalsOpenErrors, ThrowOnError, 'data'>;
1041
+ /**
1042
+ * Get observed terminal state
1043
+ *
1044
+ * Reads an owned terminal record without consuming output.
1045
+ */
1046
+ get<ThrowOnError extends boolean = true>(options: Options<TerminalsGetData, ThrowOnError>): RequestResult<TerminalsGetResponses, TerminalsGetErrors, ThrowOnError, 'data'>;
1047
+ /**
1048
+ * Stream terminal output and its end
1049
+ *
1050
+ * You can rely on:
1051
+ * - Input order is kept and output applies backpressure on PTY routes.
1052
+ * - Closing an observer does not by itself end the process.
1053
+ *
1054
+ * You can set: input, dimensions. Observation controls where supported.
1055
+ *
1056
+ * Not promised: unlimited concurrent observers.
1057
+ *
1058
+ * Server-sent events. Each data field contains one JSON TerminalEvent; the SSE id
1059
+ * is its sequence. Output events carry exact bytes as base64. An exit event follows
1060
+ * all output. An error event may arrive after HTTP 200 and ends the stream without
1061
+ * implying the shell stopped. EOF without an exit or error event is an incomplete
1062
+ * stream, not success.
1063
+ *
1064
+ * Output is retained in a 1 MiB sliding window until 60 seconds after the shell
1065
+ * ends. Last-Event-ID resumes after that event while it is retained; a dropped
1066
+ * sequence returns 410, or an error event for a reader that falls behind, and is
1067
+ * never skipped silently. Without Last-Event-ID the stream starts at the oldest
1068
+ * retained event.
1069
+ *
1070
+ */
1071
+ events<ThrowOnError extends boolean = true>(options: Options<TerminalsEventsData, ThrowOnError, TerminalsEventsResponse>): Promise<ServerSentEventsResult<TerminalsEventsResponses>>;
1072
+ /**
1073
+ * Write terminal input
1074
+ *
1075
+ * You can rely on:
1076
+ * - Input order is kept and output applies backpressure on PTY routes.
1077
+ * - Closing an observer does not by itself end the process.
1078
+ *
1079
+ * You can set: input, dimensions. Observation controls where supported.
1080
+ *
1081
+ * Not promised: unlimited concurrent observers.
1082
+ *
1083
+ * Writes exact bytes to the PTY once. Await calls sequentially to preserve order.
1084
+ * Each call is one command round trip on the provider. An uncertain write must not
1085
+ * be replayed with a new key. Returns 409 after the shell has ended.
1086
+ *
1087
+ */
1088
+ write<ThrowOnError extends boolean = true>(options: Options<TerminalsWriteData, ThrowOnError>): RequestResult<TerminalsWriteResponses, TerminalsWriteErrors, ThrowOnError, 'data'>;
1089
+ /**
1090
+ * Resize the terminal window
1091
+ *
1092
+ * You can rely on:
1093
+ * - Changes the terminal's window size, or is refused where the sandbox cannot resize an open terminal.
1094
+ *
1095
+ * You can set: columns, rows.
1096
+ *
1097
+ * Not promised: when the running program notices the new size.
1098
+ *
1099
+ * The foreground program receives SIGWINCH. Where the sandbox cannot resize an open
1100
+ * terminal, the refusal is `409 capability_unavailable`; open the terminal at the size
1101
+ * you need.
1102
+ *
1103
+ */
1104
+ resize<ThrowOnError extends boolean = true>(options: Options<TerminalsResizeData, ThrowOnError>): RequestResult<TerminalsResizeResponses, TerminalsResizeErrors, ThrowOnError, 'data'>;
1105
+ /**
1106
+ * Hang up the terminal without destroying its sandbox
1107
+ *
1108
+ * You can rely on:
1109
+ * - 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.
1110
+ *
1111
+ * 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.
1112
+ *
1113
+ * It sends a hang-up to the shell's process group where the provider allows that, and
1114
+ * otherwise ends the shell process. The terminal's exit event carries the shell's exit
1115
+ * code, or -1 when, after a kill, the provider ends the terminal without reporting one. Closing an
1116
+ * events connection never calls this. Where the sandbox cannot end a terminal's shell from
1117
+ * outside, the refusal is `409 capability_unavailable`; type `exit` in the terminal or
1118
+ * destroy the sandbox. A terminal expires 60 seconds after its shell ends: until then a
1119
+ * kill answers 204, afterwards `410 expired`.
1120
+ *
1121
+ */
1122
+ kill<ThrowOnError extends boolean = true>(options: Options<TerminalsKillData, ThrowOnError>): RequestResult<TerminalsKillResponses, TerminalsKillErrors, ThrowOnError, 'data'>;
1123
+ }
1124
+ export declare class Secrets extends HeyApiClient {
1125
+ /**
1126
+ * List workspace secret names
1127
+ *
1128
+ * Requires `credentials:manage` on API keys; dashboard browser sessions are also
1129
+ * authorized. An execution key alone cannot administer workspace secrets. Lists
1130
+ * metadata only; secret values are never returned.
1131
+ *
1132
+ */
1133
+ list<ThrowOnError extends boolean = true>(options?: Options<SecretsListData, ThrowOnError>): RequestResult<SecretsListResponses, SecretsListErrors, ThrowOnError, 'data'>;
1134
+ /**
1135
+ * Delete a workspace secret
1136
+ *
1137
+ * Requires `credentials:manage` on API keys; dashboard browser sessions are also
1138
+ * authorized. An execution key alone cannot administer workspace secrets. Remove the
1139
+ * named workspace secret and return no secret data.
1140
+ *
1141
+ */
1142
+ delete<ThrowOnError extends boolean = true>(options: Options<SecretsDeleteData, ThrowOnError>): RequestResult<SecretsDeleteResponses, SecretsDeleteErrors, ThrowOnError, 'data'>;
1143
+ /**
1144
+ * Store a workspace secret
1145
+ *
1146
+ * Requires `credentials:manage` on API keys; dashboard browser sessions are also
1147
+ * authorized. An execution key alone cannot administer workspace secrets. Create or
1148
+ * replace a workspace-scoped secret. The value is accepted only in this request body;
1149
+ * it is never returned by this or any secret listing operation.
1150
+ *
1151
+ */
1152
+ put<ThrowOnError extends boolean = true>(options: Options<SecretsPutData, ThrowOnError>): RequestResult<SecretsPutResponses, SecretsPutErrors, ThrowOnError, 'data'>;
1153
+ }
1154
+ export declare class Previews extends HeyApiClient {
1155
+ /**
1156
+ * List a sandbox's open previews
1157
+ *
1158
+ * You can rely on:
1159
+ * - Lists the previews this sandbox has open, as recorded when they were opened; a resume forgets them, so the list is empty until one is opened again.
1160
+ *
1161
+ * You can set: cursor, limit.
1162
+ *
1163
+ * Not promised: that a listed preview still works.
1164
+ *
1165
+ * Records only: this call observes no provider.
1166
+ *
1167
+ */
1168
+ list<ThrowOnError extends boolean = true>(options: Options<PreviewsListData, ThrowOnError>): RequestResult<PreviewsListResponses, PreviewsListErrors, ThrowOnError, 'data'>;
1169
+ /**
1170
+ * Get a URL for a sandbox port
1171
+ *
1172
+ * You can rely on:
1173
+ * - A private preview never falls back to a public link, and a requested credential form never falls back to the other; a mode the sandbox cannot enforce is refused. A route whose declaration cannot enforce the mode is refused before anything is opened; a weaker preview a route does open is ended before the refusal, or the refusal says it may still be reachable and names its port and id.
1174
+ * - Opening a port that already has a preview with the same access returns that preview instead of opening a second one.
1175
+ *
1176
+ * You can set: port, access, credential.
1177
+ *
1178
+ * Not promised: that an application is listening on the port; an expiry time unless one is enforced.
1179
+ *
1180
+ * Returns an HTTPS URL for one port in the sandbox and, when the link is private, where its
1181
+ * credential is carried. The sandbox must have been created with the `previews`
1182
+ * requirement naming that port and the access you ask for.
1183
+ *
1184
+ * 404 means the sandbox does not exist in this workspace. A sandbox that exists but
1185
+ * was not created through this API is refused with `409 invalid_state`; one that has
1186
+ * ended answers `410 sandbox_ended`.
1187
+ *
1188
+ * A preview is never returned with other access than the request asked for. When the
1189
+ * provider answers with one (for example a public link for a private request), the call
1190
+ * is refused with `502 preview_access_refused` and the unwanted preview is ended where
1191
+ * the provider allows. `details.port` names the port. `details.revoked` is true when it
1192
+ * was ended and no access remains. When it could not be ended the outcome is `unknown`,
1193
+ * the message says the preview may still be reachable, and `details.preview_id` and
1194
+ * `details.url` name a public one (a private preview's address holds a credential and is
1195
+ * never repeated). The operation stays open for reconciliation: do not send the call
1196
+ * again; end the sandbox to be certain no access remains.
1197
+ *
1198
+ */
1199
+ open<ThrowOnError extends boolean = true>(options: Options<PreviewsOpenData, ThrowOnError>): RequestResult<PreviewsOpenResponses, PreviewsOpenErrors, ThrowOnError, 'data'>;
1200
+ /**
1201
+ * Revoke a preview
1202
+ *
1203
+ * You can rely on:
1204
+ * - Access through the named preview ends while the sandbox and its other previews keep running; revoking a preview that already ended succeeds.
1205
+ *
1206
+ * You can set: preview id.
1207
+ *
1208
+ * Ends a preview, named by the ID that opening it returned. The sandbox must have been created
1209
+ * with `previews.revocable` set to `true`; otherwise the call fails with `not_named`, and `fix`
1210
+ * shows the requirement to send. A sandbox that is not running fails with `not_running`, even
1211
+ * if the preview has already ended. Otherwise, ending a preview that has already ended answers
1212
+ * `204`.
1213
+ *
1214
+ */
1215
+ revoke<ThrowOnError extends boolean = true>(options: Options<PreviewsRevokeData, ThrowOnError>): RequestResult<PreviewsRevokeResponses, PreviewsRevokeErrors, ThrowOnError, 'data'>;
1216
+ }
1217
+ export declare class Sandboxes extends HeyApiClient {
1218
+ /**
1219
+ * Prove a headless Chromium in the sandbox
1220
+ *
1221
+ * You can rely on:
1222
+ * - Returns only the automation channels that loaded a page served inside the sandbox; when none does, the call is refused.
1223
+ *
1224
+ * Not promised: installing a browser in the sandbox.
1225
+ *
1226
+ * Loads a page from a server inside the guest in the image's own headless Chromium
1227
+ * and reads the CDP endpoint: Playwright and CDP on glibc images, CDP on Alpine.
1228
+ * Create the sandbox from an image with Python 3 and Playwright with Chromium (or a
1229
+ * Chromium binary); BoxRouter's standard image has neither. An image without them, or a sandbox
1230
+ * where no channel passes, such as one with too little memory, is refused with
1231
+ * `422 unsupported_feature`. Afterwards run browser scripts through commands or processes.
1232
+ *
1233
+ */
1234
+ browser<ThrowOnError extends boolean = true>(options: Options<SandboxesBrowserData, ThrowOnError>): RequestResult<SandboxesBrowserResponses, SandboxesBrowserErrors, ThrowOnError, 'data'>;
1235
+ /**
1236
+ * Pause a sandbox and keep it
1237
+ *
1238
+ * You can rely on:
1239
+ * - On return the sandbox is paused, and the result says whether running processes are kept or only files.
1240
+ * - The remaining lifetime budget is preserved.
1241
+ *
1242
+ * You can set: lifetime.
1243
+ *
1244
+ * Stops compute and keeps the sandbox where it is. The sandbox must have been created with
1245
+ * the `pause_resume` requirement. The result says what was kept (running processes, or
1246
+ * only files) and how much lifetime remains. Resume the sandbox before doing more work in it.
1247
+ *
1248
+ * 404 means the sandbox does not exist in this workspace. A sandbox that exists but
1249
+ * was not created through this API is refused with `409 invalid_state`; one that has
1250
+ * ended answers `410 sandbox_ended`.
1251
+ *
1252
+ */
1253
+ pause<ThrowOnError extends boolean = true>(options: Options<SandboxesPauseData, ThrowOnError>): RequestResult<SandboxesPauseResponses, SandboxesPauseErrors, ThrowOnError, 'data'>;
1254
+ /**
1255
+ * Resume the same paused sandbox
1256
+ *
1257
+ * You can rely on:
1258
+ * - Resumes the same sandbox on its original provider and account, never a replacement.
1259
+ * - On return the sandbox is running, and the result says whether processes from before the pause were lost.
1260
+ * - The sandbox runs on with the lifetime budget it had left; resume takes no new budget.
1261
+ * - Resuming a sandbox that is already running succeeds and changes nothing, so a retry is safe.
1262
+ *
1263
+ * Not promised: that previews opened before the pause still work.
1264
+ *
1265
+ * Starts a paused or stopped sandbox again and returns its remaining lifetime. Resume takes
1266
+ * no fields: send no body or `{}`, and any other field fails with `400 invalid_request`. To
1267
+ * change how long the sandbox may run, extend its lifetime, which works while it is running,
1268
+ * paused or stopped.
1269
+ *
1270
+ * Resuming a sandbox that is already running changes nothing, so you can safely send the call
1271
+ * again. 404 means the sandbox does not exist in this workspace. A sandbox that cannot be
1272
+ * resumed fails with 409: `invalid_state` while it is being created or destroyed, or when it
1273
+ * was not created through this API; `lifetime_used_up` when its lifetime is spent (extend it,
1274
+ * then resume); `volume_lease_lost` or `volume_busy` when its Volume cannot follow. A sandbox
1275
+ * that has ended answers `410 sandbox_ended`.
1276
+ *
1277
+ * Those refusals happen before anything is resumed and report `outcome: not_started`. If the
1278
+ * provider resumed the sandbox and a later step failed, the outcome is never `not_started`:
1279
+ * `502 volume_restore_failed` (the sandbox restarted without its Volume mounted) reports
1280
+ * `outcome: partial` with an `operation_id`, and the sandbox is running without its Volume.
1281
+ * Do not send the resume again; destroy the sandbox and create a new one with the Volume
1282
+ * attached. A lifetime failure after the resume reports `outcome: unknown`; read the operation
1283
+ * before acting.
1284
+ *
1285
+ */
1286
+ resume<ThrowOnError extends boolean = true>(options: Options<SandboxesResumeData, ThrowOnError>): RequestResult<SandboxesResumeResponses, SandboxesResumeErrors, ThrowOnError, 'data'>;
1287
+ /**
1288
+ * Extend a sandbox lifetime
1289
+ *
1290
+ * You can rely on:
1291
+ * - The value is the new total running-time budget, not an increment, so sending it again is safe; a budget shorter than the current one or than the running time already used is refused. On success the sandbox may run for at least the requested total; extending a paused or stopped sandbox sets the budget it resumes with.
1292
+ *
1293
+ * You can set: lifetime_seconds.
1294
+ *
1295
+ * Not promised: that the sandbox ends exactly when the budget runs out.
1296
+ *
1297
+ * Refused with not_named unless the creation request asked for resources.extendable_lifetime. It is
1298
+ * not a re-match: the only check is the route's max_lifetime_seconds for this account,
1299
+ * against the current run, and over it the answer is lifetime_limit. Allowed while
1300
+ * running, paused or stopped: a paused or stopped sandbox resumes with the new budget.
1301
+ * A total shorter than the current budget is invalid_request (400); a total below the
1302
+ * running time already used is lifetime_limit (409).
1303
+ *
1304
+ * 404 means the sandbox does not exist in this workspace. A sandbox that exists but
1305
+ * was not created through this API is refused with `409 invalid_state`; one that has
1306
+ * ended answers `410 sandbox_ended`.
1307
+ *
1308
+ */
1309
+ extend<ThrowOnError extends boolean = true>(options: Options<SandboxesExtendData, ThrowOnError>): RequestResult<SandboxesExtendResponses, SandboxesExtendErrors, ThrowOnError, 'data'>;
1310
+ /**
1311
+ * Change a running sandbox's outbound network policy
1312
+ *
1313
+ * You can rely on:
1314
+ * - Connections opened after the call returns follow the new policy, and the sandbox keeps its processes and files.
1315
+ * - An uncertain outcome is never resent.
1316
+ *
1317
+ * You can set: policy, allow, deny.
1318
+ *
1319
+ * Not promised: that connections already open when the call returns are closed; name lookups and DNS traffic.
1320
+ *
1321
+ * Switches the sandbox's outbound network policy, or changes its entries. Each call starts
1322
+ * from the policy the sandbox has now: the last one this call applied, or else the one named
1323
+ * when the sandbox was created (`open` if it named none).
1324
+ *
1325
+ * The sandbox must have been created with the `network_lockdown` requirement naming the
1326
+ * settings the change needs. Otherwise the call fails with `not_named`, and `fix` shows the
1327
+ * requirement to send:
1328
+ *
1329
+ * - Switching to a different policy needs `switchable`, and the target policy listed in
1330
+ * `switches_to` unless it is the policy the sandbox was created with. Switching back to the
1331
+ * created policy with different entries also needs `changeable`.
1332
+ * - Changing the entries of the current policy needs `changeable`, even when the entries are
1333
+ * the same. After one switch, a further call that names the new policy needs `changeable`.
1334
+ * - Deny entries on an allowlist need `deny_wins`, and an HTTP rule among the entries needs
1335
+ * `http_rules`.
1336
+ *
1337
+ * `422 unsupported_feature` with outcome `not_started` means the route cannot switch policies.
1338
+ *
1339
+ */
1340
+ updateNetworkPolicy<ThrowOnError extends boolean = true>(options: Options<SandboxesUpdateNetworkPolicyData, ThrowOnError>): RequestResult<SandboxesUpdateNetworkPolicyResponses, SandboxesUpdateNetworkPolicyErrors, ThrowOnError, 'data'>;
1341
+ /**
1342
+ * List workspace sandboxes
1343
+ *
1344
+ * You can rely on:
1345
+ * - Lists only the workspace's own sandboxes, each with its latest recorded state.
1346
+ * - A label filter matches exactly: only sandboxes carrying every requested label are listed.
1347
+ *
1348
+ * You can set: filters, sort, cursor, limit.
1349
+ *
1350
+ * Not promised: a fresh observation of each sandbox from its provider.
1351
+ *
1352
+ * Lists your workspace's sandboxes from BoxRouter's records, without asking providers. `state`
1353
+ * is the latest state BoxRouter recorded, or `unknown` if it recorded none; get one sandbox to
1354
+ * check its provider live. `observed_at` is when the list was read, and `state_recorded_at` is
1355
+ * when that state was recorded, which can be earlier.
1356
+ *
1357
+ * `lifecycle` defaults to `all`; send `lifecycle=live` to list only live sandboxes, or `ended` for
1358
+ * the rest. You can repeat the `state` and `provider` parameters to match any
1359
+ * of several values; repeated `label` parameters must all match. Unknown query parameters fail the request. The page counts apply every
1360
+ * filter except `lifecycle`, and `by_state` also ignores `state`, so you can show counts while
1361
+ * changing those two filters. `source` filters by what created the sandbox, and a sandbox's
1362
+ * origin stays readable after it ends or is removed.
1363
+ *
1364
+ */
1365
+ list<ThrowOnError extends boolean = true>(options?: Options<SandboxesListData, ThrowOnError>): RequestResult<SandboxesListResponses, SandboxesListErrors, ThrowOnError, 'data'>;
1366
+ /**
1367
+ * Create a sandbox
1368
+ *
1369
+ * **create (standard image)**
1370
+ *
1371
+ * You can rely on:
1372
+ * - Sandboxes are created from the requested image.
1373
+ *
1374
+ * You can set: image, lifetime, requirements.
1375
+ *
1376
+ * **volume mount**
1377
+ *
1378
+ * You can rely on:
1379
+ * - The named checkpoint, or the head when none is named, is restored into the mount folder, replacing what the image has there; an empty volume restores nothing.
1380
+ *
1381
+ * You can set: volume.
1382
+ *
1383
+ * Not promised: mounting a provider's own volumes.
1384
+ *
1385
+ * Creates a sandbox and returns it once it is ready to run commands. Send `{}`, or no
1386
+ * body, for the default: the standard image on the best eligible route, running for up
1387
+ * to 300 seconds. A credit-funded sandbox on a route that can extend a lifetime runs
1388
+ * instead for as long as your credit balance covers it when you leave out
1389
+ * `lifetime_seconds`; `funded_until` on the sandbox says how far it is funded.
1390
+ *
1391
+ * Describe what you need and BoxRouter picks a route that meets all of it:
1392
+ *
1393
+ * - `requirements`: capabilities such as `pause_resume`, `previews` or
1394
+ * `network_lockdown`, each with the settings you need.
1395
+ * - `resources`: minimum CPU and memory, and a region.
1396
+ * - `lifetime_seconds` and `at_end`: how long the sandbox may run, and whether it is
1397
+ * destroyed or paused afterward.
1398
+ * - `preferences`: how to choose among eligible routes (`sort`, `only`, `ignore`,
1399
+ * `order`, `allow_fallbacks`).
1400
+ * - `volume`: a Volume to mount, optionally at a checkpoint.
1401
+ * - `secret_refs`: saved workspace secrets to add to the environment.
1402
+ *
1403
+ * BoxRouter never relaxes a requirement to find a cheaper or faster route. If no route
1404
+ * can meet the request, the call fails with `409 no_eligible_route`, `details` names each
1405
+ * route that was ruled out and the nearest changes, and nothing is created. A field that
1406
+ * BoxRouter does not recognize fails with `400 invalid_request`; it is never ignored.
1407
+ * Choosing a connected account or route whose provider is not enabled for you fails with
1408
+ * `409 provider_not_enabled` before any route is considered. The response records the
1409
+ * contract the sandbox was created under and why its route was chosen.
1410
+ *
1411
+ * A created sandbox does not mean your application is listening on a port yet. If the
1412
+ * outcome of a create is unclear, BoxRouter does not retry it or move to another
1413
+ * provider; read the operation named by `operation_id` to find out what happened.
1414
+ *
1415
+ * A `volume` has one writer at a time. If its previous writer is ending (its destroy
1416
+ * was accepted, or cleanup of its access is pending), this call waits for the
1417
+ * release, at most 120 seconds, and then creates the sandbox, so you need no polling or
1418
+ * retry. If the release does not finish in that time, or the writer is still running,
1419
+ * the call fails with `409 volume_busy`, outcome `not_started`, and
1420
+ * `details.writer_sandbox_id` names the writer. A running writer fails at once.
1421
+ *
1422
+ */
1423
+ create<ThrowOnError extends boolean = true>(options?: Options<SandboxesCreateData, ThrowOnError>): RequestResult<SandboxesCreateResponses, SandboxesCreateErrors, ThrowOnError, 'data'>;
1424
+ /**
1425
+ * Explain routing without creating
1426
+ *
1427
+ * You can rely on:
1428
+ * - Evaluates the body exactly as create would and returns the routes create would try, in order, without provisioning, reserving or recording anything.
1429
+ *
1430
+ * You can set: creation body.
1431
+ *
1432
+ * Not promised: that a later create finds the same routes eligible.
1433
+ *
1434
+ * Each eligible route carries the contract it would grant, every excluded route the
1435
+ * checks it failed, and the nearest changes are listed; a later creation checks again.
1436
+ * A workspace with nothing to match against, that is no provider keys and no credits,
1437
+ * or a `preferences.only` pin on a provider the workspace has not connected, answers 409 no_eligible_route with the same fix
1438
+ * POST /sandboxes gives, because a dry run answers what the creation it stands for
1439
+ * would.
1440
+ *
1441
+ */
1442
+ match<ThrowOnError extends boolean = true>(options?: Options<SandboxesMatchData, ThrowOnError>): RequestResult<SandboxesMatchResponses, SandboxesMatchErrors, ThrowOnError, 'data'>;
1443
+ /**
1444
+ * Destroy a sandbox
1445
+ *
1446
+ * You can rely on:
1447
+ * - Never deletes another generation of the sandbox.
1448
+ * - Returns once accepted: 204 when confirmed, else 202 with an operation that completes lifecycle work; GET /operations/{id} reports completion.
1449
+ * - While a destroy is unresolved, a repeated destroy is accepted as the same pending operation and makes no second provider call; once the destroy is confirmed, a repeat returns 204 with no body.
1450
+ *
1451
+ * You can set: nothing.
1452
+ *
1453
+ * Not promised: how long teardown takes; that the sandbox is already absent from listings on return.
1454
+ *
1455
+ * Requests destruction on the original upstream account, including persistent sandbox
1456
+ * storage where the provider's destroy operation removes it. Separately owned volumes
1457
+ * are not deleted. DELETE returns once the provider accepts the destroy, always as 202
1458
+ * with the sandbox: `state` is `destroyed` when the provider confirmed within the request
1459
+ * and `destroying` while lifecycle work remains, and `operation_id` is set while work
1460
+ * remains. BoxRouter finishes an accepted destroy without the caller. GET
1461
+ * /operations/{operation_id} reports the operation's outcome; for an accepted destroy this
1462
+ * includes any remaining stop, final usage, and deletion work.
1463
+ *
1464
+ * A repeat DELETE while destruction is unresolved returns 202 with the existing
1465
+ * operation_id and makes no second provider call. Once destruction is confirmed,
1466
+ * repeat DELETEs return 202 with the destroyed sandbox and no `operation_id`. Unknown or
1467
+ * unowned sandbox IDs return 404.
1468
+ *
1469
+ */
1470
+ destroy<ThrowOnError extends boolean = true>(options: Options<SandboxesDestroyData, ThrowOnError>): RequestResult<SandboxesDestroyResponses, SandboxesDestroyErrors, ThrowOnError, 'data'>;
1471
+ /**
1472
+ * Get a sandbox
1473
+ *
1474
+ * You can rely on:
1475
+ * - Returns a handle for the id, or not_found.
1476
+ *
1477
+ * You can set: sandbox id.
1478
+ *
1479
+ * Returns the sandbox with its current state, checked with the provider, without resuming it.
1480
+ * `observed_at` is when the provider was checked. `state_recorded_at` is when BoxRouter last
1481
+ * recorded the state it returns; it is null if a concurrent change replaced the state during
1482
+ * the read. `origin` says what created the sandbox and stays readable after the sandbox ends or
1483
+ * is removed, even when the provider can no longer be checked.
1484
+ *
1485
+ */
1486
+ get<ThrowOnError extends boolean = true>(options: Options<SandboxesGetData, ThrowOnError>): RequestResult<SandboxesGetResponses, SandboxesGetErrors, ThrowOnError, 'data'>;
1487
+ }
1488
+ export declare class ProviderAccounts extends HeyApiClient {
1489
+ /**
1490
+ * List connected accounts
1491
+ *
1492
+ * Requires `provider-accounts:manage` on API keys; dashboard browser sessions are also
1493
+ * authorized. Returns your workspace's account metadata and the list of providers enabled for you;
1494
+ * it never returns stored credentials.
1495
+ *
1496
+ */
1497
+ list<ThrowOnError extends boolean = true>(options?: Options<ProviderAccountsListData, ThrowOnError>): RequestResult<ProviderAccountsListResponses, ProviderAccountsListErrors, ThrowOnError, 'data'>;
1498
+ /**
1499
+ * Connect a provider account
1500
+ *
1501
+ * Saves your own provider credentials so BoxRouter can run sandboxes on that account. Needs
1502
+ * the `provider-accounts:manage` permission on the API key; a signed-in dashboard session also
1503
+ * works. This permission is separate from the access that creates sandboxes.
1504
+ *
1505
+ * BoxRouter first makes one read-only request to the provider with the credentials. A clear
1506
+ * rejection fails with `422 credentials_rejected`; an unreachable provider or an inconclusive
1507
+ * answer does not block the save. The credentials are then stored encrypted and never
1508
+ * returned. The account is enabled at once. Connecting starts no sandbox and prepares
1509
+ * nothing in your provider account: the first sandbox that needs the standard image
1510
+ * prepares it, or run the standard image setup to prepare it now.
1511
+ *
1512
+ * If the key matches one you already connected (same provider, settings and last four
1513
+ * characters), the account is still connected and the response carries a
1514
+ * `duplicate_credential` warning naming the other account. Connecting or testing an account
1515
+ * whose provider is not enabled for you fails with `409 provider_not_enabled`.
1516
+ *
1517
+ * Provider connection settings, such as a custom URL or proxy, and credentials that run your
1518
+ * code need extra authority on the key. Submitting a URL or proxy does not by itself give
1519
+ * BoxRouter network access to that host. For credentials that run your code, send the ID of an
1520
+ * artifact you uploaded; an unknown or expired artifact fails with `404`. The response
1521
+ * returns account metadata only, never the code, configuration or tokens. Sending the same
1522
+ * request again reuses the recorded outcome, and a request still waiting on the provider
1523
+ * fails with `409` instead of running your code a second time.
1524
+ *
1525
+ * If the provider later answers with `401` or `403`, the account's status becomes
1526
+ * `credentials_rejected`; the status carries a safe cause and the action that restores access.
1527
+ *
1528
+ */
1529
+ connect<ThrowOnError extends boolean = true>(options: Options<ProviderAccountsConnectData, ThrowOnError>): RequestResult<ProviderAccountsConnectResponses, ProviderAccountsConnectErrors, ThrowOnError, 'data'>;
1530
+ /**
1531
+ * Test provider credentials without saving them
1532
+ *
1533
+ * Checks credentials without saving them. Needs the `provider-accounts:manage` permission on
1534
+ * the API key; a signed-in dashboard session also works. BoxRouter makes the same read-only
1535
+ * request to the provider as when it tests a saved account, using the credentials in the body.
1536
+ * Nothing is stored and no account is created or changed, so no idempotency key is needed.
1537
+ *
1538
+ * Credentials that run your code are not accepted here. Connection settings, such as a custom
1539
+ * URL, are accepted and choose where the request goes; they need extra authority on the key,
1540
+ * and submitting a URL or proxy does not by itself give BoxRouter network access to that host.
1541
+ * The response returns the provider's own status and body, up to 4096 characters, without
1542
+ * adding a validation message.
1543
+ *
1544
+ * Fails with `409 provider_not_enabled` when this provider is not enabled for you.
1545
+ *
1546
+ */
1547
+ testCredentials<ThrowOnError extends boolean = true>(options: Options<ProviderAccountsTestCredentialsData, ThrowOnError>): RequestResult<ProviderAccountsTestCredentialsResponses, ProviderAccountsTestCredentialsErrors, ThrowOnError, 'data'>;
1548
+ /**
1549
+ * Remove a connected account
1550
+ *
1551
+ * Requires `provider-accounts:manage` on API keys; dashboard browser sessions are also
1552
+ * authorized. Reject with 409 while owned
1553
+ * resources, pending mutations or unresolved cleanup still depend on this
1554
+ * credential. Never orphan sandboxes silently or transfer them to managed
1555
+ * billing. Removes the stored secret; does not revoke the upstream token.
1556
+ * For callable credentials, close all unreferenced factory workers and remove
1557
+ * their retained code/configuration and acquired secrets. Pending acquisitions
1558
+ * and retained credential-version dependencies also prevent disconnection.
1559
+ *
1560
+ * Removal waits for work already running on the account (standard-image setup,
1561
+ * Actions runner-image checks), which can take minutes. With `wait=false` the
1562
+ * request returns 202 at once with the account and `disconnect.state:
1563
+ * disconnecting`, and finishes in the background: read the account until it
1564
+ * returns 404 (removed) or `disconnect.state: failed`, whose `error` is the
1565
+ * refusal this request would otherwise have returned, with the account still
1566
+ * connected. Repeating the request while a removal runs returns the same 202 and
1567
+ * starts nothing new.
1568
+ *
1569
+ */
1570
+ disconnect<ThrowOnError extends boolean = true>(options: Options<ProviderAccountsDisconnectData, ThrowOnError>): RequestResult<ProviderAccountsDisconnectResponses, ProviderAccountsDisconnectErrors, ThrowOnError, 'data'>;
1571
+ /**
1572
+ * Get connected-account metadata
1573
+ *
1574
+ * Requires `provider-accounts:manage` on API keys; dashboard browser sessions are also
1575
+ * authorized. The account must be visible within the caller's workspace. Never reveals
1576
+ * key material.
1577
+ *
1578
+ */
1579
+ get<ThrowOnError extends boolean = true>(options: Options<ProviderAccountsGetData, ThrowOnError>): RequestResult<ProviderAccountsGetResponses, ProviderAccountsGetErrors, ThrowOnError, 'data'>;
1580
+ /**
1581
+ * Rotate a connected account's credentials
1582
+ *
1583
+ * Replaces a connected account's credentials, for example to rotate a key. Needs the
1584
+ * `provider-accounts:manage` permission on the API key (a signed-in dashboard session also
1585
+ * works) and the account's current `expected_version`.
1586
+ *
1587
+ * The new credentials must belong to the same provider. BoxRouter makes one read-only request
1588
+ * to the provider and refuses a clear rejection with `422 credentials_rejected`; it does not
1589
+ * check which account the key belongs to. Requests already running keep the old credentials,
1590
+ * and requests that start afterward use the new ones. A provider that is not enabled for you
1591
+ * fails with `409 provider_not_enabled`.
1592
+ *
1593
+ * Leave out the connection settings to keep the existing ones. Settings you send must match the
1594
+ * existing route; changing the endpoint, proxy or header identity needs a new connected
1595
+ * account, not a key rotation. Credentials that run your code need extra authority on the key
1596
+ * and an artifact you uploaded. If the new credentials fail to activate, the old version stays
1597
+ * in use. A token refresh that already happened with the provider is not undone.
1598
+ *
1599
+ */
1600
+ replaceCredentials<ThrowOnError extends boolean = true>(options: Options<ProviderAccountsReplaceCredentialsData, ThrowOnError>): RequestResult<ProviderAccountsReplaceCredentialsResponses, ProviderAccountsReplaceCredentialsErrors, ThrowOnError, 'data'>;
1601
+ /**
1602
+ * Test a saved provider account
1603
+ *
1604
+ * Requires `provider-accounts:manage` on API keys; dashboard browser sessions are also
1605
+ * authorized. The credential check makes one read-only provider request using the saved
1606
+ * credentials and returns the provider's native status and body, limited to 4096 characters.
1607
+ * A successful test can update account health and register provider event webhooks. It
1608
+ * starts no sandbox and prepares no image; run the standard image setup to prepare the
1609
+ * standard image before the first sandbox needs it. The response reports the credential
1610
+ * check.
1611
+ * Fails with `409 provider_not_enabled` when this provider is not enabled for you.
1612
+ *
1613
+ */
1614
+ test<ThrowOnError extends boolean = true>(options: Options<ProviderAccountsTestData, ThrowOnError>): RequestResult<ProviderAccountsTestResponses, ProviderAccountsTestErrors, ThrowOnError, 'data'>;
1615
+ /**
1616
+ * Run the standard image setup proof
1617
+ *
1618
+ * Requires `provider-accounts:manage` on API keys; dashboard browser sessions are also
1619
+ * authorized. This explicit action first tests the saved key, then boots the provider's
1620
+ * standard image, runs a bounded command, and destroys the proof sandbox. The provider
1621
+ * may charge for that short sandbox. Readiness is recorded only after boot, command and
1622
+ * cleanup succeed; failure returns the unavailable state and its setup fix. Requests are
1623
+ * idempotent and must include an idempotency key.
1624
+ *
1625
+ */
1626
+ setupStandardImage<ThrowOnError extends boolean = true>(options: Options<ProviderAccountsSetupStandardImageData, ThrowOnError>): RequestResult<ProviderAccountsSetupStandardImageResponses, ProviderAccountsSetupStandardImageErrors, ThrowOnError, 'data'>;
1627
+ }
1628
+ export declare class Volumes extends HeyApiClient {
1629
+ /**
1630
+ * List volumes
1631
+ *
1632
+ * 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.
1633
+ */
1634
+ list<ThrowOnError extends boolean = true>(options?: Options<VolumesListData, ThrowOnError>): RequestResult<VolumesListResponses, VolumesListErrors, ThrowOnError, 'data'>;
1635
+ /**
1636
+ * Create a volume
1637
+ *
1638
+ * 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.
1639
+ */
1640
+ create<ThrowOnError extends boolean = true>(options: Options<VolumesCreateData, ThrowOnError>): RequestResult<VolumesCreateResponses, VolumesCreateErrors, ThrowOnError, 'data'>;
1641
+ /**
1642
+ * Delete a volume and its checkpoints
1643
+ *
1644
+ * 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.
1645
+ */
1646
+ delete<ThrowOnError extends boolean = true>(options: Options<VolumesDeleteData, ThrowOnError>): RequestResult<VolumesDeleteResponses, VolumesDeleteErrors, ThrowOnError, 'data'>;
1647
+ /**
1648
+ * Get a volume
1649
+ *
1650
+ * Returns metadata for a BoxRouter-managed volume in the caller's workspace.
1651
+ */
1652
+ get<ThrowOnError extends boolean = true>(options: Options<VolumesGetData, ThrowOnError>): RequestResult<VolumesGetResponses, VolumesGetErrors, ThrowOnError, 'data'>;
1653
+ /**
1654
+ * List volume checkpoints
1655
+ *
1656
+ * Lists committed checkpoints for this volume, newest first. A checkpoint created by an in-progress save is not listed until the save commits.
1657
+ */
1658
+ listCheckpoints<ThrowOnError extends boolean = true>(options: Options<VolumesListCheckpointsData, ThrowOnError>): RequestResult<VolumesListCheckpointsResponses, VolumesListCheckpointsErrors, ThrowOnError, 'data'>;
1659
+ /**
1660
+ * Save a volume checkpoint
1661
+ *
1662
+ * 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.
1663
+ */
1664
+ save<ThrowOnError extends boolean = true>(options: Options<VolumesSaveData, ThrowOnError>): RequestResult<VolumesSaveResponses, VolumesSaveErrors, ThrowOnError, 'data'>;
1665
+ /**
1666
+ * Delete a checkpoint
1667
+ *
1668
+ * Removes the checkpoint reference. Backend data is reclaimed when the volume is erased.
1669
+ */
1670
+ deleteCheckpoint<ThrowOnError extends boolean = true>(options: Options<VolumesDeleteCheckpointData, ThrowOnError>): RequestResult<VolumesDeleteCheckpointResponses, VolumesDeleteCheckpointErrors, ThrowOnError, 'data'>;
1671
+ /**
1672
+ * Get a volume checkpoint
1673
+ *
1674
+ * Returns an immutable committed checkpoint by its volume ID and checkpoint number.
1675
+ */
1676
+ getCheckpoint<ThrowOnError extends boolean = true>(options: Options<VolumesGetCheckpointData, ThrowOnError>): RequestResult<VolumesGetCheckpointResponses, VolumesGetCheckpointErrors, ThrowOnError, 'data'>;
1677
+ /**
1678
+ * Release a volume's writer lease
1679
+ *
1680
+ * 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.
1681
+ */
1682
+ release<ThrowOnError extends boolean = true>(options: Options<VolumesReleaseData, ThrowOnError>): RequestResult<VolumesReleaseResponses, VolumesReleaseErrors, ThrowOnError, 'data'>;
1683
+ /**
1684
+ * Create a volume file upload
1685
+ *
1686
+ * Creates a multipart upload for a file that will appear at
1687
+ * `/workspace/<path>` in sandboxes. Upload every returned part URL with an
1688
+ * HTTP PUT containing exactly that part's bytes; save the response `ETag`
1689
+ * header for the completion request. Part URLs expire after six hours.
1690
+ * An open upload blocks `write` sandboxes, and a live or pending `write`
1691
+ * attachment blocks uploads (`volume_busy`). `read` and `shared` attachments
1692
+ * may coexist, but their sandboxes may need to refresh their volume cache to
1693
+ * see the new file.
1694
+ *
1695
+ */
1696
+ createUpload<ThrowOnError extends boolean = true>(options: Options<VolumesCreateUploadData, ThrowOnError>): RequestResult<VolumesCreateUploadResponses, VolumesCreateUploadErrors, ThrowOnError, 'data'>;
1697
+ /**
1698
+ * Complete a volume file upload
1699
+ *
1700
+ * Supply each part number exactly once with the `ETag` header returned by its PUT response.
1701
+ */
1702
+ completeUpload<ThrowOnError extends boolean = true>(options: Options<VolumesCompleteUploadData, ThrowOnError>): RequestResult<VolumesCompleteUploadResponses, VolumesCompleteUploadErrors, ThrowOnError, 'data'>;
1703
+ /**
1704
+ * Abort a volume file upload
1705
+ *
1706
+ * Aborts an open multipart upload for this volume. Repeating an abort is safe; the uploaded file is not made visible in the volume.
1707
+ */
1708
+ abortUpload<ThrowOnError extends boolean = true>(options: Options<VolumesAbortUploadData, ThrowOnError>): RequestResult<VolumesAbortUploadResponses, VolumesAbortUploadErrors, ThrowOnError, 'data'>;
1709
+ /**
1710
+ * Create a volume file download
1711
+ *
1712
+ * Creates a temporary download link that expires after one hour.
1713
+ */
1714
+ createDownload<ThrowOnError extends boolean = true>(options: Options<VolumesCreateDownloadData, ThrowOnError>): RequestResult<VolumesCreateDownloadResponses, VolumesCreateDownloadErrors, ThrowOnError, 'data'>;
1715
+ /**
1716
+ * List files in a volume
1717
+ *
1718
+ * 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.
1719
+ */
1720
+ listFiles<ThrowOnError extends boolean = true>(options: Options<VolumesListFilesData, ThrowOnError>): RequestResult<VolumesListFilesResponses, VolumesListFilesErrors, ThrowOnError, 'data'>;
1721
+ }
1722
+ export declare class Commands extends HeyApiClient {
1723
+ /**
1724
+ * Run a buffered command
1725
+ *
1726
+ * **Commands**
1727
+ *
1728
+ * You can rely on:
1729
+ * - Runs in a login Bash, so PATH changes that installers write to ~/.profile apply to later commands.
1730
+ * - Returns the exit status.
1731
+ * - Returns stdout and stderr separately.
1732
+ * - Returns exact bytes in byte mode.
1733
+ * - The timeout ends the command.
1734
+ * - On a timeout the command's process group receives TERM at the deadline and KILL 5 seconds later, in both output modes.
1735
+ * - Returned output is captured after the shell exits, and later writes by background children cannot change it.
1736
+ * - An uncertain outcome is never replayed.
1737
+ * - Output over the limit returns the exit status and the first output_limit_bytes of each stream, marked truncated. Default and maximum: 512 KiB per stream. Processes stream complete large output.
1738
+ *
1739
+ * You can set: command, cwd, env, timeout_seconds, output (text or bytes), output_limit_bytes.
1740
+ *
1741
+ * Not promised: guest disk used by output above the limit; ending children that leave the command's process group (for example setsid daemons).
1742
+ *
1743
+ * **Command stdin**
1744
+ *
1745
+ * You can rely on:
1746
+ * - A command takes no input: it starts with stdin at end-of-file, and login profiles, the command and its children all read empty input.
1747
+ *
1748
+ * You can set: nothing (use process input for interactive input).
1749
+ *
1750
+ * Output over output_limit_bytes is not an error: the result sets stdout_truncated or
1751
+ * stderr_truncated. A nonzero exit is a completed workload result, not an HTTP failure.
1752
+ * A command that reaches timeout_seconds is a result too: the process group is ended and
1753
+ * the answer is 200 with timed_out true, exit_code null and the output written so far.
1754
+ * 504 timeout is left for the case where BoxRouter lost sight of the command and cannot
1755
+ * say whether it ran. A disconnected HTTP client is not promised to end the command; the
1756
+ * timeout ends it. Use process streaming for output without a bound.
1757
+ * Generated clients take an opt-in check argument and raise CommandFailed (the operation's
1758
+ * x-boxrouter-result-check) when exit_code is not 0 or timed_out is true.
1759
+ *
1760
+ */
1761
+ run<ThrowOnError extends boolean = true>(options: Options<CommandsRunData, ThrowOnError>): RequestResult<CommandsRunResponses, CommandsRunErrors, ThrowOnError, 'data'>;
1762
+ }
1763
+ export declare class Files extends HeyApiClient {
1764
+ /**
1765
+ * Read exact file bytes
1766
+ *
1767
+ * You can rely on:
1768
+ * - Returns complete bytes, or resource_limit with no prefix returned.
1769
+ * - Reading a directory or another path that is not a regular file fails and returns no data.
1770
+ * - An absent path is not_found, outcome failed: a read has no effect, so its outcome is never unknown.
1771
+ *
1772
+ * You can set: path.
1773
+ *
1774
+ * Not promised: consistency while another writer changes the file.
1775
+ *
1776
+ * The limit is the advertised limits.file_transfer_bytes. Bytes are not text-decoded.
1777
+ * Closing the transfer does not destroy the sandbox. A stream that ends before
1778
+ * Content-Length is an incomplete transfer, not a successful file read.
1779
+ *
1780
+ */
1781
+ read<ThrowOnError extends boolean = true>(options: Options<FilesReadData, ThrowOnError>): RequestResult<FilesReadResponses, FilesReadErrors, ThrowOnError, 'data'>;
1782
+ /**
1783
+ * Read exact file bytes
1784
+ *
1785
+ * You can rely on:
1786
+ * - Returns complete bytes, or resource_limit with no prefix returned.
1787
+ * - Reading a directory or another path that is not a regular file fails and returns no data.
1788
+ * - An absent path is not_found, outcome failed: a read has no effect, so its outcome is never unknown.
1789
+ *
1790
+ * You can set: path.
1791
+ *
1792
+ * Not promised: consistency while another writer changes the file.
1793
+ *
1794
+ * The limit is the advertised limits.file_transfer_bytes. Bytes are not text-decoded.
1795
+ * Closing the transfer does not destroy the sandbox. A stream that ends before
1796
+ * Content-Length is an incomplete transfer, not a successful file read.
1797
+ *
1798
+ */
1799
+ readStream<ThrowOnError extends boolean = true>(options: Omit<Options<FilesReadData, ThrowOnError>, "parseAs" | "responseStyle">): RequestResult<BinaryStreamResponses<FilesReadResponses>, FilesReadErrors, ThrowOnError, "fields">;
1800
+ /**
1801
+ * Write exact file bytes
1802
+ *
1803
+ * You can rely on:
1804
+ * - Writes exact bytes.
1805
+ * - Creates missing parents.
1806
+ * - A new file is readable and writable by the command user.
1807
+ * - The size limit is enforced.
1808
+ *
1809
+ * You can set: path, data.
1810
+ *
1811
+ * Not promised: owner, mode or executable bit; atomic replace; whether a symbolic link at the path is followed or replaced.
1812
+ *
1813
+ * The limit is the advertised limits.file_transfer_bytes. A failed transfer may leave
1814
+ * partial data; the error's outcome describes what is known. SDK text helpers must encode
1815
+ * text as UTF-8 before transfer.
1816
+ *
1817
+ */
1818
+ write<ThrowOnError extends boolean = true>(options: Options<FilesWriteData, ThrowOnError>): RequestResult<FilesWriteResponses, FilesWriteErrors, ThrowOnError, 'data'>;
1819
+ /**
1820
+ * Create a sandbox file upload
1821
+ *
1822
+ * You can rely on:
1823
+ * - A completed upload leaves exactly the declared bytes at the path; a body of another length is refused.
1824
+ *
1825
+ * You can set: path, size.
1826
+ *
1827
+ * Not promised: removing bytes already written when an upload is aborted.
1828
+ *
1829
+ * Starts an upload of a file of known size to an absolute path in a running sandbox. Send
1830
+ * every returned part as described by its `TransferPart`, then call `completeSandboxUpload`
1831
+ * with each part's response `ETag`, if any. BoxRouter chooses the `route`; it is
1832
+ * informational and clients must not branch on it. Upload links and the session last up to
1833
+ * six hours after creation; `expires_at` says when they end. Launch behaviour is always
1834
+ * exactly one part. Idempotency-Key is required on create, complete and abort; repeat an
1835
+ * uncertain call with the same key.
1836
+ *
1837
+ */
1838
+ createUpload<ThrowOnError extends boolean = true>(options: Options<FilesCreateUploadData, ThrowOnError>): RequestResult<FilesCreateUploadResponses, FilesCreateUploadErrors, ThrowOnError, 'data'>;
1839
+ /**
1840
+ * Complete a sandbox file upload
1841
+ *
1842
+ * You can rely on:
1843
+ * - A completed upload leaves exactly the declared bytes at the path; a body of another length is refused.
1844
+ *
1845
+ * You can set: path, size.
1846
+ *
1847
+ * Not promised: removing bytes already written when an upload is aborted.
1848
+ *
1849
+ * Supply each part number exactly once with the `ETag` header returned by its request, if
1850
+ * it returned one. Repeating the call with the same idempotency key returns the same result.
1851
+ *
1852
+ */
1853
+ completeUpload<ThrowOnError extends boolean = true>(options: Options<FilesCompleteUploadData, ThrowOnError>): RequestResult<FilesCompleteUploadResponses, FilesCompleteUploadErrors, ThrowOnError, 'data'>;
1854
+ /**
1855
+ * Abort a sandbox file upload
1856
+ *
1857
+ * You can rely on:
1858
+ * - A completed upload leaves exactly the declared bytes at the path; a body of another length is refused.
1859
+ *
1860
+ * You can set: path, size.
1861
+ *
1862
+ * Not promised: removing bytes already written when an upload is aborted.
1863
+ *
1864
+ * Idempotent.
1865
+ *
1866
+ */
1867
+ abortUpload<ThrowOnError extends boolean = true>(options: Options<FilesAbortUploadData, ThrowOnError>): RequestResult<FilesAbortUploadResponses, FilesAbortUploadErrors, ThrowOnError, 'data'>;
1868
+ /**
1869
+ * Create a sandbox file download
1870
+ *
1871
+ * You can rely on:
1872
+ * - A complete download returns exactly the file's bytes; a transfer that ends short fails instead of returning a prefix.
1873
+ *
1874
+ * You can set: path.
1875
+ *
1876
+ * Not promised: the file's size before the download starts.
1877
+ *
1878
+ * Creates a temporary download link for a file in a running sandbox. The link lasts up to
1879
+ * one hour after creation; `expires_at` says when it ends. `route` is informational and
1880
+ * clients must not branch on it.
1881
+ *
1882
+ */
1883
+ createDownload<ThrowOnError extends boolean = true>(options: Options<FilesCreateDownloadData, ThrowOnError>): RequestResult<FilesCreateDownloadResponses, FilesCreateDownloadErrors, ThrowOnError, 'data'>;
1884
+ /**
1885
+ * List the immediate entries of a directory
1886
+ *
1887
+ * You can rely on:
1888
+ * - Returns every immediate entry, including hidden ones and broken symbolic links, sorted by name.
1889
+ * - Each entry has its type (file, directory, symlink, other); a link is not followed.
1890
+ * - More entries than the advertised limit fail; the list is never truncated.
1891
+ *
1892
+ * You can set: path.
1893
+ *
1894
+ * Not promised: metadata beyond the type; a consistent snapshot while the directory changes.
1895
+ *
1896
+ * An unreadable or missing directory fails; it does not appear empty. No recursion.
1897
+ *
1898
+ */
1899
+ list<ThrowOnError extends boolean = true>(options: Options<FilesListData, ThrowOnError>): RequestResult<FilesListResponses, FilesListErrors, ThrowOnError, 'data'>;
1900
+ /**
1901
+ * Create a directory
1902
+ *
1903
+ * You can rely on:
1904
+ * - parents=true (the default) creates missing parents and accepts an existing directory.
1905
+ * - parents=false requires the parent and refuses an existing path.
1906
+ *
1907
+ * You can set: path, parents.
1908
+ *
1909
+ * Not promised: mode and owner beyond command-user usability.
1910
+ *
1911
+ * A failure may leave some parent directories created. An uncertain mutation is never automatically replayed.
1912
+ *
1913
+ */
1914
+ mkdir<ThrowOnError extends boolean = true>(options: Options<FilesMkdirData, ThrowOnError>): RequestResult<FilesMkdirResponses, FilesMkdirErrors, ThrowOnError, 'data'>;
1915
+ /**
1916
+ * Check for an accessible filesystem target
1917
+ *
1918
+ * You can rely on:
1919
+ * - Follows symbolic links. True when the target exists; false when it is missing, the link is broken, or the target is not accessible.
1920
+ * - A failure to check raises an error; it never reads as false.
1921
+ *
1922
+ * You can set: path.
1923
+ *
1924
+ * Not promised: whether the answer still holds after the call.
1925
+ *
1926
+ * Transport and command-startup failures remain errors. This read does not reserve the path or guarantee it remains present.
1927
+ *
1928
+ */
1929
+ exists<ThrowOnError extends boolean = true>(options: Options<FilesExistsData, ThrowOnError>): RequestResult<FilesExistsResponses, FilesExistsErrors, ThrowOnError, 'data'>;
1930
+ /**
1931
+ * Remove a file, symbolic link or directory
1932
+ *
1933
+ * You can rely on:
1934
+ * - Removes only the named entry.
1935
+ * - A nonempty directory needs recursive.
1936
+ * - A symbolic link, broken or not, is unlinked and its target kept.
1937
+ * - A missing path fails.
1938
+ * - The sandbox root is refused.
1939
+ *
1940
+ * You can set: path, recursive.
1941
+ *
1942
+ * Not promised: atomicity; partial progress after a failure.
1943
+ *
1944
+ * A final slash does not change which entry is removed. Failures may leave partial changes. An uncertain mutation is never automatically replayed.
1945
+ *
1946
+ */
1947
+ remove<ThrowOnError extends boolean = true>(options: Options<FilesRemoveData, ThrowOnError>): RequestResult<FilesRemoveResponses, FilesRemoveErrors, ThrowOnError, 'data'>;
1948
+ }
1949
+ export declare class Pricing extends HeyApiClient {
1950
+ /**
1951
+ * List the providers' live price versions
1952
+ *
1953
+ * Public: needs no key or session. Lists every live price version, which is what
1954
+ * BoxRouter used to calculate sandbox costs, so a published cost can be
1955
+ * rechecked without BoxRouter's database. Live versions never change. With `at`, returns
1956
+ * only the version in effect at that time, one per provider; a provider with no version
1957
+ * in effect then is left out. Effective periods include `effective_from` and exclude
1958
+ * `effective_to` (`[effective_from, effective_to)`); the version taking over at a boundary
1959
+ * applies at that instant.
1960
+ *
1961
+ */
1962
+ versions<ThrowOnError extends boolean = true>(options?: Options<PricingVersionsData, ThrowOnError>): RequestResult<PricingVersionsResponses, PricingVersionsErrors, ThrowOnError, 'data'>;
1963
+ }
1964
+ export declare class Providers extends HeyApiClient {
1965
+ /**
1966
+ * List available provider routes
1967
+ *
1968
+ * Returns only supply visible to the caller, including account-specific
1969
+ * entitlements and limits. This is a point-in-time eligibility view, not a
1970
+ * capacity reservation. Unknown or unverified capability guarantees are not
1971
+ * advertised as supported. Server-side eligibility is rechecked at creation.
1972
+ *
1973
+ */
1974
+ list<ThrowOnError extends boolean = true>(options?: Options<ProvidersListData, ThrowOnError>): RequestResult<ProvidersListResponses, ProvidersListErrors, ThrowOnError, 'data'>;
1975
+ }
1976
+ export declare class BoxRouterApi extends HeyApiClient {
1977
+ static readonly __registry: HeyApiRegistry<BoxRouterApi>;
1978
+ constructor(args?: {
1979
+ client?: Client;
1980
+ key?: string;
1981
+ });
1982
+ private _agents?;
1983
+ get agents(): Agents;
1984
+ private _launches?;
1985
+ get launches(): Launches;
1986
+ private _launchRuns?;
1987
+ get launchRuns(): LaunchRuns;
1988
+ private _github?;
1989
+ get github(): Github;
1990
+ private _actions?;
1991
+ get actions(): Actions;
1992
+ private _routing?;
1993
+ get routing(): Routing;
1994
+ private _operations?;
1995
+ get operations(): Operations;
1996
+ private _artifacts?;
1997
+ get artifacts(): Artifacts;
1998
+ private _images?;
1999
+ get images(): Images;
2000
+ private _processes?;
2001
+ get processes(): Processes;
2002
+ private _credits?;
2003
+ get credits(): Credits;
2004
+ private _spendLimits?;
2005
+ get spendLimits(): SpendLimits;
2006
+ private _usage?;
2007
+ get usage(): Usage;
2008
+ private _terminals?;
2009
+ get terminals(): Terminals;
2010
+ private _secrets?;
2011
+ get secrets(): Secrets;
2012
+ private _previews?;
2013
+ get previews(): Previews;
2014
+ private _sandboxes?;
2015
+ get sandboxes(): Sandboxes;
2016
+ private _providerAccounts?;
2017
+ get providerAccounts(): ProviderAccounts;
2018
+ private _volumes?;
2019
+ get volumes(): Volumes;
2020
+ private _commands?;
2021
+ get commands(): Commands;
2022
+ private _files?;
2023
+ get files(): Files;
2024
+ private _pricing?;
2025
+ get pricing(): Pricing;
2026
+ private _providers?;
2027
+ get providers(): Providers;
2028
+ }
2029
+ export {};