Interface: NexusClient<T>
workflow.NexusClient
A Nexus client for invoking Nexus Operations for a specific service from a Workflow.
Nexus support in Temporal SDK is experimental.
Type parameters
| Name | Type |
|---|---|
T | extends nexus.ServiceDefinition |
Methods
executeOperation
▸ executeOperation<O>(op, input, options?): Promise<OperationOutput<O>>
Start a Nexus Operation and wait for its completion taking a nexus.operation. Returns the operation's result.
Nexus support in Temporal SDK is experimental.
Type parameters
| Name | Type |
|---|---|
O | extends OperationDefinition<any, any> |
Parameters
| Name | Type |
|---|---|
op | O |
input | OperationInput<O> |
options? | Partial<StartNexusOperationOptions> |
Returns
Promise<OperationOutput<O>>
▸ executeOperation<K>(op, input, options?): Promise<OperationOutput<T["operations"][K]>>
Start a Nexus Operation and wait for its completion, taking an Operation's property name. Returns the operation's result.
An Operation's property name is the name of the property used to define that Operation in
the nexus.ServiceDefinition object; it may differ from the value of the name property
if one was explicitly specified on the nexus.OperationDefinition object.
Nexus support in Temporal SDK is experimental.
Type parameters
| Name | Type |
|---|---|
K | extends string |
Parameters
| Name | Type |
|---|---|
op | K |
input | OperationInput<T["operations"][K]> |
options? | Partial<StartNexusOperationOptions> |
Returns
Promise<OperationOutput<T["operations"][K]>>
startOperation
▸ startOperation<O>(op, input, options?): Promise<NexusOperationHandle<OperationOutput<O>>>
Start a Nexus Operation taking a nexus.operation.
Returns a handle that can be used to wait for the Operation's result.
Nexus support in Temporal SDK is experimental.
Type parameters
| Name | Type |
|---|---|
O | extends OperationDefinition<any, any> |
Parameters
| Name | Type |
|---|---|
op | O |
input | OperationInput<O> |
options? | Partial<StartNexusOperationOptions> |
Returns
Promise<NexusOperationHandle<OperationOutput<O>>>
▸ startOperation<K>(op, input, options?): Promise<NexusOperationHandle<OperationOutput<T["operations"][K]>>>
Start a Nexus Operation, taking an Operation's property name. Returns a handle that can be used to wait for the Operation's result.
An Operation's property name is the name of the property used to define that Operation in
the nexus.ServiceDefinition object; it may differ from the value of the name property
if one was explicitly specified on the nexus.OperationDefinition object.
Nexus support in Temporal SDK is experimental.
Type parameters
| Name | Type |
|---|---|
K | extends string |
Parameters
| Name | Type |
|---|---|
op | K |
input | OperationInput<T["operations"][K]> |
options? | Partial<StartNexusOperationOptions> |
Returns
Promise<NexusOperationHandle<OperationOutput<T["operations"][K]>>>