@upstash/workflow 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,33 @@
1
+ import { R as RouteFunction, W as WorkflowServeOptions } from './types-CfN1Epuj.mjs';
2
+ import '@upstash/qstash';
3
+
4
+ type WorkflowBindings = {
5
+ QSTASH_TOKEN: string;
6
+ QSTASH_URL?: string;
7
+ QSTASH_CURRENT_SIGNING_KEY?: string;
8
+ QSTASH_NEXT_SIGNING_KEY?: string;
9
+ UPSTASH_WORKFLOW_URL?: string;
10
+ };
11
+ /**
12
+ * Cloudflare Pages Function arguments
13
+ */
14
+ type PagesHandlerArgs = [{
15
+ request: Request;
16
+ env: Record<string, string | undefined>;
17
+ }];
18
+ /**
19
+ * Cloudflare Worker arguments
20
+ */
21
+ type WorkersHandlerArgs = [Request, Record<string, string | undefined>];
22
+ /**
23
+ * Serve method to serve a Upstash Workflow in a Nextjs project
24
+ *
25
+ * See for options https://upstash.com/docs/qstash/workflows/basics/serve
26
+ *
27
+ * @param routeFunction workflow function
28
+ * @param options workflow options
29
+ * @returns
30
+ */
31
+ declare const serve: <TInitialPayload = unknown>(routeFunction: RouteFunction<TInitialPayload>, options?: Omit<WorkflowServeOptions<Response, TInitialPayload>, "onStepFinish">) => ((...args: PagesHandlerArgs | WorkersHandlerArgs) => Promise<Response>);
32
+
33
+ export { type PagesHandlerArgs, type WorkersHandlerArgs, type WorkflowBindings, serve };
@@ -0,0 +1,33 @@
1
+ import { R as RouteFunction, W as WorkflowServeOptions } from './types-CfN1Epuj.js';
2
+ import '@upstash/qstash';
3
+
4
+ type WorkflowBindings = {
5
+ QSTASH_TOKEN: string;
6
+ QSTASH_URL?: string;
7
+ QSTASH_CURRENT_SIGNING_KEY?: string;
8
+ QSTASH_NEXT_SIGNING_KEY?: string;
9
+ UPSTASH_WORKFLOW_URL?: string;
10
+ };
11
+ /**
12
+ * Cloudflare Pages Function arguments
13
+ */
14
+ type PagesHandlerArgs = [{
15
+ request: Request;
16
+ env: Record<string, string | undefined>;
17
+ }];
18
+ /**
19
+ * Cloudflare Worker arguments
20
+ */
21
+ type WorkersHandlerArgs = [Request, Record<string, string | undefined>];
22
+ /**
23
+ * Serve method to serve a Upstash Workflow in a Nextjs project
24
+ *
25
+ * See for options https://upstash.com/docs/qstash/workflows/basics/serve
26
+ *
27
+ * @param routeFunction workflow function
28
+ * @param options workflow options
29
+ * @returns
30
+ */
31
+ declare const serve: <TInitialPayload = unknown>(routeFunction: RouteFunction<TInitialPayload>, options?: Omit<WorkflowServeOptions<Response, TInitialPayload>, "onStepFinish">) => ((...args: PagesHandlerArgs | WorkersHandlerArgs) => Promise<Response>);
32
+
33
+ export { type PagesHandlerArgs, type WorkersHandlerArgs, type WorkflowBindings, serve };