@camunda8/orchestration-cluster-api 10.0.0-alpha.23 → 10.0.0-alpha.25

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.
@@ -1,3 +1,3 @@
1
- export { dr as CamundaFpClient, Hx as DomainError, Hy as DomainErrorTag, iI as Either, Hz as FnKeys, HA as Fpify, HB as HttpError, HC as Left, HD as Right, HE as TaskEither, HF as classifyDomainError, D3 as createCamundaFpClient, HG as eventuallyTE, HH as foldDomainError, Fe as isLeft, Ff as isRight, HI as retryTE, HJ as withTimeoutTE } from '../index-DPNy4KLk.cjs';
1
+ export { dr as CamundaFpClient, Hx as DomainError, Hy as DomainErrorTag, iI as Either, Hz as FnKeys, HA as Fpify, HB as HttpError, HC as Left, HD as Right, HE as TaskEither, HF as classifyDomainError, D3 as createCamundaFpClient, HG as eventuallyTE, HH as foldDomainError, Fe as isLeft, Ff as isRight, HI as retryTE, HJ as withTimeoutTE } from '../index-1CFuY8zI.cjs';
2
2
  import 'zod';
3
3
  import '../logger-D-p21VHo.cjs';
@@ -1,3 +1,3 @@
1
- export { dr as CamundaFpClient, Hx as DomainError, Hy as DomainErrorTag, iI as Either, Hz as FnKeys, HA as Fpify, HB as HttpError, HC as Left, HD as Right, HE as TaskEither, HF as classifyDomainError, D3 as createCamundaFpClient, HG as eventuallyTE, HH as foldDomainError, Fe as isLeft, Ff as isRight, HI as retryTE, HJ as withTimeoutTE } from '../index-CE5WmteM.js';
1
+ export { dr as CamundaFpClient, Hx as DomainError, Hy as DomainErrorTag, iI as Either, Hz as FnKeys, HA as Fpify, HB as HttpError, HC as Left, HD as Right, HE as TaskEither, HF as classifyDomainError, D3 as createCamundaFpClient, HG as eventuallyTE, HH as foldDomainError, Fe as isLeft, Ff as isRight, HI as retryTE, HJ as withTimeoutTE } from '../index-PMp1qCax.js';
2
2
  import 'zod';
3
3
  import '../logger-D-p21VHo.js';
package/dist/fp/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  isRight,
8
8
  retryTE,
9
9
  withTimeoutTE
10
- } from "../chunk-JF3QWFWZ.js";
10
+ } from "../chunk-5T5DTO7V.js";
11
11
  import "../chunk-KQ4UL2WX.js";
12
12
  import "../chunk-DGUM43GV.js";
