UNPKG

@novu/framework

Version:

The Code-First Notifications Workflow SDK.

28 lines (25 loc) 1.21 kB
import * as aws_lambda from 'aws-lambda'; import { APIGatewayProxyEventV2, APIGatewayProxyResult } from 'aws-lambda'; import { S as ServeHandlerOptions } from '../index-CmEcpAEO.js'; export { C as Client, N as NovuRequestHandler, w as workflow } from '../index-CmEcpAEO.js'; import { E as Either } from '../health-check.types-D_KcRiM_.js'; export { C as CronExpression, S as SeverityLevelEnum, W as Workflow, p as providerSchemas } from '../health-check.types-D_KcRiM_.js'; import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.js'; import 'json-schema-to-ts'; import 'zod'; declare const frameworkName: SupportedFrameworkName; /** * With AWS Lambda, serve and register any declared workflows with Novu, * making them available to be triggered by events. * * @example * * ```ts * import { serve } from "@novu/framework/lambda"; * import { myWorkflow } from "./src/novu/workflows"; * * export const handler = serve({ workflows: [myWorkflow] }); * ``` */ declare const serve: (options: ServeHandlerOptions) => (event: Either<aws_lambda.APIGatewayProxyEvent, APIGatewayProxyEventV2>) => Promise<Promise<APIGatewayProxyResult>>; export { ServeHandlerOptions, frameworkName, serve };