@upstash/workflow 1.3.0 → 1.3.2-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 +2 -2
  2. package/astro.d.ts +2 -2
  3. package/astro.js +81 -14
  4. package/astro.mjs +1 -1
  5. package/{chunk-G24J5PCC.mjs → chunk-ICDNN4UW.mjs} +84 -14
  6. package/cloudflare.d.mts +2 -2
  7. package/cloudflare.d.ts +2 -2
  8. package/cloudflare.js +81 -14
  9. package/cloudflare.mjs +1 -1
  10. package/express.d.mts +2 -2
  11. package/express.d.ts +2 -2
  12. package/express.js +81 -14
  13. package/express.mjs +1 -1
  14. package/h3.d.mts +2 -2
  15. package/h3.d.ts +2 -2
  16. package/h3.js +81 -14
  17. package/h3.mjs +1 -1
  18. package/hono.d.mts +2 -2
  19. package/hono.d.ts +2 -2
  20. package/hono.js +81 -14
  21. package/hono.mjs +1 -1
  22. package/index.d.mts +43 -7
  23. package/index.d.ts +43 -7
  24. package/index.js +84 -15
  25. package/index.mjs +8 -3
  26. package/nextjs.d.mts +2 -2
  27. package/nextjs.d.ts +2 -2
  28. package/nextjs.js +81 -14
  29. package/nextjs.mjs +1 -1
  30. package/package.json +1 -1
  31. package/react-router.d.mts +2 -2
  32. package/react-router.d.ts +2 -2
  33. package/react-router.js +81 -14
  34. package/react-router.mjs +1 -1
  35. package/{serve-many-D3D9uE4u.d.mts → serve-many-CG3BFvO3.d.mts} +1 -1
  36. package/{serve-many-kPOasiyb.d.ts → serve-many-iJF1IUXk.d.ts} +1 -1
  37. package/solidjs.d.mts +1 -1
  38. package/solidjs.d.ts +1 -1
  39. package/solidjs.js +81 -14
  40. package/solidjs.mjs +1 -1
  41. package/svelte.d.mts +2 -2
  42. package/svelte.d.ts +2 -2
  43. package/svelte.js +81 -14
  44. package/svelte.mjs +1 -1
  45. package/tanstack.d.mts +2 -2
  46. package/tanstack.d.ts +2 -2
  47. package/tanstack.js +81 -14
  48. package/tanstack.mjs +1 -1
  49. package/{types-B_E1VAK6.d.ts → types-CekOpKvz.d.mts} +14 -6
  50. package/{types-B_E1VAK6.d.mts → types-CekOpKvz.d.ts} +14 -6
package/tanstack.mjs CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  SDK_TELEMETRY,
3
3
  serveBase,
4
4
  serveManyBase
5
- } from "./chunk-G24J5PCC.mjs";
5
+ } from "./chunk-ICDNN4UW.mjs";
6
6
 
7
7
  // platforms/tanstack.ts
