UNPKG

actor-kit

Version:

Actor Kit is a library for running state machines in Cloudflare Workers, leveraging XState for robust state management. It provides a framework for managing the logic, lifecycle, persistence, synchronization, and access control of actors in a distributed

18 lines 676 B
import { StateValueFrom } from "xstate"; import { AnyActorKitStateMachine, CallerSnapshotFrom, ClientEventFrom } from "./types"; export declare function createActorFetch<TMachine extends AnyActorKitStateMachine>({ actorType, host, }: { actorType: string; host: string; }): (props: { actorId: string; accessToken: string; input?: Record<string, unknown>; waitForEvent?: ClientEventFrom<TMachine>; waitForState?: StateValueFrom<TMachine>; timeout?: number; errorOnWaitTimeout?: boolean; }, options?: RequestInit) => Promise<{ snapshot: CallerSnapshotFrom<TMachine>; checksum: string; }>; //# sourceMappingURL=createActorFetch.d.ts.map