@stacksjs/queue 0.70.37 → 0.70.42

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/dist/src/job.d.ts CHANGED
@@ -72,18 +72,27 @@ export declare function runJob(name: string, options?: { payload?: any; context?
72
72
  * // Immediate (synchronous) execution, ignoring the queue
73
73
  * await Jobs.dispatchNow('SendNotification', { message: 'Hello' })
74
74
  * ```
75
+ * @defaultValue
76
+ * ```ts
77
+ * {
78
+ * dispatch: () => unknown,
79
+ * dispatchIf: () => unknown,
80
+ * dispatchUnless: () => unknown,
81
+ * dispatchNow: () => unknown
82
+ * }
83
+ * ```
75
84
  */
76
85
  export declare const Jobs: {
77
86
  /** Construct a builder without dispatching — for chained option calls. */
78
87
  make: (name: string, payload?: any) => JobBuilder;
79
88
  /** Dispatch a job in one call. Equivalent to `job(name, payload).dispatch()`. */
80
- async dispatch: (name: string, payload?: any) => Promise<void>;
89
+ dispatch: (name: string, payload?: any) => Promise<void>;
81
90
  /** Dispatch only if `condition` is truthy. */
82
- async dispatchIf: (condition: boolean, name: string, payload?: any) => Promise<void>;
91
+ dispatchIf: (condition: boolean, name: string, payload?: any) => Promise<void>;
83
92
  /** Dispatch unless `condition` is truthy. */
84
- async dispatchUnless: (condition: boolean, name: string, payload?: any) => Promise<void>;
93
+ dispatchUnless: (condition: boolean, name: string, payload?: any) => Promise<void>;
85
94
  /** Run the job synchronously, bypassing the queue. */
86
- async dispatchNow: (name: string, payload?: any) => Promise<void>;
95
+ dispatchNow: (name: string, payload?: any) => Promise<void>;
87
96
  /** Schedule the job to run after `seconds` of delay. */
88
97
  dispatchAfter: (seconds: number, name: string, payload?: any) => JobBuilder
89
98
  };
@@ -0,0 +1,2 @@
1
+ import type { QueueOption } from '@stacksjs/types';
2
+ export declare function storeJob(name: string, options: QueueOption): Promise<void>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/queue",
3
3
  "type": "module",
4
- "version": "0.70.37",
4
+ "version": "0.70.42",
5
5
  "description": "The Stacks Queue system powered by bun-queue.",
6
6
  "author": "Chris Breuer",
7
7
  "contributors": [