@cosmicdrift/kumiko-types 0.304.0 → 0.305.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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/config.ts +9 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-types",
3
- "version": "0.304.0",
3
+ "version": "0.305.0",
4
4
  "description": "Framework-Type-Definitions für Kumiko — FeatureDefinition, BootCheck-Types und die reinen Engine-Types. Erlaubt Downstream-Konsumenten, gegen die Type-Contracts zu bauen, ohne das ganze Framework-Package zu importieren. Enthaelt keine identitaets-sensitiven Runtime-Werte mehr (Error-Klassen leben seit #1629 in kumiko-framework, Brand-Symbole nutzen Symbol.for) und ist deshalb eine plain dependency, keine peerDependency.",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
package/src/config.ts CHANGED
@@ -358,6 +358,14 @@ export type JobTrigger =
358
358
  | { readonly cron: string }
359
359
  | { readonly manual: true };
360
360
 
361
+ export type JobBackoffStrategy = "fixed" | "exponential";
362
+ // String form uses the framework's default base delay; the object form's
363
+ // `delayMs` is the base BullMQ multiplies: "fixed" keeps it constant,
364
+ // "exponential" scales it delayMs * 2^(attemptsMade-1) per retry.
365
+ export type JobBackoff =
366
+ | JobBackoffStrategy
367
+ | { readonly type: JobBackoffStrategy; readonly delayMs?: number | undefined };
368
+
361
369
  export type JobDefinition = {
362
370
  readonly name: string;
363
371
  readonly handler: JobHandlerFn;
@@ -366,7 +374,7 @@ export type JobDefinition = {
366
374
  readonly maxPerTenant?: number | undefined;
367
375
  readonly debounceMs?: number | undefined;
368
376
  readonly retries?: number | undefined;
369
- readonly backoff?: "fixed" | "exponential" | undefined;
377
+ readonly backoff?: JobBackoff | undefined;
370
378
  readonly timeout?: number | undefined;
371
379
  readonly schema?: ZodType | undefined;
372
380
  // Enqueue this job once when a runner for its lane starts. Fire-and-forget: