Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

@temporal-contract/contract

Contract builder and type definitions for Temporal workflows and activities

npm version

Installation

pnpm add @temporal-contract/contract zod

Quick Example

import { defineContract } from "@temporal-contract/contract";
import { z } from "zod";

export const myContract = defineContract({
  taskQueue: "orders",
  workflows: {
    processOrder: {
      input: z.object({ orderId: z.string() }),
      output: z.object({ success: z.boolean() }),
      activities: {/* ... */},
    },
  },
});

Documentation

📖 Read the full documentation →

License

MIT