@camunda8/orchestration-cluster-api 1.2.0 → 1.2.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.
@@ -1,3 +1,3 @@
1
- export { h as CamundaFpClient, qn as DomainError, E as Either, qm as Fpify, qo as Left, qp as Right, qv as TaskEither, qu as classifyDomainError, g as createCamundaFpClient, qs as eventuallyTE, qt as foldDomainError, i as isLeft, j as isRight, qq as retryTE, qr as withTimeoutTE } from '../index-BuqEi2vm.cjs';
1
+ export { h as CamundaFpClient, qn as DomainError, E as Either, qm as Fpify, qo as Left, qp as Right, qv as TaskEither, qu as classifyDomainError, g as createCamundaFpClient, qs as eventuallyTE, qt as foldDomainError, i as isLeft, j as isRight, qq as retryTE, qr as withTimeoutTE } from '../index-WJHww8O1.cjs';
2
2
  import 'zod';
3
3
  import '../logger.cjs';
@@ -1,3 +1,3 @@
1
- export { h as CamundaFpClient, qn as DomainError, E as Either, qm as Fpify, qo as Left, qp as Right, qv as TaskEither, qu as classifyDomainError, g as createCamundaFpClient, qs as eventuallyTE, qt as foldDomainError, i as isLeft, j as isRight, qq as retryTE, qr as withTimeoutTE } from '../index-CICj2gu5.js';
1
+ export { h as CamundaFpClient, qn as DomainError, E as Either, qm as Fpify, qo as Left, qp as Right, qv as TaskEither, qu as classifyDomainError, g as createCamundaFpClient, qs as eventuallyTE, qt as foldDomainError, i as isLeft, j as isRight, qq as retryTE, qr as withTimeoutTE } from '../index-Cp8OPyAq.js';
2
2
  import 'zod';
3
3
  import '../logger.js';
package/dist/fp/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  isRight,
8
8
  retryTE,
9
9
  withTimeoutTE
10
- } from "../chunk-7RIALC7K.js";
10
+ } from "../chunk-HAWDB7KV.js";
11
11
  import "../chunk-W6JB7JZH.js";
12
12
  export {
13
13
  classifyDomainError,
@@ -12834,6 +12834,7 @@ interface EnrichedActivatedJob extends ActivatedJobResult {
12834
12834
  [k: string]: any;
12835
12835
  }): Promise<JobActionReceipt>;
12836
12836
  fail(body: any): Promise<JobActionReceipt>;
12837
+ error(error: JobErrorRequest): Promise<JobActionReceipt>;
12837
12838
  cancelWorkflow(): Promise<JobActionReceipt>;
12838
12839
  ignore(): Promise<JobActionReceipt>;
12839
12840
  /**
@@ -12867,7 +12868,12 @@ interface JobWorkerConfig<In extends z.ZodTypeAny = any, Out extends z.ZodTypeAn
12867
12868
  autoStart?: boolean;
12868
12869
  /** concurrency limit */
12869
12870
  maxParallelJobs: number;
12870
- /** requestTimeout for activation long poll - default 55_000 */
12871
+ /**
12872
+ * The request will be completed when at least one job is activated or after the requestTimeout.
12873
+ * If the requestTimeout = 0, the request will be completed after a default configured timeout in the broker.
12874
+ * To immediately complete the request when no job is activated set the requestTimeout to a negative value
12875
+ *
12876
+ */
12871
12877
  pollTimeoutMs?: number;
12872
12878
  /** Job activation timeout */
12873
12879
  jobTimeoutMs: number;
@@ -12834,6 +12834,7 @@ interface EnrichedActivatedJob extends ActivatedJobResult {
12834
12834
  [k: string]: any;
12835
12835
  }): Promise<JobActionReceipt>;
12836
12836
  fail(body: any): Promise<JobActionReceipt>;
12837
+ error(error: JobErrorRequest): Promise<JobActionReceipt>;
12837
12838
  cancelWorkflow(): Promise<JobActionReceipt>;
12838
12839
  ignore(): Promise<JobActionReceipt>;
12839
12840
  /**
@@ -12867,7 +12868,12 @@ interface JobWorkerConfig<In extends z.ZodTypeAny = any, Out extends z.ZodTypeAn
12867
12868
  autoStart?: boolean;
12868
12869
  /** concurrency limit */
12869
12870
  maxParallelJobs: number;
12870
- /** requestTimeout for activation long poll - default 55_000 */
12871
+ /**
12872
+ * The request will be completed when at least one job is activated or after the requestTimeout.
12873
+ * If the requestTimeout = 0, the request will be completed after a default configured timeout in the broker.
12874
+ * To immediately complete the request when no job is activated set the requestTimeout to a negative value
12875
+ *
12876
+ */
12871
12877
  pollTimeoutMs?: number;
12872
12878
  /** Job activation timeout */
12873
12879
  jobTimeoutMs: number;
package/dist/index.cjs CHANGED
@@ -9555,7 +9555,7 @@ function createLogger(opts = {}) {
9555
9555
  }
9556
9556
 
9557
9557
  // src/runtime/version.ts
9558
- var packageVersion = "1.2.0";
9558
+ var packageVersion = "1.2.2";
9559
9559
 
9560
9560
  // src/runtime/supportLogger.ts
9561
9561
  var NoopSupportLogger = class {
@@ -10511,7 +10511,7 @@ var BackpressureManager = class {
10511
10511
  // src/runtime/jobWorker.ts
10512
10512
  var JobActionReceipt = "JOB_ACTION_RECEIPT";
10513
10513
  var _workerCounter = 0;
10514
- var DEFAULT_LONGPOLL_TIMEOUT = 55e3;
10514
+ var DEFAULT_LONGPOLL_TIMEOUT = 0;
10515
10515
  var JobWorker = class {
10516
10516
  _client;
10517
10517
  _cfg;
@@ -10750,6 +10750,14 @@ function enrichActivatedJob(raw, client2, log) {
10750
10750
  }
10751
10751
  return JobActionReceipt;
10752
10752
  };
10753
+ job.error = async (error) => {
10754
+ try {
10755
+ await client2.throwJobError({ ...error, jobKey: raw.jobKey });
10756
+ } finally {
10757
+ ack();
10758
+ }
10759
+ return JobActionReceipt;
10760
+ };
10753
10761
  job.cancelWorkflow = async () => {
10754
10762
  try {
10755
10763
  await client2.cancelProcessInstance({