@novu/framework
Version:
The Code-First Notifications Workflow SDK.
38 lines (35 loc) • 1.62 kB
text/typescript
import { S as ServeHandlerOptions } from '../index-BTTxx1ad.cjs';
export { C as Client, N as NovuRequestHandler, w as workflow } from '../index-BTTxx1ad.cjs';
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-DwKatX-8.cjs';
export { C as ContextResolved, S as Subscriber, p as providerSchemas } from '../subscriber.types-CftO3aFY.cjs';
import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.cjs';
export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from '../step-resolver.cjs';
import '../base.schema.types-BApIn9jr.cjs';
import 'json-schema-to-ts';
import 'zod';
declare const frameworkName: SupportedFrameworkName;
/**
* In Remix, serve and register any declared workflows with Novu, making them
* available to be triggered by events.
*
* Remix requires that you export both a "loader" for serving `GET` requests,
* and an "action" for serving other requests, therefore exporting both is
* required.
*
* See {@link https://remix.run/docs/en/v1/guides/resource-routes}
*
* @example
* ```ts
* import { serve } from "@novu/framework/remix";
* import { myWorkflow } from "./src/novu/workflows";
*
* const handler = serve({ workflows: [myWorkflow] });
*
* export { handler as loader, handler as action };
* ```
*/
declare const serve: (options: ServeHandlerOptions) => ((ctx: {
request: Request;
context?: unknown;
}) => Promise<Response>);
export { ServeHandlerOptions, frameworkName, serve };