> ## Documentation Index
> Fetch the complete documentation index at: https://docs.parable.work/llms.txt
> Use this file to discover all available pages before exploring further.

# TypeScript SDK

> Authenticate and call the Workspace API from TypeScript.

The TypeScript client is `@parable-platform/web-api-sdk`. It covers the
endpoints in the [Workspace API reference](/protocols/http/workspace).

## Access

Distribution is not public yet. Contact your Parable representative for access.

## Import and authenticate

Create a client with your Workspace API token.

```typescript theme={null}
import { WebApiSDK } from "@parable-platform/web-api-sdk";

const token = process.env.PARABLE_API_TOKEN;
if (!token) {
  throw new Error("Set PARABLE_API_TOKEN");
}

const sdk = new WebApiSDK({
  baseUrl: "https://api.parable.work",
  auth: { token },
});
```

The client sends `Authorization: Bearer ...` on every call.

## Query Workspace data

Use the TypeScript Flight SQL client alongside the Workspace API SDK when you
need table data rather than control-plane resources. The
[SQL SDK guide](/protocols/sql/query-with-sdks) shows how to execute a query and
decode its Arrow result. The [SQL primer](/protocols/sql) defines the shared
catalog and pool model.

## Read

Read the current member, then the Provider connections configured in the
Workspace:

```typescript theme={null}
const me = await sdk.users.me();
console.log(me.name, me.email);

const connections = await sdk.vendors.tenantConnectorInstances();
for (const connection of connections) {
  console.log(connection.name, connection.connectionStatus);
}
```

## Update

Enable a tap. Replace the ID with one from the Workspace. List taps with
`sdk.tenantConnectorTaps.tenantConnectorTaps()`.

```typescript theme={null}
const tap = await sdk.tenantConnectorTaps.updateTenantConnectorTap(
  "018f2a3b-9c4d-7e5f-8a6b-1c2d3e4f5a6b",
  { enabled: true },
);

console.log(tap.id, tap.enabled);
```

Omitted fields are left unchanged. To disable the tap, pass
`{ enabled: false }`.

<Tip>
  Groups in the [Workspace API reference](/protocols/http/workspace) are
  namespaces such as `sdk.users` and `sdk.vendors`. Operations are methods such
  as `me` and `tenantConnectorInstances`.
</Tip>
