@upstash/workflow 1.3.2 → 1.4.0-rc

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.
Files changed (50) hide show
  1. package/astro.d.mts +3 -2
  2. package/astro.d.ts +3 -2
  3. package/astro.js +595 -140
  4. package/astro.mjs +3 -1
  5. package/{chunk-ICDNN4UW.mjs → chunk-UH6O5IJY.mjs} +751 -281
  6. package/cloudflare.d.mts +3 -2
  7. package/cloudflare.d.ts +3 -2
  8. package/cloudflare.js +595 -140
  9. package/cloudflare.mjs +3 -1
  10. package/express.d.mts +3 -2
  11. package/express.d.ts +3 -2
  12. package/express.js +596 -140
  13. package/express.mjs +4 -1
  14. package/h3.d.mts +3 -2
  15. package/h3.d.ts +3 -2
  16. package/h3.js +595 -140
  17. package/h3.mjs +3 -1
  18. package/hono.d.mts +3 -2
  19. package/hono.d.ts +3 -2
  20. package/hono.js +595 -140
  21. package/hono.mjs +3 -1
  22. package/index.d.mts +64 -17
  23. package/index.d.ts +64 -17
  24. package/index.js +652 -150
  25. package/index.mjs +49 -11
  26. package/nextjs.d.mts +3 -2
  27. package/nextjs.d.ts +3 -2
  28. package/nextjs.js +596 -140
  29. package/nextjs.mjs +4 -1
  30. package/package.json +1 -1
  31. package/react-router.d.mts +3 -2
  32. package/react-router.d.ts +3 -2
  33. package/react-router.js +595 -140
  34. package/react-router.mjs +3 -1
  35. package/{serve-many-iJF1IUXk.d.ts → serve-many-BCtZg31b.d.ts} +1 -1
  36. package/{serve-many-CG3BFvO3.d.mts → serve-many-CbIV7145.d.mts} +1 -1
  37. package/solidjs.d.mts +2 -1
  38. package/solidjs.d.ts +2 -1
  39. package/solidjs.js +595 -140
  40. package/solidjs.mjs +3 -1
  41. package/svelte.d.mts +3 -2
  42. package/svelte.d.ts +3 -2
  43. package/svelte.js +595 -140
  44. package/svelte.mjs +3 -1
  45. package/tanstack.d.mts +3 -2
  46. package/tanstack.d.ts +3 -2
  47. package/tanstack.js +595 -140
  48. package/tanstack.mjs +3 -1
  49. package/{types-CekOpKvz.d.ts → types-ffLPVG5_.d.mts} +248 -8
  50. package/{types-CekOpKvz.d.mts → types-ffLPVG5_.d.ts} +248 -8
package/hono.mjs CHANGED
@@ -2,14 +2,16 @@ import {
2
2
  SDK_TELEMETRY,
3
3
  serveBase,
4
4
  serveManyBase
5
- } from "./chunk-ICDNN4UW.mjs";
5
+ } from "./chunk-UH6O5IJY.mjs";
6
6
 
7
7
  // platforms/hono.ts
8
+ import { startDevServer } from "@upstash/qstash";
8
9
  var telemetry = {
9
10
  sdk: SDK_TELEMETRY,
10
11
  framework: "hono"
11
12
  };
