Cancel a workflow execution
OptionalrunId: stringComplete an externally-managed Activity, identified by task token or full ID. Use when an Activity signals completion asynchronously (e.g. from another process or a human-in-the-loop step) instead of returning from its handler.
Count Standalone Activity executions matching a visibility query. See https://docs.temporal.io/visibility for query syntax.
Execute a Standalone Activity until completion and return its result.
Fail an externally-managed Activity, identified by task token or full ID.
Get client health status
Get raw Temporal client (use with caution)
Get a handle to a Standalone Activity execution by ID.
OptionalrunId: stringGet client status for monitoring
Get handle to an existing workflow
OptionalrunId: stringWait for workflow completion and get result
OptionalrunId: stringSend a heartbeat for an externally-managed Activity, identified by task token or full ID.
Optionaldetails: unknownCheck if client is available and healthy
List Standalone Activity executions matching a visibility query. See https://docs.temporal.io/visibility for query syntax.
Query a workflow for its current state
Optionalargs: readonly unknown[]OptionalrunId: stringQuery a workflow using handle
Optionalargs: readonly unknown[]Report cancellation of an externally-managed Activity, identified by task token or full ID.
Optionaldetails: unknownAtomically start a workflow and send a signal to it.
If the workflow is already running, only the signal is delivered.
This is Temporal's signalWithStart operation — useful for ensuring
a workflow is running before sending a signal without a race condition.
Temporal workflow type name
Signal name (string) to send
Arguments for the signal
Arguments to start the workflow with (used only when starting)
Optionaloptions: WorkflowStartOptions
Workflow start options (taskQueue, workflowId, etc.)
// Idempotent: starts the cart the first time, signals it every time.
await clientService.signalWithStart(
'cartWorkflow',
'addItem',
[{ sku: 'SKU-123', qty: 2 }],
[userId], // args passed to cartWorkflow on first start
{ workflowId: `cart-${userId}`, taskQueue: 'carts' },
);
const handle = await clientService.signalWithStart(
'orderWorkflow',
'approve',
['manager-approval'],
[orderId, customerId],
{
workflowId: `order-${orderId}`,
taskQueue: 'orders',
workflowIdReusePolicy: 'ALLOW_DUPLICATE',
workflowExecutionTimeout: '1h',
memo: { source: 'api' },
},
);
console.log(`Signaled + maybe-started: ${handle.workflowId}`);
Send a signal using workflow handle
Optionalargs: readonly unknown[]Start a Standalone Activity execution — a durable, retryable Activity run directly by the client with no workflow involved.
Start an update and return a handle once the update has been accepted by the workflow,
without waiting for it to complete. Use WorkflowUpdateHandle.result() to await the outcome.
Target workflow ID
Update name (matches @UpdateMethod or defineUpdate name)
Optionalargs: readonly unknown[]
Arguments for the update handler
OptionalrunId: string
Optional specific run ID
Start an update using an existing handle and return a handle to the update once it has been accepted, without waiting for it to complete.
Optionalargs: readonly unknown[]Start a new workflow execution
Optionaloptions: WorkflowStartOptionsTerminate a workflow execution
Optionalreason: stringOptionalrunId: stringSend an update to a workflow and wait for it to complete.
Updates combine the strengths of Signals (can mutate workflow state) and Queries (can return a result) into a single request/response operation.
Target workflow ID
Update name (matches @UpdateMethod or defineUpdate name)
Optionalargs: readonly unknown[]
Arguments for the update handler
OptionalrunId: string
Optional specific run ID
Send an update to a workflow using an existing handle and wait for it to complete.
Optionalargs: readonly unknown[]
Temporal Client Service
Provides a clean interface for Temporal client operations including:
Example