@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.
- package/LICENSE +202 -0
- package/NOTICE +40 -0
- package/README.md +508 -2
- 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 +2 -0
- package/dist/client/client.gen.js +168 -0
- package/dist/client/index.d.ts +10 -0
- package/dist/client/index.js +17 -0
- package/dist/client/types.gen.d.ts +120 -0
- package/dist/client/types.gen.js +3 -0
- package/dist/client/utils.gen.d.ts +37 -0
- package/dist/client/utils.gen.js +239 -0
- package/dist/client.gen.d.ts +12 -0
- package/dist/client.gen.js +6 -0
- 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.d.ts +25 -0
- package/dist/core/auth.gen.js +18 -0
- package/dist/core/binaryStream.d.ts +8 -0
- package/dist/core/binaryStream.js +76 -0
- package/dist/core/bodySerializer.gen.d.ts +25 -0
- package/dist/core/bodySerializer.gen.js +60 -0
- 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.d.ts +43 -0
- package/dist/core/params.gen.js +112 -0
- package/dist/core/pathSerializer.gen.d.ts +33 -0
- package/dist/core/pathSerializer.gen.js +115 -0
- package/dist/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/core/queryKeySerializer.gen.js +98 -0
- 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 +30 -0
- package/dist/core/serverSentEvents.gen.js +313 -0
- package/dist/core/streamErrors.d.ts +32 -0
- package/dist/core/streamErrors.js +51 -0
- package/dist/core/types.gen.d.ts +83 -0
- package/dist/core/types.gen.js +3 -0
- package/dist/core/utils.gen.d.ts +19 -0
- package/dist/core/utils.gen.js +93 -0
- 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 -0
- package/dist/index.js +80 -0
- 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 +2029 -0
- package/dist/sdk.gen.js +3862 -0
- 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 +15016 -0
- package/dist/types.gen.js +3 -0
- 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 +135 -4
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.js';
|
|
2
|
+
import { HeyApiClient } from './namespace-base.mjs';
|
|
3
|
+
import type { PricingVersionsData, PricingVersionsErrors, PricingVersionsResponses } 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 Pricing extends HeyApiClient {
|
|
18
|
+
/**
|
|
19
|
+
* List the providers' live price versions
|
|
20
|
+
*
|
|
21
|
+
* Public: needs no key or session. Lists every live price version, which is what
|
|
22
|
+
* BoxRouter used to calculate sandbox costs, so a published cost can be
|
|
23
|
+
* rechecked without BoxRouter's database. Live versions never change. With `at`, returns
|
|
24
|
+
* only the version in effect at that time, one per provider; a provider with no version
|
|
25
|
+
* in effect then is left out. Effective periods include `effective_from` and exclude
|
|
26
|
+
* `effective_to` (`[effective_from, effective_to)`); the version taking over at a boundary
|
|
27
|
+
* applies at that instant.
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
versions<ThrowOnError extends boolean = true>(options?: Options<PricingVersionsData, ThrowOnError>): RequestResult<PricingVersionsResponses, PricingVersionsErrors, ThrowOnError, 'data'>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { HeyApiClient } from './namespace-base.mjs';
|
|
2
|
+
export class Pricing extends HeyApiClient {
|
|
3
|
+
/**
|
|
4
|
+
* List the providers' live price versions
|
|
5
|
+
*
|
|
6
|
+
* Public: needs no key or session. Lists every live price version, which is what
|
|
7
|
+
* BoxRouter used to calculate sandbox costs, so a published cost can be
|
|
8
|
+
* rechecked without BoxRouter's database. Live versions never change. With `at`, returns
|
|
9
|
+
* only the version in effect at that time, one per provider; a provider with no version
|
|
10
|
+
* in effect then is left out. Effective periods include `effective_from` and exclude
|
|
11
|
+
* `effective_to` (`[effective_from, effective_to)`); the version taking over at a boundary
|
|
12
|
+
* applies at that instant.
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
versions(options) {
|
|
16
|
+
return (options?.client ?? this.client).get({
|
|
17
|
+
responseStyle: 'data',
|
|
18
|
+
url: '/price-versions',
|
|
19
|
+
...options
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.js';
|
|
2
|
+
import { HeyApiClient } from './namespace-base.mjs';
|
|
3
|
+
import type { ProcessesCancelData, ProcessesCancelErrors, ProcessesCancelResponses, ProcessesCloseStdinData, ProcessesCloseStdinErrors, ProcessesCloseStdinResponses, ProcessesReadData, ProcessesReadErrors, ProcessesReadResponses, ProcessesRemoveData, ProcessesRemoveErrors, ProcessesRemoveResponses, ProcessesStartData, ProcessesStartErrors, ProcessesStartResponses, ProcessesWriteStdinData, ProcessesWriteStdinErrors, ProcessesWriteStdinResponses } 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 Processes extends HeyApiClient {
|
|
18
|
+
/**
|
|
19
|
+
* Start a durable background command
|
|
20
|
+
*
|
|
21
|
+
* Runs a command in the background in a Bash login shell and returns a process ID. The
|
|
22
|
+
* process keeps running between your calls: read its output, write to its input, or cancel
|
|
23
|
+
* it later, from any client. The sandbox's lifetime bounds how long it can run; cancel it to
|
|
24
|
+
* end it sooner.
|
|
25
|
+
*
|
|
26
|
+
* The sandbox image needs Linux `/proc`, Bash, and a few standard tools (`setsid`, `nohup`,
|
|
27
|
+
* `tail`, `base64`). If one is missing, the call fails with `unsupported_feature` before
|
|
28
|
+
* anything starts.
|
|
29
|
+
*
|
|
30
|
+
* `stdin` defaults to `false`. Setting it to `true`, to write to the process later, needs a
|
|
31
|
+
* sandbox created with the `processes.input` requirement and a route that supports writing to
|
|
32
|
+
* the process after it reconnects (`reattached_stdin`). To check ahead of time which routes
|
|
33
|
+
* qualify, send the same requirements to `POST /sandboxes/match`.
|
|
34
|
+
*
|
|
35
|
+
* With `wait_for_port`, the call returns once that port accepts TCP connections inside the
|
|
36
|
+
* sandbox. If the process exits first, or the port is still closed after 30 seconds, the
|
|
37
|
+
* process is ended and the call fails with `409 port_not_listening`. `details` carries
|
|
38
|
+
* `port`, `stdout_tail`, `stderr_tail` and, when the process exited, `exit_code`.
|
|
39
|
+
*
|
|
40
|
+
*/
|
|
41
|
+
start<ThrowOnError extends boolean = true>(options: Options<ProcessesStartData, ThrowOnError>): RequestResult<ProcessesStartResponses, ProcessesStartErrors, ThrowOnError, 'data'>;
|
|
42
|
+
/**
|
|
43
|
+
* Delete a finished process's retained output
|
|
44
|
+
*
|
|
45
|
+
* Deletes the retained output and metadata for a finished process in the addressed sandbox. It does not stop a running process; that request returns 409. The SDK generates an Idempotency-Key when omitted; reuse a supplied key with the identical request to reconcile an uncertain result.
|
|
46
|
+
*/
|
|
47
|
+
remove<ThrowOnError extends boolean = true>(options: Options<ProcessesRemoveData, ThrowOnError>): RequestResult<ProcessesRemoveResponses, ProcessesRemoveErrors, ThrowOnError, 'data'>;
|
|
48
|
+
/**
|
|
49
|
+
* Read process output from byte offsets
|
|
50
|
+
*
|
|
51
|
+
* **Process observation**
|
|
52
|
+
*
|
|
53
|
+
* You can rely on:
|
|
54
|
+
* - A completed result carries the exact exit status and the complete output; otherwise the call reports lost observation or incomplete output.
|
|
55
|
+
* - Output bytes are exact on every route (commands in byte mode stay exact everywhere).
|
|
56
|
+
*
|
|
57
|
+
* You can set: observation deadline. Reattach where the route supports it.
|
|
58
|
+
*
|
|
59
|
+
* Not promised: chunk sizes; immediate status visibility; output kept beyond the retained history.
|
|
60
|
+
*
|
|
61
|
+
* **Process wait**
|
|
62
|
+
*
|
|
63
|
+
* You can rely on:
|
|
64
|
+
* - Returns the exact observed exit status.
|
|
65
|
+
* - An observation deadline does not claim the process stopped.
|
|
66
|
+
*
|
|
67
|
+
* You can set: observation deadline.
|
|
68
|
+
*
|
|
69
|
+
* Returns up to 256 KiB per stream from the requested byte offsets. Pass the
|
|
70
|
+
* returned next offsets to continue without gaps or repeats. `exit_code` is set
|
|
71
|
+
* only after the process ended and both streams were read to their ends. Reads
|
|
72
|
+
* are non-blocking. If the provider replaced the guest session, the answer is
|
|
73
|
+
* 410 `expired`; the command is never run again.
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
76
|
+
read<ThrowOnError extends boolean = true>(options: Options<ProcessesReadData, ThrowOnError>): RequestResult<ProcessesReadResponses, ProcessesReadErrors, ThrowOnError, 'data'>;
|
|
77
|
+
/**
|
|
78
|
+
* Write process input
|
|
79
|
+
*
|
|
80
|
+
* You can rely on:
|
|
81
|
+
* - Input is delivered in order.
|
|
82
|
+
* - EOF is explicit.
|
|
83
|
+
* - Uncertain delivery is never resent.
|
|
84
|
+
* - Input is UTF-8 text on every route.
|
|
85
|
+
*
|
|
86
|
+
* You can set: data (text), EOF.
|
|
87
|
+
*
|
|
88
|
+
* Not promised: chunking on the wire.
|
|
89
|
+
*
|
|
90
|
+
* Append text to a process started with `stdin: true`. Calls from one client
|
|
91
|
+
* must be awaited sequentially to preserve input order. The selected route must
|
|
92
|
+
* support both `processes.input` and input after process reconnection
|
|
93
|
+
* (`reattached_stdin`); otherwise writes and EOF are refused as `unsupported_feature`
|
|
94
|
+
* before dispatch. Use `POST /sandboxes/match` with `requirements.processes.input`
|
|
95
|
+
* set to true to inspect eligible routes before create. If stdin is closed, return 409.
|
|
96
|
+
*
|
|
97
|
+
*/
|
|
98
|
+
writeStdin<ThrowOnError extends boolean = true>(options: Options<ProcessesWriteStdinData, ThrowOnError>): RequestResult<ProcessesWriteStdinResponses, ProcessesWriteStdinErrors, ThrowOnError, 'data'>;
|
|
99
|
+
/**
|
|
100
|
+
* Send stdin EOF
|
|
101
|
+
*
|
|
102
|
+
* You can rely on:
|
|
103
|
+
* - Input is delivered in order.
|
|
104
|
+
* - EOF is explicit.
|
|
105
|
+
* - Uncertain delivery is never resent.
|
|
106
|
+
* - Input is UTF-8 text on every route.
|
|
107
|
+
*
|
|
108
|
+
* You can set: data (text), EOF.
|
|
109
|
+
*
|
|
110
|
+
* Not promised: chunking on the wire.
|
|
111
|
+
*
|
|
112
|
+
* Close only the input stream of a process started with stdin enabled; unsupported providers refuse before dispatch.
|
|
113
|
+
*
|
|
114
|
+
*/
|
|
115
|
+
closeStdin<ThrowOnError extends boolean = true>(options: Options<ProcessesCloseStdinData, ThrowOnError>): RequestResult<ProcessesCloseStdinResponses, ProcessesCloseStdinErrors, ThrowOnError, 'data'>;
|
|
116
|
+
/**
|
|
117
|
+
* Cancel a durable process
|
|
118
|
+
*
|
|
119
|
+
* Ends the process and everything it started. This works on every sandbox; it needs no
|
|
120
|
+
* `processes.cancel` requirement. Cancelling a process that has already finished succeeds and
|
|
121
|
+
* changes nothing.
|
|
122
|
+
*
|
|
123
|
+
*/
|
|
124
|
+
cancel<ThrowOnError extends boolean = true>(options: Options<ProcessesCancelData, ThrowOnError>): RequestResult<ProcessesCancelResponses, ProcessesCancelErrors, ThrowOnError, 'data'>;
|
|
125
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { HeyApiClient } from './namespace-base.mjs';
|
|
2
|
+
export class Processes extends HeyApiClient {
|
|
3
|
+
/**
|
|
4
|
+
* Start a durable background command
|
|
5
|
+
*
|
|
6
|
+
* Runs a command in the background in a Bash login shell and returns a process ID. The
|
|
7
|
+
* process keeps running between your calls: read its output, write to its input, or cancel
|
|
8
|
+
* it later, from any client. The sandbox's lifetime bounds how long it can run; cancel it to
|
|
9
|
+
* end it sooner.
|
|
10
|
+
*
|
|
11
|
+
* The sandbox image needs Linux `/proc`, Bash, and a few standard tools (`setsid`, `nohup`,
|
|
12
|
+
* `tail`, `base64`). If one is missing, the call fails with `unsupported_feature` before
|
|
13
|
+
* anything starts.
|
|
14
|
+
*
|
|
15
|
+
* `stdin` defaults to `false`. Setting it to `true`, to write to the process later, needs a
|
|
16
|
+
* sandbox created with the `processes.input` requirement and a route that supports writing to
|
|
17
|
+
* the process after it reconnects (`reattached_stdin`). To check ahead of time which routes
|
|
18
|
+
* qualify, send the same requirements to `POST /sandboxes/match`.
|
|
19
|
+
*
|
|
20
|
+
* With `wait_for_port`, the call returns once that port accepts TCP connections inside the
|
|
21
|
+
* sandbox. If the process exits first, or the port is still closed after 30 seconds, the
|
|
22
|
+
* process is ended and the call fails with `409 port_not_listening`. `details` carries
|
|
23
|
+
* `port`, `stdout_tail`, `stderr_tail` and, when the process exited, `exit_code`.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
start(options) {
|
|
27
|
+
return (options.client ?? this.client).post({
|
|
28
|
+
responseStyle: 'data',
|
|
29
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
30
|
+
in: 'cookie',
|
|
31
|
+
name: '__Host-boxrouter_session',
|
|
32
|
+
type: 'apiKey'
|
|
33
|
+
}],
|
|
34
|
+
url: '/sandboxes/{sandbox_id}/processes',
|
|
35
|
+
...options,
|
|
36
|
+
headers: {
|
|
37
|
+
'Content-Type': 'application/json',
|
|
38
|
+
...options.headers
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Delete a finished process's retained output
|
|
44
|
+
*
|
|
45
|
+
* Deletes the retained output and metadata for a finished process in the addressed sandbox. It does not stop a running process; that request returns 409. The SDK generates an Idempotency-Key when omitted; reuse a supplied key with the identical request to reconcile an uncertain result.
|
|
46
|
+
*/
|
|
47
|
+
remove(options) {
|
|
48
|
+
return (options.client ?? this.client).delete({
|
|
49
|
+
responseStyle: 'data',
|
|
50
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
51
|
+
in: 'cookie',
|
|
52
|
+
name: '__Host-boxrouter_session',
|
|
53
|
+
type: 'apiKey'
|
|
54
|
+
}],
|
|
55
|
+
url: '/sandboxes/{sandbox_id}/processes/{process_id}',
|
|
56
|
+
...options
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Read process output from byte offsets
|
|
61
|
+
*
|
|
62
|
+
* **Process observation**
|
|
63
|
+
*
|
|
64
|
+
* You can rely on:
|
|
65
|
+
* - A completed result carries the exact exit status and the complete output; otherwise the call reports lost observation or incomplete output.
|
|
66
|
+
* - Output bytes are exact on every route (commands in byte mode stay exact everywhere).
|
|
67
|
+
*
|
|
68
|
+
* You can set: observation deadline. Reattach where the route supports it.
|
|
69
|
+
*
|
|
70
|
+
* Not promised: chunk sizes; immediate status visibility; output kept beyond the retained history.
|
|
71
|
+
*
|
|
72
|
+
* **Process wait**
|
|
73
|
+
*
|
|
74
|
+
* You can rely on:
|
|
75
|
+
* - Returns the exact observed exit status.
|
|
76
|
+
* - An observation deadline does not claim the process stopped.
|
|
77
|
+
*
|
|
78
|
+
* You can set: observation deadline.
|
|
79
|
+
*
|
|
80
|
+
* Returns up to 256 KiB per stream from the requested byte offsets. Pass the
|
|
81
|
+
* returned next offsets to continue without gaps or repeats. `exit_code` is set
|
|
82
|
+
* only after the process ended and both streams were read to their ends. Reads
|
|
83
|
+
* are non-blocking. If the provider replaced the guest session, the answer is
|
|
84
|
+
* 410 `expired`; the command is never run again.
|
|
85
|
+
*
|
|
86
|
+
*/
|
|
87
|
+
read(options) {
|
|
88
|
+
return (options.client ?? this.client).get({
|
|
89
|
+
responseStyle: 'data',
|
|
90
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
91
|
+
in: 'cookie',
|
|
92
|
+
name: '__Host-boxrouter_session',
|
|
93
|
+
type: 'apiKey'
|
|
94
|
+
}],
|
|
95
|
+
url: '/sandboxes/{sandbox_id}/processes/{process_id}',
|
|
96
|
+
...options
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Write process input
|
|
101
|
+
*
|
|
102
|
+
* You can rely on:
|
|
103
|
+
* - Input is delivered in order.
|
|
104
|
+
* - EOF is explicit.
|
|
105
|
+
* - Uncertain delivery is never resent.
|
|
106
|
+
* - Input is UTF-8 text on every route.
|
|
107
|
+
*
|
|
108
|
+
* You can set: data (text), EOF.
|
|
109
|
+
*
|
|
110
|
+
* Not promised: chunking on the wire.
|
|
111
|
+
*
|
|
112
|
+
* Append text to a process started with `stdin: true`. Calls from one client
|
|
113
|
+
* must be awaited sequentially to preserve input order. The selected route must
|
|
114
|
+
* support both `processes.input` and input after process reconnection
|
|
115
|
+
* (`reattached_stdin`); otherwise writes and EOF are refused as `unsupported_feature`
|
|
116
|
+
* before dispatch. Use `POST /sandboxes/match` with `requirements.processes.input`
|
|
117
|
+
* set to true to inspect eligible routes before create. If stdin is closed, return 409.
|
|
118
|
+
*
|
|
119
|
+
*/
|
|
120
|
+
writeStdin(options) {
|
|
121
|
+
return (options.client ?? this.client).post({
|
|
122
|
+
responseStyle: 'data',
|
|
123
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
124
|
+
in: 'cookie',
|
|
125
|
+
name: '__Host-boxrouter_session',
|
|
126
|
+
type: 'apiKey'
|
|
127
|
+
}],
|
|
128
|
+
url: '/sandboxes/{sandbox_id}/processes/{process_id}/stdin',
|
|
129
|
+
...options,
|
|
130
|
+
headers: {
|
|
131
|
+
'Content-Type': 'application/json',
|
|
132
|
+
...options.headers
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Send stdin EOF
|
|
138
|
+
*
|
|
139
|
+
* You can rely on:
|
|
140
|
+
* - Input is delivered in order.
|
|
141
|
+
* - EOF is explicit.
|
|
142
|
+
* - Uncertain delivery is never resent.
|
|
143
|
+
* - Input is UTF-8 text on every route.
|
|
144
|
+
*
|
|
145
|
+
* You can set: data (text), EOF.
|
|
146
|
+
*
|
|
147
|
+
* Not promised: chunking on the wire.
|
|
148
|
+
*
|
|
149
|
+
* Close only the input stream of a process started with stdin enabled; unsupported providers refuse before dispatch.
|
|
150
|
+
*
|
|
151
|
+
*/
|
|
152
|
+
closeStdin(options) {
|
|
153
|
+
return (options.client ?? this.client).post({
|
|
154
|
+
responseStyle: 'data',
|
|
155
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
156
|
+
in: 'cookie',
|
|
157
|
+
name: '__Host-boxrouter_session',
|
|
158
|
+
type: 'apiKey'
|
|
159
|
+
}],
|
|
160
|
+
url: '/sandboxes/{sandbox_id}/processes/{process_id}/stdin/close',
|
|
161
|
+
...options
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Cancel a durable process
|
|
166
|
+
*
|
|
167
|
+
* Ends the process and everything it started. This works on every sandbox; it needs no
|
|
168
|
+
* `processes.cancel` requirement. Cancelling a process that has already finished succeeds and
|
|
169
|
+
* changes nothing.
|
|
170
|
+
*
|
|
171
|
+
*/
|
|
172
|
+
cancel(options) {
|
|
173
|
+
return (options.client ?? this.client).post({
|
|
174
|
+
responseStyle: 'data',
|
|
175
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
176
|
+
in: 'cookie',
|
|
177
|
+
name: '__Host-boxrouter_session',
|
|
178
|
+
type: 'apiKey'
|
|
179
|
+
}],
|
|
180
|
+
url: '/sandboxes/{sandbox_id}/processes/{process_id}/cancel',
|
|
181
|
+
...options
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.js';
|
|
2
|
+
import { HeyApiClient } from './namespace-base.mjs';
|
|
3
|
+
import type { ProviderAccountsConnectData, ProviderAccountsConnectErrors, ProviderAccountsConnectResponses, ProviderAccountsDisconnectData, ProviderAccountsDisconnectErrors, ProviderAccountsDisconnectResponses, ProviderAccountsGetData, ProviderAccountsGetErrors, ProviderAccountsGetResponses, ProviderAccountsListData, ProviderAccountsListErrors, ProviderAccountsListResponses, ProviderAccountsReplaceCredentialsData, ProviderAccountsReplaceCredentialsErrors, ProviderAccountsReplaceCredentialsResponses, ProviderAccountsSetupStandardImageData, ProviderAccountsSetupStandardImageErrors, ProviderAccountsSetupStandardImageResponses, ProviderAccountsTestCredentialsData, ProviderAccountsTestCredentialsErrors, ProviderAccountsTestCredentialsResponses, ProviderAccountsTestData, ProviderAccountsTestErrors, ProviderAccountsTestResponses } 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 ProviderAccounts extends HeyApiClient {
|
|
18
|
+
/**
|
|
19
|
+
* List connected accounts
|
|
20
|
+
*
|
|
21
|
+
* Requires `provider-accounts:manage` on API keys; dashboard browser sessions are also
|
|
22
|
+
* authorized. Returns your workspace's account metadata and the list of providers enabled for you;
|
|
23
|
+
* it never returns stored credentials.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
list<ThrowOnError extends boolean = true>(options?: Options<ProviderAccountsListData, ThrowOnError>): RequestResult<ProviderAccountsListResponses, ProviderAccountsListErrors, ThrowOnError, 'data'>;
|
|
27
|
+
/**
|
|
28
|
+
* Connect a provider account
|
|
29
|
+
*
|
|
30
|
+
* Saves your own provider credentials so BoxRouter can run sandboxes on that account. Needs
|
|
31
|
+
* the `provider-accounts:manage` permission on the API key; a signed-in dashboard session also
|
|
32
|
+
* works. This permission is separate from the access that creates sandboxes.
|
|
33
|
+
*
|
|
34
|
+
* BoxRouter first makes one read-only request to the provider with the credentials. A clear
|
|
35
|
+
* rejection fails with `422 credentials_rejected`; an unreachable provider or an inconclusive
|
|
36
|
+
* answer does not block the save. The credentials are then stored encrypted and never
|
|
37
|
+
* returned. The account is enabled at once. Connecting starts no sandbox and prepares
|
|
38
|
+
* nothing in your provider account: the first sandbox that needs the standard image
|
|
39
|
+
* prepares it, or run the standard image setup to prepare it now.
|
|
40
|
+
*
|
|
41
|
+
* If the key matches one you already connected (same provider, settings and last four
|
|
42
|
+
* characters), the account is still connected and the response carries a
|
|
43
|
+
* `duplicate_credential` warning naming the other account. Connecting or testing an account
|
|
44
|
+
* whose provider is not enabled for you fails with `409 provider_not_enabled`.
|
|
45
|
+
*
|
|
46
|
+
* Provider connection settings, such as a custom URL or proxy, and credentials that run your
|
|
47
|
+
* code need extra authority on the key. Submitting a URL or proxy does not by itself give
|
|
48
|
+
* BoxRouter network access to that host. For credentials that run your code, send the ID of an
|
|
49
|
+
* artifact you uploaded; an unknown or expired artifact fails with `404`. The response
|
|
50
|
+
* returns account metadata only, never the code, configuration or tokens. Sending the same
|
|
51
|
+
* request again reuses the recorded outcome, and a request still waiting on the provider
|
|
52
|
+
* fails with `409` instead of running your code a second time.
|
|
53
|
+
*
|
|
54
|
+
* If the provider later answers with `401` or `403`, the account's status becomes
|
|
55
|
+
* `credentials_rejected`; the status carries a safe cause and the action that restores access.
|
|
56
|
+
*
|
|
57
|
+
*/
|
|
58
|
+
connect<ThrowOnError extends boolean = true>(options: Options<ProviderAccountsConnectData, ThrowOnError>): RequestResult<ProviderAccountsConnectResponses, ProviderAccountsConnectErrors, ThrowOnError, 'data'>;
|
|
59
|
+
/**
|
|
60
|
+
* Test provider credentials without saving them
|
|
61
|
+
*
|
|
62
|
+
* Checks credentials without saving them. Needs the `provider-accounts:manage` permission on
|
|
63
|
+
* the API key; a signed-in dashboard session also works. BoxRouter makes the same read-only
|
|
64
|
+
* request to the provider as when it tests a saved account, using the credentials in the body.
|
|
65
|
+
* Nothing is stored and no account is created or changed, so no idempotency key is needed.
|
|
66
|
+
*
|
|
67
|
+
* Credentials that run your code are not accepted here. Connection settings, such as a custom
|
|
68
|
+
* URL, are accepted and choose where the request goes; they need extra authority on the key,
|
|
69
|
+
* and submitting a URL or proxy does not by itself give BoxRouter network access to that host.
|
|
70
|
+
* The response returns the provider's own status and body, up to 4096 characters, without
|
|
71
|
+
* adding a validation message.
|
|
72
|
+
*
|
|
73
|
+
* Fails with `409 provider_not_enabled` when this provider is not enabled for you.
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
76
|
+
testCredentials<ThrowOnError extends boolean = true>(options: Options<ProviderAccountsTestCredentialsData, ThrowOnError>): RequestResult<ProviderAccountsTestCredentialsResponses, ProviderAccountsTestCredentialsErrors, ThrowOnError, 'data'>;
|
|
77
|
+
/**
|
|
78
|
+
* Remove a connected account
|
|
79
|
+
*
|
|
80
|
+
* Requires `provider-accounts:manage` on API keys; dashboard browser sessions are also
|
|
81
|
+
* authorized. Reject with 409 while owned
|
|
82
|
+
* resources, pending mutations or unresolved cleanup still depend on this
|
|
83
|
+
* credential. Never orphan sandboxes silently or transfer them to managed
|
|
84
|
+
* billing. Removes the stored secret; does not revoke the upstream token.
|
|
85
|
+
* For callable credentials, close all unreferenced factory workers and remove
|
|
86
|
+
* their retained code/configuration and acquired secrets. Pending acquisitions
|
|
87
|
+
* and retained credential-version dependencies also prevent disconnection.
|
|
88
|
+
*
|
|
89
|
+
* Removal waits for work already running on the account (standard-image setup,
|
|
90
|
+
* Actions runner-image checks), which can take minutes. With `wait=false` the
|
|
91
|
+
* request returns 202 at once with the account and `disconnect.state:
|
|
92
|
+
* disconnecting`, and finishes in the background: read the account until it
|
|
93
|
+
* returns 404 (removed) or `disconnect.state: failed`, whose `error` is the
|
|
94
|
+
* refusal this request would otherwise have returned, with the account still
|
|
95
|
+
* connected. Repeating the request while a removal runs returns the same 202 and
|
|
96
|
+
* starts nothing new.
|
|
97
|
+
*
|
|
98
|
+
*/
|
|
99
|
+
disconnect<ThrowOnError extends boolean = true>(options: Options<ProviderAccountsDisconnectData, ThrowOnError>): RequestResult<ProviderAccountsDisconnectResponses, ProviderAccountsDisconnectErrors, ThrowOnError, 'data'>;
|
|
100
|
+
/**
|
|
101
|
+
* Get connected-account metadata
|
|
102
|
+
*
|
|
103
|
+
* Requires `provider-accounts:manage` on API keys; dashboard browser sessions are also
|
|
104
|
+
* authorized. The account must be visible within the caller's workspace. Never reveals
|
|
105
|
+
* key material.
|
|
106
|
+
*
|
|
107
|
+
*/
|
|
108
|
+
get<ThrowOnError extends boolean = true>(options: Options<ProviderAccountsGetData, ThrowOnError>): RequestResult<ProviderAccountsGetResponses, ProviderAccountsGetErrors, ThrowOnError, 'data'>;
|
|
109
|
+
/**
|
|
110
|
+
* Rotate a connected account's credentials
|
|
111
|
+
*
|
|
112
|
+
* Replaces a connected account's credentials, for example to rotate a key. Needs the
|
|
113
|
+
* `provider-accounts:manage` permission on the API key (a signed-in dashboard session also
|
|
114
|
+
* works) and the account's current `expected_version`.
|
|
115
|
+
*
|
|
116
|
+
* The new credentials must belong to the same provider. BoxRouter makes one read-only request
|
|
117
|
+
* to the provider and refuses a clear rejection with `422 credentials_rejected`; it does not
|
|
118
|
+
* check which account the key belongs to. Requests already running keep the old credentials,
|
|
119
|
+
* and requests that start afterward use the new ones. A provider that is not enabled for you
|
|
120
|
+
* fails with `409 provider_not_enabled`.
|
|
121
|
+
*
|
|
122
|
+
* Leave out the connection settings to keep the existing ones. Settings you send must match the
|
|
123
|
+
* existing route; changing the endpoint, proxy or header identity needs a new connected
|
|
124
|
+
* account, not a key rotation. Credentials that run your code need extra authority on the key
|
|
125
|
+
* and an artifact you uploaded. If the new credentials fail to activate, the old version stays
|
|
126
|
+
* in use. A token refresh that already happened with the provider is not undone.
|
|
127
|
+
*
|
|
128
|
+
*/
|
|
129
|
+
replaceCredentials<ThrowOnError extends boolean = true>(options: Options<ProviderAccountsReplaceCredentialsData, ThrowOnError>): RequestResult<ProviderAccountsReplaceCredentialsResponses, ProviderAccountsReplaceCredentialsErrors, ThrowOnError, 'data'>;
|
|
130
|
+
/**
|
|
131
|
+
* Test a saved provider account
|
|
132
|
+
*
|
|
133
|
+
* Requires `provider-accounts:manage` on API keys; dashboard browser sessions are also
|
|
134
|
+
* authorized. The credential check makes one read-only provider request using the saved
|
|
135
|
+
* credentials and returns the provider's native status and body, limited to 4096 characters.
|
|
136
|
+
* A successful test can update account health and register provider event webhooks. It
|
|
137
|
+
* starts no sandbox and prepares no image; run the standard image setup to prepare the
|
|
138
|
+
* standard image before the first sandbox needs it. The response reports the credential
|
|
139
|
+
* check.
|
|
140
|
+
* Fails with `409 provider_not_enabled` when this provider is not enabled for you.
|
|
141
|
+
*
|
|
142
|
+
*/
|
|
143
|
+
test<ThrowOnError extends boolean = true>(options: Options<ProviderAccountsTestData, ThrowOnError>): RequestResult<ProviderAccountsTestResponses, ProviderAccountsTestErrors, ThrowOnError, 'data'>;
|
|
144
|
+
/**
|
|
145
|
+
* Run the standard image setup proof
|
|
146
|
+
*
|
|
147
|
+
* Requires `provider-accounts:manage` on API keys; dashboard browser sessions are also
|
|
148
|
+
* authorized. This explicit action first tests the saved key, then boots the provider's
|
|
149
|
+
* standard image, runs a bounded command, and destroys the proof sandbox. The provider
|
|
150
|
+
* may charge for that short sandbox. Readiness is recorded only after boot, command and
|
|
151
|
+
* cleanup succeed; failure returns the unavailable state and its setup fix. Requests are
|
|
152
|
+
* idempotent and must include an idempotency key.
|
|
153
|
+
*
|
|
154
|
+
*/
|
|
155
|
+
setupStandardImage<ThrowOnError extends boolean = true>(options: Options<ProviderAccountsSetupStandardImageData, ThrowOnError>): RequestResult<ProviderAccountsSetupStandardImageResponses, ProviderAccountsSetupStandardImageErrors, ThrowOnError, 'data'>;
|
|
156
|
+
}
|