13
13
  export {
@@ -6928,7 +6928,11 @@ type JobCompletionRequest = {
6928
6928
  * The result of the completed job as determined by the worker.
6929
6929
  *
6930
6930
  */
6931
- type JobResult = JobResultUserTask | JobResultAdHocSubProcess;
6931
+ type JobResult = ({
6932
+ type: 'userTask';
6933
+ } & JobResultUserTask) | ({
6934
+ type: 'adHocSubProcess';
6935
+ } & JobResultAdHocSubProcess);
6932
6936
  /**
6933
6937
  * Job result details for a user task completion, optionally including a denial reason and corrected task properties.
6934
6938
  *
@@ -8862,7 +8866,9 @@ type ProcessInstanceCreationStartInstruction = {
8862
8866
  */
8863
8867
  elementId: ElementId;
8864
8868
  };
8865
- type ProcessInstanceCreationRuntimeInstruction = ProcessInstanceCreationTerminateInstruction;
8869
+ type ProcessInstanceCreationRuntimeInstruction = ({
8870
+ type: 'TERMINATE_PROCESS_INSTANCE';
8871
+ } & ProcessInstanceCreationTerminateInstruction);
8866
8872
  /**
8867
8873
  * Terminates the process instance after a specific BPMN element is completed or terminated.
8868
8874
  *
@@ -19213,6 +19219,10 @@ type ChangeClusterModeErrors = {
19213
19219
  * The request lacks valid authentication credentials.
19214
19220
  */
19215
19221
  401: ProblemDetail;
19222
+ /**
19223
+ * Forbidden. The request is not allowed.
19224
+ */
19225
+ 403: ProblemDetail;
19216
19226
  /**
19217
19227
  * An internal error occurred while processing the request.
19218
19228
  */
@@ -22275,6 +22285,18 @@ interface JobWorkerConfig<In extends z.ZodTypeAny = any, Out extends z.ZodTypeAn
22275
22285
  customHeadersSchema?: Headers;
22276
22286
  /** Backoff between polls - default 1ms */
22277
22287
  pollIntervalMs?: number;
22288
+ /**
22289
+ * Floor (ms) of the exponential backoff applied between *failed* activation
22290
+ * requests (connection refused, connect timeout, broker restart, LAN blip …).
22291
+ * The first retry waits ≈ this/2–this ms; subsequent consecutive failures
22292
+ * double the window up to {@link pollBackoffMaxMs}, with jitter, and reset to
22293
+ * zero on the first successful poll. Default `1000`. Set to `0` to disable backoff (failed polls then fall back to {@link pollIntervalMs} rather than retrying immediately).
22294
+ */
22295
+ pollBackoffMinMs?: number;
22296
+ /**
22297
+ * Ceiling (ms) of the between-failed-poll exponential backoff. Default `30000`.
22298
+ */
22299
+ pollBackoffMaxMs?: number;
22278
22300
  jobHandler: (job: Job<In, Headers>) => Promise<JobActionReceipt> | JobActionReceipt;
22279
22301
  /** Immediately start polling for work - default `true` */
22280
22302
  autoStart?: boolean;
@@ -22325,6 +22347,8 @@ declare class JobWorker {
22325
22347
  private _stopped;
22326
22348
  private _pollTimer;
22327
22349
  private _inFlightActivation;
22350
+ /** Consecutive failed activation requests; drives the retry backoff, reset on success. */
22351
+ private _consecutiveActivationErrors;
22328
22352
  private _log;
22329
22353
  private _startGate;
22330
22354
  constructor(client: CamundaClient, cfg: JobWorkerConfig);
@@ -22474,6 +22498,18 @@ interface ThreadedJobWorkerConfig<In extends z.ZodTypeAny = any, Out extends z.Z
22474
22498
  customHeadersSchema?: Headers;
22475
22499
  /** Backoff between polls - default 1ms */
22476
22500
  pollIntervalMs?: number;
22501
+ /**
22502
+ * Floor (ms) of the exponential backoff applied between *failed* activation
22503
+ * requests (connection refused, connect timeout, broker restart, LAN blip …).
22504
+ * The first retry waits ≈ this/2–this ms; subsequent consecutive failures
22505
+ * double the window up to {@link pollBackoffMaxMs}, with jitter, and reset to
22506
+ * zero on the first successful poll. Default `1000`. Set to `0` to disable backoff (failed polls then fall back to {@link pollIntervalMs} rather than retrying immediately).
22507
+ */
22508
+ pollBackoffMinMs?: number;
22509
+ /**
22510
+ * Ceiling (ms) of the between-failed-poll exponential backoff. Default `30000`.
22511
+ */
22512
+ pollBackoffMaxMs?: number;
22477
22513
  /** Immediately start polling for work - default `true` */
22478
22514
  autoStart?: boolean;
22479
22515
  /** Concurrency limit — default `10`. Overridden by CAMUNDA_WORKER_MAX_CONCURRENT_JOBS env var. */
@@ -22530,6 +22566,8 @@ declare class ThreadedJobWorker {
22530
22566
  private _stopped;
22531
22567
  private _pollTimer;
22532
22568
  private _inFlightActivation;
22569
+ /** Consecutive failed activation requests; drives the retry backoff, reset on success. */
22570
+ private _consecutiveActivationErrors;
22533
22571
  private _log;
22534
22572
  private _jobQueue;
22535
22573
  private _startGate;
@@ -6928,7 +6928,11 @@ type JobCompletionRequest = {
6928
6928
  * The result of the completed job as determined by the worker.
6929
6929
  *
6930
6930
  */
6931
- type JobResult = JobResultUserTask | JobResultAdHocSubProcess;
6931
+ type JobResult = ({
6932
+ type: 'userTask';
6933
+ } & JobResultUserTask) | ({
6934
+ type: 'adHocSubProcess';
6935
+ } & JobResultAdHocSubProcess);
6932
6936
  /**
6933
6937
  * Job result details for a user task completion, optionally including a denial reason and corrected task properties.
6934
6938
  *
@@ -8862,7 +8866,9 @@ type ProcessInstanceCreationStartInstruction = {
8862
8866
  */
8863
8867
  elementId: ElementId;
8864
8868
  };
8865
- type ProcessInstanceCreationRuntimeInstruction = ProcessInstanceCreationTerminateInstruction;
8869
+ type ProcessInstanceCreationRuntimeInstruction = ({
8870
+ type: 'TERMINATE_PROCESS_INSTANCE';
8871
+ } & ProcessInstanceCreationTerminateInstruction);
8866
8872
  /**
8867
8873
  * Terminates the process instance after a specific BPMN element is completed or terminated.
8868
8874
  *
@@ -19213,6 +19219,10 @@ type ChangeClusterModeErrors = {
19213
19219
  * The request lacks valid authentication credentials.
19214
19220
  */
19215
19221
  401: ProblemDetail;
19222
+ /**
19223
+ * Forbidden. The request is not allowed.
19224
+ */
19225
+ 403: ProblemDetail;
19216
19226
  /**
19217
19227
  * An internal error occurred while processing the request.
19218
19228
  */
@@ -22275,6 +22285,18 @@ interface JobWorkerConfig<In extends z.ZodTypeAny = any, Out extends z.ZodTypeAn
22275
22285
  customHeadersSchema?: Headers;
22276
22286
  /** Backoff between polls - default 1ms */
22277
22287
  pollIntervalMs?: number;
22288
+ /**
22289
+ * Floor (ms) of the exponential backoff applied between *failed* activation
22290
+ * requests (connection refused, connect timeout, broker restart, LAN blip …).
22291
+ * The first retry waits ≈ this/2–this ms; subsequent consecutive failures
22292
+ * double the window up to {@link pollBackoffMaxMs}, with jitter, and reset to
22293
+ * zero on the first successful poll. Default `1000`. Set to `0` to disable backoff (failed polls then fall back to {@link pollIntervalMs} rather than retrying immediately).
22294
+ */
22295
+ pollBackoffMinMs?: number;
22296
+ /**
22297
+ * Ceiling (ms) of the between-failed-poll exponential backoff. Default `30000`.
22298
+ */
22299
+ pollBackoffMaxMs?: number;
22278
22300
  jobHandler: (job: Job<In, Headers>) => Promise<JobActionReceipt> | JobActionReceipt;
22279
22301
  /** Immediately start polling for work - default `true` */
22280
22302
  autoStart?: boolean;
@@ -22325,6 +22347,8 @@ declare class JobWorker {
22325
22347
  private _stopped;
22326
22348
  private _pollTimer;
22327
22349
  private _inFlightActivation;
22350
+ /** Consecutive failed activation requests; drives the retry backoff, reset on success. */
22351
+ private _consecutiveActivationErrors;
22328
22352
  private _log;
22329
22353
  private _startGate;
22330
22354
  constructor(client: CamundaClient, cfg: JobWorkerConfig);
@@ -22474,6 +22498,18 @@ interface ThreadedJobWorkerConfig<In extends z.ZodTypeAny = any, Out extends z.Z
22474
22498
  customHeadersSchema?: Headers;
22475
22499
  /** Backoff between polls - default 1ms */
22476
22500
  pollIntervalMs?: number;
22501
+ /**
22502
+ * Floor (ms) of the exponential backoff applied between *failed* activation
22503
+ * requests (connection refused, connect timeout, broker restart, LAN blip …).
22504
+ * The first retry waits ≈ this/2–this ms; subsequent consecutive failures
22505
+ * double the window up to {@link pollBackoffMaxMs}, with jitter, and reset to
22506
+ * zero on the first successful poll. Default `1000`. Set to `0` to disable backoff (failed polls then fall back to {@link pollIntervalMs} rather than retrying immediately).
22507
+ */
22508
+ pollBackoffMinMs?: number;
22509
+ /**
22510
+ * Ceiling (ms) of the between-failed-poll exponential backoff. Default `30000`.
22511
+ */
22512
+ pollBackoffMaxMs?: number;
22477
22513
  /** Immediately start polling for work - default `true` */
22478
22514
  autoStart?: boolean;
22479
22515
  /** Concurrency limit — default `10`. Overridden by CAMUNDA_WORKER_MAX_CONCURRENT_JOBS env var. */
@@ -22530,6 +22566,8 @@ declare class ThreadedJobWorker {
22530
22566
  private _stopped;
22531
22567
  private _pollTimer;
22532
22568
  private _inFlightActivation;
22569
+ /** Consecutive failed activation requests; drives the retry backoff, reset on success. */
22570
+ private _consecutiveActivationErrors;
22533
22571
  private _log;
22534
22572
  private _jobQueue;
22535
22573
  private _startGate;