inngest
Version:
Official SDK for Inngest.com. Inngest is the reliability layer for modern applications. Inngest combines durable execution, events, and queues into a zero-infra platform with built-in observability.
50 lines • 1.49 kB
TypeScript
/**
* An adapter for Remix to serve and register any declared functions with
* Inngest, making them available to be triggered by events.
*
* @example
* ```ts
* import { serve } from "inngest/remix";
* import functions from "~/inngest";
*
* const handler = serve({ id: "my-remix-app", functions });
*
* export { handler as loader, handler as action };
* ```
*
* @module
*/
import { type ServeHandlerOptions } from "./components/InngestCommHandler.js";
import { type SupportedFrameworkName } from "./types.js";
/**
* The name of the framework, used to identify the framework in Inngest
* dashboards and during testing.
*/
export declare const frameworkName: SupportedFrameworkName;
/**
* In Remix, serve and register any declared functions with Inngest, 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 "inngest/remix";
* import functions from "~/inngest";
*
* const handler = serve({ id: "my-remix-app", functions });
*
* export { handler as loader, handler as action };
* ```
*
* @public
*/
export declare const serve: (options: ServeHandlerOptions) => ((ctx: {
request: Request;
context?: unknown;
}) => Promise<Response>);
//# sourceMappingURL=remix.d.ts.map