Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

@temporal-contract/client

Type-safe client for consuming Temporal workflows

npm version

Installation

pnpm add @temporal-contract/client @temporal-contract/contract @temporalio/client zod

Quick Example

import { TypedClient } from "@temporal-contract/client";
import { Connection, Client } from "@temporalio/client";

const connection = await Connection.connect({ address: "localhost:7233" });
const temporalClient = new Client({ connection });
const client = TypedClient.create(myContract, temporalClient);

// Execute workflow (fully typed!)
const result = await client.executeWorkflow("processOrder", {
  workflowId: "order-123",
  args: { orderId: "ORD-123" },
});

Documentation

📖 Read the full documentation →

License

MIT