@boxrouter/sdk 0.0.1-alpha.0 → 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.
- package/NOTICE +29 -5
- package/README.md +497 -24
- package/dist/addresses.d.ts +5 -0
- package/dist/addresses.js +10 -0
- package/dist/api-error.d.ts +62 -0
- package/dist/api-error.js +264 -0
- package/dist/boxrouter.d.ts +68 -0
- package/dist/boxrouter.js +291 -0
- package/dist/browser-session/index.d.ts +17 -0
- package/dist/browser-session/index.js +48 -0
- package/dist/browser-session/operations.gen.d.ts +272 -0
- package/dist/browser-session/operations.gen.js +58 -0
- package/dist/browser-session/responseContracts/api_keys.d.ts +2 -0
- package/dist/browser-session/responseContracts/api_keys.js +10 -0
- package/dist/browser-session/responseContracts/credits.d.ts +2 -0
- package/dist/browser-session/responseContracts/credits.js +8 -0
- package/dist/browser-session/responseContracts/github.d.ts +2 -0
- package/dist/browser-session/responseContracts/github.js +11 -0
- package/dist/browser-session/responseContracts/identity.d.ts +2 -0
- package/dist/browser-session/responseContracts/identity.js +30 -0
- package/dist/browser-session/responseContracts/organizations.d.ts +2 -0
- package/dist/browser-session/responseContracts/organizations.js +17 -0
- package/dist/browser-session/responseContracts/privacy.d.ts +2 -0
- package/dist/browser-session/responseContracts/privacy.js +7 -0
- package/dist/browser-session/responseContracts.gen.d.ts +3 -0
- package/dist/browser-session/responseContracts.gen.js +10 -0
- package/dist/browser-session/responseValidators/api_keys-diagnostics.cjs +1 -0
- package/dist/browser-session/responseValidators/api_keys-diagnostics.d.cts +4 -0
- package/dist/browser-session/responseValidators/api_keys.cjs +2 -0
- package/dist/browser-session/responseValidators/api_keys.d.cts +4 -0
- package/dist/browser-session/responseValidators/credits-diagnostics.cjs +1 -0
- package/dist/browser-session/responseValidators/credits-diagnostics.d.cts +3 -0
- package/dist/browser-session/responseValidators/credits.cjs +2 -0
- package/dist/browser-session/responseValidators/credits.d.cts +3 -0
- package/dist/browser-session/responseValidators/github-diagnostics.cjs +1 -0
- package/dist/browser-session/responseValidators/github-diagnostics.d.cts +3 -0
- package/dist/browser-session/responseValidators/github.cjs +2 -0
- package/dist/browser-session/responseValidators/github.d.cts +3 -0
- package/dist/browser-session/responseValidators/identity-diagnostics.cjs +1 -0
- package/dist/browser-session/responseValidators/identity-diagnostics.d.cts +23 -0
- package/dist/browser-session/responseValidators/identity.cjs +2 -0
- package/dist/browser-session/responseValidators/identity.d.cts +23 -0
- package/dist/browser-session/responseValidators/organizations-diagnostics.cjs +1 -0
- package/dist/browser-session/responseValidators/organizations-diagnostics.d.cts +15 -0
- package/dist/browser-session/responseValidators/organizations.cjs +2 -0
- package/dist/browser-session/responseValidators/organizations.d.cts +15 -0
- package/dist/browser-session/responseValidators/privacy-diagnostics.cjs +1 -0
- package/dist/browser-session/responseValidators/privacy-diagnostics.d.cts +2 -0
- package/dist/browser-session/responseValidators/privacy.cjs +2 -0
- package/dist/browser-session/responseValidators/privacy.d.cts +2 -0
- package/dist/client/client.gen.d.ts +1 -1
- package/dist/client/client.gen.js +46 -94
- package/dist/client/index.d.ts +10 -10
- package/dist/client/index.js +16 -5
- package/dist/client/types.gen.d.ts +6 -6
- package/dist/client/types.gen.js +2 -1
- package/dist/client/utils.gen.d.ts +2 -2
- package/dist/client/utils.gen.js +31 -20
- package/dist/client.gen.d.ts +2 -2
- package/dist/client.gen.js +5 -2
- package/dist/command-check.gen.d.ts +14 -0
- package/dist/command-check.gen.js +23 -0
- package/dist/command-input.gen.d.ts +6 -0
- package/dist/command-input.gen.js +45 -0
- package/dist/core/auth.gen.js +5 -1
- package/dist/core/binaryStream.d.ts +8 -0
- package/dist/core/binaryStream.js +76 -0
- package/dist/core/bodySerializer.gen.d.ts +1 -1
- package/dist/core/bodySerializer.gen.js +8 -5
- package/dist/core/commandValidators.cjs +1 -0
- package/dist/core/commandValidators.d.cts +14 -0
- package/dist/core/eventValidation.d.ts +17 -0
- package/dist/core/eventValidation.js +56 -0
- package/dist/core/eventValidators.cjs +1 -0
- package/dist/core/eventValidators.d.cts +2 -0
- package/dist/core/json.d.ts +3 -0
- package/dist/core/json.js +33 -0
- package/dist/core/params.gen.js +4 -1
- package/dist/core/pathSerializer.gen.js +20 -11
- package/dist/core/queryKeySerializer.gen.js +12 -6
- package/dist/core/responseContracts/actions.d.ts +2 -0
- package/dist/core/responseContracts/actions.js +30 -0
- package/dist/core/responseContracts/agents.d.ts +2 -0
- package/dist/core/responseContracts/agents.js +7 -0
- package/dist/core/responseContracts/artifacts.d.ts +2 -0
- package/dist/core/responseContracts/artifacts.js +8 -0
- package/dist/core/responseContracts/commands.d.ts +2 -0
- package/dist/core/responseContracts/commands.js +6 -0
- package/dist/core/responseContracts/credits.d.ts +2 -0
- package/dist/core/responseContracts/credits.js +27 -0
- package/dist/core/responseContracts/files.d.ts +2 -0
- package/dist/core/responseContracts/files.js +15 -0
- package/dist/core/responseContracts/github.d.ts +2 -0
- package/dist/core/responseContracts/github.js +8 -0
- package/dist/core/responseContracts/images.d.ts +2 -0
- package/dist/core/responseContracts/images.js +8 -0
- package/dist/core/responseContracts/launchRuns.d.ts +2 -0
- package/dist/core/responseContracts/launchRuns.js +10 -0
- package/dist/core/responseContracts/launches.d.ts +2 -0
- package/dist/core/responseContracts/launches.js +10 -0
- package/dist/core/responseContracts/operations.d.ts +2 -0
- package/dist/core/responseContracts/operations.js +7 -0
- package/dist/core/responseContracts/previews.d.ts +2 -0
- package/dist/core/responseContracts/previews.js +8 -0
- package/dist/core/responseContracts/pricing.d.ts +2 -0
- package/dist/core/responseContracts/pricing.js +6 -0
- package/dist/core/responseContracts/processes.d.ts +2 -0
- package/dist/core/responseContracts/processes.js +11 -0
- package/dist/core/responseContracts/provider_accounts.d.ts +2 -0
- package/dist/core/responseContracts/provider_accounts.js +13 -0
- package/dist/core/responseContracts/providers.d.ts +2 -0
- package/dist/core/responseContracts/providers.js +6 -0
- package/dist/core/responseContracts/routing.d.ts +2 -0
- package/dist/core/responseContracts/routing.js +8 -0
- package/dist/core/responseContracts/sandboxes.d.ts +2 -0
- package/dist/core/responseContracts/sandboxes.js +15 -0
- package/dist/core/responseContracts/secrets.d.ts +2 -0
- package/dist/core/responseContracts/secrets.js +8 -0
- package/dist/core/responseContracts/spend_limits.d.ts +2 -0
- package/dist/core/responseContracts/spend_limits.js +8 -0
- package/dist/core/responseContracts/terminals.d.ts +2 -0
- package/dist/core/responseContracts/terminals.js +11 -0
- package/dist/core/responseContracts/usage.d.ts +2 -0
- package/dist/core/responseContracts/usage.js +7 -0
- package/dist/core/responseContracts/volumes.d.ts +2 -0
- package/dist/core/responseContracts/volumes.js +19 -0
- package/dist/core/responseContracts.gen.d.ts +3 -0
- package/dist/core/responseContracts.gen.js +27 -0
- package/dist/core/responseModes.d.ts +19 -0
- package/dist/core/responseModes.js +13 -0
- package/dist/core/responseValidation.d.ts +44 -0
- package/dist/core/responseValidation.js +174 -0
- package/dist/core/responseValidators/actions-diagnostics.cjs +4 -0
- package/dist/core/responseValidators/actions-diagnostics.d.cts +24 -0
- package/dist/core/responseValidators/actions.cjs +2 -0
- package/dist/core/responseValidators/actions.d.cts +24 -0
- package/dist/core/responseValidators/agents-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/agents-diagnostics.d.cts +2 -0
- package/dist/core/responseValidators/agents.cjs +2 -0
- package/dist/core/responseValidators/agents.d.cts +2 -0
- package/dist/core/responseValidators/artifacts-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/artifacts-diagnostics.d.cts +2 -0
- package/dist/core/responseValidators/artifacts.cjs +2 -0
- package/dist/core/responseValidators/artifacts.d.cts +2 -0
- package/dist/core/responseValidators/commands-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/commands-diagnostics.d.cts +1 -0
- package/dist/core/responseValidators/commands.cjs +2 -0
- package/dist/core/responseValidators/commands.d.cts +1 -0
- package/dist/core/responseValidators/compact.cjs +122 -0
- package/dist/core/responseValidators/credits-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/credits-diagnostics.d.cts +21 -0
- package/dist/core/responseValidators/credits.cjs +2 -0
- package/dist/core/responseValidators/credits.d.cts +21 -0
- package/dist/core/responseValidators/files-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/files-diagnostics.d.cts +5 -0
- package/dist/core/responseValidators/files.cjs +2 -0
- package/dist/core/responseValidators/files.d.cts +5 -0
- package/dist/core/responseValidators/github-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/github-diagnostics.d.cts +2 -0
- package/dist/core/responseValidators/github.cjs +2 -0
- package/dist/core/responseValidators/github.d.cts +2 -0
- package/dist/core/responseValidators/images-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/images-diagnostics.d.cts +3 -0
- package/dist/core/responseValidators/images.cjs +2 -0
- package/dist/core/responseValidators/images.d.cts +3 -0
- package/dist/core/responseValidators/launchRuns-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/launchRuns-diagnostics.d.cts +5 -0
- package/dist/core/responseValidators/launchRuns.cjs +2 -0
- package/dist/core/responseValidators/launchRuns.d.cts +5 -0
- package/dist/core/responseValidators/launches-diagnostics.cjs +10 -0
- package/dist/core/responseValidators/launches-diagnostics.d.cts +5 -0
- package/dist/core/responseValidators/launches.cjs +2 -0
- package/dist/core/responseValidators/launches.d.cts +5 -0
- package/dist/core/responseValidators/operations-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/operations-diagnostics.d.cts +2 -0
- package/dist/core/responseValidators/operations.cjs +2 -0
- package/dist/core/responseValidators/operations.d.cts +2 -0
- package/dist/core/responseValidators/previews-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/previews-diagnostics.d.cts +3 -0
- package/dist/core/responseValidators/previews.cjs +2 -0
- package/dist/core/responseValidators/previews.d.cts +3 -0
- package/dist/core/responseValidators/pricing-diagnostics.cjs +7 -0
- package/dist/core/responseValidators/pricing-diagnostics.d.cts +1 -0
- package/dist/core/responseValidators/pricing.cjs +2 -0
- package/dist/core/responseValidators/pricing.d.cts +1 -0
- package/dist/core/responseValidators/processes-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/processes-diagnostics.d.cts +2 -0
- package/dist/core/responseValidators/processes.cjs +2 -0
- package/dist/core/responseValidators/processes.d.cts +2 -0
- package/dist/core/responseValidators/provider_accounts-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/provider_accounts-diagnostics.d.cts +8 -0
- package/dist/core/responseValidators/provider_accounts.cjs +2 -0
- package/dist/core/responseValidators/provider_accounts.d.cts +8 -0
- package/dist/core/responseValidators/providers-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/providers-diagnostics.d.cts +1 -0
- package/dist/core/responseValidators/providers.cjs +2 -0
- package/dist/core/responseValidators/providers.d.cts +1 -0
- package/dist/core/responseValidators/routing-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/routing-diagnostics.d.cts +3 -0
- package/dist/core/responseValidators/routing.cjs +2 -0
- package/dist/core/responseValidators/routing.d.cts +3 -0
- package/dist/core/responseValidators/sandboxes-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/sandboxes-diagnostics.d.cts +10 -0
- package/dist/core/responseValidators/sandboxes.cjs +2 -0
- package/dist/core/responseValidators/sandboxes.d.cts +10 -0
- package/dist/core/responseValidators/secrets-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/secrets-diagnostics.d.cts +1 -0
- package/dist/core/responseValidators/secrets.cjs +2 -0
- package/dist/core/responseValidators/secrets.d.cts +1 -0
- package/dist/core/responseValidators/spend_limits-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/spend_limits-diagnostics.d.cts +3 -0
- package/dist/core/responseValidators/spend_limits.cjs +2 -0
- package/dist/core/responseValidators/spend_limits.d.cts +3 -0
- package/dist/core/responseValidators/terminals-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/terminals-diagnostics.d.cts +2 -0
- package/dist/core/responseValidators/terminals.cjs +2 -0
- package/dist/core/responseValidators/terminals.d.cts +2 -0
- package/dist/core/responseValidators/usage-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/usage-diagnostics.d.cts +1 -0
- package/dist/core/responseValidators/usage.cjs +2 -0
- package/dist/core/responseValidators/usage.d.cts +1 -0
- package/dist/core/responseValidators/volumes-diagnostics.cjs +1 -0
- package/dist/core/responseValidators/volumes-diagnostics.d.cts +10 -0
- package/dist/core/responseValidators/volumes.cjs +2 -0
- package/dist/core/responseValidators/volumes.d.cts +10 -0
- package/dist/core/serverSentEvents.gen.d.ts +21 -62
- package/dist/core/serverSentEvents.gen.js +297 -116
- package/dist/core/streamErrors.d.ts +32 -0
- package/dist/core/streamErrors.js +51 -0
- package/dist/core/types.gen.d.ts +2 -2
- package/dist/core/types.gen.js +2 -1
- package/dist/core/utils.gen.d.ts +1 -1
- package/dist/core/utils.gen.js +16 -10
- package/dist/creation.gen.d.ts +21 -0
- package/dist/creation.gen.js +35 -0
- package/dist/data-origin.d.ts +25 -0
- package/dist/data-origin.js +57 -0
- package/dist/error-codes.gen.d.ts +2 -0
- package/dist/error-codes.gen.js +2 -0
- package/dist/idempotency.gen.d.ts +1 -0
- package/dist/idempotency.gen.js +60 -0
- package/dist/images.d.ts +74 -0
- package/dist/images.js +88 -0
- package/dist/index.d.ts +22 -2
- package/dist/index.js +79 -1
- package/dist/launch-input.gen.d.ts +9 -0
- package/dist/launch-input.gen.js +83 -0
- package/dist/launch.d.ts +28 -0
- package/dist/launch.js +222 -0
- package/dist/namespace-actions.d.mts +307 -0
- package/dist/namespace-actions.mjs +595 -0
- package/dist/namespace-agents.d.mts +33 -0
- package/dist/namespace-agents.mjs +40 -0
- package/dist/namespace-artifacts.d.mts +46 -0
- package/dist/namespace-artifacts.mjs +69 -0
- package/dist/namespace-base.d.mts +7 -0
- package/dist/namespace-base.mjs +7 -0
- package/dist/namespace-commands.d.mts +57 -0
- package/dist/namespace-commands.mjs +57 -0
- package/dist/namespace-credits.d.mts +213 -0
- package/dist/namespace-credits.mjs +476 -0
- package/dist/namespace-files.d.mts +203 -0
- package/dist/namespace-files.mjs +334 -0
- package/dist/namespace-github.d.mts +50 -0
- package/dist/namespace-github.mjs +68 -0
- package/dist/namespace-images.d.mts +52 -0
- package/dist/namespace-images.mjs +78 -0
- package/dist/namespace-launch_runs.d.mts +89 -0
- package/dist/namespace-launch_runs.mjs +133 -0
- package/dist/namespace-launches.d.mts +89 -0
- package/dist/namespace-launches.mjs +133 -0
- package/dist/namespace-operations.d.mts +45 -0
- package/dist/namespace-operations.mjs +52 -0
- package/dist/namespace-previews.d.mts +79 -0
- package/dist/namespace-previews.mjs +101 -0
- package/dist/namespace-pricing.d.mts +31 -0
- package/dist/namespace-pricing.mjs +22 -0
- package/dist/namespace-processes.d.mts +125 -0
- package/dist/namespace-processes.mjs +184 -0
- package/dist/namespace-provider_accounts.d.mts +156 -0
- package/dist/namespace-provider_accounts.mjs +241 -0
- package/dist/namespace-providers.d.mts +28 -0
- package/dist/namespace-providers.mjs +24 -0
- package/dist/namespace-routing.d.mts +64 -0
- package/dist/namespace-routing.mjs +86 -0
- package/dist/namespace-sandboxes.d.mts +287 -0
- package/dist/namespace-sandboxes.mjs +402 -0
- package/dist/namespace-secrets.d.mts +46 -0
- package/dist/namespace-secrets.mjs +68 -0
- package/dist/namespace-spend_limits.d.mts +48 -0
- package/dist/namespace-spend_limits.mjs +70 -0
- package/dist/namespace-terminals.d.mts +112 -0
- package/dist/namespace-terminals.mjs +177 -0
- package/dist/namespace-usage.d.mts +46 -0
- package/dist/namespace-usage.mjs +53 -0
- package/dist/namespace-volumes.d.mts +110 -0
- package/dist/namespace-volumes.mjs +269 -0
- package/dist/operations.d.ts +14 -0
- package/dist/operations.js +31 -0
- package/dist/retry.d.ts +8 -0
- package/dist/retry.js +63 -0
- package/dist/routing-choices.gen.d.ts +132 -0
- package/dist/routing-choices.gen.js +136 -0
- package/dist/routing.d.ts +23 -0
- package/dist/routing.js +38 -0
- package/dist/sandbox-handle.gen.d.ts +8 -0
- package/dist/sandbox-handle.gen.js +14 -0
- package/dist/sandboxes.d.ts +213 -0
- package/dist/sandboxes.js +507 -0
- package/dist/sdk.gen.d.ts +2016 -12
- package/dist/sdk.gen.js +3862 -16
- package/dist/server-timing.d.ts +19 -0
- package/dist/server-timing.gen.d.ts +265 -0
- package/dist/server-timing.gen.js +254 -0
- package/dist/server-timing.js +421 -0
- package/dist/spend-limits.d.ts +17 -0
- package/dist/spend-limits.js +26 -0
- package/dist/telemetry.d.ts +51 -0
- package/dist/telemetry.gen.d.ts +1 -0
- package/dist/telemetry.gen.js +5 -0
- package/dist/telemetry.js +438 -0
- package/dist/terminal.d.ts +61 -0
- package/dist/terminal.js +266 -0
- package/dist/transfer.d.ts +75 -0
- package/dist/transfer.js +389 -0
- package/dist/types.gen.d.ts +14936 -110
- package/dist/types.gen.js +2 -1
- package/dist/user-agent.d.ts +2 -0
- package/dist/user-agent.js +18 -0
- package/dist/version.gen.d.ts +1 -0
- package/dist/version.gen.js +5 -0
- package/dist/volumes.d.ts +33 -0
- package/dist/volumes.js +221 -0
- package/dist/waits.d.ts +31 -0
- package/dist/waits.js +42 -0
- package/dist/workflow-policy.gen.d.ts +41 -0
- package/dist/workflow-policy.gen.js +45 -0
- package/package.json +124 -14
|
@@ -0,0 +1,595 @@
|
|
|
1
|
+
import { HeyApiClient } from './namespace-base.mjs';
|
|
2
|
+
export class Actions extends HeyApiClient {
|
|
3
|
+
/**
|
|
4
|
+
* Read Actions runner and workspace funding readiness
|
|
5
|
+
*
|
|
6
|
+
* Requires workspace read authority. This read-only view uses the workspace's
|
|
7
|
+
* existing provider accounts and credits. Unknown source facts remain unknown;
|
|
8
|
+
* link targets appear only when an existing page can address the reported issue.
|
|
9
|
+
* When `repository_id` is supplied, readiness is scoped to that repository's saved
|
|
10
|
+
* software profile. The profile is resolved from workspace-owned settings; callers
|
|
11
|
+
* cannot select a profile through this parameter.
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
readiness(options) {
|
|
15
|
+
return (options?.client ?? this.client).get({
|
|
16
|
+
responseStyle: 'data',
|
|
17
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
18
|
+
in: 'cookie',
|
|
19
|
+
name: '__Host-boxrouter_session',
|
|
20
|
+
type: 'apiKey'
|
|
21
|
+
}],
|
|
22
|
+
url: '/actions/readiness',
|
|
23
|
+
...options
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Read the recommended Actions runner labels and resource floors
|
|
28
|
+
*
|
|
29
|
+
* Requires workspace read authority. The catalog is fixed for a server release and does not
|
|
30
|
+
* depend on the workspace, so clients and caches may reuse it until its ETag changes. It does not assert live route availability or
|
|
31
|
+
* verified software; use readiness for that. Readiness still carries `runner_catalog` for
|
|
32
|
+
* older clients, but new clients should read this operation instead.
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
runnerCatalog(options) {
|
|
36
|
+
return (options?.client ?? this.client).get({
|
|
37
|
+
responseStyle: 'data',
|
|
38
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
39
|
+
in: 'cookie',
|
|
40
|
+
name: '__Host-boxrouter_session',
|
|
41
|
+
type: 'apiKey'
|
|
42
|
+
}],
|
|
43
|
+
url: '/actions/runner-catalog',
|
|
44
|
+
...options
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Preview Actions label and policy eligibility
|
|
49
|
+
*
|
|
50
|
+
* Requires read authority for the linked repository in the authenticated workspace.
|
|
51
|
+
* This is a read-only evaluation of the same resolved policy and route matcher used
|
|
52
|
+
* for dispatch. It creates no runner, sandbox, reservation or billing hold. Refused
|
|
53
|
+
* and unknown results remain explicit; the preview never relaxes a requirement or
|
|
54
|
+
* claims an unverified route is eligible. It does not verify runner images. Runner image readiness is checked separately before dispatch.
|
|
55
|
+
*
|
|
56
|
+
*/
|
|
57
|
+
preview(options) {
|
|
58
|
+
return (options.client ?? this.client).post({
|
|
59
|
+
responseStyle: 'data',
|
|
60
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
61
|
+
in: 'cookie',
|
|
62
|
+
name: '__Host-boxrouter_session',
|
|
63
|
+
type: 'apiKey'
|
|
64
|
+
}],
|
|
65
|
+
url: '/actions/preview',
|
|
66
|
+
...options,
|
|
67
|
+
headers: {
|
|
68
|
+
'Content-Type': 'application/json',
|
|
69
|
+
...options.headers
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
_repositories;
|
|
74
|
+
get repositories() {
|
|
75
|
+
return this._repositories ??= new Repositories({ client: this.client });
|
|
76
|
+
}
|
|
77
|
+
_policies;
|
|
78
|
+
get policies() {
|
|
79
|
+
return this._policies ??= new Policies({ client: this.client });
|
|
80
|
+
}
|
|
81
|
+
_runs;
|
|
82
|
+
get runs() {
|
|
83
|
+
return this._runs ??= new Runs({ client: this.client });
|
|
84
|
+
}
|
|
85
|
+
_poolIdleTime;
|
|
86
|
+
get poolIdleTime() {
|
|
87
|
+
return this._poolIdleTime ??= new PoolIdleTime({ client: this.client });
|
|
88
|
+
}
|
|
89
|
+
_jobs;
|
|
90
|
+
get jobs() {
|
|
91
|
+
return this._jobs ??= new Jobs({ client: this.client });
|
|
92
|
+
}
|
|
93
|
+
_placements;
|
|
94
|
+
get placements() {
|
|
95
|
+
return this._placements ??= new Placements({ client: this.client });
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
export class Repositories extends HeyApiClient {
|
|
99
|
+
/**
|
|
100
|
+
* Get Actions enablement and defaults for a repository
|
|
101
|
+
*
|
|
102
|
+
* Requires read authority in the authenticated workspace. The repository must have
|
|
103
|
+
* a currently linked, verified GitHub installation. The returned ETag identifies
|
|
104
|
+
* this settings revision. A missing settings record is represented as `exists: false`,
|
|
105
|
+
* disabled with no required policy; it is not silently enabled by reading it. For
|
|
106
|
+
* `exists: false`, omit If-Match on the first write; for `exists: true`, send the
|
|
107
|
+
* returned ETag to update the existing record safely.
|
|
108
|
+
*
|
|
109
|
+
*/
|
|
110
|
+
get(options) {
|
|
111
|
+
return (options.client ?? this.client).get({
|
|
112
|
+
responseStyle: 'data',
|
|
113
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
114
|
+
in: 'cookie',
|
|
115
|
+
name: '__Host-boxrouter_session',
|
|
116
|
+
type: 'apiKey'
|
|
117
|
+
}],
|
|
118
|
+
url: '/actions/repositories/{repository_id}',
|
|
119
|
+
...options
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Enable or update Actions defaults for a repository
|
|
124
|
+
*
|
|
125
|
+
* Requires workspace administrator authority. Browser-session calls require the CSRF
|
|
126
|
+
* token and configured Origin. The minimal enable request is `{"enabled":true}`;
|
|
127
|
+
* Actions creates its safe default settings and begins automatic image preparation
|
|
128
|
+
* without requiring a named policy, provider key, runner registration or YAML change.
|
|
129
|
+
* `policy_id` is optional and, when null, selects the workspace's current safe
|
|
130
|
+
* defaults. When the preceding read returned `exists: false`, omit If-Match to create
|
|
131
|
+
* the settings record; when it returned `exists: true`, send its ETag to update. The
|
|
132
|
+
* server rejects a write if that existence state changed after the read. An
|
|
133
|
+
* Idempotency-Key records
|
|
134
|
+
* the logical mutation: identical uncertain retries return the recorded outcome,
|
|
135
|
+
* changed input under the same key conflicts, and unknown effects are reconciled
|
|
136
|
+
* without automatic redispatch. Disabling stops new admission; it does not cancel
|
|
137
|
+
* accepted GitHub workflow runs or change their funding binding.
|
|
138
|
+
*
|
|
139
|
+
*/
|
|
140
|
+
update(options) {
|
|
141
|
+
return (options.client ?? this.client).put({
|
|
142
|
+
responseStyle: 'data',
|
|
143
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
144
|
+
in: 'cookie',
|
|
145
|
+
name: '__Host-boxrouter_session',
|
|
146
|
+
type: 'apiKey'
|
|
147
|
+
}],
|
|
148
|
+
url: '/actions/repositories/{repository_id}',
|
|
149
|
+
...options,
|
|
150
|
+
headers: {
|
|
151
|
+
'Content-Type': 'application/json',
|
|
152
|
+
...options.headers
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
export class Policies extends HeyApiClient {
|
|
158
|
+
/**
|
|
159
|
+
* List workspace Actions policies
|
|
160
|
+
*
|
|
161
|
+
* Requires workspace read authority. Stable ID-ordered pages may be empty; listing never changes policy or starts compute.
|
|
162
|
+
*/
|
|
163
|
+
list(options) {
|
|
164
|
+
return (options?.client ?? this.client).get({
|
|
165
|
+
responseStyle: 'data',
|
|
166
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
167
|
+
in: 'cookie',
|
|
168
|
+
name: '__Host-boxrouter_session',
|
|
169
|
+
type: 'apiKey'
|
|
170
|
+
}],
|
|
171
|
+
url: '/actions/policies',
|
|
172
|
+
...options
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Create a named workspace Actions policy
|
|
177
|
+
*
|
|
178
|
+
* Requires workspace administrator authority. Browser-session calls require the CSRF
|
|
179
|
+
* token and configured Origin. Policy settings can only narrow workspace and
|
|
180
|
+
* repository guardrails. The workspace funding choice decides the logical authority
|
|
181
|
+
* (workspace BYOK or platform managed); the actual provider, account and payer binding
|
|
182
|
+
* is confirmed separately for each attempt and is never taken from a policy. A policy
|
|
183
|
+
* cannot change supply or add accounts. Idempotency-Key replays the recorded
|
|
184
|
+
* outcome for identical input; changed input conflicts. An unknown outcome is
|
|
185
|
+
* reconciled without creating a second policy.
|
|
186
|
+
*
|
|
187
|
+
*/
|
|
188
|
+
create(options) {
|
|
189
|
+
return (options.client ?? this.client).post({
|
|
190
|
+
responseStyle: 'data',
|
|
191
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
192
|
+
in: 'cookie',
|
|
193
|
+
name: '__Host-boxrouter_session',
|
|
194
|
+
type: 'apiKey'
|
|
195
|
+
}],
|
|
196
|
+
url: '/actions/policies',
|
|
197
|
+
...options,
|
|
198
|
+
headers: {
|
|
199
|
+
'Content-Type': 'application/json',
|
|
200
|
+
...options.headers
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Delete an unused workspace Actions policy
|
|
206
|
+
*
|
|
207
|
+
* Requires workspace administrator authority. Browser-session calls require CSRF and
|
|
208
|
+
* the configured Origin. If-Match is required. A policy referenced by repository
|
|
209
|
+
* defaults or accepted work cannot be deleted and returns 409. Idempotency-Key
|
|
210
|
+
* returns the recorded delete result for identical retries; changed input conflicts. Unknown outcomes are
|
|
211
|
+
* reconciled without repeating the deletion.
|
|
212
|
+
*
|
|
213
|
+
*/
|
|
214
|
+
delete(options) {
|
|
215
|
+
return (options.client ?? this.client).delete({
|
|
216
|
+
responseStyle: 'data',
|
|
217
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
218
|
+
in: 'cookie',
|
|
219
|
+
name: '__Host-boxrouter_session',
|
|
220
|
+
type: 'apiKey'
|
|
221
|
+
}],
|
|
222
|
+
url: '/actions/policies/{policy_id}',
|
|
223
|
+
...options
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Get a workspace Actions policy
|
|
228
|
+
*
|
|
229
|
+
* Requires workspace read authority. The policy ID is workspace-scoped; foreign and unknown IDs both return 404.
|
|
230
|
+
*/
|
|
231
|
+
get(options) {
|
|
232
|
+
return (options.client ?? this.client).get({
|
|
233
|
+
responseStyle: 'data',
|
|
234
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
235
|
+
in: 'cookie',
|
|
236
|
+
name: '__Host-boxrouter_session',
|
|
237
|
+
type: 'apiKey'
|
|
238
|
+
}],
|
|
239
|
+
url: '/actions/policies/{policy_id}',
|
|
240
|
+
...options
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Replace a workspace Actions policy
|
|
245
|
+
*
|
|
246
|
+
* Requires workspace administrator authority. Browser-session calls require CSRF and
|
|
247
|
+
* the configured Origin. If-Match is required and must equal the latest ETag. Policy
|
|
248
|
+
* changes only narrow workspace/repository guardrails and do not mutate accepted jobs
|
|
249
|
+
* or change their supply, accounts or logical funding authority. Idempotency-Key replays an identical recorded update;
|
|
250
|
+
* changed input conflicts. A stale ETag returns 409 without writing. Unknown outcomes
|
|
251
|
+
* are reconciled, never automatically redispatched.
|
|
252
|
+
*
|
|
253
|
+
*/
|
|
254
|
+
update(options) {
|
|
255
|
+
return (options.client ?? this.client).put({
|
|
256
|
+
responseStyle: 'data',
|
|
257
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
258
|
+
in: 'cookie',
|
|
259
|
+
name: '__Host-boxrouter_session',
|
|
260
|
+
type: 'apiKey'
|
|
261
|
+
}],
|
|
262
|
+
url: '/actions/policies/{policy_id}',
|
|
263
|
+
...options,
|
|
264
|
+
headers: {
|
|
265
|
+
'Content-Type': 'application/json',
|
|
266
|
+
...options.headers
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
export class Runs extends HeyApiClient {
|
|
272
|
+
/**
|
|
273
|
+
* List workspace Actions workflow-run projections
|
|
274
|
+
*
|
|
275
|
+
* Requires workspace read authority. Pages may be empty and default to newest-first
|
|
276
|
+
* by creation time; `sort` also supports oldest-first by creation time and longest
|
|
277
|
+
* first by duration. Equal sort values retain a stable run ID order, including
|
|
278
|
+
* across pages. A run's status and cost are BoxRouter's latest recorded evidence;
|
|
279
|
+
* this read does not poll GitHub, change a run, start a job or retry an uncertain
|
|
280
|
+
* effect.
|
|
281
|
+
*
|
|
282
|
+
*/
|
|
283
|
+
list(options) {
|
|
284
|
+
return (options?.client ?? this.client).get({
|
|
285
|
+
responseStyle: 'data',
|
|
286
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
287
|
+
in: 'cookie',
|
|
288
|
+
name: '__Host-boxrouter_session',
|
|
289
|
+
type: 'apiKey'
|
|
290
|
+
}],
|
|
291
|
+
url: '/actions/runs',
|
|
292
|
+
...options
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Count the values each run filter offers
|
|
297
|
+
*
|
|
298
|
+
* For each filter of `listActionsRuns`, its values with the number of runs in the whole
|
|
299
|
+
* workspace that have the value, ignoring any active filters. A run counts once for each
|
|
300
|
+
* value it has. Requires workspace read authority; it does not poll GitHub.
|
|
301
|
+
*
|
|
302
|
+
*/
|
|
303
|
+
listFacets(options) {
|
|
304
|
+
return (options?.client ?? this.client).get({
|
|
305
|
+
responseStyle: 'data',
|
|
306
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
307
|
+
in: 'cookie',
|
|
308
|
+
name: '__Host-boxrouter_session',
|
|
309
|
+
type: 'apiKey'
|
|
310
|
+
}],
|
|
311
|
+
url: '/actions/runs/facets',
|
|
312
|
+
...options
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Get a workflow-run projection and aggregate billing evidence
|
|
317
|
+
*
|
|
318
|
+
* Requires workspace read authority. Foreign and unknown run IDs both return 404; state and costs are not inferred from missing observations.
|
|
319
|
+
*/
|
|
320
|
+
get(options) {
|
|
321
|
+
return (options.client ?? this.client).get({
|
|
322
|
+
responseStyle: 'data',
|
|
323
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
324
|
+
in: 'cookie',
|
|
325
|
+
name: '__Host-boxrouter_session',
|
|
326
|
+
type: 'apiKey'
|
|
327
|
+
}],
|
|
328
|
+
url: '/actions/runs/{run_id}',
|
|
329
|
+
...options
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* List GitHub jobs projected for a workflow run
|
|
334
|
+
*
|
|
335
|
+
* Requires workspace read authority. Job assignment is tied to the runner GitHub actually assigns, not the job a JIT label initially requested.
|
|
336
|
+
*/
|
|
337
|
+
listJobs(options) {
|
|
338
|
+
return (options.client ?? this.client).get({
|
|
339
|
+
responseStyle: 'data',
|
|
340
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
341
|
+
in: 'cookie',
|
|
342
|
+
name: '__Host-boxrouter_session',
|
|
343
|
+
type: 'apiKey'
|
|
344
|
+
}],
|
|
345
|
+
url: '/actions/runs/{run_id}/jobs',
|
|
346
|
+
...options
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* List placements attempted for a workflow run
|
|
351
|
+
*
|
|
352
|
+
* Requires workspace read authority. Placement state, outcome, cleanup and billing evidence remain separate; uncertain effects are never replayed by this read.
|
|
353
|
+
*/
|
|
354
|
+
listPlacements(options) {
|
|
355
|
+
return (options.client ?? this.client).get({
|
|
356
|
+
responseStyle: 'data',
|
|
357
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
358
|
+
in: 'cookie',
|
|
359
|
+
name: '__Host-boxrouter_session',
|
|
360
|
+
type: 'apiKey'
|
|
361
|
+
}],
|
|
362
|
+
url: '/actions/runs/{run_id}/placements',
|
|
363
|
+
...options
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Ask GitHub to cancel the entire workflow run
|
|
368
|
+
*
|
|
369
|
+
* Requires workspace execute authority. This explicitly cancels the whole GitHub
|
|
370
|
+
* workflow run, including its other jobs; it cannot cancel only one job. GitHub
|
|
371
|
+
* remains authoritative for cancellation. A 202 means GitHub acknowledged the
|
|
372
|
+
* request, not that every job or sandbox has ended. Idempotency-Key identifies this
|
|
373
|
+
* user-authorized mutation. An identical replay returns the recorded result; changed
|
|
374
|
+
* input conflicts. Unknown outcomes are reconciled against GitHub without repeating
|
|
375
|
+
* the cancellation automatically. BoxRouter never cancels as a side effect of a
|
|
376
|
+
* read, timeout or cleanup failure.
|
|
377
|
+
*
|
|
378
|
+
*/
|
|
379
|
+
cancel(options) {
|
|
380
|
+
return (options.client ?? this.client).post({
|
|
381
|
+
responseStyle: 'data',
|
|
382
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
383
|
+
in: 'cookie',
|
|
384
|
+
name: '__Host-boxrouter_session',
|
|
385
|
+
type: 'apiKey'
|
|
386
|
+
}],
|
|
387
|
+
url: '/actions/runs/{run_id}/cancel',
|
|
388
|
+
...options
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Ask GitHub to rerun the entire workflow
|
|
393
|
+
*
|
|
394
|
+
* Requires workspace execute authority. This explicitly asks GitHub to rerun the
|
|
395
|
+
* entire workflow run, not one job or only failed jobs. GitHub creates and owns the
|
|
396
|
+
* new attempt. A 202 means GitHub acknowledged the request; it does not mean the new
|
|
397
|
+
* jobs have started. Idempotency-Key identifies this user-authorized mutation. An
|
|
398
|
+
* identical replay returns the recorded result; changed input conflicts. An unknown
|
|
399
|
+
* outcome is reconciled against GitHub and never automatically submitted again.
|
|
400
|
+
* Actions admission still rechecks repository binding, policy, trust and the
|
|
401
|
+
* immutable workspace/account/payer before creating any new placement.
|
|
402
|
+
*
|
|
403
|
+
*/
|
|
404
|
+
rerun(options) {
|
|
405
|
+
return (options.client ?? this.client).post({
|
|
406
|
+
responseStyle: 'data',
|
|
407
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
408
|
+
in: 'cookie',
|
|
409
|
+
name: '__Host-boxrouter_session',
|
|
410
|
+
type: 'apiKey'
|
|
411
|
+
}],
|
|
412
|
+
url: '/actions/runs/{run_id}/rerun',
|
|
413
|
+
...options
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Ask GitHub to rerun failed jobs and their dependents
|
|
418
|
+
*
|
|
419
|
+
* Requires workspace execute authority. This explicitly asks GitHub to rerun the failed
|
|
420
|
+
* jobs of the entire workflow run and the jobs that depend on them in a new attempt.
|
|
421
|
+
* Passed jobs rerun only when they depend on a failed job. GitHub creates and owns the new attempt. A 202 means
|
|
422
|
+
* GitHub acknowledged the request; it does not mean the new jobs have started.
|
|
423
|
+
* Idempotency-Key identifies this user-authorized mutation. An identical replay returns
|
|
424
|
+
* the recorded result; changed input conflicts. An unknown outcome is reconciled against
|
|
425
|
+
* GitHub and never automatically submitted again. A run with no failed job is refused
|
|
426
|
+
* with 409. Actions admission still rechecks repository binding, policy, trust and the
|
|
427
|
+
* immutable workspace/account/payer before creating any new placement.
|
|
428
|
+
*
|
|
429
|
+
*/
|
|
430
|
+
rerunFailedJobs(options) {
|
|
431
|
+
return (options.client ?? this.client).post({
|
|
432
|
+
responseStyle: 'data',
|
|
433
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
434
|
+
in: 'cookie',
|
|
435
|
+
name: '__Host-boxrouter_session',
|
|
436
|
+
type: 'apiKey'
|
|
437
|
+
}],
|
|
438
|
+
url: '/actions/runs/{run_id}/rerun-failed-jobs',
|
|
439
|
+
...options
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
export class PoolIdleTime extends HeyApiClient {
|
|
444
|
+
/**
|
|
445
|
+
* Get the billed time of runners that served no job
|
|
446
|
+
*
|
|
447
|
+
* Requires workspace read authority. A pooled runner can cost money while no GitHub job
|
|
448
|
+
* shows it: it sat idle until the pool drained it, or its pickup was foreign or revoked,
|
|
449
|
+
* or it failed after its sandbox existed. That time is charged to the payer and shown
|
|
450
|
+
* here, apart from every run and job. The read counts the runners that started in
|
|
451
|
+
* `[since, until)`, in total and per pool, with the same `billing` object a run carries.
|
|
452
|
+
* `idle_seconds` is each runner's lifetime from creation to its end (to now for a runner
|
|
453
|
+
* that is still alive). `until` defaults to now, `since` to 30 days before `until`, and the
|
|
454
|
+
* range may not exceed 92 days; a longer or empty range returns 400. It does not poll
|
|
455
|
+
* GitHub or a provider and does not change a runner.
|
|
456
|
+
*
|
|
457
|
+
*/
|
|
458
|
+
get(options) {
|
|
459
|
+
return (options?.client ?? this.client).get({
|
|
460
|
+
responseStyle: 'data',
|
|
461
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
462
|
+
in: 'cookie',
|
|
463
|
+
name: '__Host-boxrouter_session',
|
|
464
|
+
type: 'apiKey'
|
|
465
|
+
}],
|
|
466
|
+
url: '/actions/pool-idle-time',
|
|
467
|
+
...options
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
export class Jobs extends HeyApiClient {
|
|
472
|
+
/**
|
|
473
|
+
* Get an Actions job projection
|
|
474
|
+
*
|
|
475
|
+
* Requires workspace read authority. The GitHub assignment is authoritative; a requested job ID is not treated as runner reservation.
|
|
476
|
+
*/
|
|
477
|
+
get(options) {
|
|
478
|
+
return (options.client ?? this.client).get({
|
|
479
|
+
responseStyle: 'data',
|
|
480
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
481
|
+
in: 'cookie',
|
|
482
|
+
name: '__Host-boxrouter_session',
|
|
483
|
+
type: 'apiKey'
|
|
484
|
+
}],
|
|
485
|
+
url: '/actions/jobs/{job_id}',
|
|
486
|
+
...options
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Get GitHub workflow steps for an Actions job
|
|
491
|
+
*
|
|
492
|
+
* Requires workspace execute authority. Resolves the selected workspace-owned
|
|
493
|
+
* job and its exact historical run attempt before reading the assigned GitHub
|
|
494
|
+
* workflow job. Steps preserve GitHub source order and original step numbers;
|
|
495
|
+
* position is the zero-based display order. Pending, unavailable, forbidden and
|
|
496
|
+
* removed are explicit source states. Step output is not included.
|
|
497
|
+
*
|
|
498
|
+
*/
|
|
499
|
+
getSteps(options) {
|
|
500
|
+
return (options.client ?? this.client).get({
|
|
501
|
+
responseStyle: 'data',
|
|
502
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
503
|
+
in: 'cookie',
|
|
504
|
+
name: '__Host-boxrouter_session',
|
|
505
|
+
type: 'apiKey'
|
|
506
|
+
}],
|
|
507
|
+
url: '/actions/jobs/{job_id}/steps',
|
|
508
|
+
...options
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Read a bounded prefix of the selected GitHub job log
|
|
513
|
+
*
|
|
514
|
+
* Requires workspace execute authority. Resolves the workspace-owned job,
|
|
515
|
+
* current repository binding, assigned GitHub job and exact historical attempt
|
|
516
|
+
* before fetching only that native whole-job log. At most 1 MiB is returned;
|
|
517
|
+
* partial indicates a bounded prefix. Output is transient and is not retained.
|
|
518
|
+
* Individual step log availability depends on the GitHub App/repository source.
|
|
519
|
+
*
|
|
520
|
+
*/
|
|
521
|
+
getLogs(options) {
|
|
522
|
+
return (options.client ?? this.client).get({
|
|
523
|
+
responseStyle: 'data',
|
|
524
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
525
|
+
in: 'cookie',
|
|
526
|
+
name: '__Host-boxrouter_session',
|
|
527
|
+
type: 'apiKey'
|
|
528
|
+
}],
|
|
529
|
+
url: '/actions/jobs/{job_id}/logs',
|
|
530
|
+
...options
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* Read a bounded prefix of one GitHub step log
|
|
535
|
+
*
|
|
536
|
+
* Requires workspace execute authority. step_position is zero-based and is
|
|
537
|
+
* verified against the selected fresh GitHub job before this endpoint is read.
|
|
538
|
+
* GitHub may report individual step logs unavailable for an App/repository;
|
|
539
|
+
* this is returned explicitly without synthesizing output from the whole-job log.
|
|
540
|
+
* At most 1 MiB is returned and partial indicates a bounded prefix.
|
|
541
|
+
*
|
|
542
|
+
*/
|
|
543
|
+
getStepLogs(options) {
|
|
544
|
+
return (options.client ?? this.client).get({
|
|
545
|
+
responseStyle: 'data',
|
|
546
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
547
|
+
in: 'cookie',
|
|
548
|
+
name: '__Host-boxrouter_session',
|
|
549
|
+
type: 'apiKey'
|
|
550
|
+
}],
|
|
551
|
+
url: '/actions/jobs/{job_id}/steps/{step_position}/logs',
|
|
552
|
+
...options
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* List Actions step events for a job
|
|
557
|
+
*
|
|
558
|
+
* Requires workspace execute authority. Returns durable step events recorded for
|
|
559
|
+
* this workspace-owned Actions job, ordered by event time and ID. Use the
|
|
560
|
+
* continuation cursor to retrieve the next page; the list is empty when no
|
|
561
|
+
* events are available.
|
|
562
|
+
*
|
|
563
|
+
*/
|
|
564
|
+
listEvents(options) {
|
|
565
|
+
return (options.client ?? this.client).get({
|
|
566
|
+
responseStyle: 'data',
|
|
567
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
568
|
+
in: 'cookie',
|
|
569
|
+
name: '__Host-boxrouter_session',
|
|
570
|
+
type: 'apiKey'
|
|
571
|
+
}],
|
|
572
|
+
url: '/actions/jobs/{job_id}/events',
|
|
573
|
+
...options
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
export class Placements extends HeyApiClient {
|
|
578
|
+
/**
|
|
579
|
+
* Get an Actions placement and its cost and cleanup evidence
|
|
580
|
+
*
|
|
581
|
+
* Requires workspace read authority. A completed workflow job does not prove sandbox cleanup or final charge; pending and unknown remain explicit.
|
|
582
|
+
*/
|
|
583
|
+
get(options) {
|
|
584
|
+
return (options.client ?? this.client).get({
|
|
585
|
+
responseStyle: 'data',
|
|
586
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
587
|
+
in: 'cookie',
|
|
588
|
+
name: '__Host-boxrouter_session',
|
|
589
|
+
type: 'apiKey'
|
|
590
|
+
}],
|
|
591
|
+
url: '/actions/placements/{placement_id}',
|
|
592
|
+
...options
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.js';
|
|
2
|
+
import { HeyApiClient } from './namespace-base.mjs';
|
|
3
|
+
import type { AgentsGetData, AgentsGetErrors, AgentsGetResponses, AgentsListData, AgentsListErrors, AgentsListResponses } from './types.gen.js';
|
|
4
|
+
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
|
|
5
|
+
/**
|
|
6
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
7
|
+
* individual options. This might be also useful if you want to implement a
|
|
8
|
+
* custom client.
|
|
9
|
+
*/
|
|
10
|
+
client?: Client;
|
|
11
|
+
/**
|
|
12
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
13
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
14
|
+
*/
|
|
15
|
+
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
|
|
16
|
+
};
|
|
17
|
+
export declare class Agents extends HeyApiClient {
|
|
18
|
+
/**
|
|
19
|
+
* List launch agents
|
|
20
|
+
*
|
|
21
|
+
* List the launch manifests available to this workspace. The response includes
|
|
22
|
+
* names, descriptions, declared secret names and preview ports. It never includes
|
|
23
|
+
* commands, file contents or secret values.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
list<ThrowOnError extends boolean = true>(options?: Options<AgentsListData, ThrowOnError>): RequestResult<AgentsListResponses, AgentsListErrors, ThrowOnError, 'data'>;
|
|
27
|
+
/**
|
|
28
|
+
* Get a launch agent manifest
|
|
29
|
+
*
|
|
30
|
+
* Returns a workspace-available manifest. Unknown names return agent_not_found.
|
|
31
|
+
*/
|
|
32
|
+
get<ThrowOnError extends boolean = true>(options: Options<AgentsGetData, ThrowOnError>): RequestResult<AgentsGetResponses, AgentsGetErrors, ThrowOnError, 'data'>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { HeyApiClient } from './namespace-base.mjs';
|
|
2
|
+
export class Agents extends HeyApiClient {
|
|
3
|
+
/**
|
|
4
|
+
* List launch agents
|
|
5
|
+
*
|
|
6
|
+
* List the launch manifests available to this workspace. The response includes
|
|
7
|
+
* names, descriptions, declared secret names and preview ports. It never includes
|
|
8
|
+
* commands, file contents or secret values.
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
list(options) {
|
|
12
|
+
return (options?.client ?? this.client).get({
|
|
13
|
+
responseStyle: 'data',
|
|
14
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
15
|
+
in: 'cookie',
|
|
16
|
+
name: '__Host-boxrouter_session',
|
|
17
|
+
type: 'apiKey'
|
|
18
|
+
}],
|
|
19
|
+
url: '/agents',
|
|
20
|
+
...options
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Get a launch agent manifest
|
|
25
|
+
*
|
|
26
|
+
* Returns a workspace-available manifest. Unknown names return agent_not_found.
|
|
27
|
+
*/
|
|
28
|
+
get(options) {
|
|
29
|
+
return (options.client ?? this.client).get({
|
|
30
|
+
responseStyle: 'data',
|
|
31
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
32
|
+
in: 'cookie',
|
|
33
|
+
name: '__Host-boxrouter_session',
|
|
34
|
+
type: 'apiKey'
|
|
35
|
+
}],
|
|
36
|
+
url: '/agents/{name}',
|
|
37
|
+
...options
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|