@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,421 @@
1
+ "use strict";
2
+ /** Safe, opt-in Server-Timing measurements for a BoxRouter fetch hook. */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.withClientTiming = withClientTiming;
5
+ exports.connectionSegmentRecorder = connectionSegmentRecorder;
6
+ exports.connectionSegmentStart = connectionSegmentStart;
7
+ exports.parseServerTiming = parseServerTiming;
8
+ exports.usesClientOwnedFetch = usesClientOwnedFetch;
9
+ exports.usesClientTimingFetch = usesClientTimingFetch;
10
+ exports.useClientOwnedFetch = useClientOwnedFetch;
11
+ exports.createServerTimingFetch = createServerTimingFetch;
12
+ const server_timing_gen_1 = require("./server-timing.gen");
13
+ const durationPattern = /^[0-9]+(?:\.[0-9]+)?$/;
14
+ const signedPattern = /^[+-]?[0-9]+(?:\.[0-9]+)?$/;
15
+ const integerPattern = /^[0-9]+$/;
16
+ const operationName = new RegExp(server_timing_gen_1.timingContract[server_timing_gen_1.timingContract.operationGrammar.namePattern]);
17
+ const aggregateMetrics = new Set(server_timing_gen_1.aggregateBindings.map(binding => binding.metric));
18
+ let textEncoder;
19
+ let timingRuntimePromise;
20
+ let timingRuntime;
21
+ const requestStates = new WeakMap();
22
+ function nodeRuntime() {
23
+ return typeof globalThis.process?.versions?.node === 'string';
24
+ }
25
+ function record(state, field, value) {
26
+ if (state && state.values[field] === null)
27
+ state.values[field] = value;
28
+ }
29
+ function publish(state) {
30
+ if (state.published || !state.callEnded || !state.fetchEnded || !state.callback || !state.serverTiming ||
31
+ state.clientMs === undefined)
32
+ return;
33
+ state.published = true;
34
+ const metrics = Object.fromEntries(server_timing_gen_1.aggregateBindings.map(({ metric, field }) => [field, state.serverTiming.aggregates[metric].durationMs]));
35
+ try {
36
+ state.callback({ clientMs: state.clientMs,
37
+ networkMs: metrics.cloudMs === null ? null : Math.round(Math.max(0, state.clientMs - metrics.cloudMs) * 1000) / 1000,
38
+ ...metrics, ...state.values, serverTiming: state.serverTiming });
39
+ }
40
+ catch { /* An observability callback must not change the request result. */ }
41
+ }
42
+ function currentState() {
43
+ return timingRuntime?.storage.getStore();
44
+ }
45
+ async function ensureTimingRuntime() {
46
+ if (!nodeRuntime())
47
+ return undefined;
48
+ if (!timingRuntimePromise)
49
+ timingRuntimePromise = Promise.all([
50
+ import('node:async_hooks'), import('node:diagnostics_channel'),
51
+ ]).then(([asyncHooks, diagnostics]) => {
52
+ const runtime = {
53
+ AsyncLocalStorage: asyncHooks.AsyncLocalStorage,
54
+ channel: diagnostics.channel,
55
+ };
56
+ const storage = new runtime.AsyncLocalStorage();
57
+ const current = () => storage.getStore();
58
+ runtime.channel('undici:client:connected').subscribe(message => {
59
+ const socket = message?.socket;
60
+ if (socket)
61
+ connectedSockets.add(socket);
62
+ });
63
+ runtime.channel('undici:client:sendHeaders').subscribe(message => {
64
+ const state = current();
65
+ const ended = timingClock();
66
+ if (!state || ended === null)
67
+ return;
68
+ const request = message?.request;
69
+ if (request)
70
+ requestStates.set(request, state);
71
+ const socket = message?.socket;
72
+ if (socket) {
73
+ record(state, 'connectionReused', !connectedSockets.has(socket));
74
+ connectedSockets.delete(socket);
75
+ }
76
+ state.requestSentStarted = ended;
77
+ });
78
+ runtime.channel('undici:request:bodySent').subscribe(message => {
79
+ const request = message?.request;
80
+ const state = (request && requestStates.get(request)) ?? current();
81
+ const ended = timingClock();
82
+ if (state && ended !== null && state.requestSentStarted !== undefined) {
83
+ record(state, 'requestSentMs', ended - state.requestSentStarted);
84
+ state.firstByteAt = ended;
85
+ }
86
+ });
87
+ runtime.channel('undici:request:headers').subscribe(message => {
88
+ const request = message?.request;
89
+ const state = (request && requestStates.get(request)) ?? current();
90
+ const ended = timingClock();
91
+ if (state && ended !== null && state.firstByteAt !== undefined) {
92
+ record(state, 'firstByteMs', ended - state.firstByteAt);
93
+ state.bodyReadEnded = ended;
94
+ }
95
+ });
96
+ runtime.channel('undici:request:trailers').subscribe(message => {
97
+ const request = message?.request;
98
+ const state = (request && requestStates.get(request)) ?? current();
99
+ const ended = timingClock();
100
+ if (state && ended !== null && state.bodyReadEnded !== undefined) {
101
+ record(state, 'bodyReadMs', ended - state.bodyReadEnded);
102
+ state.bodyReadEnded = ended;
103
+ }
104
+ });
105
+ timingRuntime = { storage, runtime };
106
+ return timingRuntime;
107
+ }).catch(() => undefined);
108
+ return timingRuntimePromise;
109
+ }
110
+ /** Carry opt-in timing across the generated API call, fetch and response validation. */
111
+ async function withClientTiming(run, enabled) {
112
+ if (!enabled || !nodeRuntime())
113
+ return run();
114
+ const installed = await ensureTimingRuntime();
115
+ if (!installed)
116
+ return run();
117
+ const state = {
118
+ callStarted: timingClock() ?? 0,
119
+ values: Object.fromEntries(server_timing_gen_1.clientTimingBindings.map(({ field }) => [field, null])),
120
+ };
121
+ return installed.storage.run(state, async () => {
122
+ try {
123
+ return await run();
124
+ }
125
+ finally {
126
+ const ended = timingClock();
127
+ const decodeStarted = state.bodyReadEnded;
128
+ if (ended !== null && decodeStarted !== undefined && ended >= decodeStarted) {
129
+ record(state, 'sdkDecodeMs', ended - decodeStarted);
130
+ }
131
+ state.callEnded = true;
132
+ publish(state);
133
+ }
134
+ });
135
+ }
136
+ /** Mark TCP and TLS separately when the SDK's owned connector exposes both events. */
137
+ /** Capture the current operation before Undici invokes its asynchronous connector callbacks. */
138
+ function connectionSegmentRecorder(field) {
139
+ const state = currentState();
140
+ const recordCaptured = (started, ended) => {
141
+ if (state && Number.isFinite(started) && Number.isFinite(ended) && ended >= started) {
142
+ record(state, field, ended - started);
143
+ if (field === 'dnsMs')
144
+ state.dnsEndedAt = ended;
145
+ }
146
+ };
147
+ return Object.assign(recordCaptured, { dnsEndedAt: () => state?.dnsEndedAt });
148
+ }
149
+ /** Timestamp after DNS, used by the owned Undici connector to isolate TCP time. */
150
+ function connectionSegmentStart() {
151
+ return currentState()?.dnsEndedAt;
152
+ }
153
+ const connectedSockets = new WeakSet();
154
+ function splitQuoted(value, separator) {
155
+ const parts = [];
156
+ let start = 0;
157
+ let quoted = false;
158
+ let escaped = false;
159
+ for (let index = 0; index < value.length; index++) {
160
+ const character = value[index];
161
+ if (escaped) {
162
+ escaped = false;
163
+ }
164
+ else if (character === '\\' && quoted) {
165
+ escaped = true;
166
+ }
167
+ else if (character === '"') {
168
+ quoted = !quoted;
169
+ }
170
+ else if (character === separator && !quoted) {
171
+ parts.push(value.slice(start, index));
172
+ start = index + 1;
173
+ }
174
+ }
175
+ parts.push(value.slice(start));
176
+ return parts;
177
+ }
178
+ function text(value) {
179
+ if (value === undefined || !value.startsWith('"'))
180
+ return value;
181
+ if (!value.endsWith('"') || value.length < 2)
182
+ return undefined;
183
+ let decoded = '';
184
+ for (let index = 1; index < value.length - 1; index++) {
185
+ const character = value[index];
186
+ if (character === '\\') {
187
+ if (++index >= value.length - 1)
188
+ return undefined;
189
+ decoded += value[index];
190
+ }
191
+ else if (character === '"') {
192
+ return undefined;
193
+ }
194
+ else {
195
+ decoded += character;
196
+ }
197
+ }
198
+ return decoded;
199
+ }
200
+ function numberValue(value, signed = false, minimum = 0) {
201
+ if (value === undefined || !(signed ? signedPattern : durationPattern).test(value))
202
+ return null;
203
+ const parsed = Number(value);
204
+ return Number.isFinite(parsed) && (signed || parsed >= minimum) ? parsed : null;
205
+ }
206
+ /** Parse bounded, independent measurements without inferring complete coverage. */
207
+ function parseServerTiming(header) {
208
+ const aggregates = Object.fromEntries(server_timing_gen_1.aggregateBindings.map(({ metric }) => [metric, { durationMs: null, state: server_timing_gen_1.timingContract.aggregateGrammar.missingMeans }]));
209
+ const result = {
210
+ aggregates, operations: [], omissions: null,
211
+ operationCoverage: server_timing_gen_1.timingContract.coverageGrammar.absentState, parseLimited: false,
212
+ };
213
+ if (header === null)
214
+ return result;
215
+ if (header.length > server_timing_gen_1.timingContract.maxHeaderBytes ||
216
+ (textEncoder ??= new TextEncoder()).encode(header).length > server_timing_gen_1.timingContract.maxHeaderBytes) {
217
+ result.parseLimited = true;
218
+ return result;
219
+ }
220
+ for (const entry of splitQuoted(header, ',')) {
221
+ const [rawName, ...rawParameters] = splitQuoted(entry.trim(), ';');
222
+ const name = rawName.trim();
223
+ const parameters = new Map();
224
+ for (const parameter of rawParameters) {
225
+ const separator = parameter.indexOf('=');
226
+ const key = (separator < 0 ? parameter : parameter.slice(0, separator)).trim().toLowerCase();
227
+ if (!parameters.has(key)) {
228
+ parameters.set(key, separator < 0 ? undefined : parameter.slice(separator + 1).trim());
229
+ }
230
+ }
231
+ const first = (key) => text(parameters.get(key.toLowerCase()));
232
+ const duration = (key, minimum) => numberValue(first(key), false, minimum);
233
+ if (aggregateMetrics.has(name)) {
234
+ const grammar = server_timing_gen_1.timingContract.aggregateGrammar;
235
+ if (first(grammar.descriptionParameter) === grammar.unknownDescription) {
236
+ aggregates[name] = { durationMs: null, state: grammar.unknownDescription };
237
+ }
238
+ else {
239
+ const measured = duration(grammar.duration.parameter, grammar.duration.minimum);
240
+ if (measured !== null)
241
+ aggregates[name] = { durationMs: measured, state: 'measured' };
242
+ }
243
+ }
244
+ else if (name === server_timing_gen_1.timingContract.operationGrammar.metric) {
245
+ const grammar = server_timing_gen_1.timingContract.operationGrammar;
246
+ const label = first(grammar.nameParameter);
247
+ const start = numberValue(first(grammar.start.parameter), true);
248
+ const measured = duration(grammar.duration.parameter, grammar.duration.minimum);
249
+ const outcome = first(grammar.outcomeParameter);
250
+ if (label !== undefined && operationName.test(label) && start !== null && measured !== null &&
251
+ outcome !== undefined && grammar.outcomes.includes(outcome)) {
252
+ if (result.operations.length < server_timing_gen_1.timingContract.maxOperationRows) {
253
+ result.operations.push({ name: label, startMs: start, durationMs: measured, outcome: outcome });
254
+ }
255
+ else {
256
+ result.parseLimited = true;
257
+ }
258
+ }
259
+ }
260
+ else if (name === server_timing_gen_1.timingContract.omissionGrammar.metric) {
261
+ const grammar = server_timing_gen_1.timingContract.omissionGrammar;
262
+ const rawCount = first(grammar.count.parameter);
263
+ const measured = duration(grammar.duration.parameter, grammar.duration.minimum);
264
+ if (rawCount !== undefined && integerPattern.test(rawCount) && measured !== null) {
265
+ const exact = BigInt(rawCount);
266
+ if (exact >= BigInt(grammar.count.minimum)) {
267
+ result.omissions = {
268
+ count: exact <= BigInt(Number.MAX_SAFE_INTEGER) ? Number(exact) : exact.toString(),
269
+ durationMs: measured,
270
+ };
271
+ }
272
+ }
273
+ }
274
+ else if (name === server_timing_gen_1.timingContract.coverageGrammar.metric) {
275
+ const grammar = server_timing_gen_1.timingContract.coverageGrammar;
276
+ if (first(grammar.descriptionParameter) === grammar.unknownValue) {
277
+ result.operationCoverage = grammar.unknownValue;
278
+ }
279
+ }
280
+ }
281
+ return result;
282
+ }
283
+ function timingClock() {
284
+ try {
285
+ const value = performance.now();
286
+ return typeof value === 'number' && Number.isFinite(value) ? value : null;
287
+ }
288
+ catch {
289
+ return null;
290
+ }
291
+ }
292
+ function decorateResponse(response, source) {
293
+ Object.defineProperties(response, {
294
+ url: { configurable: true, value: source.url },
295
+ redirected: { configurable: true, value: source.redirected },
296
+ type: { configurable: true, value: source.type },
297
+ });
298
+ const clone = response.clone.bind(response);
299
+ Object.defineProperty(response, 'clone', {
300
+ configurable: true,
301
+ value: () => decorateResponse(clone(), source),
302
+ });
303
+ return response;
304
+ }
305
+ /**
306
+ * Wrap a fetch implementation to report bounded timing fields after each body is read.
307
+ * Pass the result as `BoxRouter({ fetch })`; the default client has no callback overhead.
308
+ */
309
+ const timingFetchConfigurations = new WeakMap();
310
+ function usesClientOwnedFetch(fetch) {
311
+ return fetch !== undefined && timingFetchConfigurations.get(fetch)?.usesDefaultFetch === true;
312
+ }
313
+ function usesClientTimingFetch(fetch) {
314
+ return fetch !== undefined && timingFetchConfigurations.has(fetch);
315
+ }
316
+ /** Use the BoxRouter-owned Node pool behind a timing hook created without a custom fetch. */
317
+ function useClientOwnedFetch(fetch, clientFetch) {
318
+ if (!fetch || !clientFetch)
319
+ return fetch;
320
+ const configuration = timingFetchConfigurations.get(fetch);
321
+ return configuration?.usesDefaultFetch ? createServerTimingFetch(configuration.callback, clientFetch) : fetch;
322
+ }
323
+ function createServerTimingFetch(onTiming, fetchImpl) {
324
+ const usesDefaultFetch = fetchImpl === undefined;
325
+ const timedFetch = async (input, init) => {
326
+ const installed = await ensureTimingRuntime();
327
+ const state = installed?.storage.getStore();
328
+ const started = timingClock();
329
+ if (state && started !== null) {
330
+ record(state, 'sdkBuildMs', Math.max(0, started - state.callStarted));
331
+ }
332
+ const response = await (fetchImpl ?? globalThis.fetch)(input, init);
333
+ if (started === null)
334
+ return response;
335
+ let serverTiming;
336
+ try {
337
+ serverTiming = parseServerTiming(response.headers.get('Server-Timing'));
338
+ }
339
+ catch {
340
+ // Optional parsing must preserve the native response, including its body.
341
+ return response;
342
+ }
343
+ let finished = false;
344
+ const finish = () => {
345
+ if (finished)
346
+ return;
347
+ finished = true;
348
+ const ended = timingClock();
349
+ if (ended === null)
350
+ return;
351
+ const elapsed = ended - started;
352
+ if (!Number.isFinite(elapsed) || elapsed < 0)
353
+ return;
354
+ const clientMs = Math.round(elapsed * 1000) / 1000;
355
+ if (!Number.isFinite(clientMs))
356
+ return;
357
+ if (state) {
358
+ state.clientMs = clientMs;
359
+ state.serverTiming = serverTiming;
360
+ state.callback = onTiming;
361
+ state.fetchEnded = true;
362
+ publish(state);
363
+ }
364
+ else {
365
+ const metrics = Object.fromEntries(server_timing_gen_1.aggregateBindings.map(({ metric, field }) => [field, serverTiming.aggregates[metric].durationMs]));
366
+ const clientFields = Object.fromEntries(server_timing_gen_1.clientTimingBindings.map(({ field }) => [field, null]));
367
+ const serviceMs = serverTiming.aggregates[server_timing_gen_1.timingContract.serviceAggregateMetric].durationMs;
368
+ try {
369
+ onTiming({ clientMs,
370
+ networkMs: serviceMs === null ? null : Math.round(Math.max(0, clientMs - serviceMs) * 1000) / 1000,
371
+ ...metrics, ...clientFields, serverTiming });
372
+ }
373
+ catch { /* An observability callback must not change the request result. */ }
374
+ }
375
+ };
376
+ const sourceBody = response.body;
377
+ if (sourceBody === null || response.status === 0 || [204, 205, 304].includes(response.status)) {
378
+ finish();
379
+ return response;
380
+ }
381
+ let reader;
382
+ const timedBody = new ReadableStream({
383
+ async pull(controller) {
384
+ reader ??= sourceBody.getReader();
385
+ try {
386
+ const result = await reader.read();
387
+ if (result.done) {
388
+ controller.close();
389
+ finish();
390
+ reader.releaseLock();
391
+ }
392
+ else {
393
+ controller.enqueue(result.value);
394
+ }
395
+ }
396
+ catch (error) {
397
+ controller.error(error);
398
+ finish();
399
+ reader.releaseLock();
400
+ }
401
+ },
402
+ async cancel(reason) {
403
+ reader ??= sourceBody.getReader();
404
+ try {
405
+ await reader.cancel(reason);
406
+ }
407
+ finally {
408
+ finish();
409
+ reader.releaseLock();
410
+ }
411
+ },
412
+ }, { highWaterMark: 0 });
413
+ return decorateResponse(new Response(timedBody, {
414
+ status: response.status,
415
+ statusText: response.statusText,
416
+ headers: response.headers,
417
+ }), response);
418
+ };
419
+ timingFetchConfigurations.set(timedFetch, { callback: onTiming, usesDefaultFetch });
420
+ return timedFetch;
421
+ }
@@ -0,0 +1,17 @@
1
+ import type { BoxRouterApi } from './sdk.gen';
2
+ import type { SpendLimit, SpendLimitList, SpendLimitRecord } from './types.gen';
3
+ import type { RequestOptions } from './sandboxes';
4
+ /**
5
+ * Cap what the workspace can spend on BoxRouter-billed sandboxes.
6
+ * `'workspace'` is the only scope.
7
+ */
8
+ export declare class SpendLimitResources {
9
+ private readonly spendLimits;
10
+ constructor(api: BoxRouterApi);
11
+ /** The workspace cap (`workspace` is `null` without one). */
12
+ list(options?: RequestOptions): Promise<SpendLimitList>;
13
+ /** Set a cap, replacing the scope's current one. `limit_period` is `'daily'`, `'monthly'` or `'total'`. */
14
+ set(scope: 'workspace', limit: SpendLimit, options?: RequestOptions): Promise<SpendLimitRecord>;
15
+ /** Remove the scope's cap. Clearing a scope with no cap succeeds. */
16
+ clear(scope: 'workspace', options?: RequestOptions): Promise<SpendLimitRecord>;
17
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SpendLimitResources = void 0;
4
+ /**
5
+ * Cap what the workspace can spend on BoxRouter-billed sandboxes.
6
+ * `'workspace'` is the only scope.
7
+ */
8
+ class SpendLimitResources {
9
+ spendLimits;
10
+ constructor(api) {
11
+ this.spendLimits = api.spendLimits;
12
+ }
13
+ /** The workspace cap (`workspace` is `null` without one). */
14
+ async list(options = {}) {
15
+ return this.spendLimits.list({ signal: options.signal });
16
+ }
17
+ /** Set a cap, replacing the scope's current one. `limit_period` is `'daily'`, `'monthly'` or `'total'`. */
18
+ async set(scope, limit, options = {}) {
19
+ return this.spendLimits.set({ path: { scope }, body: limit, signal: options.signal });
20
+ }
21
+ /** Remove the scope's cap. Clearing a scope with no cap succeeds. */
22
+ async clear(scope, options = {}) {
23
+ return this.spendLimits.clear({ path: { scope }, signal: options.signal });
24
+ }
25
+ }
26
+ exports.SpendLimitResources = SpendLimitResources;
@@ -0,0 +1,51 @@
1
+ import { type Context, type Span } from '@opentelemetry/api';
2
+ export declare function isTimeoutError(error: unknown): boolean;
3
+ export type RequestPhaseObservation = {
4
+ phase: 'request_preparation' | 'response_headers' | 'response_processing' | 'stream_lifetime';
5
+ outcome: 'success' | 'http_error' | 'network_error' | 'cancelled' | 'parse_error' | 'stream_error' | 'stream_cancelled' | 'unknown';
6
+ durationMs: number;
7
+ };
8
+ export type RequestPhaseObserver = (observation: RequestPhaseObservation) => void;
9
+ /** Opt in to bounded, payload-free request phase observations. */
10
+ export declare function setRequestPhaseObserver(observer?: RequestPhaseObserver): void;
11
+ /** The application owns providers, sampling, propagation and export. */
12
+ export declare class RequestTrace {
13
+ readonly span: Span;
14
+ readonly context: Context;
15
+ streaming: boolean;
16
+ private timingEnabled;
17
+ private requestPreparationStarted;
18
+ private requestPreparationDuration;
19
+ private requestPreparationMeasured;
20
+ private responseHeadersDuration;
21
+ private responseProcessingStarted;
22
+ private responseProcessingDuration;
23
+ private responseProcessingMeasured;
24
+ private phaseObserver;
25
+ private streamLifetimeStarted;
26
+ private requestPreparationOutcomeSent;
27
+ private responseProcessingOutcomeSent;
28
+ private responseHeadersOutcomeSent;
29
+ private responseHeadersSpanWritten;
30
+ private responseStatus;
31
+ private responseWasHttpError;
32
+ constructor(method: string | undefined, path: string | undefined, parent?: Context);
33
+ inject(headers: Headers): void;
34
+ fetchResponse<T extends Response>(fetchCallback: () => Promise<T>): Promise<T>;
35
+ finishBufferedResponse(): void;
36
+ recordResponseHeadersSpan(): void;
37
+ finishRequestPreparationOutcome(outcome: RequestPhaseObservation['outcome']): void;
38
+ finishResponseHeadersOutcome(outcome: RequestPhaseObservation['outcome']): void;
39
+ finishResponseOutcome(outcome: RequestPhaseObservation['outcome']): void;
40
+ startStreamLifetime(): void;
41
+ finishStreamLifetime(outcome: RequestPhaseObservation['outcome']): void;
42
+ finishResponseProcessing(): void;
43
+ finishObserverOutcome(outcome: RequestPhaseObservation['outcome']): void;
44
+ finishFailureOutcomes(error: unknown): void;
45
+ response(response: Response): void;
46
+ error(error: unknown): void;
47
+ responseOutcome(error: unknown): RequestPhaseObservation['outcome'];
48
+ successfulResponseOutcome(): RequestPhaseObservation['outcome'];
49
+ private setTiming;
50
+ }
51
+ export declare function tracedRequest<T>(method: string | undefined, path: string, run: (telemetry: RequestTrace) => Promise<T>): Promise<T>;
@@ -0,0 +1 @@
1
+ export declare const operationNames: Map<string, string>;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.operationNames = void 0;
4
+ // Canonical operation names, never substituted resource IDs or query values.
5
+ exports.operationNames = new Map([["GET /agents", "listAgents"], ["GET /agents/{name}", "getAgent"], ["POST /launches", "createLaunch"], ["GET /launches/{operation_id}", "getLaunchOperation"], ["GET /launches/{operation_id}/settings", "getLaunchSettings"], ["GET /launches/{operation_id}/command", "getLaunchCommand"], ["GET /launch-runs", "listLaunchRuns"], ["POST /launch-runs", "createLaunchRun"], ["GET /launch-runs/{run_id}", "getLaunchRun"], ["POST /launch-runs/{run_id}/stop", "stopLaunchRun"], ["POST /launch-runs/{run_id}/copies/{copy_index}/destroy", "destroyLaunchRunCopy"], ["GET /repositories/{owner}/{repo}/access", "checkRepositoryAccess"], ["GET /github/installations", "listGithubInstallations"], ["DELETE /github/installations/{installation_id}", "unlinkGithubInstallation"], ["GET /github/repositories", "listGithubRepositories"], ["GET /actions/repositories/{repository_id}", "getActionsRepository"], ["PUT /actions/repositories/{repository_id}", "updateActionsRepository"], ["GET /routing/settings", "getRoutingSettings"], ["PUT /routing/settings", "updateRoutingSettings"], ["GET /routing/preview", "getRoutingPreview"], ["GET /actions/readiness", "getActionsReadiness"], ["GET /actions/runner-catalog", "getActionsRunnerCatalog"], ["GET /actions/policies", "listActionsPolicies"], ["POST /actions/policies", "createActionsPolicy"], ["GET /actions/policies/{policy_id}", "getActionsPolicy"], ["PUT /actions/policies/{policy_id}", "updateActionsPolicy"], ["DELETE /actions/policies/{policy_id}", "deleteActionsPolicy"], ["POST /actions/preview", "previewActions"], ["GET /actions/runs", "listActionsRuns"], ["GET /actions/runs/facets", "listActionsRunFacets"], ["GET /actions/pool-idle-time", "getActionsPoolIdleTime"], ["GET /actions/runs/{run_id}", "getActionsRun"], ["GET /actions/runs/{run_id}/jobs", "listActionsRunJobs"], ["GET /actions/runs/{run_id}/placements", "listActionsRunPlacements"], ["GET /actions/jobs/{job_id}", "getActionsJob"], ["GET /actions/jobs/{job_id}/steps", "getActionsJobSteps"], ["GET /actions/jobs/{job_id}/logs", "getActionsJobLogs"], ["GET /actions/jobs/{job_id}/steps/{step_position}/logs", "getActionsJobStepLogs"], ["GET /actions/jobs/{job_id}/events", "getActionsJobEvents"], ["GET /actions/placements/{placement_id}", "getActionsPlacement"], ["POST /actions/runs/{run_id}/cancel", "cancelActionsRun"], ["POST /actions/runs/{run_id}/rerun", "rerunActionsRun"], ["POST /actions/runs/{run_id}/rerun-failed-jobs", "rerunActionsRunFailedJobs"], ["GET /operations", "listOperations"], ["POST /artifacts", "uploadArtifact"], ["GET /artifacts/{artifact_id}", "getArtifact"], ["DELETE /artifacts/{artifact_id}", "deleteArtifact"], ["POST /images/prepare", "prepareImage"], ["GET /images/preparations", "getImagePreparations"], ["POST /images/unprepare", "unprepareImage"], ["POST /sandboxes/{sandbox_id}/processes", "startProcess"], ["GET /sandboxes/{sandbox_id}/processes/{process_id}", "readProcess"], ["DELETE /sandboxes/{sandbox_id}/processes/{process_id}", "removeProcess"], ["POST /sandboxes/{sandbox_id}/processes/{process_id}/stdin", "writeProcessStdin"], ["POST /sandboxes/{sandbox_id}/processes/{process_id}/stdin/close", "closeProcessStdin"], ["POST /sandboxes/{sandbox_id}/processes/{process_id}/cancel", "cancelProcess"], ["GET /credits", "getCredits"], ["GET /spend-limits", "listSpendLimits"], ["PUT /spend-limits/{scope}", "setSpendLimit"], ["DELETE /spend-limits/{scope}", "clearSpendLimit"], ["POST /credits/purchases", "createCreditPurchase"], ["GET /credits/purchases", "listCreditPurchases"], ["POST /credits/purchases/quote", "quoteCreditPurchase"], ["GET /credits/usage", "listCreditUsage"], ["GET /usage", "listUsageReport"], ["GET /usage.csv", "exportUsageReportCsv"], ["GET /credits/purchases/{purchase_id}", "getCreditPurchase"], ["POST /credits/purchases/{purchase_id}/cancel", "cancelCreditPurchase"], ["POST /credits/promotions", "redeemCreditPromotion"], ["GET /credits/promotions", "listCreditPromotions"], ["GET /credits/billing-details", "getCreditBillingDetails"], ["PUT /credits/billing-details", "updateCreditBillingDetails"], ["GET /credits/alerts", "getCreditAlerts"], ["PUT /credits/alerts", "updateCreditAlerts"], ["GET /credits/payment-methods", "listCreditPaymentMethods"], ["POST /credits/payment-methods/setup", "createCreditPaymentMethodSetup"], ["POST /credits/payment-methods/setup-intent", "createCreditPaymentMethodSetupIntent"], ["PUT /credits/payment-methods/order", "reorderCreditPaymentMethods"], ["GET /credits/payment-method-setups/{setup_id}", "getCreditPaymentMethodSetup"], ["DELETE /credits/payment-methods/{payment_method_id}", "deleteCreditPaymentMethod"], ["POST /credits/payment-methods/{payment_method_id}/default", "setCreditDefaultPaymentMethod"], ["GET /credits/auto-top-up", "getCreditAutoTopUp"], ["PUT /credits/auto-top-up", "updateCreditAutoTopUp"], ["POST /sandboxes/{sandbox_id}/terminals", "openTerminal"], ["GET /sandboxes/{sandbox_id}/terminals/{terminal_id}", "getTerminal"], ["GET /sandboxes/{sandbox_id}/terminals/{terminal_id}/events", "streamTerminalEvents"], ["POST /sandboxes/{sandbox_id}/terminals/{terminal_id}/input", "writeTerminalInput"], ["POST /sandboxes/{sandbox_id}/terminals/{terminal_id}/resize", "resizeTerminal"], ["POST /sandboxes/{sandbox_id}/terminals/{terminal_id}/kill", "killTerminal"], ["GET /secrets", "listSecrets"], ["PUT /secrets/{name}", "putSecret"], ["DELETE /secrets/{name}", "deleteSecret"], ["GET /sandboxes/{sandbox_id}/previews", "listPreviews"], ["POST /sandboxes/{sandbox_id}/previews", "openPreview"], ["DELETE /sandboxes/{sandbox_id}/previews/{preview_id}", "revokePreview"], ["POST /sandboxes/{sandbox_id}/browser", "ensureBrowser"], ["POST /sandboxes/{sandbox_id}/pause", "pauseSandbox"], ["POST /sandboxes/{sandbox_id}/resume", "resumeSandbox"], ["POST /sandboxes/{sandbox_id}/lifetime", "extendSandboxLifetime"], ["POST /sandboxes/{sandbox_id}/network-policy", "updateNetworkPolicy"], ["POST /provider-accounts", "connectProviderAccount"], ["GET /provider-accounts", "listProviderAccounts"], ["POST /provider-accounts/test", "testProviderCredentials"], ["GET /provider-accounts/{account_id}", "getProviderAccount"], ["DELETE /provider-accounts/{account_id}", "disconnectProviderAccount"], ["PUT /provider-accounts/{account_id}/credentials", "replaceProviderCredentials"], ["POST /provider-accounts/{account_id}/test", "testProviderAccount"], ["POST /provider-accounts/{account_id}/standard-image/setup", "setupProviderStandardImage"], ["GET /operations/{operation_id}", "getOperation"], ["GET /volumes", "listVolumes"], ["POST /volumes", "createVolume"], ["GET /volumes/{volume_id}", "getVolume"], ["DELETE /volumes/{volume_id}", "deleteVolume"], ["GET /volumes/{volume_id}/checkpoints", "listVolumeCheckpoints"], ["POST /volumes/{volume_id}/checkpoints", "saveVolume"], ["GET /volumes/{volume_id}/checkpoints/{checkpoint}", "getVolumeCheckpoint"], ["DELETE /volumes/{volume_id}/checkpoints/{checkpoint}", "deleteVolumeCheckpoint"], ["DELETE /volumes/{volume_id}/lease", "releaseVolumeLease"], ["POST /volumes/{volume_id}/uploads", "createVolumeUpload"], ["POST /volumes/{volume_id}/uploads/{upload_id}/complete", "completeVolumeUpload"], ["DELETE /volumes/{volume_id}/uploads/{upload_id}", "abortVolumeUpload"], ["POST /volumes/{volume_id}/downloads", "createVolumeDownload"], ["GET /volumes/{volume_id}/files", "listVolumeFiles"], ["POST /sandboxes", "createSandbox"], ["GET /sandboxes", "listSandboxes"], ["POST /sandboxes/match", "matchSandbox"], ["GET /sandboxes/{sandbox_id}", "getSandbox"], ["DELETE /sandboxes/{sandbox_id}", "destroySandbox"], ["POST /sandboxes/{sandbox_id}/commands", "runCommand"], ["GET /sandboxes/{sandbox_id}/files/content", "readFile"], ["PUT /sandboxes/{sandbox_id}/files/content", "writeFile"], ["POST /sandboxes/{sandbox_id}/files/uploads", "createSandboxUpload"], ["POST /sandboxes/{sandbox_id}/files/uploads/{upload_id}/complete", "completeSandboxUpload"], ["DELETE /sandboxes/{sandbox_id}/files/uploads/{upload_id}", "abortSandboxUpload"], ["POST /sandboxes/{sandbox_id}/files/downloads", "createSandboxDownload"], ["GET /sandboxes/{sandbox_id}/files/directories", "listDirectory"], ["POST /sandboxes/{sandbox_id}/files/directories", "createDirectory"], ["GET /sandboxes/{sandbox_id}/files/exists", "pathExists"], ["POST /sandboxes/{sandbox_id}/files/remove", "removePath"], ["GET /price-versions", "listPriceVersions"], ["GET /providers", "listProviders"]]);