Client
View as MarkdownThis page lists the TypeScript SDK names for the Client. The doc comment of each API gives its parameters, defaults, and errors. Read them in the TypeScript SDK API reference.
API names
| Task | TypeScript API | Dex behavior |
|---|---|---|
| Create a Client | Client, with ClientOptions | Client requests |
| Start a Flow | startFlow, with StartFlowOptions | Start a Flow |
| Invoke an RPC | invokeRPC, or invokeRPCWithOptions with RPCInvokeOptions | Invoke an RPC |
| Read Attributes | getAttributes | Read Attributes |
| Wait for a Flow to close | waitForFlow | Wait for a Flow |
| Wait for a Step execution to complete | waitForStepCompletion, with WaitForStepCompletionOptions | Wait for a Step |
| Wait until an Attribute matches | waitForAttributeMatch, with WaitForAttributeOptions | Wait for an Attribute match |
| Describe a Flow | describeFlow | Describe a Flow |
| Search Flows | searchFlows | Search Flows |
| Stop a Flow | stopFlow, with StopFlowOptions | Stop a Flow |
| Skip a Timer | skipTimer | Skip a Timer |
| Update FlowConfig | updateFlowConfig | Update FlowConfig |
| Write and read a Stream | writeStream, readStream, and listStreamMessages | Stream |
| Time travel a Flow | timeTravel, with TimeTravelOptions | Time travel |
| Upload Flow definitions | uploadFlowDefinitions, with FlowDefinitionDocument. Since 1.45 | Flow definitions |
| Handle a failed request | DexServiceError, with ErrorSubStatus | Client requests |
Every Client request method is asynchronous and returns a Promise. Call close when the application shuts down.
Example
Example: examples/typescript/src/primitives/client-apis/controller.ts