8
8
  var telemetry = {
@@ -685,9 +685,10 @@ declare class WorkflowContext<TInitialPayload = unknown> {
685
685
  */
686
686
  readonly env: Record<string, string | undefined>;
687
687
  /**
688
- * Label to apply to the workflow run.
688
+ * Labels attached to the workflow run.
689
689
  *
690
- * Can be used to filter the workflow run logs.
690
+ * Can be used to filter the workflow run logs. A run can have multiple
691
+ * labels when triggered with `label: string[]`.
691
692
  *
692
693
  * Can be set by passing a `label` parameter when triggering the workflow
693
694
  * with `client.trigger`:
@@ -695,11 +696,18 @@ declare class WorkflowContext<TInitialPayload = unknown> {
695
696
  * ```ts
696
697
  * await client.trigger({
697
698
  * url: "https://workflow-endpoint.com",
698
- * label: "my-label"
699
+ * label: ["label-1", "label-2"]
699
700
  * });
700
701
  * ```
701
702
  */
702
- readonly label?: string;
703
+ readonly labels: string[];
704
+ /**
705
+ * Label of the workflow run.
706
+ *
707
+ * @deprecated Use `labels` instead. When a run has multiple labels, this
708
+ * only returns the first one.
709
+ */
710
+ get label(): string | undefined;
703
711
  /**
704
712
  * Number of times QStash has retried delivering the current request.
705
713
  *
@@ -718,7 +726,7 @@ declare class WorkflowContext<TInitialPayload = unknown> {
718
726
  env?: Record<string, string | undefined>;
719
727
  telemetry?: Telemetry;
720
728
  invokeCount?: number;
721
- label?: string;
729
+ label?: string | string[];
722
730
  retried?: number;
723
731
  middlewareManager?: MiddlewareManager<TInitialPayload>;
724
732
  });
@@ -1311,7 +1319,7 @@ type InvokeWorkflowRequest = {
1311
1319
  type LazyInvokeStepParams<TInitiaPayload, TResult> = {
1312
1320
  workflow: InvokableWorkflow<TInitiaPayload, TResult>;
1313
1321
  workflowRunId?: string;
1314
- label?: string;
1322
+ label?: string | string[];
1315
1323
  } & Pick<CallSettings, "retries" | "headers" | "flowControl" | "retryDelay"> & (TInitiaPayload extends undefined ? {
1316
1324
  body?: undefined;
1317
1325
  } : {
@@ -685,9 +685,10 @@ declare class WorkflowContext<TInitialPayload = unknown> {
685
685
  */
686
686
  readonly env: Record<string, string | undefined>;
687
687
  /**
688
- * Label to apply to the workflow run.
688
+ * Labels attached to the workflow run.
689
689
  *
690
- * Can be used to filter the workflow run logs.
690
+ * Can be used to filter the workflow run logs. A run can have multiple
691
+ * labels when triggered with `label: string[]`.
691
692
  *
692
693
  * Can be set by passing a `label` parameter when triggering the workflow
693
694
  * with `client.trigger`:
@@ -695,11 +696,18 @@ declare class WorkflowContext<TInitialPayload = unknown> {
695
696
  * ```ts
696
697
  * await client.trigger({
697
698
  * url: "https://workflow-endpoint.com",
698
- * label: "my-label"
699
+ * label: ["label-1", "label-2"]
699
700
  * });
700
701
  * ```
701
702
  */
702
- readonly label?: string;
703
+ readonly labels: string[];
704
+ /**
705
+ * Label of the workflow run.
706
+ *
707
+ * @deprecated Use `labels` instead. When a run has multiple labels, this
708
+ * only returns the first one.
709
+ */
710
+ get label(): string | undefined;
703
711
  /**
704
712
  * Number of times QStash has retried delivering the current request.
705
713
  *
@@ -718,7 +726,7 @@ declare class WorkflowContext<TInitialPayload = unknown> {
718
726
  env?: Record<string, string | undefined>;
719
727
  telemetry?: Telemetry;
720
728
  invokeCount?: number;
721
- label?: string;
729
+ label?: string | string[];
722
730
  retried?: number;
723
731
  middlewareManager?: MiddlewareManager<TInitialPayload>;
724
732
  });
@@ -1311,7 +1319,7 @@ type InvokeWorkflowRequest = {
1311
1319
  type LazyInvokeStepParams<TInitiaPayload, TResult> = {
1312
1320
  workflow: InvokableWorkflow<TInitiaPayload, TResult>;
1313
1321
  workflowRunId?: string;
1314
- label?: string;
1322
+ label?: string | string[];
1315
1323
  } & Pick<CallSettings, "retries" | "headers" | "flowControl" | "retryDelay"> & (TInitiaPayload extends undefined ? {
1316
1324
  body?: undefined;
1317
1325
  } : {