12
13
  var serve = (routeFunction, options) => {
14
+ void startDevServer();
13
15
  const handler = async (context) => {
14
16
  const environment = context.env ? context.env : typeof process === "undefined" ? {} : process.env;
15
17
  const request = context.req.raw;
package/index.d.mts CHANGED
@@ -1,7 +1,8 @@
1
- import { S as StepType, R as RawStep, W as WorkflowMiddleware, a as WorkflowClient, b as WorkflowReceiver, c as RouteFunction, d as WorkflowServeOptions, T as Telemetry, N as NotifyResponse, e as Waiter } from './types-CekOpKvz.mjs';
2
- export { A as AsyncStepFunction, C as CallResponse, f as CallSettings, D as DetailedFinishCondition, g as Duration, E as ExclusiveValidationOptions, F as FailureFunctionPayload, h as FinishCondition, H as HeaderParams, I as InvokableWorkflow, i as InvokeStepResponse, j as InvokeWorkflowRequest, L as LazyInvokeStepParams, k as NotifyStepResponse, P as ParallelCallState, Q as QStashClientExtraConfig, l as RequiredExceptFields, m as Step, n as StepFunction, o as StepTypes, p as SyncStepFunction, q as WaitEventOptions, r as WaitRequest, s as WaitStepResponse, t as WorkflowAbort, u as WorkflowContext, v as WorkflowError, w as WorkflowNonRetryableError, x as WorkflowRetryAfterError } from './types-CekOpKvz.mjs';
1
+ import { S as StepType, R as RawStep, W as WorkflowMiddleware, a as WorkflowClient, b as WorkflowReceiver, c as RouteFunction, d as WorkflowServeOptions, T as Telemetry, N as NotifyResponse, e as Waiter } from './types-ffLPVG5_.mjs';
2
+ export { A as AsyncStepFunction, C as CallResponse, f as CallSettings, D as DetailedFinishCondition, g as Duration, E as ExclusiveValidationOptions, F as FailureFunctionPayload, h as FinishCondition, H as HeaderParams, I as InvokableWorkflow, i as InvokeStepResponse, j as InvokeWorkflowRequest, L as LazyInvokeStepParams, k as NotifyStepResponse, P as ParallelCallState, Q as QStashClientExtraConfig, l as RequiredExceptFields, m as Step, n as StepFunction, o as StepSettings, p as StepTypes, q as SyncStepFunction, r as WaitEventOptions, s as WaitRequest, t as WaitStepResponse, u as WorkflowAbort, v as WorkflowContext, w as WorkflowError, x as WorkflowNonRetryableError, y as WorkflowRetryAfterError } from './types-ffLPVG5_.mjs';
3
3
  import { FlowControl, PublishRequest, HTTPMethods, Client as Client$1 } from '@upstash/qstash';
4
4
  import 'zod';
5
+ import 'neverthrow';
5
6
 
6
7
  type BaseStepLog = {
7
8
  /**
@@ -209,6 +210,11 @@ type StepLogGroup = {
209
210
  */
210
211
  type: "next";
211
212
  };
213
+ /**
214
+ * State of the failure function (`failureUrl`/`failureFunction`) call of a
215
+ * failed workflow run.
216
+ */
217
+ type FailureFunctionState = "CALLBACK_INPROGRESS" | "CALLBACK_SUCCESS" | "CALLBACK_FAIL" | "CALLBACK_CANCELED";
212
218
  type FailureFunctionLog = {
213
219
  /**
214
220
  * messageId of the message published for handling the failure
@@ -221,7 +227,7 @@ type FailureFunctionLog = {
221
227
  /**
222
228
  * State of the message published for failure
223
229
  */
224
- state: "CALLBACK_INPROGRESS" | "CALLBACK_SUCCESS" | "CALLBACK_FAIL";
230
+ state: FailureFunctionState;
225
231
  /**
226
232
  * Headers received from the step which caused the workflow to fail
227
233
  */
@@ -538,14 +544,21 @@ declare const serveBase: <TInitialPayload = unknown, TRequest extends Request =
538
544
  */
539
545
  declare const serve: <TInitialPayload = unknown, TRequest extends Request = Request, TResponse extends Response = Response, TResult = unknown>(routeFunction: RouteFunction<TInitialPayload, TResult>, options?: WorkflowServeOptions<TInitialPayload, TResult>) => ReturnType<typeof serveBase<TInitialPayload, TRequest, TResponse, TResult>>;
540
546
 
541
- type RequireAtLeastOne<T> = {
547
+ type RequireAtLeastOne<T> = T & {
542
548
  [K in keyof T]-?: Required<Pick<T, K>>;
543
549
  }[keyof T];
544
- /** Shared filter fields accepted by every qstash & workflow endpoint. */
550
+ /**
551
+ * Shared filter fields accepted by every qstash & workflow endpoint.
552
+ *
553
+ * Most fields support multi-value filtering: pass an array to match a record
554
+ * whose value equals any of the given values (OR semantics). Separate filters
555
+ * are combined with AND semantics.
556
+ */
545
557
  type UniversalFilterFields = {
546
558
  fromDate?: Date | number;
547
559
  toDate?: Date | number;
548
- callerIp?: string;
560
+ /** Filter by the IP address of the publisher. Supports multiple values. */
561
+ callerIp?: string | string[];
549
562
  /**
550
563
  * Filter by label.
551
564
  *
@@ -554,32 +567,52 @@ type UniversalFilterFields = {
554
567
  * filtering by `[label_1, label_2]` returns both.
555
568
  */
556
569
  label?: string | string[];
557
- flowControlKey?: string;
570
+ /** Filter by Flow Control Key. Supports multiple values. */
571
+ flowControlKey?: string | string[];
558
572
  };
559
573
  /** Workflow-specific filter fields for DLQ and bulk endpoints. */
560
574
  type WorkflowFilterFields = {
561
- workflowUrl?: string;
575
+ /** Filter by workflow URL. Supports multiple values. */
576
+ workflowUrl?: string | string[];
562
577
  workflowRunId?: string;
563
578
  workflowCreatedAt?: number;
564
- failureFunctionState?: string;
579
+ /**
580
+ * Filter by the state of the failure function call. Supports multiple values:
581
+ * pass an array to match runs in any of the given states (OR semantics).
582
+ */
583
+ failureFunctionState?: FailureFunctionState | FailureFunctionState[];
565
584
  };
566
585
  type WorkflowLogsFilterFields = {
567
586
  state?: WorkflowRunLog["workflowState"];
568
587
  messageId?: string;
569
588
  };
589
+ /**
590
+ * Filter by the host/path of the workflow URL.
591
+ *
592
+ * Supported by the cancel and logs endpoints (the DLQ endpoint rejects these).
593
+ * Each supports multiple values: pass an array to match any value.
594
+ */
595
+ type HostPathFilterFields = {
596
+ /** Filter by the host of the workflow URL. Supports multiple values. */
597
+ host?: string | string[];
598
+ /** Filter by the path of the workflow URL. Supports multiple values. */
599
+ path?: string | string[];
600
+ };
570
601
  type DLQActionFilterFields = UniversalFilterFields & WorkflowFilterFields;
571
602
  /** Cancel filter: exact URL match. Cannot combine with `workflowUrlStartingWith`. */
572
- type CancelFilterWithExactUrl = UniversalFilterFields & {
573
- workflowUrl: string;
603
+ type CancelFilterWithExactUrl = UniversalFilterFields & HostPathFilterFields & {
604
+ /** Filter by exact workflow URL. Supports multiple values. */
605
+ workflowUrl: string | string[];
574
606
  workflowUrlStartingWith?: never;
575
607
  };
576
608
  /** Cancel filter: URL prefix match. Cannot combine with `workflowUrl`. */
577
- type CancelFilterWithPrefixUrl = UniversalFilterFields & {
578
- workflowUrlStartingWith: string;
609
+ type CancelFilterWithPrefixUrl = UniversalFilterFields & HostPathFilterFields & {
610
+ /** Filter by workflow URL prefix. Supports multiple values. */
611
+ workflowUrlStartingWith: string | string[];
579
612
  workflowUrl?: never;
580
613
  };
581
614
  /** Cancel filter: no URL. Requires at least one other filter field. */
582
- type CancelFilterWithoutUrl = RequireAtLeastOne<UniversalFilterFields> & {
615
+ type CancelFilterWithoutUrl = RequireAtLeastOne<UniversalFilterFields & HostPathFilterFields> & {
583
616
  workflowUrl?: never;
584
617
  workflowUrlStartingWith?: never;
585
618
  };
@@ -650,14 +683,14 @@ type WorkflowRunCancelFilters = {
650
683
  workflowRunIds?: never;
651
684
  filter?: never;
652
685
  } & WorkflowCancelCount);
653
- type WorkflowLogsListFilters = UniversalFilterFields & Pick<WorkflowFilterFields, "workflowUrl" | "workflowRunId" | "workflowCreatedAt"> & WorkflowLogsFilterFields;
686
+ type WorkflowLogsListFilters = UniversalFilterFields & Pick<WorkflowFilterFields, "workflowUrl" | "workflowRunId" | "workflowCreatedAt"> & HostPathFilterFields & WorkflowLogsFilterFields;
654
687
 
655
688
  type ResumeRestartOptions = {
656
689
  flowControl?: FlowControl;
657
690
  retries?: number;
658
691
  };
659
692
  type FailureCallbackInfo = {
660
- state?: "CALLBACK_FAIL" | "CALLBACK_SUCCESS" | "CALLBACK_INPROGRESS";
693
+ state?: FailureFunctionState;
661
694
  responseStatus?: number;
662
695
  responseBody?: string;
663
696
  responseHeaders?: Record<string, string[]>;
@@ -811,6 +844,15 @@ declare class DLQ {
811
844
  retryFailureFunction({ dlqId }: Pick<DLQResumeRestartOptions<string>, "dlqId">): Promise<DLQResumeRestartResponse & {
812
845
  error?: string;
813
846
  }>;
847
+ /**
848
+ * Cancel the in-progress failure function (failureUrl/failureFunction) call
849
+ * of a workflow run.
850
+ *
851
+ * Fails if the run has no failure function call in progress.
852
+ *
853
+ * @param dlqId - The ID of the DLQ message whose failure function call will be canceled
854
+ */
855
+ cancelFailureFunction({ dlqId }: Pick<DLQResumeRestartOptions<string>, "dlqId">): Promise<void>;
814
856
  /**
815
857
  * Delete DLQ messages.
816
858
  *
@@ -863,6 +905,11 @@ declare class Client {
863
905
  * - With other filters: `cancel({ filter: { label: "my-label" } })`
864
906
  * - To target all: `cancel({ all: true })`
865
907
  *
908
+ * Filters support multiple values: pass an array to match a run whose value
909
+ * equals any of the given values (OR logic). Separate filters are combined with
910
+ * AND logic. For example:
911
+ * `cancel({ filter: { workflowUrl: ["https://a.com", "https://b.com"] } })`
912
+ *
866
913
  * Cancels up to `count` workflow runs per call (defaults to 100).
867
914
  *
868
915
  * ```ts
@@ -1043,4 +1090,4 @@ declare class Client {
1043
1090
  get dlq(): DLQ;
1044
1091
  }
1045
1092
 
1046
- export { Client, type DLQResumeRestartOptions, type DLQResumeRestartResponse, NotifyResponse, RawStep, RouteFunction, type StepError, type StepLog, StepType, Telemetry, type TriggerOptions, Waiter, WorkflowClient, WorkflowMiddleware, WorkflowReceiver, type WorkflowRunLog, type WorkflowRunLogs, WorkflowServeOptions, loggingMiddleware, serve };
1093
+ export { Client, type DLQResumeRestartOptions, type DLQResumeRestartResponse, type FailureFunctionState, NotifyResponse, RawStep, RouteFunction, type StepError, type StepLog, StepType, Telemetry, type TriggerOptions, Waiter, WorkflowClient, WorkflowMiddleware, WorkflowReceiver, type WorkflowRunLog, type WorkflowRunLogs, WorkflowServeOptions, loggingMiddleware, serve };
package/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- import { S as StepType, R as RawStep, W as WorkflowMiddleware, a as WorkflowClient, b as WorkflowReceiver, c as RouteFunction, d as WorkflowServeOptions, T as Telemetry, N as NotifyResponse, e as Waiter } from './types-CekOpKvz.js';
2
- export { A as AsyncStepFunction, C as CallResponse, f as CallSettings, D as DetailedFinishCondition, g as Duration, E as ExclusiveValidationOptions, F as FailureFunctionPayload, h as FinishCondition, H as HeaderParams, I as InvokableWorkflow, i as InvokeStepResponse, j as InvokeWorkflowRequest, L as LazyInvokeStepParams, k as NotifyStepResponse, P as ParallelCallState, Q as QStashClientExtraConfig, l as RequiredExceptFields, m as Step, n as StepFunction, o as StepTypes, p as SyncStepFunction, q as WaitEventOptions, r as WaitRequest, s as WaitStepResponse, t as WorkflowAbort, u as WorkflowContext, v as WorkflowError, w as WorkflowNonRetryableError, x as WorkflowRetryAfterError } from './types-CekOpKvz.js';
1
+ import { S as StepType, R as RawStep, W as WorkflowMiddleware, a as WorkflowClient, b as WorkflowReceiver, c as RouteFunction, d as WorkflowServeOptions, T as Telemetry, N as NotifyResponse, e as Waiter } from './types-ffLPVG5_.js';
2
+ export { A as AsyncStepFunction, C as CallResponse, f as CallSettings, D as DetailedFinishCondition, g as Duration, E as ExclusiveValidationOptions, F as FailureFunctionPayload, h as FinishCondition, H as HeaderParams, I as InvokableWorkflow, i as InvokeStepResponse, j as InvokeWorkflowRequest, L as LazyInvokeStepParams, k as NotifyStepResponse, P as ParallelCallState, Q as QStashClientExtraConfig, l as RequiredExceptFields, m as Step, n as StepFunction, o as StepSettings, p as StepTypes, q as SyncStepFunction, r as WaitEventOptions, s as WaitRequest, t as WaitStepResponse, u as WorkflowAbort, v as WorkflowContext, w as WorkflowError, x as WorkflowNonRetryableError, y as WorkflowRetryAfterError } from './types-ffLPVG5_.js';
3
3
  import { FlowControl, PublishRequest, HTTPMethods, Client as Client$1 } from '@upstash/qstash';
4
4
  import 'zod';
5
+ import 'neverthrow';
5
6
 
6
7
  type BaseStepLog = {
7
8
  /**
@@ -209,6 +210,11 @@ type StepLogGroup = {
209
210
  */
210
211
  type: "next";
211
212
  };
213
+ /**
214
+ * State of the failure function (`failureUrl`/`failureFunction`) call of a
215
+ * failed workflow run.
216
+ */
217
+ type FailureFunctionState = "CALLBACK_INPROGRESS" | "CALLBACK_SUCCESS" | "CALLBACK_FAIL" | "CALLBACK_CANCELED";
212
218
  type FailureFunctionLog = {
213
219
  /**
214
220
  * messageId of the message published for handling the failure
@@ -221,7 +227,7 @@ type FailureFunctionLog = {
221
227
  /**
222
228
  * State of the message published for failure
223
229
  */
224
- state: "CALLBACK_INPROGRESS" | "CALLBACK_SUCCESS" | "CALLBACK_FAIL";
230
+ state: FailureFunctionState;
225
231
  /**
226
232
  * Headers received from the step which caused the workflow to fail
227
233
  */
@@ -538,14 +544,21 @@ declare const serveBase: <TInitialPayload = unknown, TRequest extends Request =
538
544
  */
539
545
  declare const serve: <TInitialPayload = unknown, TRequest extends Request = Request, TResponse extends Response = Response, TResult = unknown>(routeFunction: RouteFunction<TInitialPayload, TResult>, options?: WorkflowServeOptions<TInitialPayload, TResult>) => ReturnType<typeof serveBase<TInitialPayload, TRequest, TResponse, TResult>>;
540
546
 
541
- type RequireAtLeastOne<T> = {
547
+ type RequireAtLeastOne<T> = T & {
542
548
  [K in keyof T]-?: Required<Pick<T, K>>;
543
549
  }[keyof T];
544
- /** Shared filter fields accepted by every qstash & workflow endpoint. */
550
+ /**
551
+ * Shared filter fields accepted by every qstash & workflow endpoint.
552
+ *
553
+ * Most fields support multi-value filtering: pass an array to match a record
554
+ * whose value equals any of the given values (OR semantics). Separate filters
555
+ * are combined with AND semantics.
556
+ */
545
557
  type UniversalFilterFields = {
546
558
  fromDate?: Date | number;
547
559
  toDate?: Date | number;
548
- callerIp?: string;
560
+ /** Filter by the IP address of the publisher. Supports multiple values. */
561
+ callerIp?: string | string[];
549
562
  /**
550
563
  * Filter by label.
551
564
  *
@@ -554,32 +567,52 @@ type UniversalFilterFields = {
554
567
  * filtering by `[label_1, label_2]` returns both.
555
568
  */
556
569
  label?: string | string[];
557
- flowControlKey?: string;
570
+ /** Filter by Flow Control Key. Supports multiple values. */
571
+ flowControlKey?: string | string[];
558
572
  };
559
573
  /** Workflow-specific filter fields for DLQ and bulk endpoints. */
560
574
  type WorkflowFilterFields = {
561
- workflowUrl?: string;
575
+ /** Filter by workflow URL. Supports multiple values. */
576
+ workflowUrl?: string | string[];
562
577
  workflowRunId?: string;
563
578
  workflowCreatedAt?: number;
564
- failureFunctionState?: string;
579
+ /**
580
+ * Filter by the state of the failure function call. Supports multiple values:
581
+ * pass an array to match runs in any of the given states (OR semantics).
582
+ */
583
+ failureFunctionState?: FailureFunctionState | FailureFunctionState[];
565
584
  };
566
585
  type WorkflowLogsFilterFields = {
567
586
  state?: WorkflowRunLog["workflowState"];
568
587
  messageId?: string;
569
588
  };
589
+ /**
590
+ * Filter by the host/path of the workflow URL.
591
+ *
592
+ * Supported by the cancel and logs endpoints (the DLQ endpoint rejects these).
593
+ * Each supports multiple values: pass an array to match any value.
594
+ */
595
+ type HostPathFilterFields = {
596
+ /** Filter by the host of the workflow URL. Supports multiple values. */
597
+ host?: string | string[];
598
+ /** Filter by the path of the workflow URL. Supports multiple values. */
599
+ path?: string | string[];
600
+ };
570
601
  type DLQActionFilterFields = UniversalFilterFields & WorkflowFilterFields;
571
602
  /** Cancel filter: exact URL match. Cannot combine with `workflowUrlStartingWith`. */
572
- type CancelFilterWithExactUrl = UniversalFilterFields & {
573
- workflowUrl: string;
603
+ type CancelFilterWithExactUrl = UniversalFilterFields & HostPathFilterFields & {
604
+ /** Filter by exact workflow URL. Supports multiple values. */
605
+ workflowUrl: string | string[];
574
606
  workflowUrlStartingWith?: never;
575
607
  };
576
608
  /** Cancel filter: URL prefix match. Cannot combine with `workflowUrl`. */
577
- type CancelFilterWithPrefixUrl = UniversalFilterFields & {
578
- workflowUrlStartingWith: string;
609
+ type CancelFilterWithPrefixUrl = UniversalFilterFields & HostPathFilterFields & {
610
+ /** Filter by workflow URL prefix. Supports multiple values. */
611
+ workflowUrlStartingWith: string | string[];
579
612
  workflowUrl?: never;
580
613
  };
581
614
  /** Cancel filter: no URL. Requires at least one other filter field. */
582
- type CancelFilterWithoutUrl = RequireAtLeastOne<UniversalFilterFields> & {
615
+ type CancelFilterWithoutUrl = RequireAtLeastOne<UniversalFilterFields & HostPathFilterFields> & {
583
616
  workflowUrl?: never;
584
617
  workflowUrlStartingWith?: never;
585
618
  };
@@ -650,14 +683,14 @@ type WorkflowRunCancelFilters = {
650
683
  workflowRunIds?: never;
651
684
  filter?: never;
652
685
  } & WorkflowCancelCount);
653
- type WorkflowLogsListFilters = UniversalFilterFields & Pick<WorkflowFilterFields, "workflowUrl" | "workflowRunId" | "workflowCreatedAt"> & WorkflowLogsFilterFields;
686
+ type WorkflowLogsListFilters = UniversalFilterFields & Pick<WorkflowFilterFields, "workflowUrl" | "workflowRunId" | "workflowCreatedAt"> & HostPathFilterFields & WorkflowLogsFilterFields;
654
687
 
655
688
  type ResumeRestartOptions = {
656
689
  flowControl?: FlowControl;
657
690
  retries?: number;
658
691
  };
659
692
  type FailureCallbackInfo = {
660
- state?: "CALLBACK_FAIL" | "CALLBACK_SUCCESS" | "CALLBACK_INPROGRESS";
693
+ state?: FailureFunctionState;
661
694
  responseStatus?: number;
662
695
  responseBody?: string;
663
696
  responseHeaders?: Record<string, string[]>;
@@ -811,6 +844,15 @@ declare class DLQ {
811
844
  retryFailureFunction({ dlqId }: Pick<DLQResumeRestartOptions<string>, "dlqId">): Promise<DLQResumeRestartResponse & {
812
845
  error?: string;
813
846
  }>;
847
+ /**
848
+ * Cancel the in-progress failure function (failureUrl/failureFunction) call
849
+ * of a workflow run.
850
+ *
851
+ * Fails if the run has no failure function call in progress.
852
+ *
853
+ * @param dlqId - The ID of the DLQ message whose failure function call will be canceled
854
+ */
855
+ cancelFailureFunction({ dlqId }: Pick<DLQResumeRestartOptions<string>, "dlqId">): Promise<void>;
814
856
  /**
815
857
  * Delete DLQ messages.
816
858
  *
@@ -863,6 +905,11 @@ declare class Client {
863
905
  * - With other filters: `cancel({ filter: { label: "my-label" } })`
864
906
  * - To target all: `cancel({ all: true })`
865
907
  *
908
+ * Filters support multiple values: pass an array to match a run whose value
909
+ * equals any of the given values (OR logic). Separate filters are combined with
910
+ * AND logic. For example:
911
+ * `cancel({ filter: { workflowUrl: ["https://a.com", "https://b.com"] } })`
912
+ *
866
913
  * Cancels up to `count` workflow runs per call (defaults to 100).
867
914
  *
868
915
  * ```ts
@@ -1043,4 +1090,4 @@ declare class Client {
1043
1090
  get dlq(): DLQ;
1044
1091
  }
1045
1092
 
1046
- export { Client, type DLQResumeRestartOptions, type DLQResumeRestartResponse, NotifyResponse, RawStep, RouteFunction, type StepError, type StepLog, StepType, Telemetry, type TriggerOptions, Waiter, WorkflowClient, WorkflowMiddleware, WorkflowReceiver, type WorkflowRunLog, type WorkflowRunLogs, WorkflowServeOptions, loggingMiddleware, serve };
1093
+ export { Client, type DLQResumeRestartOptions, type DLQResumeRestartResponse, type FailureFunctionState, NotifyResponse, RawStep, RouteFunction, type StepError, type StepLog, StepType, Telemetry, type TriggerOptions, Waiter, WorkflowClient, WorkflowMiddleware, WorkflowReceiver, type WorkflowRunLog, type WorkflowRunLogs, WorkflowServeOptions, loggingMiddleware, serve };