@camunda8/orchestration-cluster-api 10.0.0-alpha.4 → 10.0.0-alpha.5
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/CHANGELOG.md +8 -0
- package/README.md +43 -1
- package/dist/{chunk-YMG6EGPW.js → chunk-S3RXIYYE.js} +203 -3
- package/dist/chunk-S3RXIYYE.js.map +1 -0
- package/dist/fp/index.cjs +633 -595
- package/dist/fp/index.cjs.map +1 -1
- package/dist/fp/index.d.cts +1 -1
- package/dist/fp/index.d.ts +1 -1
- package/dist/fp/index.js +1 -1
- package/dist/{index-CvA10E3U.d.cts → index-CBhZBupS.d.cts} +906 -459
- package/dist/{index-CtFmBFXM.d.ts → index-CMbPTSiX.d.ts} +906 -459
- package/dist/index.cjs +794 -602
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +154 -7
- package/dist/index.js.map +1 -1
- package/dist/{zod.gen-WZT74U4Q.js → zod.gen-UJLBQNEH.js} +431 -593
- package/dist/zod.gen-UJLBQNEH.js.map +1 -0
- package/package.json +3 -2
- package/dist/chunk-YMG6EGPW.js.map +0 -1
- package/dist/zod.gen-WZT74U4Q.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
# [10.0.0-alpha.5](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.4...v10.0.0-alpha.5) (2026-05-08)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add agent instance example coverage ([8a0072d](https://github.com/camunda/orchestration-cluster-api-js/commit/8a0072d03cf426ea895863d7cbdd87178c2e7e2f))
|
|
7
|
+
* v10 migration — bundler 2.4.1, branded type examples, README ([dd4a714](https://github.com/camunda/orchestration-cluster-api-js/commit/dd4a7149682b89d1f8f9c0f627dfef5645b10ea7)), closes [#203](https://github.com/camunda/orchestration-cluster-api-js/issues/203) [#204](https://github.com/camunda/orchestration-cluster-api-js/issues/204)
|
|
8
|
+
|
|
1
9
|
# [10.0.0-alpha.4](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.3...v10.0.0-alpha.4) (2026-04-29)
|
|
2
10
|
|
|
3
11
|
|
package/README.md
CHANGED
|
@@ -149,10 +149,51 @@ await camunda.createDeployment({
|
|
|
149
149
|
});
|
|
150
150
|
```
|
|
151
151
|
|
|
152
|
-
`TenantId.assumeExists()` validates the string against the tenant ID pattern and
|
|
152
|
+
`TenantId.assumeExists()` validates the string against the tenant ID pattern and returns a branded value. The branded value is just a string at runtime, but `assumeExists()` performs validation and can throw if the input is malformed. See [Branded Keys](#branded-keys) for more on this pattern.
|
|
153
153
|
|
|
154
154
|
> **Tip**: If your tenant ID comes from a validated source (environment variable, config file), call `TenantId.assumeExists()` once at startup and pass the branded value throughout your application.
|
|
155
155
|
|
|
156
|
+
## Migrating from 8.9
|
|
157
|
+
|
|
158
|
+
SDK 10.x (for Camunda 8.10) promotes several identifier and name fields from plain `string` to **branded types** via `CamundaKey<T>`. The wire format and runtime API are unchanged — branded values are still plain strings at runtime and are assignable anywhere a `string` is expected (template literals, logging, JSON serialization). Callers need to brand values using `.assumeExists()` (which performs validation) to satisfy the new types.
|
|
159
|
+
|
|
160
|
+
### New branded types
|
|
161
|
+
|
|
162
|
+
| Brand | Used for |
|
|
163
|
+
|-------|----------|
|
|
164
|
+
| `RoleId` | Role identifiers |
|
|
165
|
+
| `GroupId` | Group identifiers |
|
|
166
|
+
| `ClientId` | OAuth client identifiers |
|
|
167
|
+
| `MappingRuleId` | Mapping-rule identifiers |
|
|
168
|
+
| `ClusterVariableName` | Cluster variable names |
|
|
169
|
+
| `AgentInstanceKey` | Agent-instance system keys |
|
|
170
|
+
|
|
171
|
+
### Migration
|
|
172
|
+
|
|
173
|
+
<!-- snippet-source: examples/readme.ts | regions: V9ToV10Migration -->
|
|
174
|
+
|
|
175
|
+
```ts
|
|
176
|
+
// v9 — plain strings were accepted
|
|
177
|
+
// await camunda.assignRoleToGroup({
|
|
178
|
+
// roleId: 'developer',
|
|
179
|
+
// groupId: 'engineering',
|
|
180
|
+
// });
|
|
181
|
+
|
|
182
|
+
// v10 — use the branded type helpers at the boundary
|
|
183
|
+
await camunda.assignRoleToGroup({
|
|
184
|
+
roleId: RoleId.assumeExists('developer'),
|
|
185
|
+
groupId: GroupId.assumeExists('engineering'),
|
|
186
|
+
});
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Each branded type has an `.assumeExists()` method that validates the string and returns the branded value. Validation runs at call time and can throw if the input is malformed, so call it once at the boundary (startup, config parsing, API response) and pass the branded value through your application. See [Branded Keys](#branded-keys) for more on this pattern.
|
|
190
|
+
|
|
191
|
+
### What does NOT change
|
|
192
|
+
|
|
193
|
+
- The wire format is unchanged — all values are still strings on the wire.
|
|
194
|
+
- No method signatures changed name or arity.
|
|
195
|
+
- Branded values are assignable anywhere a `string` is expected (template literals, logging, JSON serialization), so existing string-handling code continues to work.
|
|
196
|
+
|
|
156
197
|
## Quick Start (Zero‑Config – Recommended)
|
|
157
198
|
|
|
158
199
|
Keep configuration out of application code. Let the factory read `CAMUNDA_*` variables from the environment (12‑factor style). This makes rotation, secret management, and environment promotion safer & simpler.
|
|
@@ -681,6 +722,7 @@ Example patterns:
|
|
|
681
722
|
return job.complete({ variables: { processed: true } });
|
|
682
723
|
|
|
683
724
|
// GOOD: No-arg completion example, sentinel stored for ultimate return
|
|
725
|
+
// biome-ignore lint/correctness/noUnreachable: intentional — showing multiple completion patterns
|
|
684
726
|
const ack = await job.complete();
|
|
685
727
|
// ...
|
|
686
728
|
return ack;
|
|
@@ -1166,6 +1166,26 @@ var client = createClient(createConfig({
|
|
|
1166
1166
|
}));
|
|
1167
1167
|
|
|
1168
1168
|
// src/gen/sdk.gen.ts
|
|
1169
|
+
var getAgentInstance = (options) => {
|
|
1170
|
+
return (options.client ?? client).get({
|
|
1171
|
+
requestValidator: void 0,
|
|
1172
|
+
responseValidator: void 0,
|
|
1173
|
+
url: "/agent-instances/{agentInstanceKey}",
|
|
1174
|
+
...options
|
|
1175
|
+
});
|
|
1176
|
+
};
|
|
1177
|
+
var searchAgentInstances = (options) => {
|
|
1178
|
+
return (options?.client ?? client).post({
|
|
1179
|
+
requestValidator: void 0,
|
|
1180
|
+
responseValidator: void 0,
|
|
1181
|
+
url: "/agent-instances/search",
|
|
1182
|
+
...options,
|
|
1183
|
+
headers: {
|
|
1184
|
+
"Content-Type": "application/json",
|
|
1185
|
+
...options?.headers
|
|
1186
|
+
}
|
|
1187
|
+
});
|
|
1188
|
+
};
|
|
1169
1189
|
var searchAuditLogs = (options) => {
|
|
1170
1190
|
return (options?.client ?? client).post({
|
|
1171
1191
|
requestValidator: void 0,
|
|
@@ -2451,6 +2471,18 @@ var getProcessInstanceStatistics = (options) => {
|
|
|
2451
2471
|
...options
|
|
2452
2472
|
});
|
|
2453
2473
|
};
|
|
2474
|
+
var searchResources = (options) => {
|
|
2475
|
+
return (options?.client ?? client).post({
|
|
2476
|
+
requestValidator: void 0,
|
|
2477
|
+
responseValidator: void 0,
|
|
2478
|
+
url: "/resources/search",
|
|
2479
|
+
...options,
|
|
2480
|
+
headers: {
|
|
2481
|
+
"Content-Type": "application/json",
|
|
2482
|
+
...options?.headers
|
|
2483
|
+
}
|
|
2484
|
+
});
|
|
2485
|
+
};
|
|
2454
2486
|
var getResource = (options) => {
|
|
2455
2487
|
return (options.client ?? client).get({
|
|
2456
2488
|
requestValidator: void 0,
|
|
@@ -4409,7 +4441,7 @@ function installAuthInterceptor(client2, getStrategy, getAuthHeaders) {
|
|
|
4409
4441
|
}
|
|
4410
4442
|
|
|
4411
4443
|
// src/runtime/version.ts
|
|
4412
|
-
var packageVersion = "10.0.0-alpha.
|
|
4444
|
+
var packageVersion = "10.0.0-alpha.5";
|
|
4413
4445
|
|
|
4414
4446
|
// src/runtime/supportLogger.ts
|
|
4415
4447
|
var NoopSupportLogger = class {
|
|
@@ -6386,7 +6418,7 @@ var CamundaClient = class {
|
|
|
6386
6418
|
_schemasPromise = null;
|
|
6387
6419
|
_loadSchemas() {
|
|
6388
6420
|
if (!this._schemasPromise) {
|
|
6389
|
-
this._schemasPromise = import("./zod.gen-
|
|
6421
|
+
this._schemasPromise = import("./zod.gen-UJLBQNEH.js");
|
|
6390
6422
|
}
|
|
6391
6423
|
return this._schemasPromise;
|
|
6392
6424
|
}
|
|
@@ -9511,6 +9543,62 @@ var CamundaClient = class {
|
|
|
9511
9543
|
return this._invokeWithRetry(() => call(), { opId: "failJob", exempt: true, retryOverride: options?.retry });
|
|
9512
9544
|
});
|
|
9513
9545
|
}
|
|
9546
|
+
getAgentInstance(arg, consistencyManagement, options) {
|
|
9547
|
+
if (!consistencyManagement) throw new Error("Missing consistencyManagement parameter for eventually consistent endpoint");
|
|
9548
|
+
const useConsistency = consistencyManagement.consistency;
|
|
9549
|
+
return toCancelable2(async (signal) => {
|
|
9550
|
+
const { agentInstanceKey } = arg || {};
|
|
9551
|
+
let envelope = {};
|
|
9552
|
+
envelope.path = { agentInstanceKey };
|
|
9553
|
+
if (this._validation.settings.req !== "none") {
|
|
9554
|
+
const _schemas = await this._loadSchemas();
|
|
9555
|
+
const maybe = await this._validation.gateRequest("getAgentInstance", _schemas.zGetAgentInstanceData, envelope);
|
|
9556
|
+
if (this._validation.settings.req === "strict") envelope = maybe;
|
|
9557
|
+
}
|
|
9558
|
+
const opts = { client: this._client, signal, throwOnError: false };
|
|
9559
|
+
if (envelope.path) opts.path = envelope.path;
|
|
9560
|
+
const call = async () => {
|
|
9561
|
+
try {
|
|
9562
|
+
const _raw = await getAgentInstance(opts);
|
|
9563
|
+
let data = this._evaluateResponse(_raw, "getAgentInstance", (resp) => {
|
|
9564
|
+
const st = resp.status ?? resp.response?.status;
|
|
9565
|
+
if (!st) return void 0;
|
|
9566
|
+
const candidate = st === 429 || st === 503 || st === 500;
|
|
9567
|
+
if (!candidate) return void 0;
|
|
9568
|
+
let prob = void 0;
|
|
9569
|
+
if (resp.error && typeof resp.error === "object") prob = resp.error;
|
|
9570
|
+
const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
|
|
9571
|
+
err.status = st;
|
|
9572
|
+
err.name = "HttpSdkError";
|
|
9573
|
+
if (prob) {
|
|
9574
|
+
for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
|
|
9575
|
+
}
|
|
9576
|
+
const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
|
|
9577
|
+
if (!isBp) err.nonRetryable = true;
|
|
9578
|
+
return err;
|
|
9579
|
+
});
|
|
9580
|
+
const _respSchemaName = "zGetAgentInstanceResponse";
|
|
9581
|
+
if (this._isVoidResponse(_respSchemaName)) {
|
|
9582
|
+
data = void 0;
|
|
9583
|
+
}
|
|
9584
|
+
if (this._validation.settings.res !== "none") {
|
|
9585
|
+
const _schemas = await this._loadSchemas();
|
|
9586
|
+
const _schema = _schemas.zGetAgentInstanceResponse;
|
|
9587
|
+
if (_schema) {
|
|
9588
|
+
const maybeR = await this._validation.gateResponse("getAgentInstance", _schema, data);
|
|
9589
|
+
if (this._validation.settings.res === "strict") data = maybeR;
|
|
9590
|
+
}
|
|
9591
|
+
}
|
|
9592
|
+
return data;
|
|
9593
|
+
} catch (e) {
|
|
9594
|
+
throw e;
|
|
9595
|
+
}
|
|
9596
|
+
};
|
|
9597
|
+
const invoke = () => toCancelable2(() => call());
|
|
9598
|
+
if (useConsistency) return eventualPoll("getAgentInstance", true, invoke, { ...useConsistency, logger: this._log });
|
|
9599
|
+
return invoke();
|
|
9600
|
+
});
|
|
9601
|
+
}
|
|
9514
9602
|
getAuditLog(arg, consistencyManagement, options) {
|
|
9515
9603
|
if (!consistencyManagement) throw new Error("Missing consistencyManagement parameter for eventually consistent endpoint");
|
|
9516
9604
|
const useConsistency = consistencyManagement.consistency;
|
|
@@ -12709,6 +12797,62 @@ var CamundaClient = class {
|
|
|
12709
12797
|
return this._invokeWithRetry(() => call(), { opId: "resumeBatchOperation", exempt: false, retryOverride: options?.retry });
|
|
12710
12798
|
});
|
|
12711
12799
|
}
|
|
12800
|
+
searchAgentInstances(arg, consistencyManagement, options) {
|
|
12801
|
+
if (!consistencyManagement) throw new Error("Missing consistencyManagement parameter for eventually consistent endpoint");
|
|
12802
|
+
const useConsistency = consistencyManagement.consistency;
|
|
12803
|
+
return toCancelable2(async (signal) => {
|
|
12804
|
+
const _body = arg;
|
|
12805
|
+
let envelope = {};
|
|
12806
|
+
envelope.body = _body;
|
|
12807
|
+
if (this._validation.settings.req !== "none") {
|
|
12808
|
+
const _schemas = await this._loadSchemas();
|
|
12809
|
+
const maybe = await this._validation.gateRequest("searchAgentInstances", _schemas.zSearchAgentInstancesData, envelope);
|
|
12810
|
+
if (this._validation.settings.req === "strict") envelope = maybe;
|
|
12811
|
+
}
|
|
12812
|
+
const opts = { client: this._client, signal, throwOnError: false };
|
|
12813
|
+
if (envelope.body !== void 0) opts.body = envelope.body;
|
|
12814
|
+
const call = async () => {
|
|
12815
|
+
try {
|
|
12816
|
+
const _raw = await searchAgentInstances(opts);
|
|
12817
|
+
let data = this._evaluateResponse(_raw, "searchAgentInstances", (resp) => {
|
|
12818
|
+
const st = resp.status ?? resp.response?.status;
|
|
12819
|
+
if (!st) return void 0;
|
|
12820
|
+
const candidate = st === 429 || st === 503 || st === 500;
|
|
12821
|
+
if (!candidate) return void 0;
|
|
12822
|
+
let prob = void 0;
|
|
12823
|
+
if (resp.error && typeof resp.error === "object") prob = resp.error;
|
|
12824
|
+
const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
|
|
12825
|
+
err.status = st;
|
|
12826
|
+
err.name = "HttpSdkError";
|
|
12827
|
+
if (prob) {
|
|
12828
|
+
for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
|
|
12829
|
+
}
|
|
12830
|
+
const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
|
|
12831
|
+
if (!isBp) err.nonRetryable = true;
|
|
12832
|
+
return err;
|
|
12833
|
+
});
|
|
12834
|
+
const _respSchemaName = "zSearchAgentInstancesResponse";
|
|
12835
|
+
if (this._isVoidResponse(_respSchemaName)) {
|
|
12836
|
+
data = void 0;
|
|
12837
|
+
}
|
|
12838
|
+
if (this._validation.settings.res !== "none") {
|
|
12839
|
+
const _schemas = await this._loadSchemas();
|
|
12840
|
+
const _schema = _schemas.zSearchAgentInstancesResponse;
|
|
12841
|
+
if (_schema) {
|
|
12842
|
+
const maybeR = await this._validation.gateResponse("searchAgentInstances", _schema, data);
|
|
12843
|
+
if (this._validation.settings.res === "strict") data = maybeR;
|
|
12844
|
+
}
|
|
12845
|
+
}
|
|
12846
|
+
return data;
|
|
12847
|
+
} catch (e) {
|
|
12848
|
+
throw e;
|
|
12849
|
+
}
|
|
12850
|
+
};
|
|
12851
|
+
const invoke = () => toCancelable2(() => call());
|
|
12852
|
+
if (useConsistency) return eventualPoll("searchAgentInstances", false, invoke, { ...useConsistency, logger: this._log });
|
|
12853
|
+
return invoke();
|
|
12854
|
+
});
|
|
12855
|
+
}
|
|
12712
12856
|
searchAuditLogs(arg, consistencyManagement, options) {
|
|
12713
12857
|
if (!consistencyManagement) throw new Error("Missing consistencyManagement parameter for eventually consistent endpoint");
|
|
12714
12858
|
const useConsistency = consistencyManagement.consistency;
|
|
@@ -14299,6 +14443,62 @@ var CamundaClient = class {
|
|
|
14299
14443
|
return invoke();
|
|
14300
14444
|
});
|
|
14301
14445
|
}
|
|
14446
|
+
searchResources(arg, consistencyManagement, options) {
|
|
14447
|
+
if (!consistencyManagement) throw new Error("Missing consistencyManagement parameter for eventually consistent endpoint");
|
|
14448
|
+
const useConsistency = consistencyManagement.consistency;
|
|
14449
|
+
return toCancelable2(async (signal) => {
|
|
14450
|
+
const _body = arg;
|
|
14451
|
+
let envelope = {};
|
|
14452
|
+
envelope.body = _body;
|
|
14453
|
+
if (this._validation.settings.req !== "none") {
|
|
14454
|
+
const _schemas = await this._loadSchemas();
|
|
14455
|
+
const maybe = await this._validation.gateRequest("searchResources", _schemas.zSearchResourcesData, envelope);
|
|
14456
|
+
if (this._validation.settings.req === "strict") envelope = maybe;
|
|
14457
|
+
}
|
|
14458
|
+
const opts = { client: this._client, signal, throwOnError: false };
|
|
14459
|
+
if (envelope.body !== void 0) opts.body = envelope.body;
|
|
14460
|
+
const call = async () => {
|
|
14461
|
+
try {
|
|
14462
|
+
const _raw = await searchResources(opts);
|
|
14463
|
+
let data = this._evaluateResponse(_raw, "searchResources", (resp) => {
|
|
14464
|
+
const st = resp.status ?? resp.response?.status;
|
|
14465
|
+
if (!st) return void 0;
|
|
14466
|
+
const candidate = st === 429 || st === 503 || st === 500;
|
|
14467
|
+
if (!candidate) return void 0;
|
|
14468
|
+
let prob = void 0;
|
|
14469
|
+
if (resp.error && typeof resp.error === "object") prob = resp.error;
|
|
14470
|
+
const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
|
|
14471
|
+
err.status = st;
|
|
14472
|
+
err.name = "HttpSdkError";
|
|
14473
|
+
if (prob) {
|
|
14474
|
+
for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
|
|
14475
|
+
}
|
|
14476
|
+
const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
|
|
14477
|
+
if (!isBp) err.nonRetryable = true;
|
|
14478
|
+
return err;
|
|
14479
|
+
});
|
|
14480
|
+
const _respSchemaName = "zSearchResourcesResponse";
|
|
14481
|
+
if (this._isVoidResponse(_respSchemaName)) {
|
|
14482
|
+
data = void 0;
|
|
14483
|
+
}
|
|
14484
|
+
if (this._validation.settings.res !== "none") {
|
|
14485
|
+
const _schemas = await this._loadSchemas();
|
|
14486
|
+
const _schema = _schemas.zSearchResourcesResponse;
|
|
14487
|
+
if (_schema) {
|
|
14488
|
+
const maybeR = await this._validation.gateResponse("searchResources", _schema, data);
|
|
14489
|
+
if (this._validation.settings.res === "strict") data = maybeR;
|
|
14490
|
+
}
|
|
14491
|
+
}
|
|
14492
|
+
return data;
|
|
14493
|
+
} catch (e) {
|
|
14494
|
+
throw e;
|
|
14495
|
+
}
|
|
14496
|
+
};
|
|
14497
|
+
const invoke = () => toCancelable2(() => call());
|
|
14498
|
+
if (useConsistency) return eventualPoll("searchResources", false, invoke, { ...useConsistency, logger: this._log });
|
|
14499
|
+
return invoke();
|
|
14500
|
+
});
|
|
14501
|
+
}
|
|
14302
14502
|
searchRoles(arg, consistencyManagement, options) {
|
|
14303
14503
|
if (!consistencyManagement) throw new Error("Missing consistencyManagement parameter for eventually consistent endpoint");
|
|
14304
14504
|
const useConsistency = consistencyManagement.consistency;
|
|
@@ -16727,4 +16927,4 @@ export {
|
|
|
16727
16927
|
withTimeoutTE,
|
|
16728
16928
|
eventuallyTE
|
|
16729
16929
|
};
|
|
16730
|
-
//# sourceMappingURL=chunk-
|
|
16930
|
+
//# sourceMappingURL=chunk-S3RXIYYE.js.map
|