@restatedev/tanstack-workflows-client
v0.2.0
Published
Client for @restatedev/tanstack-workflows
Readme
@restatedev/tanstack-workflows-client
Start and drive TanStack workflows running on
Restate with
@restatedev/tanstack-workflows.
npm install @restatedev/tanstack-workflows-client @restatedev/restate-sdk-clientsimport { createRestateWorkflowRuntime } from "@restatedev/tanstack-workflows-client";
const runtime = createRestateWorkflowRuntime({ url: "http://localhost:8080" });
await runtime.startRun({ workflowId: "checkout", runId: "order-42", input: { amount: 20_000 } });
await runtime.deliverApproval({
workflowId: "checkout",
runId: "order-42",
approval: { approvalId: "manager", approved: true },
});
const output = await runtime.attachRun("checkout", "order-42");Full docs: https://github.com/restatedev/tanstack-workflows
