---
title: "Client"
description: "This page lists the TypeScript SDK names for the Client."
canonical_url: "https://docs.superdurable.io/zh-Hans/reference/typescript/client/"
source: "docs/reference/typescript/client.mdx"
locale: "zh-Hans"
---

# Client

This page lists the TypeScript SDK names for the [Client](https://docs.superdurable.io/zh-Hans/concepts/client.md).
The doc comment of each API gives its parameters, defaults, and errors. Read
them in the [TypeScript SDK API reference](https://docs.superdurable.io/zh-Hans/reference/typescript.md#api-reference).

<a id="api-names"></a>

## API names

| Task                                  | TypeScript API                                                         | Dex behavior                                                                                                                       |
| ------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| Create a Client                       | **Client**, with **ClientOptions**                                     | [Client requests](https://docs.superdurable.io/zh-Hans/reference/server/runtime-client.md)                                         |
| Start a Flow                          | **startFlow**, with **StartFlowOptions**                               | [Start a Flow](https://docs.superdurable.io/zh-Hans/reference/server/runtime-client.md#start-a-flow)                               |
| Invoke an RPC                         | **invokeRPC**, or **invokeRPCWithOptions** with **RPCInvokeOptions**   | [Invoke an RPC](https://docs.superdurable.io/zh-Hans/reference/server/runtime-client.md#invoke-an-rpc)                             |
| Read Attributes                       | **getAttributes**                                                      | [Read Attributes](https://docs.superdurable.io/zh-Hans/reference/server/runtime-client.md#read-attributes)                         |
| Wait for a Flow to close              | **waitForFlow**                                                        | [Wait for a Flow](https://docs.superdurable.io/zh-Hans/reference/server/runtime-client.md#wait-for-a-flow)                         |
| Wait for a Step execution to complete | **waitForStepCompletion**, with **WaitForStepCompletionOptions**       | [Wait for a Step](https://docs.superdurable.io/zh-Hans/reference/server/runtime-client.md#wait-for-a-step)                         |
| Wait until an Attribute matches       | **waitForAttributeMatch**, with **WaitForAttributeOptions**            | [Wait for an Attribute match](https://docs.superdurable.io/zh-Hans/reference/server/runtime-client.md#wait-for-an-attribute-match) |
| Describe a Flow                       | **describeFlow**                                                       | [Describe a Flow](https://docs.superdurable.io/zh-Hans/reference/server/runtime-client.md#describe-a-flow)                         |
| Search Flows                          | **searchFlows**                                                        | [Search Flows](https://docs.superdurable.io/zh-Hans/reference/server/runtime-client.md#search-flows)                               |
| Stop a Flow                           | **stopFlow**, with **StopFlowOptions**                                 | [Stop a Flow](https://docs.superdurable.io/zh-Hans/reference/server/runtime-client.md#stop-a-flow)                                 |
| Skip a Timer                          | **skipTimer**                                                          | [Skip a Timer](https://docs.superdurable.io/zh-Hans/reference/server/runtime-client.md#skip-a-timer)                               |
| Update FlowConfig                     | **updateFlowConfig**                                                   | [Update FlowConfig](https://docs.superdurable.io/zh-Hans/reference/typescript/flow.md#update-flow-config-with-a-client)            |
| Write and read a Stream               | **writeStream**, **readStream**, and **listStreamMessages**            | [Stream](https://docs.superdurable.io/zh-Hans/reference/typescript/stream.md)                                                      |
| Time travel a Flow                    | **timeTravel**, with **TimeTravelOptions**                             | [Time travel](https://docs.superdurable.io/zh-Hans/reference/server/runtime-client.md#time-travel)                                 |
| Upload Flow definitions               | **uploadFlowDefinitions**, with **FlowDefinitionDocument**. Since 1.45 | [Flow definitions](https://docs.superdurable.io/zh-Hans/reference/typescript/workers.md#flow-definitions)                          |
| Handle a failed request               | **DexServiceError**, with **ErrorSubStatus**                           | [Client requests](https://docs.superdurable.io/zh-Hans/reference/server/runtime-client.md)                                         |

Every **Client** request method is asynchronous and returns a Promise. Call
**close** when the application shuts down.

<a id="example"></a>

## Example

Example: [examples/typescript/src/primitives/client-apis/controller.ts](https://github.com/superdurable/dex/tree/main/examples/typescript/src/primitives/client-apis/controller.ts)
