Contract builder and type definitions for Temporal workflows and activities
pnpm add @temporal-contract/contract zodimport { 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: {/* ... */},
},
},
});📖 Read the full documentation →
MIT