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.
41 lines (39 loc) • 1.24 kB
TypeScript
import { SupportedFrameworkName } from "./types.js";
import { ServeHandlerOptions } from "./components/InngestCommHandler.js";
import { RequestEvent } from "@sveltejs/kit";
//#region src/sveltekit.d.ts
/**
* The name of the framework, used to identify the framework in Inngest
* dashboards and during testing.
*/
declare const frameworkName: SupportedFrameworkName;
/**
* Using SvelteKit, serve and register any declared functions with Inngest,
* making them available to be triggered by events.
*
* @example
* ```ts
* // app/routes/api.inngest.ts
* // (for Remix 1, use app/routes/api/inngest.ts)
* import { serve } from "inngest/remix";
* import { inngest } from "~/inngest/client";
* import fnA from "~/inngest/fnA";
*
* const handler = serve({
* client: inngest,
* functions: [fnA],
* });
*
* export { handler as action, handler as loader };
* ```
*
* @public
*/
declare const serve: (options: ServeHandlerOptions) => ((event: RequestEvent) => Promise<Response>) & {
GET: (event: RequestEvent) => Promise<Response>;
POST: (event: RequestEvent) => Promise<Response>;
PUT: (event: RequestEvent) => Promise<Response>;
};
//#endregion
export { frameworkName, serve };
//# sourceMappingURL=sveltekit.d.ts.map