@loop-engine/core
v0.1.5
Published
Core domain model and schemas for Loop Engine
Downloads
812
Maintainers
Readme
@loop-engine/core
Branded ID types, Zod schemas, and core domain types for Loop Engine.
Install
npm install @loop-engine/coreQuick Start
import { LoopIdSchema, LoopDefinitionSchema } from "@loop-engine/core";
const loopId = LoopIdSchema.parse("expense.approval");
const parsed = LoopDefinitionSchema.parse({
loopId,
version: "1.0.0",
name: "Expense Approval",
description: "Simple approval loop",
states: [{ stateId: "submitted", label: "Submitted" }, { stateId: "approved", label: "Approved", terminal: true }],
initialState: "submitted",
transitions: [{ transitionId: "approve", from: "submitted", to: "approved", signal: "approve", allowedActors: ["human"] }]
});Documentation link
https://loopengine.io/docs/packages/core
License
Apache-2.0 © Better Data, Inc.
