# openapi

Developer-friendly & type-safe Typescript SDK specifically catered to leverage _openapi_ API.

<div align="left">
    <a href="https://www.speakeasy.com/?utm_source=openapi&utm_campaign=typescript"><img src="https://www.speakeasy.com/assets/badges/built-by-speakeasy.svg" /></a>
    <a href="https://opensource.org/licenses/MIT">
        <img src="https://img.shields.io/badge/License-MIT-blue.svg" style="width: 100px; height: 28px;" />
    </a>
</div>

<br /><br />

> [!IMPORTANT]
> This SDK is not yet ready for production use. To complete setup please follow the steps outlined in your [workspace](https://app.speakeasy.com/org/alien/alien). Delete this section before > publishing to a package manager.

<!-- Start Summary [summary] -->
## Summary


<!-- End Summary [summary] -->

<!-- Start Table of Contents [toc] -->
## Table of Contents
<!-- $toc-max-depth=2 -->
* [openapi](#openapi)
  * [SDK Installation](#sdk-installation)
  * [Requirements](#requirements)
  * [SDK Example Usage](#sdk-example-usage)
  * [Authentication](#authentication)
  * [Available Resources and Operations](#available-resources-and-operations)
  * [Standalone functions](#standalone-functions)
  * [Global Parameters](#global-parameters)
  * [Retries](#retries)
  * [Error Handling](#error-handling)
  * [Server Selection](#server-selection)
  * [Custom HTTP Client](#custom-http-client)
  * [Debugging](#debugging)
* [Development](#development)
  * [Maturity](#maturity)
  * [Contributions](#contributions)

<!-- End Table of Contents [toc] -->

<!-- Start SDK Installation [installation] -->
## SDK Installation

> [!TIP]
> To finish publishing your SDK to npm and others you must [run your first generation action](https://www.speakeasy.com/docs/github-setup#step-by-step-guide).


The SDK can be installed with either [npm](https://www.npmjs.com/), [pnpm](https://pnpm.io/), [bun](https://bun.sh/) or [yarn](https://classic.yarnpkg.com/en/) package managers.

### NPM

```bash
npm add <UNSET>
```

### PNPM

```bash
pnpm add <UNSET>
```

### Bun

```bash
bun add <UNSET>
```

### Yarn

```bash
yarn add <UNSET>
```

> [!NOTE]
> This package is published as an ES Module (ESM) only. For applications using
> CommonJS, use `await import()` to import and use this package.
<!-- End SDK Installation [installation] -->

<!-- Start Requirements [requirements] -->
## Requirements

For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
<!-- End Requirements [requirements] -->

<!-- Start SDK Example Usage [usage] -->
## SDK Example Usage

### Example

```typescript
import { Alien } from "@alienplatform/platform-api";

const alien = new Alien({
  apiKey: process.env["ALIEN_API_KEY"] ?? "",
});

async function run() {
  const result = await alien.getWorkspaceInvitationPreview({
    token: "<value>",
  });

  console.log(result);
}

run();

```
<!-- End SDK Example Usage [usage] -->

<!-- Start Authentication [security] -->
## Authentication

### Per-Client Security Schemes

This SDK supports the following security scheme globally:

| Name     | Type | Scheme      | Environment Variable |
| -------- | ---- | ----------- | -------------------- |
| `apiKey` | http | HTTP Bearer | `ALIEN_API_KEY`      |

To authenticate with the API the `apiKey` parameter must be set when initializing the SDK client instance. For example:
```typescript
import { Alien } from "@alienplatform/platform-api";

const alien = new Alien({
  apiKey: process.env["ALIEN_API_KEY"] ?? "",
});

async function run() {
  const result = await alien.getWorkspaceInvitationPreview({
    token: "<value>",
  });

  console.log(result);
}

run();

```
<!-- End Authentication [security] -->

<!-- Start Available Resources and Operations [operations] -->
## Available Resources and Operations

<details open>
<summary>Available methods</summary>

### [Alien SDK](docs/sdks/alien/README.md)

* [getWorkspaceInvitationPreview](docs/sdks/alien/README.md#getworkspaceinvitationpreview)
* [acceptWorkspaceInvitation](docs/sdks/alien/README.md#acceptworkspaceinvitation)
* [listWorkspaceInvitations](docs/sdks/alien/README.md#listworkspaceinvitations)
* [createWorkspaceInvitation](docs/sdks/alien/README.md#createworkspaceinvitation)
* [resendWorkspaceInvitation](docs/sdks/alien/README.md#resendworkspaceinvitation)
* [revokeWorkspaceInvitation](docs/sdks/alien/README.md#revokeworkspaceinvitation)
* [getWorkspaceInviteLink](docs/sdks/alien/README.md#getworkspaceinvitelink)
* [createWorkspaceInviteLink](docs/sdks/alien/README.md#createworkspaceinvitelink)
* [revokeWorkspaceInviteLink](docs/sdks/alien/README.md#revokeworkspaceinvitelink)
* [getDeploymentCredentialRotation](docs/sdks/alien/README.md#getdeploymentcredentialrotation)
* [prepareDeploymentCredentialRotation](docs/sdks/alien/README.md#preparedeploymentcredentialrotation)
* [cancelDeploymentCredentialRotation](docs/sdks/alien/README.md#canceldeploymentcredentialrotation)
* [getDeploymentCredentialRotationValues](docs/sdks/alien/README.md#getdeploymentcredentialrotationvalues)
* [listAwsVirtualKeys](docs/sdks/alien/README.md#listawsvirtualkeys)
* [createAwsVirtualKey](docs/sdks/alien/README.md#createawsvirtualkey)
* [rotateAwsVirtualKeyCredential](docs/sdks/alien/README.md#rotateawsvirtualkeycredential)
* [restoreAwsVirtualKey](docs/sdks/alien/README.md#restoreawsvirtualkey)
* [finalizeAwsVirtualKeyDeletion](docs/sdks/alien/README.md#finalizeawsvirtualkeydeletion)
* [decommissionAwsVirtualKey](docs/sdks/alien/README.md#decommissionawsvirtualkey)
* [getAwsVirtualKey](docs/sdks/alien/README.md#getawsvirtualkey)
* [continueAwsVirtualKey](docs/sdks/alien/README.md#continueawsvirtualkey)

### [AgentSessions](docs/sdks/agentsessions/README.md)

* [list](docs/sdks/agentsessions/README.md#list) - List ai-agent monitor sessions for this workspace. Newest first, capped at 50.
* [get](docs/sdks/agentsessions/README.md#get) - Retrieve one ai-agent monitor session by id.
* [events](docs/sdks/agentsessions/README.md#events) - Incrementally read a session's event log (steps, tool calls, report deltas, approvals, status transitions). Pass the previous response's `latestSeq` as `after` to fetch only new events.
* [approve](docs/sdks/agentsessions/README.md#approve) - Approve a halted ai-agent monitor session. Proxies to the ai-agent service, minting a fresh CLI session for the caller so the ai-agent's own auth applies.
* [stop](docs/sdks/agentsessions/README.md#stop) - Stop (cancel) a running, queued, or halted ai-agent monitor session. Proxies to the ai-agent service, minting a fresh CLI session for the caller so the ai-agent's own auth applies. Idempotent — stopping an already-terminal session is a 200 no-op.

### [ApiKeys](docs/sdks/apikeys/README.md)

* [list](docs/sdks/apikeys/README.md#list) - Retrieve all API keys for the current workspace.
* [create](docs/sdks/apikeys/README.md#create) - Create a new API key.
* [get](docs/sdks/apikeys/README.md#get) - Retrieve a specific API key.
* [update](docs/sdks/apikeys/README.md#update) - Update an API key (enable/disable, change description).
* [revoke](docs/sdks/apikeys/README.md#revoke) - Revoke (soft delete) an API key.
* [deleteMultiple](docs/sdks/apikeys/README.md#deletemultiple) - Permanently delete multiple API keys.

### [Auth](docs/sdks/auth/README.md)

* [whoami](docs/sdks/auth/README.md#whoami) - Get the current authenticated principal (user or service account). Works with both session cookies and API keys.

### [Billing](docs/sdks/billing/README.md)

* [listAuditLog](docs/sdks/billing/README.md#listauditlog) - List billing activity entries for the current workspace.
* [getEntitlements](docs/sdks/billing/README.md#getentitlements) - Get the workspace billing entitlements used for product feature gates. Autumn is the source of truth; the response is served through the workspace billing read model with stale-cache fallback.

### [CloudRegions](docs/sdks/cloudregions/README.md)

* [get](docs/sdks/cloudregions/README.md#get) - Get cloud regions supported by this Alien environment.

### [Commands](docs/sdks/commands/README.md)

* [bootstrap](docs/sdks/commands/README.md#bootstrap) - Resolve a deployment's current manager and mint a five-minute command capability. Sender tokens can dispatch and observe commands only for this deployment. Receiver tokens can lease and complete commands only for the resolved Container or Daemon target.
* [list](docs/sdks/commands/README.md#list) - Retrieve commands. Use for dashboard analytics and command history.
* [create](docs/sdks/commands/README.md#create) - Create command metadata. Called by manager when processing commands. Returns project info for routing decisions.
* [listNames](docs/sdks/commands/README.md#listnames) - List distinct command names. Use for filter dropdowns in the dashboard.
* [listDeployments](docs/sdks/commands/README.md#listdeployments) - List distinct deployments that have commands, including deployment group info. Use for filter dropdowns in the dashboard.
* [resolveTarget](docs/sdks/commands/README.md#resolvetarget) - Resolve which resource a command for this deployment would be addressed to, and how it would be delivered. Fails when the deployment has no command-capable resources, or more than one and no explicit target was named.
* [update](docs/sdks/commands/README.md#update) - Update command state. Called by manager when command is dispatched or completes.
* [get](docs/sdks/commands/README.md#get) - Retrieve a command by ID.
* [dispatch](docs/sdks/commands/README.md#dispatch) - Atomically mark a command DISPATCHED unless it is already terminal. Returns whether the transition was applied.
* [complete](docs/sdks/commands/README.md#complete) - Atomically transition a command to a terminal state (SUCCEEDED, FAILED, or EXPIRED) unless it is already terminal. Returns whether the transition was applied.
* [incrementAttempt](docs/sdks/commands/README.md#incrementattempt) - Atomically increment the command's attempt counter and return the new value.

### [ContainerRegistry](docs/sdks/containerregistry/README.md)

* [getContainerRegistry](docs/sdks/containerregistry/README.md#getcontainerregistry)
* [putContainerRegistry](docs/sdks/containerregistry/README.md#putcontainerregistry)
* [createContainerRegistryRepository](docs/sdks/containerregistry/README.md#createcontainerregistryrepository)
* [createContainerRegistryCredential](docs/sdks/containerregistry/README.md#createcontainerregistrycredential)
* [revokeContainerRegistryCredential](docs/sdks/containerregistry/README.md#revokecontainerregistrycredential)
* [deleteContainerRegistryRepository](docs/sdks/containerregistry/README.md#deletecontainerregistryrepository)
* [verifyContainerRegistry](docs/sdks/containerregistry/README.md#verifycontainerregistry)
* [revokeContainerRegistry](docs/sdks/containerregistry/README.md#revokecontainerregistry)
* [getContainerRegistryManagerSnapshot](docs/sdks/containerregistry/README.md#getcontainerregistrymanagersnapshot)
* [applyContainerRegistryManagerSnapshot](docs/sdks/containerregistry/README.md#applycontainerregistrymanagersnapshot)

### [DebugSessions](docs/sdks/debugsessions/README.md)

* [list](docs/sdks/debugsessions/README.md#list) - Retrieve debug sessions for dashboard audit. Filters: project, deployment, state, mode.
* [create](docs/sdks/debugsessions/README.md#create) - Create a debug-session audit row. Called by the manager when a pull or push debug tunnel is opened. Workspace + project derived from deployment.
* [update](docs/sdks/debugsessions/README.md#update) - Update debug-session state. Called by manager on tunnel attach, close, or deadline expiry.
* [get](docs/sdks/debugsessions/README.md#get) - Retrieve a debug session by ID.

### [Deployment](docs/sdks/deployment/README.md)

* [getInfo](docs/sdks/deployment/README.md#getinfo) - Get deployment information for the deployment portal. Accepts both deployment-scoped and deployment-group-scoped API keys. Returns project information, package status/outputs, and either deployment or deployment group details depending on the token type. Poll this endpoint to check if packages are ready.
* [planCompute](docs/sdks/deployment/README.md#plancompute) - Plan deployment compute for the active release before stack preparation. The response contains recommended machine and scale choices for cloud compute pools.
* [prepareStack](docs/sdks/deployment/README.md#preparestack) - Prepare the active release stack for a deployment portal setup session. The response contains the generated stack shape plus setup compatibility metadata.

### [DeploymentGroups](docs/sdks/deploymentgroups/README.md)

* [createDeploymentGroup](docs/sdks/deploymentgroups/README.md#createdeploymentgroup) - Create a new deployment group
* [listDeploymentGroups](docs/sdks/deploymentgroups/README.md#listdeploymentgroups) - List deployment groups
* [ensureDeploymentGroupByName](docs/sdks/deploymentgroups/README.md#ensuredeploymentgroupbyname) - Get or create a deployment group by project and name
* [ensureDeploymentGroupByExternalId](docs/sdks/deploymentgroups/README.md#ensuredeploymentgroupbyexternalid) - Get or create a deployment group by project and external ID
* [getDeploymentGroupByExternalId](docs/sdks/deploymentgroups/README.md#getdeploymentgroupbyexternalid) - Get a deployment group by project and external ID
* [getDeploymentGroup](docs/sdks/deploymentgroups/README.md#getdeploymentgroup) - Get deployment group details
* [updateDeploymentGroup](docs/sdks/deploymentgroups/README.md#updatedeploymentgroup) - Update deployment group
* [deleteDeploymentGroup](docs/sdks/deploymentgroups/README.md#deletedeploymentgroup) - Delete deployment group
* [setDeploymentGroupExternalId](docs/sdks/deploymentgroups/README.md#setdeploymentgroupexternalid) - Set or clear a deployment group's external ID
* [createDeploymentGroupToken](docs/sdks/deploymentgroups/README.md#createdeploymentgrouptoken) - Create deployment group token
* [createFirstPartyDeploymentSession](docs/sdks/deploymentgroups/README.md#createfirstpartydeploymentsession) - Create first-party deployment session
* [getExternalAIBinding](docs/sdks/deploymentgroups/README.md#getexternalaibinding) - Get external AI connection state
* [putExternalAIBinding](docs/sdks/deploymentgroups/README.md#putexternalaibinding) - Connect or rotate an external AI provider key
* [deleteExternalAIBinding](docs/sdks/deploymentgroups/README.md#deleteexternalaibinding) - Revoke the external AI connection
* [createExternalAIModelCheck](docs/sdks/deploymentgroups/README.md#createexternalaimodelcheck) - Queue an explicit external model access check
* [getExternalAIModelCheck](docs/sdks/deploymentgroups/README.md#getexternalaimodelcheck) - Get an external model access check

### [Deployments](docs/sdks/deployments/README.md)

* [list](docs/sdks/deployments/README.md#list) - Retrieve all deployments.
* [create](docs/sdks/deployments/README.md#create) - Create a new deployment. Deployment group tokens automatically use their group. Workspace/project tokens must provide deploymentGroupId.
* [getStats](docs/sdks/deployments/README.md#getstats) - Get aggregated deployment statistics. Returns total count and breakdown by status.
* [listFilterEnvironments](docs/sdks/deployments/README.md#listfilterenvironments) - List distinct effective environments used by deployments. Used for filter dropdowns.
* [listFilterDeploymentGroups](docs/sdks/deployments/README.md#listfilterdeploymentgroups) - List deployment groups with deployment counts. Used for filter dropdowns.
* [get](docs/sdks/deployments/README.md#get) - Retrieve a deployment by ID.
* [getInfo](docs/sdks/deployments/README.md#getinfo) - Get deployment connection information including command endpoint and resource URLs.
* [import](docs/sdks/deployments/README.md#import) - Import a deployment from resolved setup infrastructure such as CloudFormation, Terraform, or Helm.
* [setFirstPartyDeploymentInputs](docs/sdks/deployments/README.md#setfirstpartydeploymentinputs) - Store operator-provided input values on a first-party deployment session token so CLI/local deploys apply them.
* [createSetupRegistrationOperation](docs/sdks/deployments/README.md#createsetupregistrationoperation) - Start a durable setup registration operation for CloudFormation, Terraform, or Helm.
* [getSetupRegistrationOperation](docs/sdks/deployments/README.md#getsetupregistrationoperation) - Get setup registration operation status.
* [delete](docs/sdks/deployments/README.md#delete) - Delete, detach, or forget a deployment by ID.
* [redeploy](docs/sdks/deployments/README.md#redeploy) - Redeploy a running deployment with the same release and fresh environment variables. Sets status to update-pending.
* [pinRelease](docs/sdks/deployments/README.md#pinrelease) - Pin or unpin a running or runtime-failed deployment. Running deployments start an update; failed deployments retry toward the selected release.
* [setReleaseChannel](docs/sdks/deployments/README.md#setreleasechannel)
* [retry](docs/sdks/deployments/README.md#retry) - Retry a failed deployment operation. Uses alien-infra's retry mechanisms to resume from exact failure point.
* [getInputs](docs/sdks/deployments/README.md#getinputs) - Get the active input definitions and current non-secret values for a deployment.
* [updateInputs](docs/sdks/deployments/README.md#updateinputs) - Update runtime stack inputs, rebuild their environment-variable mappings, and request a deployment update when runtime configuration changes.
* [updateCompute](docs/sdks/deployments/README.md#updatecompute) - Update deployment-time compute pool selections and request reconciliation by the hosted manager.
* [updateEnvironmentVariables](docs/sdks/deployments/README.md#updateenvironmentvariables) - Replace a deployment's advanced environment variables. Stack-input-backed variables are write-only through the input endpoint. If the deployment is running and not locked, the status will be changed to update-pending to trigger a deployment.
* [createToken](docs/sdks/deployments/README.md#createtoken) - Create a deployment token (deployment-scoped API key). The deployment must exist before creating a token.
* [listMachines](docs/sdks/deployments/README.md#listmachines)

### [Domains](docs/sdks/domains/README.md)

* [list](docs/sdks/domains/README.md#list) - List system domains and workspace domains.
* [create](docs/sdks/domains/README.md#create) - Create a workspace domain and optional initial endpoints.
* [createEndpoint](docs/sdks/domains/README.md#createendpoint) - Create an endpoint under a workspace domain.
* [get](docs/sdks/domains/README.md#get) - Get domain by ID.
* [delete](docs/sdks/domains/README.md#delete) - Delete a workspace domain.
* [refresh](docs/sdks/domains/README.md#refresh) - Refresh workspace domain verification.

### [Events](docs/sdks/events/README.md)

* [list](docs/sdks/events/README.md#list) - Retrieve all events.
* [get](docs/sdks/events/README.md#get) - Retrieve an event by ID.

### [Gateways](docs/sdks/gateways/README.md)

* [getWorkspaceOverview](docs/sdks/gateways/README.md#getworkspaceoverview) - Get compact cross-Project setup and customer status for a workspace Gateway.

### [Machines](docs/sdks/machines/README.md)

* [listJoinTokens](docs/sdks/machines/README.md#listjointokens)
* [createJoinToken](docs/sdks/machines/README.md#createjointoken)
* [rotateJoinToken](docs/sdks/machines/README.md#rotatejointoken)
* [revokeJoinToken](docs/sdks/machines/README.md#revokejointoken)
* [cancelMachineDrain](docs/sdks/machines/README.md#cancelmachinedrain)
* [drainMachine](docs/sdks/machines/README.md#drainmachine)
* [removeMachine](docs/sdks/machines/README.md#removemachine)

### [Managers](docs/sdks/managers/README.md)

* [create](docs/sdks/managers/README.md#create) - Create a new manager.
* [list](docs/sdks/managers/README.md#list) - Retrieve all managers.
* [retrySetup](docs/sdks/managers/README.md#retrysetup) - Revoke previous private-manager setup tokens and issue a fresh setup token/config.
* [retry](docs/sdks/managers/README.md#retry) - Retry private-manager setup. Returns a fresh setup action before the internal deployment exists, or requests retry for the internal deployment after it exists.
* [cancelSetup](docs/sdks/managers/README.md#cancelsetup) - Cancel pending private-manager setup, revoke setup/runtime tokens, and remove the undeployed manager record.
* [get](docs/sdks/managers/README.md#get) - Retrieve a manager by ID.
* [delete](docs/sdks/managers/README.md#delete) - Delete a manager by ID.
* [getDomainBinding](docs/sdks/managers/README.md#getdomainbinding) - Get the custom domain binding for a private manager.
* [updateDomainBinding](docs/sdks/managers/README.md#updatedomainbinding) - Create, update, or remove the custom domain binding for a private manager.
* [getManagementConfig](docs/sdks/managers/README.md#getmanagementconfig) - Get the management configuration for a manager.
* [provision](docs/sdks/managers/README.md#provision) - Enqueue provisioning for a manager by ID.
* [update](docs/sdks/managers/README.md#update) - Update a manager to a specific release ID or active release.
* [listEvents](docs/sdks/managers/README.md#listevents) - Retrieve all events of a manager.
* [generateManagerToken](docs/sdks/managers/README.md#generatemanagertoken) - Generate a short-lived JWT for direct browser → manager communication. Used for fetching command payloads and querying logs without routing sensitive data through the platform API.
* [generateManagerBindingToken](docs/sdks/managers/README.md#generatemanagerbindingtoken) - Generate a short-lived deployment-scoped token for resolving opted-in remote bindings through the currently assigned manager.
* [resolveGcpOAuthProvider](docs/sdks/managers/README.md#resolvegcpoauthprovider) - Resolve decrypted project-level Google Cloud OAuth provider settings for a manager-side deployment bootstrap.
* [reportHeartbeat](docs/sdks/managers/README.md#reportheartbeat) - Report Manager health status and metrics.
* [getDeployment](docs/sdks/managers/README.md#getdeployment) - Get deployment details for a private manager (internal deployment platform, status, resources).

### [Operations](docs/sdks/operations/README.md)

* [listPlugins](docs/sdks/operations/README.md#listplugins) - List available operations plugins (builtin + custom) for a project, with their operations and risk tiers.
* [publishPlugin](docs/sdks/operations/README.md#publishplugin) - Register a custom operations plugin whose bundle ZIP has already been uploaded to S3 (see POST /plugins/upload-url). Replaces any existing plugin of the same name in that project. New custom plugins are enabled by default.
* [setBuiltinPlugins](docs/sdks/operations/README.md#setbuiltinplugins) - Replace the complete set of enabled built-in operations plugins for a project.
* [createBundleUploadUrl](docs/sdks/operations/README.md#createbundleuploadurl) - Get a presigned S3 URL to upload a custom operations plugin bundle ZIP. Upload the ZIP with a PUT to the returned url (sending the given Content-Type), then call POST /plugins to register it.
* [setPluginEnabled](docs/sdks/operations/README.md#setpluginenabled) - Enable or disable an operations plugin (builtin or custom) for a project. Only enabled plugins are baked into the operator image and can be invoked.
* [getPolicy](docs/sdks/operations/README.md#getpolicy) - Get a project's per-command approval policy. Mirrors what the operator enforces: `plugin/operation` / `plugin/*` / `*` patterns → auto | manual.
* [updatePolicy](docs/sdks/operations/README.md#updatepolicy) - Replace a project's per-command approval policy (full rule set). Patterns are `plugin/operation`, `plugin/*`, or `*`; each maps to auto | manual.
* [invoke](docs/sdks/operations/README.md#invoke) - Invoke a plugin operation against a deployment. Honors the project's per-command approval policy.
* [verifyCheck](docs/sdks/operations/README.md#verifycheck) - One verification poll cycle for an original operation command. Loads that command's authoritative stored result and dispatch-time verification contract, dispatches the frozen read-only poll operation once, and evaluates its frozen success condition. Callers poll this repeatedly per the returned policy.
* [createAccessRequest](docs/sdks/operations/README.md#createaccessrequest) - Create an access request — either plan-backed (an ai-agent investigation's exact commands) or plan-less (a CLI-originated exact operation or wildcard pattern, resolved and frozen here). Plan-backed requests await the engineer gate (status `pending-approval`); plan-less requests are queued immediately since the requester is asking for their own access (status `queued`).
* [listAccessRequests](docs/sdks/operations/README.md#listaccessrequests) - List a project's access requests, newest first.
* [queueAccessRequest](docs/sdks/operations/README.md#queueaccessrequest) - Engineer gate — approve a pending access request, queuing it for the operator to materialize. Records who queued it.
* [approveAccessRequest](docs/sdks/operations/README.md#approveaccessrequest) - Customer gate — an authenticated workspace member or administrator other than the requester may approve a queued access request. Actor identity comes from authentication; method/source are audit context only.
* [denyAccessRequest](docs/sdks/operations/README.md#denyaccessrequest) - Customer gate — an authenticated workspace member or administrator other than the requester may reject a queued access request. Actor identity comes from authentication.
* [getAccessRequestCoordinates](docs/sdks/operations/README.md#getaccessrequestcoordinates) - The customer's kubectl approve command for a queued access request, or null until the operator has materialized the grant CR and reported its coordinates. Polled by the Slack handler to update the access-plan card.
* [getAccessRequest](docs/sdks/operations/README.md#getaccessrequest) - Get an access request by id.

### [OperatorManifests](docs/sdks/operatormanifests/README.md)

* [prepareOperatorManifestPackage](docs/sdks/operatormanifests/README.md#prepareoperatormanifestpackage) - Prepare the white-labeled Operator image for an Operate install
* [renderOperatorManifest](docs/sdks/operatormanifests/README.md#renderoperatormanifest) - Render a Kubernetes Operator manifest
* [renderOperatorEcsCloudFormation](docs/sdks/operatormanifests/README.md#renderoperatorecscloudformation) - Render a Remote Operator ECS Fargate CloudFormation installer

### [Packages](docs/sdks/packages/README.md)

* [list](docs/sdks/packages/README.md#list) - List packages with optional filters. Returns packages ordered by creation date (newest first).
* [get](docs/sdks/packages/README.md#get) - Get details of a specific package.
* [rebuild](docs/sdks/packages/README.md#rebuild) - Rebuild packages for a project. This will cancel any pending packages and create new ones with auto-incremented versions.
* [cancel](docs/sdks/packages/README.md#cancel) - Cancel a pending or building package.

### [Projects](docs/sdks/projects/README.md)

* [list](docs/sdks/projects/README.md#list) - Retrieve all projects.
* [create](docs/sdks/projects/README.md#create) - Create a new project.
* [get](docs/sdks/projects/README.md#get) - Retrieve a project by ID or name.
* [update](docs/sdks/projects/README.md#update) - Update a project.
* [delete](docs/sdks/projects/README.md#delete) - Delete a project. The project must have no deployments.
* [getGcpOAuthProvider](docs/sdks/projects/README.md#getgcpoauthprovider) - Retrieve redacted project-level Google Cloud OAuth provider settings.
* [updateGcpOAuthProvider](docs/sdks/projects/README.md#updategcpoauthprovider) - Update project-level Google Cloud OAuth provider settings.
* [configureSource](docs/sdks/projects/README.md#configuresource) - Connect a GitHub repository or Alien template to an existing project.
* [getDeploymentPortalDomain](docs/sdks/projects/README.md#getdeploymentportaldomain) - Get the deployment portal domain binding for a project.
* [createFromTemplate](docs/sdks/projects/README.md#createfromtemplate) - Create a project by forking alienplatform/alien into your namespace.
* [getTemplateUrls](docs/sdks/projects/README.md#gettemplateurls) - Get template URLs for deploying setup stacks in this project.
* [getDeploymentLinkSetup](docs/sdks/projects/README.md#getdeploymentlinksetup) - Get the active release stack and portal-visible setup availability for deployment-link configuration.
* [getActiveRelease](docs/sdks/projects/README.md#getactiverelease) - Get the production channel's current release. When deploymentId is provided, returns that deployment's effective release: its pin, or its followed channel's current release.
* [previewModelsImpact](docs/sdks/projects/README.md#previewmodelsimpact) - Preview which customer model connections a configuration change may affect.
* [setCapabilities](docs/sdks/projects/README.md#setcapabilities) - Set the capabilities offered by a Project. Removing a capability prevents new setup without deleting existing customer resources.
* [configureDeployments](docs/sdks/projects/README.md#configuredeployments) - Enable deployments for a Project.
* [getAiProviderHeaders](docs/sdks/projects/README.md#getaiproviderheaders) - Get static headers added to AI requests for each provider.
* [configureAiProviderHeaders](docs/sdks/projects/README.md#configureaiproviderheaders) - Replace the static headers added to AI requests for each provider.
* [configureModels](docs/sdks/projects/README.md#configuremodels) - Configure customer-owned model providers without requiring an application Release.
* [configureKeys](docs/sdks/projects/README.md#configurekeys) - Enable customer-owned application encryption without requiring an application Release.
* [configureBuckets](docs/sdks/projects/README.md#configurebuckets) - Enable buckets without requiring a project Release.
* [configureRegistry](docs/sdks/projects/README.md#configureregistry) - Enable customer-owned container registries without requiring an application Release.
* [configureRemoteSandbox](docs/sdks/projects/README.md#configureremotesandbox) - Enable a customer-owned sandbox a hosted caller can drive through Remote Bindings. The clouds it publishes to follow the sources configured: an AWS bundle, an Azure catalog image, or both.
* [getCapabilityOverview](docs/sdks/projects/README.md#getcapabilityoverview) - Get safe, server-derived capability status for a Project.
* [getAiUsage](docs/sdks/projects/README.md#getaiusage)
* [getEncryptionUsage](docs/sdks/projects/README.md#getencryptionusage)
* [getSandboxMetrics](docs/sdks/projects/README.md#getsandboxmetrics)

### [ReleaseChannels](docs/sdks/releasechannels/README.md)

* [list](docs/sdks/releasechannels/README.md#list) - List release channels
* [create](docs/sdks/releasechannels/README.md#create) - Create a release channel
* [delete](docs/sdks/releasechannels/README.md#delete) - Delete a release channel

### [Releases](docs/sdks/releases/README.md)

* [list](docs/sdks/releases/README.md#list) - Retrieve all releases.
* [create](docs/sdks/releases/README.md#create) - Create a new release.
* [listBranches](docs/sdks/releases/README.md#listbranches) - List distinct git branches across releases. Used for filter dropdowns.
* [listAuthors](docs/sdks/releases/README.md#listauthors) - List distinct commit authors across releases. Used for filter dropdowns.
* [get](docs/sdks/releases/README.md#get) - Retrieve a release by ID.
* [listDeployments](docs/sdks/releases/README.md#listdeployments) - List the project's deployments with their rollout state relative to this release.
* [promote](docs/sdks/releases/README.md#promote)

### [RemoteBindings](docs/sdks/remotebindings/README.md)

* [createExternalAccess](docs/sdks/remotebindings/README.md#createexternalaccess) - Create short-lived Remote Bindings access for a external resource

### [Resolve](docs/sdks/resolve/README.md)

* [resolve](docs/sdks/resolve/README.md#resolve) - Resolve manager for a project and platform

### [Resources](docs/sdks/resources/README.md)

* [listInventory](docs/sdks/resources/README.md#listinventory)
* [listOverview](docs/sdks/resources/README.md#listoverview)
* [listDeployments](docs/sdks/resources/README.md#listdeployments) - List deployments where the selected resource is installed.
* [getDeploymentDetail](docs/sdks/resources/README.md#getdeploymentdetail)

### [SetupLinks](docs/sdks/setuplinks/README.md)

* [create](docs/sdks/setuplinks/README.md#create) - Create a customer setup link

### [SlackIntegration](docs/sdks/slackintegration/README.md)

* [installUrl](docs/sdks/slackintegration/README.md#installurl) - Generate the Slack OAuth consent URL for this workspace.
* [status](docs/sdks/slackintegration/README.md#status) - Return the Slack install for this workspace (if any).
* [listChannels](docs/sdks/slackintegration/README.md#listchannels) - List public Slack channels for this workspace's install. Used by the dashboard's notification-channel picker.
* [setNotificationChannel](docs/sdks/slackintegration/README.md#setnotificationchannel) - Configure which Slack channel receives ai-agent monitor reports.
* [uninstall](docs/sdks/slackintegration/README.md#uninstall) - Uninstall the Slack integration for this workspace. Revokes the bot token at Slack and deletes the row.

### [Sync](docs/sdks/sync/README.md)

* [list](docs/sdks/sync/README.md#list) - List full deployment records for manager operational loops. This endpoint is intentionally separate from the public deployments list, which returns lightweight UI rows.
* [context](docs/sdks/sync/README.md#context) - Get computed deployment state and configuration for a manager-side operation without acquiring the deployment reconciliation lock.
* [acquire](docs/sdks/sync/README.md#acquire) - Acquire a batch of deployments for processing. Used by Manager to atomically lock deployments matching filters. Each deployment in the batch must be released after processing.
* [reconcile](docs/sdks/sync/README.md#reconcile) - Reconcile deployment state. Push model requests that include a session verify lock ownership. Pull model state reports are accepted as authz-gated agent progress even when they carry an agent-sync session. Accepts full DeploymentState after step() execution.
* [renew](docs/sdks/sync/README.md#renew)
* [release](docs/sdks/sync/README.md#release) - Release a deployment lock. Must be called after processing an acquired deployment, even if processing failed. This is critical to avoid deadlocks.

### [User](docs/sdks/user/README.md)

* [listMemberships](docs/sdks/user/README.md#listmemberships) - List all workspaces the current user has access to.
* [getProfile](docs/sdks/user/README.md#getprofile) - Get the current user's profile and user-scoped onboarding state.
* [updateProfile](docs/sdks/user/README.md#updateprofile) - Update the current user's profile (display name).
* [completeProfileSetup](docs/sdks/user/README.md#completeprofilesetup) - Complete the required beta intake and profile setup dialog.
* [createWorkspace](docs/sdks/user/README.md#createworkspace) - Create a new workspace. The current user will be automatically added as an admin.
* [listGitNamespaces](docs/sdks/user/README.md#listgitnamespaces) - List all git namespaces (GitHub installations) the current user has access to.
* [syncGitNamespaces](docs/sdks/user/README.md#syncgitnamespaces) - Sync git namespaces from the provider. For GitHub, this fetches all app installations accessible to the user.
* [listGitNamespaceRepositories](docs/sdks/user/README.md#listgitnamespacerepositories) - List repositories accessible through a git namespace (GitHub installation).

### [Workspaces](docs/sdks/workspaces/README.md)

* [list](docs/sdks/workspaces/README.md#list) - Retrieve all workspaces.
* [get](docs/sdks/workspaces/README.md#get) - Retrieve a workspace by ID.
* [update](docs/sdks/workspaces/README.md#update) - Update a workspace.
* [delete](docs/sdks/workspaces/README.md#delete) - Delete a workspace. The workspace must have no projects.
* [listMembers](docs/sdks/workspaces/README.md#listmembers) - List all members of a workspace.
* [addMember](docs/sdks/workspaces/README.md#addmember) - Add a member to a workspace by email. The user must already have an account.
* [updateMember](docs/sdks/workspaces/README.md#updatemember) - Update a workspace member's role.
* [removeMember](docs/sdks/workspaces/README.md#removemember) - Remove a member from a workspace.
* [getSettings](docs/sdks/workspaces/README.md#getsettings) - Read the ai-agent settings for a workspace. Returns defaults (`enabled: true`, `debugPermissionMode: auto`) when the workspace has never customized them.
* [updateSettings](docs/sdks/workspaces/README.md#updatesettings) - Update the ai-agent settings for a workspace. Supports `debugPermissionMode` (`ask` requires human approval on every ai-agent debug command, `auto` runs them without asking) and `enabled` (`false` turns the ai-agent off so incoming triggers are rejected before any session runs).

</details>
<!-- End Available Resources and Operations [operations] -->

<!-- Start Standalone functions [standalone-funcs] -->
## Standalone functions

All the methods listed above are available as standalone functions. These
functions are ideal for use in applications running in the browser, serverless
runtimes or other environments where application bundle size is a primary
concern. When using a bundler to build your application, all unused
functionality will be either excluded from the final bundle or tree-shaken away.

To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).

<details>

<summary>Available standalone functions</summary>

- [`acceptWorkspaceInvitation`](docs/sdks/alien/README.md#acceptworkspaceinvitation)
- [`agentSessionsApprove`](docs/sdks/agentsessions/README.md#approve) - Approve a halted ai-agent monitor session. Proxies to the ai-agent service, minting a fresh CLI session for the caller so the ai-agent's own auth applies.
- [`agentSessionsEvents`](docs/sdks/agentsessions/README.md#events) - Incrementally read a session's event log (steps, tool calls, report deltas, approvals, status transitions). Pass the previous response's `latestSeq` as `after` to fetch only new events.
- [`agentSessionsGet`](docs/sdks/agentsessions/README.md#get) - Retrieve one ai-agent monitor session by id.
- [`agentSessionsList`](docs/sdks/agentsessions/README.md#list) - List ai-agent monitor sessions for this workspace. Newest first, capped at 50.
- [`agentSessionsStop`](docs/sdks/agentsessions/README.md#stop) - Stop (cancel) a running, queued, or halted ai-agent monitor session. Proxies to the ai-agent service, minting a fresh CLI session for the caller so the ai-agent's own auth applies. Idempotent — stopping an already-terminal session is a 200 no-op.
- [`apiKeysCreate`](docs/sdks/apikeys/README.md#create) - Create a new API key.
- [`apiKeysDeleteMultiple`](docs/sdks/apikeys/README.md#deletemultiple) - Permanently delete multiple API keys.
- [`apiKeysGet`](docs/sdks/apikeys/README.md#get) - Retrieve a specific API key.
- [`apiKeysList`](docs/sdks/apikeys/README.md#list) - Retrieve all API keys for the current workspace.
- [`apiKeysRevoke`](docs/sdks/apikeys/README.md#revoke) - Revoke (soft delete) an API key.
- [`apiKeysUpdate`](docs/sdks/apikeys/README.md#update) - Update an API key (enable/disable, change description).
- [`authWhoami`](docs/sdks/auth/README.md#whoami) - Get the current authenticated principal (user or service account). Works with both session cookies and API keys.
- [`billingGetEntitlements`](docs/sdks/billing/README.md#getentitlements) - Get the workspace billing entitlements used for product feature gates. Autumn is the source of truth; the response is served through the workspace billing read model with stale-cache fallback.
- [`billingListAuditLog`](docs/sdks/billing/README.md#listauditlog) - List billing activity entries for the current workspace.
- [`cancelDeploymentCredentialRotation`](docs/sdks/alien/README.md#canceldeploymentcredentialrotation)
- [`cloudRegionsGet`](docs/sdks/cloudregions/README.md#get) - Get cloud regions supported by this Alien environment.
- [`commandsBootstrap`](docs/sdks/commands/README.md#bootstrap) - Resolve a deployment's current manager and mint a five-minute command capability. Sender tokens can dispatch and observe commands only for this deployment. Receiver tokens can lease and complete commands only for the resolved Container or Daemon target.
- [`commandsComplete`](docs/sdks/commands/README.md#complete) - Atomically transition a command to a terminal state (SUCCEEDED, FAILED, or EXPIRED) unless it is already terminal. Returns whether the transition was applied.
- [`commandsCreate`](docs/sdks/commands/README.md#create) - Create command metadata. Called by manager when processing commands. Returns project info for routing decisions.
- [`commandsDispatch`](docs/sdks/commands/README.md#dispatch) - Atomically mark a command DISPATCHED unless it is already terminal. Returns whether the transition was applied.
- [`commandsGet`](docs/sdks/commands/README.md#get) - Retrieve a command by ID.
- [`commandsIncrementAttempt`](docs/sdks/commands/README.md#incrementattempt) - Atomically increment the command's attempt counter and return the new value.
- [`commandsList`](docs/sdks/commands/README.md#list) - Retrieve commands. Use for dashboard analytics and command history.
- [`commandsListDeployments`](docs/sdks/commands/README.md#listdeployments) - List distinct deployments that have commands, including deployment group info. Use for filter dropdowns in the dashboard.
- [`commandsListNames`](docs/sdks/commands/README.md#listnames) - List distinct command names. Use for filter dropdowns in the dashboard.
- [`commandsResolveTarget`](docs/sdks/commands/README.md#resolvetarget) - Resolve which resource a command for this deployment would be addressed to, and how it would be delivered. Fails when the deployment has no command-capable resources, or more than one and no explicit target was named.
- [`commandsUpdate`](docs/sdks/commands/README.md#update) - Update command state. Called by manager when command is dispatched or completes.
- [`containerRegistryApplyContainerRegistryManagerSnapshot`](docs/sdks/containerregistry/README.md#applycontainerregistrymanagersnapshot)
- [`containerRegistryCreateContainerRegistryCredential`](docs/sdks/containerregistry/README.md#createcontainerregistrycredential)
- [`containerRegistryCreateContainerRegistryRepository`](docs/sdks/containerregistry/README.md#createcontainerregistryrepository)
- [`containerRegistryDeleteContainerRegistryRepository`](docs/sdks/containerregistry/README.md#deletecontainerregistryrepository)
- [`containerRegistryGetContainerRegistry`](docs/sdks/containerregistry/README.md#getcontainerregistry)
- [`containerRegistryGetContainerRegistryManagerSnapshot`](docs/sdks/containerregistry/README.md#getcontainerregistrymanagersnapshot)
- [`containerRegistryPutContainerRegistry`](docs/sdks/containerregistry/README.md#putcontainerregistry)
- [`containerRegistryRevokeContainerRegistry`](docs/sdks/containerregistry/README.md#revokecontainerregistry)
- [`containerRegistryRevokeContainerRegistryCredential`](docs/sdks/containerregistry/README.md#revokecontainerregistrycredential)
- [`containerRegistryVerifyContainerRegistry`](docs/sdks/containerregistry/README.md#verifycontainerregistry)
- [`continueAwsVirtualKey`](docs/sdks/alien/README.md#continueawsvirtualkey)
- [`createAwsVirtualKey`](docs/sdks/alien/README.md#createawsvirtualkey)
- [`createWorkspaceInvitation`](docs/sdks/alien/README.md#createworkspaceinvitation)
- [`createWorkspaceInviteLink`](docs/sdks/alien/README.md#createworkspaceinvitelink)
- [`debugSessionsCreate`](docs/sdks/debugsessions/README.md#create) - Create a debug-session audit row. Called by the manager when a pull or push debug tunnel is opened. Workspace + project derived from deployment.
- [`debugSessionsGet`](docs/sdks/debugsessions/README.md#get) - Retrieve a debug session by ID.
- [`debugSessionsList`](docs/sdks/debugsessions/README.md#list) - Retrieve debug sessions for dashboard audit. Filters: project, deployment, state, mode.
- [`debugSessionsUpdate`](docs/sdks/debugsessions/README.md#update) - Update debug-session state. Called by manager on tunnel attach, close, or deadline expiry.
- [`decommissionAwsVirtualKey`](docs/sdks/alien/README.md#decommissionawsvirtualkey)
- [`deploymentGetInfo`](docs/sdks/deployment/README.md#getinfo) - Get deployment information for the deployment portal. Accepts both deployment-scoped and deployment-group-scoped API keys. Returns project information, package status/outputs, and either deployment or deployment group details depending on the token type. Poll this endpoint to check if packages are ready.
- [`deploymentGroupsCreateDeploymentGroup`](docs/sdks/deploymentgroups/README.md#createdeploymentgroup) - Create a new deployment group
- [`deploymentGroupsCreateDeploymentGroupToken`](docs/sdks/deploymentgroups/README.md#createdeploymentgrouptoken) - Create deployment group token
- [`deploymentGroupsCreateExternalAIModelCheck`](docs/sdks/deploymentgroups/README.md#createexternalaimodelcheck) - Queue an explicit external model access check
- [`deploymentGroupsCreateFirstPartyDeploymentSession`](docs/sdks/deploymentgroups/README.md#createfirstpartydeploymentsession) - Create first-party deployment session
- [`deploymentGroupsDeleteDeploymentGroup`](docs/sdks/deploymentgroups/README.md#deletedeploymentgroup) - Delete deployment group
- [`deploymentGroupsDeleteExternalAIBinding`](docs/sdks/deploymentgroups/README.md#deleteexternalaibinding) - Revoke the external AI connection
- [`deploymentGroupsEnsureDeploymentGroupByExternalId`](docs/sdks/deploymentgroups/README.md#ensuredeploymentgroupbyexternalid) - Get or create a deployment group by project and external ID
- [`deploymentGroupsEnsureDeploymentGroupByName`](docs/sdks/deploymentgroups/README.md#ensuredeploymentgroupbyname) - Get or create a deployment group by project and name
- [`deploymentGroupsGetDeploymentGroup`](docs/sdks/deploymentgroups/README.md#getdeploymentgroup) - Get deployment group details
- [`deploymentGroupsGetDeploymentGroupByExternalId`](docs/sdks/deploymentgroups/README.md#getdeploymentgroupbyexternalid) - Get a deployment group by project and external ID
- [`deploymentGroupsGetExternalAIBinding`](docs/sdks/deploymentgroups/README.md#getexternalaibinding) - Get external AI connection state
- [`deploymentGroupsGetExternalAIModelCheck`](docs/sdks/deploymentgroups/README.md#getexternalaimodelcheck) - Get an external model access check
- [`deploymentGroupsListDeploymentGroups`](docs/sdks/deploymentgroups/README.md#listdeploymentgroups) - List deployment groups
- [`deploymentGroupsPutExternalAIBinding`](docs/sdks/deploymentgroups/README.md#putexternalaibinding) - Connect or rotate an external AI provider key
- [`deploymentGroupsSetDeploymentGroupExternalId`](docs/sdks/deploymentgroups/README.md#setdeploymentgroupexternalid) - Set or clear a deployment group's external ID
- [`deploymentGroupsUpdateDeploymentGroup`](docs/sdks/deploymentgroups/README.md#updatedeploymentgroup) - Update deployment group
- [`deploymentPlanCompute`](docs/sdks/deployment/README.md#plancompute) - Plan deployment compute for the active release before stack preparation. The response contains recommended machine and scale choices for cloud compute pools.
- [`deploymentPrepareStack`](docs/sdks/deployment/README.md#preparestack) - Prepare the active release stack for a deployment portal setup session. The response contains the generated stack shape plus setup compatibility metadata.
- [`deploymentsCreate`](docs/sdks/deployments/README.md#create) - Create a new deployment. Deployment group tokens automatically use their group. Workspace/project tokens must provide deploymentGroupId.
- [`deploymentsCreateSetupRegistrationOperation`](docs/sdks/deployments/README.md#createsetupregistrationoperation) - Start a durable setup registration operation for CloudFormation, Terraform, or Helm.
- [`deploymentsCreateToken`](docs/sdks/deployments/README.md#createtoken) - Create a deployment token (deployment-scoped API key). The deployment must exist before creating a token.
- [`deploymentsDelete`](docs/sdks/deployments/README.md#delete) - Delete, detach, or forget a deployment by ID.
- [`deploymentsGet`](docs/sdks/deployments/README.md#get) - Retrieve a deployment by ID.
- [`deploymentsGetInfo`](docs/sdks/deployments/README.md#getinfo) - Get deployment connection information including command endpoint and resource URLs.
- [`deploymentsGetInputs`](docs/sdks/deployments/README.md#getinputs) - Get the active input definitions and current non-secret values for a deployment.
- [`deploymentsGetSetupRegistrationOperation`](docs/sdks/deployments/README.md#getsetupregistrationoperation) - Get setup registration operation status.
- [`deploymentsGetStats`](docs/sdks/deployments/README.md#getstats) - Get aggregated deployment statistics. Returns total count and breakdown by status.
- [`deploymentsImport`](docs/sdks/deployments/README.md#import) - Import a deployment from resolved setup infrastructure such as CloudFormation, Terraform, or Helm.
- [`deploymentsList`](docs/sdks/deployments/README.md#list) - Retrieve all deployments.
- [`deploymentsListFilterDeploymentGroups`](docs/sdks/deployments/README.md#listfilterdeploymentgroups) - List deployment groups with deployment counts. Used for filter dropdowns.
- [`deploymentsListFilterEnvironments`](docs/sdks/deployments/README.md#listfilterenvironments) - List distinct effective environments used by deployments. Used for filter dropdowns.
- [`deploymentsListMachines`](docs/sdks/deployments/README.md#listmachines)
- [`deploymentsPinRelease`](docs/sdks/deployments/README.md#pinrelease) - Pin or unpin a running or runtime-failed deployment. Running deployments start an update; failed deployments retry toward the selected release.
- [`deploymentsRedeploy`](docs/sdks/deployments/README.md#redeploy) - Redeploy a running deployment with the same release and fresh environment variables. Sets status to update-pending.
- [`deploymentsRetry`](docs/sdks/deployments/README.md#retry) - Retry a failed deployment operation. Uses alien-infra's retry mechanisms to resume from exact failure point.
- [`deploymentsSetFirstPartyDeploymentInputs`](docs/sdks/deployments/README.md#setfirstpartydeploymentinputs) - Store operator-provided input values on a first-party deployment session token so CLI/local deploys apply them.
- [`deploymentsSetReleaseChannel`](docs/sdks/deployments/README.md#setreleasechannel)
- [`deploymentsUpdateCompute`](docs/sdks/deployments/README.md#updatecompute) - Update deployment-time compute pool selections and request reconciliation by the hosted manager.
- [`deploymentsUpdateEnvironmentVariables`](docs/sdks/deployments/README.md#updateenvironmentvariables) - Replace a deployment's advanced environment variables. Stack-input-backed variables are write-only through the input endpoint. If the deployment is running and not locked, the status will be changed to update-pending to trigger a deployment.
- [`deploymentsUpdateInputs`](docs/sdks/deployments/README.md#updateinputs) - Update runtime stack inputs, rebuild their environment-variable mappings, and request a deployment update when runtime configuration changes.
- [`domainsCreate`](docs/sdks/domains/README.md#create) - Create a workspace domain and optional initial endpoints.
- [`domainsCreateEndpoint`](docs/sdks/domains/README.md#createendpoint) - Create an endpoint under a workspace domain.
- [`domainsDelete`](docs/sdks/domains/README.md#delete) - Delete a workspace domain.
- [`domainsGet`](docs/sdks/domains/README.md#get) - Get domain by ID.
- [`domainsList`](docs/sdks/domains/README.md#list) - List system domains and workspace domains.
- [`domainsRefresh`](docs/sdks/domains/README.md#refresh) - Refresh workspace domain verification.
- [`eventsGet`](docs/sdks/events/README.md#get) - Retrieve an event by ID.
- [`eventsList`](docs/sdks/events/README.md#list) - Retrieve all events.
- [`finalizeAwsVirtualKeyDeletion`](docs/sdks/alien/README.md#finalizeawsvirtualkeydeletion)
- [`gatewaysGetWorkspaceOverview`](docs/sdks/gateways/README.md#getworkspaceoverview) - Get compact cross-Project setup and customer status for a workspace Gateway.
- [`getAwsVirtualKey`](docs/sdks/alien/README.md#getawsvirtualkey)
- [`getDeploymentCredentialRotation`](docs/sdks/alien/README.md#getdeploymentcredentialrotation)
- [`getDeploymentCredentialRotationValues`](docs/sdks/alien/README.md#getdeploymentcredentialrotationvalues)
- [`getWorkspaceInvitationPreview`](docs/sdks/alien/README.md#getworkspaceinvitationpreview)
- [`getWorkspaceInviteLink`](docs/sdks/alien/README.md#getworkspaceinvitelink)
- [`listAwsVirtualKeys`](docs/sdks/alien/README.md#listawsvirtualkeys)
- [`listWorkspaceInvitations`](docs/sdks/alien/README.md#listworkspaceinvitations)
- [`machinesCancelMachineDrain`](docs/sdks/machines/README.md#cancelmachinedrain)
- [`machinesCreateJoinToken`](docs/sdks/machines/README.md#createjointoken)
- [`machinesDrainMachine`](docs/sdks/machines/README.md#drainmachine)
- [`machinesListJoinTokens`](docs/sdks/machines/README.md#listjointokens)
- [`machinesRemoveMachine`](docs/sdks/machines/README.md#removemachine)
- [`machinesRevokeJoinToken`](docs/sdks/machines/README.md#revokejointoken)
- [`machinesRotateJoinToken`](docs/sdks/machines/README.md#rotatejointoken)
- [`managersCancelSetup`](docs/sdks/managers/README.md#cancelsetup) - Cancel pending private-manager setup, revoke setup/runtime tokens, and remove the undeployed manager record.
- [`managersCreate`](docs/sdks/managers/README.md#create) - Create a new manager.
- [`managersDelete`](docs/sdks/managers/README.md#delete) - Delete a manager by ID.
- [`managersGenerateManagerBindingToken`](docs/sdks/managers/README.md#generatemanagerbindingtoken) - Generate a short-lived deployment-scoped token for resolving opted-in remote bindings through the currently assigned manager.
- [`managersGenerateManagerToken`](docs/sdks/managers/README.md#generatemanagertoken) - Generate a short-lived JWT for direct browser → manager communication. Used for fetching command payloads and querying logs without routing sensitive data through the platform API.
- [`managersGet`](docs/sdks/managers/README.md#get) - Retrieve a manager by ID.
- [`managersGetDeployment`](docs/sdks/managers/README.md#getdeployment) - Get deployment details for a private manager (internal deployment platform, status, resources).
- [`managersGetDomainBinding`](docs/sdks/managers/README.md#getdomainbinding) - Get the custom domain binding for a private manager.
- [`managersGetManagementConfig`](docs/sdks/managers/README.md#getmanagementconfig) - Get the management configuration for a manager.
- [`managersList`](docs/sdks/managers/README.md#list) - Retrieve all managers.
- [`managersListEvents`](docs/sdks/managers/README.md#listevents) - Retrieve all events of a manager.
- [`managersProvision`](docs/sdks/managers/README.md#provision) - Enqueue provisioning for a manager by ID.
- [`managersReportHeartbeat`](docs/sdks/managers/README.md#reportheartbeat) - Report Manager health status and metrics.
- [`managersResolveGcpOAuthProvider`](docs/sdks/managers/README.md#resolvegcpoauthprovider) - Resolve decrypted project-level Google Cloud OAuth provider settings for a manager-side deployment bootstrap.
- [`managersRetry`](docs/sdks/managers/README.md#retry) - Retry private-manager setup. Returns a fresh setup action before the internal deployment exists, or requests retry for the internal deployment after it exists.
- [`managersRetrySetup`](docs/sdks/managers/README.md#retrysetup) - Revoke previous private-manager setup tokens and issue a fresh setup token/config.
- [`managersUpdate`](docs/sdks/managers/README.md#update) - Update a manager to a specific release ID or active release.
- [`managersUpdateDomainBinding`](docs/sdks/managers/README.md#updatedomainbinding) - Create, update, or remove the custom domain binding for a private manager.
- [`operationsApproveAccessRequest`](docs/sdks/operations/README.md#approveaccessrequest) - Customer gate — an authenticated workspace member or administrator other than the requester may approve a queued access request. Actor identity comes from authentication; method/source are audit context only.
- [`operationsCreateAccessRequest`](docs/sdks/operations/README.md#createaccessrequest) - Create an access request — either plan-backed (an ai-agent investigation's exact commands) or plan-less (a CLI-originated exact operation or wildcard pattern, resolved and frozen here). Plan-backed requests await the engineer gate (status `pending-approval`); plan-less requests are queued immediately since the requester is asking for their own access (status `queued`).
- [`operationsCreateBundleUploadUrl`](docs/sdks/operations/README.md#createbundleuploadurl) - Get a presigned S3 URL to upload a custom operations plugin bundle ZIP. Upload the ZIP with a PUT to the returned url (sending the given Content-Type), then call POST /plugins to register it.
- [`operationsDenyAccessRequest`](docs/sdks/operations/README.md#denyaccessrequest) - Customer gate — an authenticated workspace member or administrator other than the requester may reject a queued access request. Actor identity comes from authentication.
- [`operationsGetAccessRequest`](docs/sdks/operations/README.md#getaccessrequest) - Get an access request by id.
- [`operationsGetAccessRequestCoordinates`](docs/sdks/operations/README.md#getaccessrequestcoordinates) - The customer's kubectl approve command for a queued access request, or null until the operator has materialized the grant CR and reported its coordinates. Polled by the Slack handler to update the access-plan card.
- [`operationsGetPolicy`](docs/sdks/operations/README.md#getpolicy) - Get a project's per-command approval policy. Mirrors what the operator enforces: `plugin/operation` / `plugin/*` / `*` patterns → auto | manual.
- [`operationsInvoke`](docs/sdks/operations/README.md#invoke) - Invoke a plugin operation against a deployment. Honors the project's per-command approval policy.
- [`operationsListAccessRequests`](docs/sdks/operations/README.md#listaccessrequests) - List a project's access requests, newest first.
- [`operationsListPlugins`](docs/sdks/operations/README.md#listplugins) - List available operations plugins (builtin + custom) for a project, with their operations and risk tiers.
- [`operationsPublishPlugin`](docs/sdks/operations/README.md#publishplugin) - Register a custom operations plugin whose bundle ZIP has already been uploaded to S3 (see POST /plugins/upload-url). Replaces any existing plugin of the same name in that project. New custom plugins are enabled by default.
- [`operationsQueueAccessRequest`](docs/sdks/operations/README.md#queueaccessrequest) - Engineer gate — approve a pending access request, queuing it for the operator to materialize. Records who queued it.
- [`operationsSetBuiltinPlugins`](docs/sdks/operations/README.md#setbuiltinplugins) - Replace the complete set of enabled built-in operations plugins for a project.
- [`operationsSetPluginEnabled`](docs/sdks/operations/README.md#setpluginenabled) - Enable or disable an operations plugin (builtin or custom) for a project. Only enabled plugins are baked into the operator image and can be invoked.
- [`operationsUpdatePolicy`](docs/sdks/operations/README.md#updatepolicy) - Replace a project's per-command approval policy (full rule set). Patterns are `plugin/operation`, `plugin/*`, or `*`; each maps to auto | manual.
- [`operationsVerifyCheck`](docs/sdks/operations/README.md#verifycheck) - One verification poll cycle for an original operation command. Loads that command's authoritative stored result and dispatch-time verification contract, dispatches the frozen read-only poll operation once, and evaluates its frozen success condition. Callers poll this repeatedly per the returned policy.
- [`operatorManifestsPrepareOperatorManifestPackage`](docs/sdks/operatormanifests/README.md#prepareoperatormanifestpackage) - Prepare the white-labeled Operator image for an Operate install
- [`operatorManifestsRenderOperatorEcsCloudFormation`](docs/sdks/operatormanifests/README.md#renderoperatorecscloudformation) - Render a Remote Operator ECS Fargate CloudFormation installer
- [`operatorManifestsRenderOperatorManifest`](docs/sdks/operatormanifests/README.md#renderoperatormanifest) - Render a Kubernetes Operator manifest
- [`packagesCancel`](docs/sdks/packages/README.md#cancel) - Cancel a pending or building package.
- [`packagesGet`](docs/sdks/packages/README.md#get) - Get details of a specific package.
- [`packagesList`](docs/sdks/packages/README.md#list) - List packages with optional filters. Returns packages ordered by creation date (newest first).
- [`packagesRebuild`](docs/sdks/packages/README.md#rebuild) - Rebuild packages for a project. This will cancel any pending packages and create new ones with auto-incremented versions.
- [`prepareDeploymentCredentialRotation`](docs/sdks/alien/README.md#preparedeploymentcredentialrotation)
- [`projectsConfigureAiProviderHeaders`](docs/sdks/projects/README.md#configureaiproviderheaders) - Replace the static headers added to AI requests for each provider.
- [`projectsConfigureBuckets`](docs/sdks/projects/README.md#configurebuckets) - Enable buckets without requiring a project Release.
- [`projectsConfigureDeployments`](docs/sdks/projects/README.md#configuredeployments) - Enable deployments for a Project.
- [`projectsConfigureKeys`](docs/sdks/projects/README.md#configurekeys) - Enable customer-owned application encryption without requiring an application Release.
- [`projectsConfigureModels`](docs/sdks/projects/README.md#configuremodels) - Configure customer-owned model providers without requiring an application Release.
- [`projectsConfigureRegistry`](docs/sdks/projects/README.md#configureregistry) - Enable customer-owned container registries without requiring an application Release.
- [`projectsConfigureRemoteSandbox`](docs/sdks/projects/README.md#configureremotesandbox) - Enable a customer-owned sandbox a hosted caller can drive through Remote Bindings. The clouds it publishes to follow the sources configured: an AWS bundle, an Azure catalog image, or both.
- [`projectsConfigureSource`](docs/sdks/projects/README.md#configuresource) - Connect a GitHub repository or Alien template to an existing project.
- [`projectsCreate`](docs/sdks/projects/README.md#create) - Create a new project.
- [`projectsCreateFromTemplate`](docs/sdks/projects/README.md#createfromtemplate) - Create a project by forking alienplatform/alien into your namespace.
- [`projectsDelete`](docs/sdks/projects/README.md#delete) - Delete a project. The project must have no deployments.
- [`projectsGet`](docs/sdks/projects/README.md#get) - Retrieve a project by ID or name.
- [`projectsGetActiveRelease`](docs/sdks/projects/README.md#getactiverelease) - Get the production channel's current release. When deploymentId is provided, returns that deployment's effective release: its pin, or its followed channel's current release.
- [`projectsGetAiProviderHeaders`](docs/sdks/projects/README.md#getaiproviderheaders) - Get static headers added to AI requests for each provider.
- [`projectsGetAiUsage`](docs/sdks/projects/README.md#getaiusage)
- [`projectsGetCapabilityOverview`](docs/sdks/projects/README.md#getcapabilityoverview) - Get safe, server-derived capability status for a Project.
- [`projectsGetDeploymentLinkSetup`](docs/sdks/projects/README.md#getdeploymentlinksetup) - Get the active release stack and portal-visible setup availability for deployment-link configuration.
- [`projectsGetDeploymentPortalDomain`](docs/sdks/projects/README.md#getdeploymentportaldomain) - Get the deployment portal domain binding for a project.
- [`projectsGetEncryptionUsage`](docs/sdks/projects/README.md#getencryptionusage)
- [`projectsGetGcpOAuthProvider`](docs/sdks/projects/README.md#getgcpoauthprovider) - Retrieve redacted project-level Google Cloud OAuth provider settings.
- [`projectsGetSandboxMetrics`](docs/sdks/projects/README.md#getsandboxmetrics)
- [`projectsGetTemplateUrls`](docs/sdks/projects/README.md#gettemplateurls) - Get template URLs for deploying setup stacks in this project.
- [`projectsList`](docs/sdks/projects/README.md#list) - Retrieve all projects.
- [`projectsPreviewModelsImpact`](docs/sdks/projects/README.md#previewmodelsimpact) - Preview which customer model connections a configuration change may affect.
- [`projectsSetCapabilities`](docs/sdks/projects/README.md#setcapabilities) - Set the capabilities offered by a Project. Removing a capability prevents new setup without deleting existing customer resources.
- [`projectsUpdate`](docs/sdks/projects/README.md#update) - Update a project.
- [`projectsUpdateGcpOAuthProvider`](docs/sdks/projects/README.md#updategcpoauthprovider) - Update project-level Google Cloud OAuth provider settings.
- [`releaseChannelsCreate`](docs/sdks/releasechannels/README.md#create) - Create a release channel
- [`releaseChannelsDelete`](docs/sdks/releasechannels/README.md#delete) - Delete a release channel
- [`releaseChannelsList`](docs/sdks/releasechannels/README.md#list) - List release channels
- [`releasesCreate`](docs/sdks/releases/README.md#create) - Create a new release.
- [`releasesGet`](docs/sdks/releases/README.md#get) - Retrieve a release by ID.
- [`releasesList`](docs/sdks/releases/README.md#list) - Retrieve all releases.
- [`releasesListAuthors`](docs/sdks/releases/README.md#listauthors) - List distinct commit authors across releases. Used for filter dropdowns.
- [`releasesListBranches`](docs/sdks/releases/README.md#listbranches) - List distinct git branches across releases. Used for filter dropdowns.
- [`releasesListDeployments`](docs/sdks/releases/README.md#listdeployments) - List the project's deployments with their rollout state relative to this release.
- [`releasesPromote`](docs/sdks/releases/README.md#promote)
- [`remoteBindingsCreateExternalAccess`](docs/sdks/remotebindings/README.md#createexternalaccess) - Create short-lived Remote Bindings access for a external resource
- [`resendWorkspaceInvitation`](docs/sdks/alien/README.md#resendworkspaceinvitation)
- [`resolveResolve`](docs/sdks/resolve/README.md#resolve) - Resolve manager for a project and platform
- [`resourcesGetDeploymentDetail`](docs/sdks/resources/README.md#getdeploymentdetail)
- [`resourcesListDeployments`](docs/sdks/resources/README.md#listdeployments) - List deployments where the selected resource is installed.
- [`resourcesListInventory`](docs/sdks/resources/README.md#listinventory)
- [`resourcesListOverview`](docs/sdks/resources/README.md#listoverview)
- [`restoreAwsVirtualKey`](docs/sdks/alien/README.md#restoreawsvirtualkey)
- [`revokeWorkspaceInvitation`](docs/sdks/alien/README.md#revokeworkspaceinvitation)
- [`revokeWorkspaceInviteLink`](docs/sdks/alien/README.md#revokeworkspaceinvitelink)
- [`rotateAwsVirtualKeyCredential`](docs/sdks/alien/README.md#rotateawsvirtualkeycredential)
- [`setupLinksCreate`](docs/sdks/setuplinks/README.md#create) - Create a customer setup link
- [`slackIntegrationInstallUrl`](docs/sdks/slackintegration/README.md#installurl) - Generate the Slack OAuth consent URL for this workspace.
- [`slackIntegrationListChannels`](docs/sdks/slackintegration/README.md#listchannels) - List public Slack channels for this workspace's install. Used by the dashboard's notification-channel picker.
- [`slackIntegrationSetNotificationChannel`](docs/sdks/slackintegration/README.md#setnotificationchannel) - Configure which Slack channel receives ai-agent monitor reports.
- [`slackIntegrationStatus`](docs/sdks/slackintegration/README.md#status) - Return the Slack install for this workspace (if any).
- [`slackIntegrationUninstall`](docs/sdks/slackintegration/README.md#uninstall) - Uninstall the Slack integration for this workspace. Revokes the bot token at Slack and deletes the row.
- [`syncAcquire`](docs/sdks/sync/README.md#acquire) - Acquire a batch of deployments for processing. Used by Manager to atomically lock deployments matching filters. Each deployment in the batch must be released after processing.
- [`syncContext`](docs/sdks/sync/README.md#context) - Get computed deployment state and configuration for a manager-side operation without acquiring the deployment reconciliation lock.
- [`syncList`](docs/sdks/sync/README.md#list) - List full deployment records for manager operational loops. This endpoint is intentionally separate from the public deployments list, which returns lightweight UI rows.
- [`syncReconcile`](docs/sdks/sync/README.md#reconcile) - Reconcile deployment state. Push model requests that include a session verify lock ownership. Pull model state reports are accepted as authz-gated agent progress even when they carry an agent-sync session. Accepts full DeploymentState after step() execution.
- [`syncRelease`](docs/sdks/sync/README.md#release) - Release a deployment lock. Must be called after processing an acquired deployment, even if processing failed. This is critical to avoid deadlocks.
- [`syncRenew`](docs/sdks/sync/README.md#renew)
- [`userCompleteProfileSetup`](docs/sdks/user/README.md#completeprofilesetup) - Complete the required beta intake and profile setup dialog.
- [`userCreateWorkspace`](docs/sdks/user/README.md#createworkspace) - Create a new workspace. The current user will be automatically added as an admin.
- [`userGetProfile`](docs/sdks/user/README.md#getprofile) - Get the current user's profile and user-scoped onboarding state.
- [`userListGitNamespaceRepositories`](docs/sdks/user/README.md#listgitnamespacerepositories) - List repositories accessible through a git namespace (GitHub installation).
- [`userListGitNamespaces`](docs/sdks/user/README.md#listgitnamespaces) - List all git namespaces (GitHub installations) the current user has access to.
- [`userListMemberships`](docs/sdks/user/README.md#listmemberships) - List all workspaces the current user has access to.
- [`userSyncGitNamespaces`](docs/sdks/user/README.md#syncgitnamespaces) - Sync git namespaces from the provider. For GitHub, this fetches all app installations accessible to the user.
- [`userUpdateProfile`](docs/sdks/user/README.md#updateprofile) - Update the current user's profile (display name).
- [`workspacesAddMember`](docs/sdks/workspaces/README.md#addmember) - Add a member to a workspace by email. The user must already have an account.
- [`workspacesDelete`](docs/sdks/workspaces/README.md#delete) - Delete a workspace. The workspace must have no projects.
- [`workspacesGet`](docs/sdks/workspaces/README.md#get) - Retrieve a workspace by ID.
- [`workspacesGetSettings`](docs/sdks/workspaces/README.md#getsettings) - Read the ai-agent settings for a workspace. Returns defaults (`enabled: true`, `debugPermissionMode: auto`) when the workspace has never customized them.
- [`workspacesList`](docs/sdks/workspaces/README.md#list) - Retrieve all workspaces.
- [`workspacesListMembers`](docs/sdks/workspaces/README.md#listmembers) - List all members of a workspace.
- [`workspacesRemoveMember`](docs/sdks/workspaces/README.md#removemember) - Remove a member from a workspace.
- [`workspacesUpdate`](docs/sdks/workspaces/README.md#update) - Update a workspace.
- [`workspacesUpdateMember`](docs/sdks/workspaces/README.md#updatemember) - Update a workspace member's role.
- [`workspacesUpdateSettings`](docs/sdks/workspaces/README.md#updatesettings) - Update the ai-agent settings for a workspace. Supports `debugPermissionMode` (`ask` requires human approval on every ai-agent debug command, `auto` runs them without asking) and `enabled` (`false` turns the ai-agent off so incoming triggers are rejected before any session runs).

</details>
<!-- End Standalone functions [standalone-funcs] -->

<!-- Start Global Parameters [global-parameters] -->
## Global Parameters

A parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.

For example, you can set `workspace` to `"my-workspace"` at SDK initialization and then you do not have to pass the same value on calls to operations like `listWorkspaceInvitations`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.


### Available Globals

The following global parameter is available.
Global parameters can also be set via environment variable.

| Name      | Type   | Description                                                                                                                         | Environment     |
| --------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------- | --------------- |
| workspace | string | Workspace name. Platform API keys already select a workspace; other authentication methods can configure it once on the SDK client. | ALIEN_WORKSPACE |

### Example

```typescript
import { Alien } from "@alienplatform/platform-api";

const alien = new Alien({
  workspace: "my-workspace",
  apiKey: process.env["ALIEN_API_KEY"] ?? "",
});

async function run() {
  const result = await alien.listWorkspaceInvitations({
    id: "ws_It13CUaGEhLLAB87simX0",
  });

  console.log(result);
}

run();

```
<!-- End Global Parameters [global-parameters] -->

<!-- Start Retries [retries] -->
## Retries

Some of the endpoints in this SDK support retries.  If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API.  However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.

To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
```typescript
import { Alien } from "@alienplatform/platform-api";

const alien = new Alien({
  apiKey: process.env["ALIEN_API_KEY"] ?? "",
});

async function run() {
  const result = await alien.getWorkspaceInvitationPreview({
    token: "<value>",
  }, {
    retries: {
      strategy: "backoff",
      backoff: {
        initialInterval: 1,
        maxInterval: 50,
        exponent: 1.1,
        maxElapsedTime: 100,
      },
      retryConnectionErrors: false,
    },
  });

  console.log(result);
}

run();

```

If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
```typescript
import { Alien } from "@alienplatform/platform-api";

const alien = new Alien({
  retryConfig: {
    strategy: "backoff",
    backoff: {
      initialInterval: 1,
      maxInterval: 50,
      exponent: 1.1,
      maxElapsedTime: 100,
    },
    retryConnectionErrors: false,
  },
  apiKey: process.env["ALIEN_API_KEY"] ?? "",
});

async function run() {
  const result = await alien.getWorkspaceInvitationPreview({
    token: "<value>",
  });

  console.log(result);
}

run();

```
<!-- End Retries [retries] -->

<!-- Start Error Handling [errors] -->
## Error Handling

[`AlienError`](./src/models/errors/alienerror.ts) is the base class for all HTTP error responses. It has the following properties:

| Property            | Type       | Description                                                                             |
| ------------------- | ---------- | --------------------------------------------------------------------------------------- |
| `error.message`     | `string`   | Error message                                                                           |
| `error.statusCode`  | `number`   | HTTP response status code eg `404`                                                      |
| `error.headers`     | `Headers`  | HTTP response headers                                                                   |
| `error.body`        | `string`   | HTTP body. Can be empty string if no body is returned.                                  |
| `error.rawResponse` | `Response` | Raw HTTP response                                                                       |
| `error.data$`       |            | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). |

### Example
```typescript
import { Alien } from "@alienplatform/platform-api";
import * as errors from "@alienplatform/platform-api/models/errors";

const alien = new Alien({
  apiKey: process.env["ALIEN_API_KEY"] ?? "",
});

async function run() {
  try {
    const result = await alien.getWorkspaceInvitationPreview({
      token: "<value>",
    });

    console.log(result);
  } catch (error) {
    // The base class for HTTP error responses
    if (error instanceof errors.AlienError) {
      console.log(error.message);
      console.log(error.statusCode);
      console.log(error.body);
      console.log(error.headers);

      // Depending on the method different errors may be thrown
      if (error instanceof errors.APIError) {
        console.log(error.data$.code); // string
        console.log(error.data$.message); // string
        console.log(error.data$.source); // any
        console.log(error.data$.retryable); // boolean
        console.log(error.data$.context); // any
      }
    }
  }
}

run();

```

### Error Classes
**Primary errors:**
* [`AlienError`](./src/models/errors/alienerror.ts): The base class for HTTP error responses.
  * [`APIError`](./src/models/errors/apierror.ts): *

<details><summary>Less common errors (6)</summary>

<br />

**Network errors:**
* [`ConnectionError`](./src/models/errors/httpclienterrors.ts): HTTP client was unable to make a request to a server.
* [`RequestTimeoutError`](./src/models/errors/httpclienterrors.ts): HTTP request timed out due to an AbortSignal signal.
* [`RequestAbortedError`](./src/models/errors/httpclienterrors.ts): HTTP request was aborted by the client.
* [`InvalidRequestError`](./src/models/errors/httpclienterrors.ts): Any input used to create a request is invalid.
* [`UnexpectedClientError`](./src/models/errors/httpclienterrors.ts): Unrecognised or unexpected error.


**Inherit from [`AlienError`](./src/models/errors/alienerror.ts)**:
* [`ResponseValidationError`](./src/models/errors/responsevalidationerror.ts): Type mismatch between the data returned from the server and the structure expected by the SDK. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string.

</details>

\* Check [the method documentation](#available-resources-and-operations) to see if the error is applicable.
<!-- End Error Handling [errors] -->

<!-- Start Server Selection [server] -->
## Server Selection

### Override Server URL Per-Client

The default server can be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example:
```typescript
import { Alien } from "@alienplatform/platform-api";

const alien = new Alien({
  serverURL: "https://api.alien.dev",
  apiKey: process.env["ALIEN_API_KEY"] ?? "",
});

async function run() {
  const result = await alien.getWorkspaceInvitationPreview({
    token: "<value>",
  });

  console.log(result);
}

run();

```
<!-- End Server Selection [server] -->

<!-- Start Custom HTTP Client [http-client] -->
## Custom HTTP Client

The TypeScript SDK makes API calls using an `HTTPClient` that wraps the native
[Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). This
client is a thin wrapper around `fetch` and provides the ability to attach hooks
around the request lifecycle that can be used to modify the request or handle
errors and response.

The `HTTPClient` constructor takes an optional `fetcher` argument that can be
used to integrate a third-party HTTP client or when writing tests to mock out
the HTTP client and feed in fixtures.

The following example shows how to use the `"beforeRequest"` hook to to add a
custom header and a timeout to requests and how to use the `"requestError"` hook
to log errors:

```typescript
import { Alien } from "@alienplatform/platform-api";
import { HTTPClient } from "@alienplatform/platform-api/lib/http";

const httpClient = new HTTPClient({
  // fetcher takes a function that has the same signature as native `fetch`.
  fetcher: (request) => {
    return fetch(request);
  }
});

httpClient.addHook("beforeRequest", (request) => {
  const nextRequest = new Request(request, {
    signal: request.signal || AbortSignal.timeout(5000)
  });

  nextRequest.headers.set("x-custom-header", "custom value");

  return nextRequest;
});

httpClient.addHook("requestError", (error, request) => {
  console.group("Request Error");
  console.log("Reason:", `${error}`);
  console.log("Endpoint:", `${request.method} ${request.url}`);
  console.groupEnd();
});

const sdk = new Alien({ httpClient: httpClient });
```
<!-- End Custom HTTP Client [http-client] -->

<!-- Start Debugging [debug] -->
## Debugging

You can setup your SDK to emit debug logs for SDK requests and responses.

You can pass a logger that matches `console`'s interface as an SDK option.

> [!WARNING]
> Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production.

```typescript
import { Alien } from "@alienplatform/platform-api";

const sdk = new Alien({ debugLogger: console });
```

You can also enable a default debug logger by setting an environment variable `ALIEN_DEBUG` to true.
<!-- End Debugging [debug] -->

<!-- Placeholder for Future Speakeasy SDK Sections -->

# Development

## Maturity

This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
looking for the latest version.

## Contributions

While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.

### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=openapi&utm_campaign=typescript)
