@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,46 @@
|
|
|
1
|
+
import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.js';
|
|
2
|
+
import { HeyApiClient } from './namespace-base.mjs';
|
|
3
|
+
import type { ArtifactsDeleteData, ArtifactsDeleteErrors, ArtifactsDeleteResponses, ArtifactsGetData, ArtifactsGetErrors, ArtifactsGetResponses, ArtifactsUploadData, ArtifactsUploadErrors, ArtifactsUploadResponses } 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 Artifacts extends HeyApiClient {
|
|
18
|
+
/**
|
|
19
|
+
* Upload a staged input
|
|
20
|
+
*
|
|
21
|
+
* Stream opaque source bytes to workspace-scoped temporary storage. Enforce
|
|
22
|
+
* workspace upload quotas without buffering the entire request in memory.
|
|
23
|
+
* Compute the digest server-side; return a handle only after the full upload
|
|
24
|
+
* succeeds. A failed upload is not a usable artifact. Do not execute or import
|
|
25
|
+
* uploaded code. Artifact references stay workspace-scoped and can be used across routes.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
upload<ThrowOnError extends boolean = true>(options: Options<ArtifactsUploadData, ThrowOnError>): RequestResult<ArtifactsUploadResponses, ArtifactsUploadErrors, ThrowOnError, 'data'>;
|
|
29
|
+
/**
|
|
30
|
+
* Remove a staged artifact
|
|
31
|
+
*
|
|
32
|
+
* Delete source storage without deleting resulting provider images. Reject with
|
|
33
|
+
* 409 while a submitted build, file transfer or credential-factory activation
|
|
34
|
+
* still needs these bytes. An activated factory uses its retained encrypted
|
|
35
|
+
* copy; deleting staging bytes does not revoke that credential version. Successful deletion is
|
|
36
|
+
* idempotent for a known owned record; unowned IDs remain 404.
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
delete<ThrowOnError extends boolean = true>(options: Options<ArtifactsDeleteData, ThrowOnError>): RequestResult<ArtifactsDeleteResponses, ArtifactsDeleteErrors, ThrowOnError, 'data'>;
|
|
40
|
+
/**
|
|
41
|
+
* Inspect a staged artifact
|
|
42
|
+
*
|
|
43
|
+
* Return metadata only. Unknown, unowned and expired artifacts return 404.
|
|
44
|
+
*/
|
|
45
|
+
get<ThrowOnError extends boolean = true>(options: Options<ArtifactsGetData, ThrowOnError>): RequestResult<ArtifactsGetResponses, ArtifactsGetErrors, ThrowOnError, 'data'>;
|
|
46
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { HeyApiClient } from './namespace-base.mjs';
|
|
2
|
+
export class Artifacts extends HeyApiClient {
|
|
3
|
+
/**
|
|
4
|
+
* Upload a staged input
|
|
5
|
+
*
|
|
6
|
+
* Stream opaque source bytes to workspace-scoped temporary storage. Enforce
|
|
7
|
+
* workspace upload quotas without buffering the entire request in memory.
|
|
8
|
+
* Compute the digest server-side; return a handle only after the full upload
|
|
9
|
+
* succeeds. A failed upload is not a usable artifact. Do not execute or import
|
|
10
|
+
* uploaded code. Artifact references stay workspace-scoped and can be used across routes.
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
upload(options) {
|
|
14
|
+
return (options.client ?? this.client).post({
|
|
15
|
+
bodySerializer: null,
|
|
16
|
+
responseStyle: 'data',
|
|
17
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
18
|
+
in: 'cookie',
|
|
19
|
+
name: '__Host-boxrouter_session',
|
|
20
|
+
type: 'apiKey'
|
|
21
|
+
}],
|
|
22
|
+
url: '/artifacts',
|
|
23
|
+
...options,
|
|
24
|
+
headers: {
|
|
25
|
+
'Content-Type': 'application/octet-stream',
|
|
26
|
+
...options.headers
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Remove a staged artifact
|
|
32
|
+
*
|
|
33
|
+
* Delete source storage without deleting resulting provider images. Reject with
|
|
34
|
+
* 409 while a submitted build, file transfer or credential-factory activation
|
|
35
|
+
* still needs these bytes. An activated factory uses its retained encrypted
|
|
36
|
+
* copy; deleting staging bytes does not revoke that credential version. Successful deletion is
|
|
37
|
+
* idempotent for a known owned record; unowned IDs remain 404.
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
delete(options) {
|
|
41
|
+
return (options.client ?? this.client).delete({
|
|
42
|
+
responseStyle: 'data',
|
|
43
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
44
|
+
in: 'cookie',
|
|
45
|
+
name: '__Host-boxrouter_session',
|
|
46
|
+
type: 'apiKey'
|
|
47
|
+
}],
|
|
48
|
+
url: '/artifacts/{artifact_id}',
|
|
49
|
+
...options
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Inspect a staged artifact
|
|
54
|
+
*
|
|
55
|
+
* Return metadata only. Unknown, unowned and expired artifacts return 404.
|
|
56
|
+
*/
|
|
57
|
+
get(options) {
|
|
58
|
+
return (options.client ?? this.client).get({
|
|
59
|
+
responseStyle: 'data',
|
|
60
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
61
|
+
in: 'cookie',
|
|
62
|
+
name: '__Host-boxrouter_session',
|
|
63
|
+
type: 'apiKey'
|
|
64
|
+
}],
|
|
65
|
+
url: '/artifacts/{artifact_id}',
|
|
66
|
+
...options
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.js';
|
|
2
|
+
import { HeyApiClient } from './namespace-base.mjs';
|
|
3
|
+
import type { CommandsRunData, CommandsRunErrors, CommandsRunResponses } 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 Commands extends HeyApiClient {
|
|
18
|
+
/**
|
|
19
|
+
* Run a buffered command
|
|
20
|
+
*
|
|
21
|
+
* **Commands**
|
|
22
|
+
*
|
|
23
|
+
* You can rely on:
|
|
24
|
+
* - Runs in a login Bash, so PATH changes that installers write to ~/.profile apply to later commands.
|
|
25
|
+
* - Returns the exit status.
|
|
26
|
+
* - Returns stdout and stderr separately.
|
|
27
|
+
* - Returns exact bytes in byte mode.
|
|
28
|
+
* - The timeout ends the command.
|
|
29
|
+
* - On a timeout the command's process group receives TERM at the deadline and KILL 5 seconds later, in both output modes.
|
|
30
|
+
* - Returned output is captured after the shell exits, and later writes by background children cannot change it.
|
|
31
|
+
* - An uncertain outcome is never replayed.
|
|
32
|
+
* - Output over the limit returns the exit status and the first output_limit_bytes of each stream, marked truncated. Default and maximum: 512 KiB per stream. Processes stream complete large output.
|
|
33
|
+
*
|
|
34
|
+
* You can set: command, cwd, env, timeout_seconds, output (text or bytes), output_limit_bytes.
|
|
35
|
+
*
|
|
36
|
+
* Not promised: guest disk used by output above the limit; ending children that leave the command's process group (for example setsid daemons).
|
|
37
|
+
*
|
|
38
|
+
* **Command stdin**
|
|
39
|
+
*
|
|
40
|
+
* You can rely on:
|
|
41
|
+
* - A command takes no input: it starts with stdin at end-of-file, and login profiles, the command and its children all read empty input.
|
|
42
|
+
*
|
|
43
|
+
* You can set: nothing (use process input for interactive input).
|
|
44
|
+
*
|
|
45
|
+
* Output over output_limit_bytes is not an error: the result sets stdout_truncated or
|
|
46
|
+
* stderr_truncated. A nonzero exit is a completed workload result, not an HTTP failure.
|
|
47
|
+
* A command that reaches timeout_seconds is a result too: the process group is ended and
|
|
48
|
+
* the answer is 200 with timed_out true, exit_code null and the output written so far.
|
|
49
|
+
* 504 timeout is left for the case where BoxRouter lost sight of the command and cannot
|
|
50
|
+
* say whether it ran. A disconnected HTTP client is not promised to end the command; the
|
|
51
|
+
* timeout ends it. Use process streaming for output without a bound.
|
|
52
|
+
* Generated clients take an opt-in check argument and raise CommandFailed (the operation's
|
|
53
|
+
* x-boxrouter-result-check) when exit_code is not 0 or timed_out is true.
|
|
54
|
+
*
|
|
55
|
+
*/
|
|
56
|
+
run<ThrowOnError extends boolean = true>(options: Options<CommandsRunData, ThrowOnError>): RequestResult<CommandsRunResponses, CommandsRunErrors, ThrowOnError, 'data'>;
|
|
57
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { HeyApiClient } from './namespace-base.mjs';
|
|
2
|
+
export class Commands extends HeyApiClient {
|
|
3
|
+
/**
|
|
4
|
+
* Run a buffered command
|
|
5
|
+
*
|
|
6
|
+
* **Commands**
|
|
7
|
+
*
|
|
8
|
+
* You can rely on:
|
|
9
|
+
* - Runs in a login Bash, so PATH changes that installers write to ~/.profile apply to later commands.
|
|
10
|
+
* - Returns the exit status.
|
|
11
|
+
* - Returns stdout and stderr separately.
|
|
12
|
+
* - Returns exact bytes in byte mode.
|
|
13
|
+
* - The timeout ends the command.
|
|
14
|
+
* - On a timeout the command's process group receives TERM at the deadline and KILL 5 seconds later, in both output modes.
|
|
15
|
+
* - Returned output is captured after the shell exits, and later writes by background children cannot change it.
|
|
16
|
+
* - An uncertain outcome is never replayed.
|
|
17
|
+
* - Output over the limit returns the exit status and the first output_limit_bytes of each stream, marked truncated. Default and maximum: 512 KiB per stream. Processes stream complete large output.
|
|
18
|
+
*
|
|
19
|
+
* You can set: command, cwd, env, timeout_seconds, output (text or bytes), output_limit_bytes.
|
|
20
|
+
*
|
|
21
|
+
* Not promised: guest disk used by output above the limit; ending children that leave the command's process group (for example setsid daemons).
|
|
22
|
+
*
|
|
23
|
+
* **Command stdin**
|
|
24
|
+
*
|
|
25
|
+
* You can rely on:
|
|
26
|
+
* - A command takes no input: it starts with stdin at end-of-file, and login profiles, the command and its children all read empty input.
|
|
27
|
+
*
|
|
28
|
+
* You can set: nothing (use process input for interactive input).
|
|
29
|
+
*
|
|
30
|
+
* Output over output_limit_bytes is not an error: the result sets stdout_truncated or
|
|
31
|
+
* stderr_truncated. A nonzero exit is a completed workload result, not an HTTP failure.
|
|
32
|
+
* A command that reaches timeout_seconds is a result too: the process group is ended and
|
|
33
|
+
* the answer is 200 with timed_out true, exit_code null and the output written so far.
|
|
34
|
+
* 504 timeout is left for the case where BoxRouter lost sight of the command and cannot
|
|
35
|
+
* say whether it ran. A disconnected HTTP client is not promised to end the command; the
|
|
36
|
+
* timeout ends it. Use process streaming for output without a bound.
|
|
37
|
+
* Generated clients take an opt-in check argument and raise CommandFailed (the operation's
|
|
38
|
+
* x-boxrouter-result-check) when exit_code is not 0 or timed_out is true.
|
|
39
|
+
*
|
|
40
|
+
*/
|
|
41
|
+
run(options) {
|
|
42
|
+
return (options.client ?? this.client).post({
|
|
43
|
+
responseStyle: 'data',
|
|
44
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
45
|
+
in: 'cookie',
|
|
46
|
+
name: '__Host-boxrouter_session',
|
|
47
|
+
type: 'apiKey'
|
|
48
|
+
}],
|
|
49
|
+
url: '/sandboxes/{sandbox_id}/commands',
|
|
50
|
+
...options,
|
|
51
|
+
headers: {
|
|
52
|
+
'Content-Type': 'application/json',
|
|
53
|
+
...options.headers
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.js';
|
|
2
|
+
import { HeyApiClient } from './namespace-base.mjs';
|
|
3
|
+
import type { CreditsAlertsData, CreditsAlertsErrors, CreditsAlertsResponses, CreditsAutoTopUpData, CreditsAutoTopUpErrors, CreditsAutoTopUpResponses, CreditsBalanceData, CreditsBalanceErrors, CreditsBalanceResponses, CreditsBillingDetailsData, CreditsBillingDetailsErrors, CreditsBillingDetailsResponses, CreditsCancelPurchaseData, CreditsCancelPurchaseErrors, CreditsCancelPurchaseResponses, CreditsDeletePaymentMethodData, CreditsDeletePaymentMethodErrors, CreditsDeletePaymentMethodResponses, CreditsGetPaymentMethodSetupData, CreditsGetPaymentMethodSetupErrors, CreditsGetPaymentMethodSetupResponses, CreditsGetPurchaseData, CreditsGetPurchaseErrors, CreditsGetPurchaseResponses, CreditsPaymentMethodsData, CreditsPaymentMethodsErrors, CreditsPaymentMethodsResponses, CreditsPromotionsData, CreditsPromotionsErrors, CreditsPromotionsResponses, CreditsPurchaseData, CreditsPurchaseErrors, CreditsPurchaseResponses, CreditsPurchasesData, CreditsPurchasesErrors, CreditsPurchasesResponses, CreditsQuotePurchaseData, CreditsQuotePurchaseErrors, CreditsQuotePurchaseResponses, CreditsRedeemData, CreditsRedeemErrors, CreditsRedeemResponses, CreditsReorderPaymentMethodsData, CreditsReorderPaymentMethodsErrors, CreditsReorderPaymentMethodsResponses, CreditsSetDefaultPaymentMethodData, CreditsSetDefaultPaymentMethodErrors, CreditsSetDefaultPaymentMethodResponses, CreditsSetupPaymentMethodData, CreditsSetupPaymentMethodErrors, CreditsSetupPaymentMethodIntentData, CreditsSetupPaymentMethodIntentErrors, CreditsSetupPaymentMethodIntentResponses, CreditsSetupPaymentMethodResponses, CreditsUpdateAlertsData, CreditsUpdateAlertsErrors, CreditsUpdateAlertsResponses, CreditsUpdateAutoTopUpData, CreditsUpdateAutoTopUpErrors, CreditsUpdateAutoTopUpResponses, CreditsUpdateBillingDetailsData, CreditsUpdateBillingDetailsErrors, CreditsUpdateBillingDetailsResponses, CreditsUsageData, CreditsUsageErrors, CreditsUsageResponses } 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 Credits extends HeyApiClient {
|
|
18
|
+
/**
|
|
19
|
+
* Get the workspace credit balance
|
|
20
|
+
*
|
|
21
|
+
* Requires account-management permission; execution keys receive 403. Returns 503
|
|
22
|
+
* payments_unavailable while credit purchases are not configured. BYOK work never
|
|
23
|
+
* depends on this balance.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
balance<ThrowOnError extends boolean = true>(options?: Options<CreditsBalanceData, ThrowOnError>): RequestResult<CreditsBalanceResponses, CreditsBalanceErrors, ThrowOnError, 'data'>;
|
|
27
|
+
/**
|
|
28
|
+
* List recent credit purchases
|
|
29
|
+
*
|
|
30
|
+
* Workspace-owned purchases in every state, ordered by creation time and ID descending. Invoice and receipt links appear only after confirmed payment. New purchases do not shift subsequent pages. Invalid or another workspace's cursor is a 400.
|
|
31
|
+
*/
|
|
32
|
+
purchases<ThrowOnError extends boolean = true>(options?: Options<CreditsPurchasesData, ThrowOnError>): RequestResult<CreditsPurchasesResponses, CreditsPurchasesErrors, ThrowOnError, 'data'>;
|
|
33
|
+
/**
|
|
34
|
+
* Start a credit purchase through Checkout or a saved card
|
|
35
|
+
*
|
|
36
|
+
* Without payment_method_id, records a pending purchase and returns the hosted
|
|
37
|
+
* Checkout page; success_url and cancel_url are required for this path. The response
|
|
38
|
+
* reports fee_minor and total_minor before redirect: Checkout charges total_minor
|
|
39
|
+
* (amount_minor plus BoxRouter's purchase fee, before tax) in two line items, and only
|
|
40
|
+
* amount_minor is added as credit. A refund returns credit only; the fee is not
|
|
41
|
+
* refunded. With a
|
|
42
|
+
* workspace-owned payment_method_id, creates and pays a
|
|
43
|
+
* Stripe invoice using that card. A verified paid invoice returns confirmed; when
|
|
44
|
+
* payer authentication is required, returns pending with the hosted invoice
|
|
45
|
+
* authentication_url. Send the payer there, then poll this purchase after they
|
|
46
|
+
* return to the dashboard. Credit is added only after BoxRouter fetches and validates
|
|
47
|
+
* the paid invoice. A definitive card decline returns payment_declined with the
|
|
48
|
+
* purchase ID and a short safe decline reason in error details, outcome not_started;
|
|
49
|
+
* the failed purchase remains in history. Repeating a request with the same
|
|
50
|
+
* Idempotency-Key returns its original result; a different amount or card under that
|
|
51
|
+
* key is a 409. After a payment_provider_unavailable response with outcome unknown,
|
|
52
|
+
* retry with the same key.
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
purchase<ThrowOnError extends boolean = true>(options: Options<CreditsPurchaseData, ThrowOnError>): RequestResult<CreditsPurchaseResponses, CreditsPurchaseErrors, ThrowOnError, 'data'>;
|
|
56
|
+
/**
|
|
57
|
+
* Preview a credit purchase and its tax
|
|
58
|
+
*
|
|
59
|
+
* Returns Stripe's current tax preview for the requested top-up amount. Requires account-management permission and is available only when in-page card purchases are enabled.
|
|
60
|
+
*/
|
|
61
|
+
quotePurchase<ThrowOnError extends boolean = true>(options: Options<CreditsQuotePurchaseData, ThrowOnError>): RequestResult<CreditsQuotePurchaseResponses, CreditsQuotePurchaseErrors, ThrowOnError, 'data'>;
|
|
62
|
+
/**
|
|
63
|
+
* List managed-compute credit movements
|
|
64
|
+
*
|
|
65
|
+
* Requires account-management permission; execution keys receive 403. Returns
|
|
66
|
+
* confirmed, nonzero charges from the configured test or live billing book, the later
|
|
67
|
+
* corrections to them, reservations still held, and reservations released with no
|
|
68
|
+
* charge, newest first. Results are limited to the calling workspace. BYOK work,
|
|
69
|
+
* supplier costs, provider account identities, API-key digests and raw usage evidence
|
|
70
|
+
* are not returned; a row's `key_id` names the workspace API key it belongs to. A
|
|
71
|
+
* cursor belongs to this workspace and billing mode; invalid or foreign cursors
|
|
72
|
+
* return 400. New rows do not shift subsequent pages. No provider or payment-provider
|
|
73
|
+
* calls are made.
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
76
|
+
usage<ThrowOnError extends boolean = true>(options?: Options<CreditsUsageData, ThrowOnError>): RequestResult<CreditsUsageResponses, CreditsUsageErrors, ThrowOnError, 'data'>;
|
|
77
|
+
/**
|
|
78
|
+
* Get one credit purchase
|
|
79
|
+
*
|
|
80
|
+
* The authoritative state to poll after the payer returns from Checkout. Another workspace's purchase is a 404.
|
|
81
|
+
*/
|
|
82
|
+
getPurchase<ThrowOnError extends boolean = true>(options: Options<CreditsGetPurchaseData, ThrowOnError>): RequestResult<CreditsGetPurchaseResponses, CreditsGetPurchaseErrors, ThrowOnError, 'data'>;
|
|
83
|
+
/**
|
|
84
|
+
* Close an unpaid Checkout session
|
|
85
|
+
*
|
|
86
|
+
* Expires a known open Checkout session for this workspace-owned purchase. A
|
|
87
|
+
* completed payment is reconciled and remains confirmed. If Checkout creation
|
|
88
|
+
* had an unknown outcome and no session ID was recorded, the same stable Stripe
|
|
89
|
+
* idempotency key recovers that request before BoxRouter expires the session.
|
|
90
|
+
* Repeating this request is safe. The request needs no body: the return URLs are
|
|
91
|
+
* optional and unused when closing a purchase.
|
|
92
|
+
*
|
|
93
|
+
*/
|
|
94
|
+
cancelPurchase<ThrowOnError extends boolean = true>(options: Options<CreditsCancelPurchaseData, ThrowOnError>): RequestResult<CreditsCancelPurchaseResponses, CreditsCancelPurchaseErrors, ThrowOnError, 'data'>;
|
|
95
|
+
/**
|
|
96
|
+
* List redeemed promotion codes
|
|
97
|
+
*
|
|
98
|
+
* Promotion codes this workspace redeemed, newest first.
|
|
99
|
+
*/
|
|
100
|
+
promotions<ThrowOnError extends boolean = true>(options?: Options<CreditsPromotionsData, ThrowOnError>): RequestResult<CreditsPromotionsResponses, CreditsPromotionsErrors, ThrowOnError, 'data'>;
|
|
101
|
+
/**
|
|
102
|
+
* Redeem a promotion code for free credit
|
|
103
|
+
*
|
|
104
|
+
* Adds the code's credit to the workspace balance, once per workspace. Codes are
|
|
105
|
+
* case-insensitive and surrounding spaces are ignored. An unknown, expired, disabled
|
|
106
|
+
* or fully used code is 404 promotion_code_invalid; these cases are not told apart.
|
|
107
|
+
* A new redemption answers 201. A code this workspace already redeemed is refused
|
|
108
|
+
* with 409 promotion_already_redeemed and details.redemption containing the original redemption;
|
|
109
|
+
* its message names the redemption date. No credit is granted again. Promotional
|
|
110
|
+
* credit does not expire. Requires account-management permission; 503 payments_unavailable while
|
|
111
|
+
* credits are not configured.
|
|
112
|
+
*
|
|
113
|
+
*/
|
|
114
|
+
redeem<ThrowOnError extends boolean = true>(options: Options<CreditsRedeemData, ThrowOnError>): RequestResult<CreditsRedeemResponses, CreditsRedeemErrors, ThrowOnError, 'data'>;
|
|
115
|
+
/**
|
|
116
|
+
* Get workspace billing details
|
|
117
|
+
*
|
|
118
|
+
* Requires account-management permission. Reads the workspace Stripe customer. When multiple customer tax IDs exist, tax_id is the newest by creation time (ID breaks ties). Unset details are null.
|
|
119
|
+
*/
|
|
120
|
+
billingDetails<ThrowOnError extends boolean = true>(options?: Options<CreditsBillingDetailsData, ThrowOnError>): RequestResult<CreditsBillingDetailsResponses, CreditsBillingDetailsErrors, ThrowOnError, 'data'>;
|
|
121
|
+
/**
|
|
122
|
+
* Replace workspace billing details
|
|
123
|
+
*
|
|
124
|
+
* Stores legal name, invoice email, address and one tax ID on the workspace Stripe customer, creating it when absent. Details apply to future invoices. PUT replaces all customer tax IDs with the supplied single ID, adding the replacement before deleting old IDs so a rejected replacement preserves them. Stripe tax ID verification can be pending or unsuccessful. Repeat an uncertain update with the same Idempotency-Key; a changed body under that key returns 409. Stripe rejection returns 502; the update can have partially completed, so read current details before correcting it.
|
|
125
|
+
*/
|
|
126
|
+
updateBillingDetails<ThrowOnError extends boolean = true>(options: Options<CreditsUpdateBillingDetailsData, ThrowOnError>): RequestResult<CreditsUpdateBillingDetailsResponses, CreditsUpdateBillingDetailsErrors, ThrowOnError, 'data'>;
|
|
127
|
+
/**
|
|
128
|
+
* Get workspace credit alert settings
|
|
129
|
+
*
|
|
130
|
+
* Requires account-management permission. Returns workspace-owned settings only.
|
|
131
|
+
*/
|
|
132
|
+
alerts<ThrowOnError extends boolean = true>(options?: Options<CreditsAlertsData, ThrowOnError>): RequestResult<CreditsAlertsResponses, CreditsAlertsErrors, ThrowOnError, 'data'>;
|
|
133
|
+
/**
|
|
134
|
+
* Replace workspace credit alert settings
|
|
135
|
+
*
|
|
136
|
+
* Atomically replaces the optional trigger level and evaluates the current available balance. Repeating identical settings is idempotent and requires no Idempotency-Key. Sends the owner one alert per crossing below the trigger level and one when available credit is zero or negative; a repeated evaluation does not resend. Re-arms at or above the trigger level and above zero respectively. BYOK work is unaffected by credit balance.
|
|
137
|
+
*/
|
|
138
|
+
updateAlerts<ThrowOnError extends boolean = true>(options: Options<CreditsUpdateAlertsData, ThrowOnError>): RequestResult<CreditsUpdateAlertsResponses, CreditsUpdateAlertsErrors, ThrowOnError, 'data'>;
|
|
139
|
+
/**
|
|
140
|
+
* List saved workspace payment methods
|
|
141
|
+
*
|
|
142
|
+
* Returns masked card details only. Saved methods can be charged for a workspace member's purchase or immediately when enabling auto top-up with a trigger level above the current balance.
|
|
143
|
+
*/
|
|
144
|
+
paymentMethods<ThrowOnError extends boolean = true>(options?: Options<CreditsPaymentMethodsData, ThrowOnError>): RequestResult<CreditsPaymentMethodsResponses, CreditsPaymentMethodsErrors, ThrowOnError, 'data'>;
|
|
145
|
+
/**
|
|
146
|
+
* Start hosted setup for a saved payment method
|
|
147
|
+
*
|
|
148
|
+
* Creates a Stripe-hosted setup page and returns its URL. Setup does not charge the
|
|
149
|
+
* payer. The completed method can be charged for a later user-initiated purchase or immediately when enabling auto top-up with a trigger level above the current balance.
|
|
150
|
+
* Repeating the request with the same Idempotency-Key returns the same page.
|
|
151
|
+
*
|
|
152
|
+
*/
|
|
153
|
+
setupPaymentMethod<ThrowOnError extends boolean = true>(options: Options<CreditsSetupPaymentMethodData, ThrowOnError>): RequestResult<CreditsSetupPaymentMethodResponses, CreditsSetupPaymentMethodErrors, ThrowOnError, 'data'>;
|
|
154
|
+
/**
|
|
155
|
+
* Start in-page saved card setup
|
|
156
|
+
*
|
|
157
|
+
* Creates a Stripe SetupIntent for in-page card collection. Requires account-management permission and the in-page cards feature.
|
|
158
|
+
*/
|
|
159
|
+
setupPaymentMethodIntent<ThrowOnError extends boolean = true>(options?: Options<CreditsSetupPaymentMethodIntentData, ThrowOnError>): RequestResult<CreditsSetupPaymentMethodIntentResponses, CreditsSetupPaymentMethodIntentErrors, ThrowOnError, 'data'>;
|
|
160
|
+
/**
|
|
161
|
+
* Set saved card charge order
|
|
162
|
+
*
|
|
163
|
+
* Replaces the order of every saved card and Link method for automatic top-up. Requires account-management permission and the multi-card top-up feature.
|
|
164
|
+
*/
|
|
165
|
+
reorderPaymentMethods<ThrowOnError extends boolean = true>(options: Options<CreditsReorderPaymentMethodsData, ThrowOnError>): RequestResult<CreditsReorderPaymentMethodsResponses, CreditsReorderPaymentMethodsErrors, ThrowOnError, 'data'>;
|
|
166
|
+
/**
|
|
167
|
+
* Get a saved payment method setup status
|
|
168
|
+
*
|
|
169
|
+
* Reads Stripe's current setup state after the payer returns. Another workspace's setup is a 404.
|
|
170
|
+
*/
|
|
171
|
+
getPaymentMethodSetup<ThrowOnError extends boolean = true>(options: Options<CreditsGetPaymentMethodSetupData, ThrowOnError>): RequestResult<CreditsGetPaymentMethodSetupResponses, CreditsGetPaymentMethodSetupErrors, ThrowOnError, 'data'>;
|
|
172
|
+
/**
|
|
173
|
+
* Remove a saved workspace payment method
|
|
174
|
+
*
|
|
175
|
+
* Detaches a saved card. Another workspace's payment method is a 404. If the card
|
|
176
|
+
* was the default, the next saved card becomes default; removing the last card
|
|
177
|
+
* disables auto top-up with disabled_reason payment_method_required.
|
|
178
|
+
*
|
|
179
|
+
*/
|
|
180
|
+
deletePaymentMethod<ThrowOnError extends boolean = true>(options: Options<CreditsDeletePaymentMethodData, ThrowOnError>): RequestResult<CreditsDeletePaymentMethodResponses, CreditsDeletePaymentMethodErrors, ThrowOnError, 'data'>;
|
|
181
|
+
/**
|
|
182
|
+
* Set the workspace's default saved card
|
|
183
|
+
*
|
|
184
|
+
* Makes this workspace-owned saved card the only default card. The first saved
|
|
185
|
+
* card becomes default automatically. This local setting is used by one-click
|
|
186
|
+
* purchases and auto top-up; repeating the request is safe. Another workspace's
|
|
187
|
+
* card is a 404.
|
|
188
|
+
*
|
|
189
|
+
*/
|
|
190
|
+
setDefaultPaymentMethod<ThrowOnError extends boolean = true>(options: Options<CreditsSetDefaultPaymentMethodData, ThrowOnError>): RequestResult<CreditsSetDefaultPaymentMethodResponses, CreditsSetDefaultPaymentMethodErrors, ThrowOnError, 'data'>;
|
|
191
|
+
/**
|
|
192
|
+
* Get automatic credit top-up settings
|
|
193
|
+
*
|
|
194
|
+
* Requires account-management permission. Auto top-up is off until explicitly enabled.
|
|
195
|
+
*/
|
|
196
|
+
autoTopUp<ThrowOnError extends boolean = true>(options?: Options<CreditsAutoTopUpData, ThrowOnError>): RequestResult<CreditsAutoTopUpResponses, CreditsAutoTopUpErrors, ThrowOnError, 'data'>;
|
|
197
|
+
/**
|
|
198
|
+
* Replace automatic credit top-up settings
|
|
199
|
+
*
|
|
200
|
+
* Stores the enabled state, trigger level and purchase amount. The amount must be
|
|
201
|
+
* within current purchase_bounds_minor and the trigger level must be zero or greater.
|
|
202
|
+
* Enabling requires a default saved card. Enabling with a trigger level above current
|
|
203
|
+
* available credit evaluates and attempts one top-up immediately. An attempt is
|
|
204
|
+
* made once per crossing below the trigger level and is never retried automatically. A
|
|
205
|
+
* decline or required authentication disables auto top-up and records the reason.
|
|
206
|
+
* Repeating the same settings is idempotent and does not start a second attempt for
|
|
207
|
+
* the same balance crossing. After a 503 with outcome unknown, retry the identical
|
|
208
|
+
* settings or GET the settings; inspect last_attempt.purchase_id and poll that
|
|
209
|
+
* purchase to reconcile the original attempt.
|
|
210
|
+
*
|
|
211
|
+
*/
|
|
212
|
+
updateAutoTopUp<ThrowOnError extends boolean = true>(options: Options<CreditsUpdateAutoTopUpData, ThrowOnError>): RequestResult<CreditsUpdateAutoTopUpResponses, CreditsUpdateAutoTopUpErrors, ThrowOnError, 'data'>;
|
|
213
|
+
}
|