@upstash/workflow 0.2.11 → 0.2.13
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.
- package/astro.d.mts +2 -2
- package/astro.d.ts +2 -2
- package/astro.js +1264 -1071
- package/astro.mjs +1 -1
- package/{chunk-WQAJ2RSZ.mjs → chunk-XVNSBBDC.mjs} +897 -702
- package/cloudflare.d.mts +2 -2
- package/cloudflare.d.ts +2 -2
- package/cloudflare.js +1264 -1071
- package/cloudflare.mjs +1 -1
- package/express.d.mts +2 -2
- package/express.d.ts +2 -2
- package/express.js +1267 -1074
- package/express.mjs +1 -1
- package/h3.d.mts +2 -2
- package/h3.d.ts +2 -2
- package/h3.js +1264 -1071
- package/h3.mjs +1 -1
- package/hono.d.mts +2 -2
- package/hono.d.ts +2 -2
- package/hono.js +1265 -1072
- package/hono.mjs +2 -2
- package/index.d.mts +16 -6
- package/index.d.ts +16 -6
- package/index.js +1238 -1038
- package/index.mjs +10 -3
- package/nextjs.d.mts +2 -2
- package/nextjs.d.ts +2 -2
- package/nextjs.js +1264 -1071
- package/nextjs.mjs +1 -1
- package/package.json +1 -1
- package/{serve-many-Fuovl7gl.d.mts → serve-many-BF71QZHQ.d.mts} +1 -1
- package/{serve-many-DNnLsDIp.d.ts → serve-many-BMlN2PAB.d.ts} +1 -1
- package/solidjs.d.mts +1 -1
- package/solidjs.d.ts +1 -1
- package/solidjs.js +1235 -1042
- package/solidjs.mjs +1 -1
- package/svelte.d.mts +2 -2
- package/svelte.d.ts +2 -2
- package/svelte.js +1264 -1071
- package/svelte.mjs +1 -1
- package/{types-DS9q8FyV.d.ts → types-C1WIgVLA.d.mts} +110 -82
- package/{types-DS9q8FyV.d.mts → types-C1WIgVLA.d.ts} +110 -82
package/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
makeNotifyRequest,
|
|
11
11
|
serve,
|
|
12
12
|
triggerFirstInvocation
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-XVNSBBDC.mjs";
|
|
14
14
|
|
|
15
15
|
// src/client/index.ts
|
|
16
16
|
import { Client as QStashClient } from "@upstash/qstash";
|
|
@@ -166,6 +166,11 @@ var Client = class {
|
|
|
166
166
|
* with `wfr_`.
|
|
167
167
|
* @param retries retry to use in the initial request. in the rest of
|
|
168
168
|
* the workflow, `retries` option of the `serve` will be used.
|
|
169
|
+
* @param flowControl Settings for controlling the number of active requests
|
|
170
|
+
* and number of requests per second with the same key.
|
|
171
|
+
* @param delay Delay for the workflow run. This is used to delay the
|
|
172
|
+
* execution of the workflow run. The delay is in seconds or can be passed
|
|
173
|
+
* as a string with a time unit (e.g. "1h", "30m", "15s").
|
|
169
174
|
* @returns workflow run id
|
|
170
175
|
*/
|
|
171
176
|
async trigger({
|
|
@@ -174,7 +179,8 @@ var Client = class {
|
|
|
174
179
|
headers,
|
|
175
180
|
workflowRunId,
|
|
176
181
|
retries,
|
|
177
|
-
flowControl
|
|
182
|
+
flowControl,
|
|
183
|
+
delay
|
|
178
184
|
}) {
|
|
179
185
|
const finalWorkflowRunId = getWorkflowRunId(workflowRunId);
|
|
180
186
|
const context = new WorkflowContext({
|
|
@@ -192,8 +198,9 @@ var Client = class {
|
|
|
192
198
|
});
|
|
193
199
|
const result = await triggerFirstInvocation({
|
|
194
200
|
workflowContext: context,
|
|
195
|
-
telemetry: void 0
|
|
201
|
+
telemetry: void 0,
|
|
196
202
|
// can't know workflow telemetry here
|
|
203
|
+
delay
|
|
197
204
|
});
|
|
198
205
|
if (result.isOk()) {
|
|
199
206
|
return { workflowRunId: finalWorkflowRunId };
|
package/nextjs.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NextApiHandler, NextApiRequest, NextApiResponse } from 'next';
|
|
2
|
-
import { R as RouteFunction, k as PublicServeOptions, t as InvokableWorkflow } from './types-
|
|
3
|
-
import { s as serveManyBase } from './serve-many-
|
|
2
|
+
import { R as RouteFunction, k as PublicServeOptions, t as InvokableWorkflow } from './types-C1WIgVLA.mjs';
|
|
3
|
+
import { s as serveManyBase } from './serve-many-BF71QZHQ.mjs';
|
|
4
4
|
import '@upstash/qstash';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import 'ai';
|
package/nextjs.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NextApiHandler, NextApiRequest, NextApiResponse } from 'next';
|
|
2
|
-
import { R as RouteFunction, k as PublicServeOptions, t as InvokableWorkflow } from './types-
|
|
3
|
-
import { s as serveManyBase } from './serve-many-
|
|
2
|
+
import { R as RouteFunction, k as PublicServeOptions, t as InvokableWorkflow } from './types-C1WIgVLA.js';
|
|
3
|
+
import { s as serveManyBase } from './serve-many-BMlN2PAB.js';
|
|
4
4
|
import '@upstash/qstash';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import 'ai';
|