keryx 0.23.1 → 0.23.2

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.
@@ -109,13 +109,35 @@ export class Actions extends Initializer {
109
109
  * Enqueues one job per item, injects `_fanOutId` into each,
110
110
  * and stores metadata in Redis for result collection.
111
111
  *
112
- * Two call signatures:
113
- * - Single action: fanOut(actionName, inputsArray, queue?, options?)
114
- * - Multi action: fanOut(jobs, options?) where each job specifies { action, inputs?, queue? }
115
- *
116
- * Returns a FanOutResult with the fanOutId for later status queries.
112
+ * @returns A {@link FanOutResult} containing the `fanOutId` for later
113
+ * status queries via {@link fanOutStatus}.
114
+ * @throws {TypedError} With `ErrorType.CONNECTION_TASK_DEFINITION` if any
115
+ * referenced action is not registered.
117
116
  */
118
- fanOut = async (
117
+ fanOut: {
118
+ /**
119
+ * Single-action form: enqueue one job per entry in `inputsArray`, all for the same action.
120
+ *
121
+ * @param actionName - Name of the action to enqueue for every job.
122
+ * @param inputsArray - One input object per child job. An empty array is allowed.
123
+ * @param queue - Optional queue override for every job. Falls back to the action's configured queue, then `DEFAULT_QUEUE`.
124
+ * @param options - Fan-out options (batch size, result TTL, correlation ID).
125
+ */
126
+ (
127
+ actionName: string,
128
+ inputsArray: TaskInputs[],
129
+ queue?: string,
130
+ options?: FanOutOptions,
131
+ ): Promise<FanOutResult>;
132
+
133
+ /**
134
+ * Multi-action form: enqueue heterogeneous jobs, each with its own action and optional queue override.
135
+ *
136
+ * @param jobs - Job descriptors. Each entry must reference a registered action.
137
+ * @param options - Fan-out options (batch size, result TTL, correlation ID).
138
+ */
139
+ (jobs: FanOutJob[], options?: FanOutOptions): Promise<FanOutResult>;
140
+ } = async (
119
141
  actionNameOrJobs: string | FanOutJob[],
120
142
  inputsArrayOrOptions?: TaskInputs[] | FanOutOptions,
121
143
  queue?: string,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keryx",
3
- "version": "0.23.1",
3
+ "version": "0.23.2",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "license": "MIT",