@upstash/workflow 1.2.0 → 1.3.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.
Files changed (51) hide show
  1. package/README.md +10 -0
  2. package/astro.d.mts +2 -2
  3. package/astro.d.ts +2 -2
  4. package/astro.js +31 -5
  5. package/astro.mjs +1 -1
  6. package/{chunk-V5ZUHMAF.mjs → chunk-G24J5PCC.mjs} +93 -5
  7. package/cloudflare.d.mts +2 -2
  8. package/cloudflare.d.ts +2 -2
  9. package/cloudflare.js +31 -5
  10. package/cloudflare.mjs +1 -1
  11. package/express.d.mts +2 -2
  12. package/express.d.ts +2 -2
  13. package/express.js +31 -5
  14. package/express.mjs +1 -1
  15. package/h3.d.mts +2 -2
  16. package/h3.d.ts +2 -2
  17. package/h3.js +31 -5
  18. package/h3.mjs +1 -1
  19. package/hono.d.mts +2 -2
  20. package/hono.d.ts +2 -2
  21. package/hono.js +31 -5
  22. package/hono.mjs +1 -1
  23. package/index.d.mts +201 -128
  24. package/index.d.ts +201 -128
  25. package/index.js +212 -160
  26. package/index.mjs +124 -156
  27. package/nextjs.d.mts +2 -2
  28. package/nextjs.d.ts +2 -2
  29. package/nextjs.js +31 -5
  30. package/nextjs.mjs +1 -1
  31. package/package.json +1 -1
  32. package/react-router.d.mts +2 -2
  33. package/react-router.d.ts +2 -2
  34. package/react-router.js +31 -5
  35. package/react-router.mjs +1 -1
  36. package/{serve-many-C6sa_DxN.d.mts → serve-many-D3D9uE4u.d.mts} +1 -1
  37. package/{serve-many-B-fe7bh7.d.ts → serve-many-kPOasiyb.d.ts} +1 -1
  38. package/solidjs.d.mts +1 -1
  39. package/solidjs.d.ts +1 -1
  40. package/solidjs.js +31 -5
  41. package/solidjs.mjs +1 -1
  42. package/svelte.d.mts +2 -2
  43. package/svelte.d.ts +2 -2
  44. package/svelte.js +31 -5
  45. package/svelte.mjs +1 -1
  46. package/tanstack.d.mts +2 -2
  47. package/tanstack.d.ts +2 -2
  48. package/tanstack.js +31 -5
  49. package/tanstack.mjs +1 -1
  50. package/{types-B2S08hRU.d.ts → types-B_E1VAK6.d.mts} +9 -1
  51. package/{types-B2S08hRU.d.mts → types-B_E1VAK6.d.ts} +9 -1
package/tanstack.mjs CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  SDK_TELEMETRY,
3
3
  serveBase,
4
4
  serveManyBase
5
- } from "./chunk-V5ZUHMAF.mjs";
5
+ } from "./chunk-G24J5PCC.mjs";
6
6
 
7
7
  // platforms/tanstack.ts
8
8
  var telemetry = {
@@ -700,7 +700,14 @@ declare class WorkflowContext<TInitialPayload = unknown> {
700
700
  * ```
701
701
  */
702
702
  readonly label?: string;
703
- constructor({ qstashClient, workflowRunId, workflowRunCreatedAt, headers, steps, url, initialPayload, env, telemetry, invokeCount, label, middlewareManager, }: {
703
+ /**
704
+ * Number of times QStash has retried delivering the current request.
705
+ *
706
+ * Sourced from the `Upstash-Retried` header. `0` on the first delivery,
707
+ * `1` on the first retry, `2` on the second, and so on.
708
+ */
709
+ readonly retried: number;
710
+ constructor({ qstashClient, workflowRunId, workflowRunCreatedAt, headers, steps, url, initialPayload, env, telemetry, invokeCount, label, retried, middlewareManager, }: {
704
711
  qstashClient: WorkflowClient;
705
712
  workflowRunId: string;
706
713
  workflowRunCreatedAt: number;
@@ -712,6 +719,7 @@ declare class WorkflowContext<TInitialPayload = unknown> {
712
719
  telemetry?: Telemetry;
713
720
  invokeCount?: number;
714
721
  label?: string;
722
+ retried?: number;
715
723
  middlewareManager?: MiddlewareManager<TInitialPayload>;
716
724
  });
717
725
  /**
@@ -700,7 +700,14 @@ declare class WorkflowContext<TInitialPayload = unknown> {
700
700
  * ```
701
701
  */
702
702
  readonly label?: string;
703
- constructor({ qstashClient, workflowRunId, workflowRunCreatedAt, headers, steps, url, initialPayload, env, telemetry, invokeCount, label, middlewareManager, }: {
703
+ /**
704
+ * Number of times QStash has retried delivering the current request.
705
+ *
706
+ * Sourced from the `Upstash-Retried` header. `0` on the first delivery,
707
+ * `1` on the first retry, `2` on the second, and so on.
708
+ */
709
+ readonly retried: number;
710
+ constructor({ qstashClient, workflowRunId, workflowRunCreatedAt, headers, steps, url, initialPayload, env, telemetry, invokeCount, label, retried, middlewareManager, }: {
704
711
  qstashClient: WorkflowClient;
705
712
  workflowRunId: string;
706
713
  workflowRunCreatedAt: number;
@@ -712,6 +719,7 @@ declare class WorkflowContext<TInitialPayload = unknown> {
712
719
  telemetry?: Telemetry;
713
720
  invokeCount?: number;
714
721
  label?: string;
722
+ retried?: number;
715
723
  middlewareManager?: MiddlewareManager<TInitialPayload>;
716
724
  });
717
725
  /**