@upstash/workflow
Version:
Durable, Reliable and Performant Serverless Functions
18 lines (15 loc) • 1.13 kB
text/typescript
import { APIContext, APIRoute } from 'astro';
import { g as WorkflowContext, n as PublicServeOptions, y as InvokableWorkflow } from './types-Q3dM0UlR.mjs';
import { s as serveManyBase } from './serve-many-BNusWYgt.mjs';
import '@upstash/qstash';
import 'zod';
import 'ai';
import '@ai-sdk/openai';
declare function serve<TInitialPayload = unknown, TResult = unknown>(routeFunction: (workflowContext: WorkflowContext<TInitialPayload>, apiContext: APIContext) => Promise<TResult>, options?: PublicServeOptions<TInitialPayload>): {
POST: APIRoute;
};
declare const createWorkflow: <TInitialPayload, TResult>(routeFunction: (workflowContext: WorkflowContext<TInitialPayload>, apiContext: APIContext) => Promise<TResult>, options?: PublicServeOptions<TInitialPayload> | undefined) => InvokableWorkflow<TInitialPayload, TResult>;
declare const serveMany: (workflows: Parameters<typeof serveManyBase>[0]["workflows"], options?: Parameters<typeof serveManyBase>[0]["options"]) => {
POST: (context: APIContext<Record<string, any>, Record<string, string | undefined>>) => Promise<any>;
};
export { createWorkflow, serve, serveMany };