Eventual is a TypeScript framework for building event-driven applications on AWS using Commands, Events, Subscribers, Workflows and Streams.
Your application exports APIs, Workflows, etc. that are then imported to synthesize an AWS CDK or SST v2 stack that is then deployed to AWS.
import{event,task,workflow,api,HttpResponse}from"@eventual/core";api.post("/work",async(request)=>{constitems: string[]=awaitrequest.json();const{ executionId }=awaitmyWorkflow.startExecution({input: items,});returnnewHttpResponse(JSON.stringify({ executionId }),{status: 200,});});exportconstmyWorkflow=workflow("myWorkflow",async(items: string[])=>{constresults=awaitPromise.all(items.map(doWork));awaitworkDone.emit({outputs: results,});returnresults;});exportconstdoWork=task("work",async(work: string)=>{console.log("Doing Work",work);returnwork.length;});exportinterfaceWorkDoneEvent{outputs: number[];}exportconstworkDone=event<WorkDoneEvent>("WorkDone");