@camunda8/sdk 8.7.6 → 8.7.8
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 +16 -0
- package/README.md +37 -35
- package/dist/admin/lib/AdminApiClient.d.ts +16 -16
- package/dist/admin/lib/AdminApiClient.js +18 -18
- package/dist/admin/lib/AdminApiClient.js.map +1 -1
- package/dist/c8/index.d.ts +13 -2
- package/dist/c8/index.js +8 -2
- package/dist/c8/index.js.map +1 -1
- package/dist/c8/lib/C8Logger.d.ts +5 -0
- package/dist/c8/lib/C8Logger.js.map +1 -1
- package/dist/c8/lib/CamundaJobWorker.d.ts +14 -1
- package/dist/c8/lib/CamundaJobWorker.js.map +1 -1
- package/dist/c8/lib/CamundaRestClient.d.ts +69 -3
- package/dist/c8/lib/CamundaRestClient.js +3 -3
- package/dist/c8/lib/CamundaRestClient.js.map +1 -1
- package/dist/c8/lib/RestApiJobClassFactory.js +6 -0
- package/dist/c8/lib/RestApiJobClassFactory.js.map +1 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +16 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/CamundaSupportLogger.d.ts +11 -0
- package/dist/lib/CamundaSupportLogger.js +154 -0
- package/dist/lib/CamundaSupportLogger.js.map +1 -0
- package/dist/lib/Configuration.d.ts +100 -84
- package/dist/lib/Configuration.js +126 -71
- package/dist/lib/Configuration.js.map +1 -1
- package/dist/lib/ConstructOAuthProvider.d.ts +1 -1
- package/dist/lib/CreateDtoInstance.d.ts +2 -2
- package/dist/lib/CreateDtoInstance.js +2 -2
- package/dist/lib/EnvironmentSetup.d.ts +3 -2
- package/dist/lib/EnvironmentSetup.js +18 -15
- package/dist/lib/EnvironmentSetup.js.map +1 -1
- package/dist/lib/GotHooks.d.ts +7 -3
- package/dist/lib/GotHooks.js +38 -5
- package/dist/lib/GotHooks.js.map +1 -1
- package/dist/lib/LosslessJsonParser.d.ts +12 -2
- package/dist/lib/LosslessJsonParser.js +12 -2
- package/dist/lib/LosslessJsonParser.js.map +1 -1
- package/dist/lib/RequireConfiguration.d.ts +2 -2
- package/dist/lib/RequireConfiguration.js +1 -1
- package/dist/lib/RequireConfiguration.js.map +1 -1
- package/dist/lib/index.d.ts +0 -1
- package/dist/lib/index.js +0 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/modeler/lib/ModelerAPIClient.d.ts +7 -1
- package/dist/modeler/lib/ModelerAPIClient.js +9 -3
- package/dist/modeler/lib/ModelerAPIClient.js.map +1 -1
- package/dist/oauth/index.d.ts +6 -0
- package/dist/oauth/index.js +3 -1
- package/dist/oauth/index.js.map +1 -1
- package/dist/oauth/lib/BasicAuthProvider.d.ts +5 -0
- package/dist/oauth/lib/BasicAuthProvider.js +5 -0
- package/dist/oauth/lib/BasicAuthProvider.js.map +1 -1
- package/dist/oauth/lib/BearerAuthProvider.d.ts +23 -1
- package/dist/oauth/lib/BearerAuthProvider.js +23 -1
- package/dist/oauth/lib/BearerAuthProvider.js.map +1 -1
- package/dist/oauth/lib/CookieAuthProvider.d.ts +17 -0
- package/dist/oauth/lib/CookieAuthProvider.js +24 -3
- package/dist/oauth/lib/CookieAuthProvider.js.map +1 -1
- package/dist/oauth/lib/IOAuthProvider.d.ts +55 -1
- package/dist/oauth/lib/NullAuthProvider.d.ts +6 -0
- package/dist/oauth/lib/NullAuthProvider.js +6 -0
- package/dist/oauth/lib/NullAuthProvider.js.map +1 -1
- package/dist/oauth/lib/OAuthProvider.d.ts +22 -0
- package/dist/oauth/lib/OAuthProvider.js +24 -2
- package/dist/oauth/lib/OAuthProvider.js.map +1 -1
- package/dist/operate/lib/OperateApiClient.d.ts +16 -13
- package/dist/operate/lib/OperateApiClient.js +18 -15
- package/dist/operate/lib/OperateApiClient.js.map +1 -1
- package/dist/optimize/lib/APIObjects.d.ts +9 -9
- package/dist/optimize/lib/OptimizeApiClient.d.ts +16 -14
- package/dist/optimize/lib/OptimizeApiClient.js +18 -16
- package/dist/optimize/lib/OptimizeApiClient.js.map +1 -1
- package/dist/tasklist/lib/TasklistApiClient.d.ts +13 -10
- package/dist/tasklist/lib/TasklistApiClient.js +15 -12
- package/dist/tasklist/lib/TasklistApiClient.js.map +1 -1
- package/dist/zeebe/lib/GrpcClient.d.ts +1 -0
- package/dist/zeebe/lib/GrpcClient.js +28 -0
- package/dist/zeebe/lib/GrpcClient.js.map +1 -1
- package/dist/zeebe/zb/ZBWorker.js +2 -2
- package/dist/zeebe/zb/ZBWorker.js.map +1 -1
- package/dist/zeebe/zb/ZeebeGrpcClient.d.ts +33 -23
- package/dist/zeebe/zb/ZeebeGrpcClient.js +57 -26
- package/dist/zeebe/zb/ZeebeGrpcClient.js.map +1 -1
- package/dist/zeebe/zb/ZeebeRESTClient.d.ts +1 -1
- package/dist/zeebe/zb/ZeebeRESTClient.js +3 -3
- package/dist/zeebe/zb/ZeebeRESTClient.js.map +1 -1
- package/package.json +6 -5
- package/dist/lib/SuppressZeebeLogging.d.ts +0 -2
- package/dist/lib/SuppressZeebeLogging.js +0 -14
- package/dist/lib/SuppressZeebeLogging.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [8.7.8](https://github.com/camunda/camunda-8-js-sdk/compare/v8.7.7...v8.7.8) (2025-05-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add hinting for Rest errors. fixes [#456](https://github.com/camunda/camunda-8-js-sdk/issues/456) ([cf34f57](https://github.com/camunda/camunda-8-js-sdk/commit/cf34f5747f328be3fceba6f588b2cbc8bb32004a))
|
|
7
|
+
* debug and trace support log infrastructure. fixes [#457](https://github.com/camunda/camunda-8-js-sdk/issues/457) ([a8e3234](https://github.com/camunda/camunda-8-js-sdk/commit/a8e3234760edb6e0fa33c9eec5ddbf54b82ea2dd))
|
|
8
|
+
|
|
9
|
+
## [8.7.7](https://github.com/camunda/camunda-8-js-sdk/compare/v8.7.6...v8.7.7) (2025-05-12)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* expose configuration in documentation. fixes [#451](https://github.com/camunda/camunda-8-js-sdk/issues/451) ([55dc5d5](https://github.com/camunda/camunda-8-js-sdk/commit/55dc5d5885c5c30373b930573e783c13b45609fb))
|
|
15
|
+
* refactor tests for configuration change ([4b33ad4](https://github.com/camunda/camunda-8-js-sdk/commit/4b33ad45f3e5bebf02801b535c5bc38252bf938a))
|
|
16
|
+
|
|
1
17
|
## [8.7.6](https://github.com/camunda/camunda-8-js-sdk/compare/v8.7.5...v8.7.6) (2025-05-08)
|
|
2
18
|
|
|
3
19
|
|
package/README.md
CHANGED
|
@@ -52,28 +52,26 @@ const admin = c8.getAdminApiClient()
|
|
|
52
52
|
|
|
53
53
|
The configuration for the SDK can be done by any combination of environment variables and explicit configuration passed to the `Camunda8` constructor.
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
The complete documentation of all configuration parameters can be found [here](https://camunda.github.io/camunda-8-js-sdk/variables/index.CamundaSDKConfiguration.html).
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
Any configuration passed in to the `Camunda8` constructor is merged over any configuration in the environment. The configuration object fields and the environment variables have exactly the same names.
|
|
58
58
|
|
|
59
59
|
## A note on how int64 is handled in the JavaScript SDK
|
|
60
60
|
|
|
61
61
|
Entity keys in Camunda 8 are stored and represented as `int64` numbers. The range of `int64` extends to numbers that cannot be represented by the JavaScript `number` type. To deal with this, `int64` keys are serialised by the SDK to the JavaScript `string` type. See [this issue](https://github.com/camunda/camunda-8-js-sdk/issues/78) for more details.
|
|
62
62
|
|
|
63
|
-
Some number values - for example: "_total returned results_ " - may be specified as `int64` in the API specifications. Although these numbers will usually not contain unsafe values, they are always serialised to `string`.
|
|
64
|
-
|
|
65
63
|
For `int64` values whose type is not known ahead of time, such as job variables, you can pass an annotated data transfer object (DTO) to decode them reliably. If no DTO is specified, the default behavior of the SDK is to serialise all numbers to JavaScript `number`, and to throw an exception if a number value is detected at a runtime that cannot be accurately represented as the JavaScript `number` type (that is, a value greater than 2^53-1).
|
|
66
64
|
|
|
67
65
|
## Authorization
|
|
68
66
|
|
|
69
67
|
Calls to APIs can be authorized using a number of strategies. The most common is OAuth - a token that is obtained via a client id/secret pair exchange.
|
|
70
68
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
69
|
+
- Camunda SaaS and Self-Managed by default are configured to use OAuth with token exchange. In most cases, you will use the `OAUTH` strategy and provide configuration only. The token exchange and its lifecycle are managed by the SDK in this strategy. This passes the token in the `authorization` header of requests.
|
|
70
|
+
- If you secure the gateway behind an Nginx reverse-proxy secured with basic authentication, you will use the `BASIC` strategy. This adds the login credentials as the `authorization` header on requests.
|
|
71
|
+
- For C8Run 8.7, you will need to use the `COOKIE` strategy. This manages a session cookie obtained from a login endpoint, and adds it as a cookie header to requests.
|
|
72
|
+
- For more customisation, you can use the `BEARER` strategy. This is a strategy that allows you to dynamically provide the `Bearer` token directly. The currently set token is added as the `authorization` header on requests.
|
|
73
|
+
- If you have a even more advanced use-case (for example, the need to add specific headers with specific values to authenticate with a proxy gateway), you can construct your own AuthProvider and pass it to the constructor.
|
|
74
|
+
- You can also disable header auth completely and use mTLS (client certificate) — or no authentication at all — with the `NONE` strategy.
|
|
77
75
|
|
|
78
76
|
For more details on each of these scenarios, see the relevant section below.
|
|
79
77
|
|
|
@@ -176,14 +174,14 @@ You can add arbitrary headers to all requests by implementing `IOAuthProvider`:
|
|
|
176
174
|
import { Camunda8, Auth } from '@camunda8/sdk'
|
|
177
175
|
|
|
178
176
|
class MyCustomAuthProvider implements Auth.IOAuthProvider {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
177
|
+
async getToken(audience: string) {
|
|
178
|
+
// here we give a static example, but this class may read configuration,
|
|
179
|
+
// exchange credentials with an endpoint, manage token lifecycles, and so forth...
|
|
180
|
+
// Return an object which will be merged with the headers on the request
|
|
181
|
+
return {
|
|
182
|
+
'x-custom-auth-header': 'someCustomValue',
|
|
183
|
+
}
|
|
184
|
+
}
|
|
187
185
|
}
|
|
188
186
|
|
|
189
187
|
const customAuthProvider = new MyCustomAuthProvider()
|
|
@@ -213,7 +211,7 @@ This is the complete environment configuration needed to run against the Dockeri
|
|
|
213
211
|
|
|
214
212
|
```bash
|
|
215
213
|
# Self-Managed
|
|
216
|
-
export
|
|
214
|
+
export ZEEBE_ADDRESS='localhost:26500'
|
|
217
215
|
export ZEEBE_REST_ADDRESS='http://localhost:8080'
|
|
218
216
|
export ZEEBE_CLIENT_ID='zeebe'
|
|
219
217
|
export ZEEBE_CLIENT_SECRET='zecret'
|
|
@@ -244,7 +242,7 @@ Here is an example of doing this via the constructor, rather than via the enviro
|
|
|
244
242
|
import { Camunda8 } from '@camunda8/sdk'
|
|
245
243
|
|
|
246
244
|
const c8 = new Camunda8({
|
|
247
|
-
|
|
245
|
+
ZEEBE_ADDRESS: 'localhost:26500',
|
|
248
246
|
ZEEBE_REST_ADDRESS: 'http://localhost:8080',
|
|
249
247
|
ZEEBE_CLIENT_ID: 'zeebe',
|
|
250
248
|
ZEEBE_CLIENT_SECRET: 'zecret',
|
|
@@ -265,7 +263,7 @@ const c8 = new Camunda8({
|
|
|
265
263
|
Here is a complete configuration example for connection to Camunda SaaS:
|
|
266
264
|
|
|
267
265
|
```bash
|
|
268
|
-
export
|
|
266
|
+
export ZEEBE_ADDRESS='5c34c0a7-7f29-4424-8414-125615f7a9b9.syd-1.zeebe.camunda.io:443'
|
|
269
267
|
export ZEEBE_REST_ADDRESS='https://syd-1.zeebe.camunda.io/5c34c0a7-7f29-4424-8414-125615f7a9b9'
|
|
270
268
|
export ZEEBE_CLIENT_ID='yvvURO9TmBnP3zx4Xd8Ho6apgeiZTjn6'
|
|
271
269
|
export ZEEBE_CLIENT_SECRET='iJJu-SHgUtuJTTAMnMLdcb8WGF8s2mHfXhXutEwe8eSbLXn98vUpoxtuLk5uG0en'
|
|
@@ -291,6 +289,7 @@ export CAMUNDA_CONSOLE_OAUTH_AUDIENCE='api.cloud.camunda.io'
|
|
|
291
289
|
The SDK uses a Winston / Pino compatible logging setup. By default it uses Winston.
|
|
292
290
|
|
|
293
291
|
When using the default logging library, you can set the logging level of the SDK via the environment variable (or constructor configuration property) `CAMUNDA_LOG_LEVEL`. This defaults to 'info'. Values (in order of priority): `error`, `warn`, `info`, `http`, `verbose`, `debug`, `silly`.
|
|
292
|
+
|
|
294
293
|
### Custom logger
|
|
295
294
|
|
|
296
295
|
You can supply a custom logger via the constructor. For example, to use the [Pino](https://getpino.io/) logging library:
|
|
@@ -305,7 +304,7 @@ const logger = pino({ level }) // Logging level controlled via the logging libra
|
|
|
305
304
|
|
|
306
305
|
logger.info('Pino logger created')
|
|
307
306
|
const c8 = new Camunda8({
|
|
308
|
-
|
|
307
|
+
logger,
|
|
309
308
|
})
|
|
310
309
|
c8.log.info('Using pino logger')
|
|
311
310
|
```
|
|
@@ -316,18 +315,18 @@ The SDK uses the [`debug`](https://github.com/debug-js/debug) library to help yo
|
|
|
316
315
|
|
|
317
316
|
To enable debugging output, set a value for the `DEBUG` environment variable. The value is a comma-separated list of debugging namespaces. The SDK has the following namespaces:
|
|
318
317
|
|
|
319
|
-
| Value
|
|
320
|
-
|
|
|
321
|
-
| `camunda:adminconsole`
|
|
322
|
-
| `camunda:modeler`
|
|
323
|
-
| `camunda:operate`
|
|
324
|
-
| `camunda:optimize`
|
|
325
|
-
| `camunda:tasklist`
|
|
326
|
-
| `camunda:oauth`
|
|
327
|
-
| `camunda:grpc`
|
|
328
|
-
| `camunda:worker`
|
|
329
|
-
| `camunda:worker:verbose
|
|
330
|
-
| `camunda:zeebeclient`
|
|
318
|
+
| Value | Component |
|
|
319
|
+
| ------------------------ | -------------------------------- |
|
|
320
|
+
| `camunda:adminconsole` | Administration API |
|
|
321
|
+
| `camunda:modeler` | Modeler API |
|
|
322
|
+
| `camunda:operate` | Operate API |
|
|
323
|
+
| `camunda:optimize` | Optimize API |
|
|
324
|
+
| `camunda:tasklist` | Tasklist API |
|
|
325
|
+
| `camunda:oauth` | OAuth Token Exchange |
|
|
326
|
+
| `camunda:grpc` | Zeebe gRPC channel |
|
|
327
|
+
| `camunda:worker` | Zeebe Worker |
|
|
328
|
+
| `camunda:worker:verbose` | Zeebe Worker (additional detail) |
|
|
329
|
+
| `camunda:zeebeclient` | Zeebe Client |
|
|
331
330
|
|
|
332
331
|
Here is an example of turning on debugging for the OAuth and Operate components:
|
|
333
332
|
|
|
@@ -335,6 +334,10 @@ Here is an example of turning on debugging for the OAuth and Operate components:
|
|
|
335
334
|
DEBUG=camunda:oauth,camunda:operate node app.js
|
|
336
335
|
```
|
|
337
336
|
|
|
337
|
+
## Diagnostic Trace file
|
|
338
|
+
|
|
339
|
+
You can output a diagnostic trace file to use with Camunda technical support by setting the environment variable `CAMUNDA_SUPPORT_LOG_ENABLED` to true. This will output a file `camunda-support.log` containing diagnostic information and tracing calls. This information is useful for debugging. Be aware that this log file will contain secrets such as bearer tokens, as well as exposing urls.
|
|
340
|
+
|
|
338
341
|
## Process Variable Typing
|
|
339
342
|
|
|
340
343
|
Process variables - the `variables` of Zeebe messages, jobs, and process instance creation requests and responses - are stored in the broker as key:value pairs. They are transported as a JSON string. The SDK parses the JSON string into a JavaScript object.
|
|
@@ -452,4 +455,3 @@ When a polling worker encounters an error, including not being authenticated, th
|
|
|
452
455
|
This means that if you start a worker with invalid credentials, then the polling backoff will look like this, by default (times in seconds): 3, 6, 9, 12, 15, 18, 21, 23, 24, 25, 26, 27, 28, 29, 30, 30, 30...
|
|
453
456
|
|
|
454
457
|
If the worker is backing off for a reason other than invalid credentials - for example a backpressure signal from the gateway - it will be: 2, 4, 6, 8, 10, 12, 14, 15, 15, 15.....
|
|
455
|
-
|
|
@@ -16,14 +16,14 @@ export declare class AdminApiClient {
|
|
|
16
16
|
private getHeaders;
|
|
17
17
|
/**
|
|
18
18
|
*
|
|
19
|
-
*
|
|
19
|
+
* Get an array of the current API clients for this cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetClients) for more details.
|
|
20
20
|
* @throws {RESTError}
|
|
21
21
|
* @param clusterUuid - The cluster UUID
|
|
22
22
|
*
|
|
23
23
|
*/
|
|
24
24
|
getClients(clusterUuid: string): Promise<Dto.ClusterClient[]>;
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Create a new API client for a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/CreateClient) for more details.
|
|
27
27
|
* @throws {RESTError}
|
|
28
28
|
*/
|
|
29
29
|
createClient(req: {
|
|
@@ -32,7 +32,7 @@ export declare class AdminApiClient {
|
|
|
32
32
|
permissions: string[];
|
|
33
33
|
}): Promise<Dto.CreatedClusterClient>;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Get the details of an API client. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetClient) for more details.
|
|
36
36
|
* @param clusterUuid
|
|
37
37
|
* @param clientId
|
|
38
38
|
* @throws {RESTError}
|
|
@@ -40,7 +40,7 @@ export declare class AdminApiClient {
|
|
|
40
40
|
*/
|
|
41
41
|
getClient(clusterUuid: string, clientId: string): Promise<Dto.ClusterClientConnectionDetails>;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/DeleteClient) for more details.
|
|
44
44
|
* @param clusterUuid
|
|
45
45
|
* @param clientId
|
|
46
46
|
* @throws {RESTError}
|
|
@@ -48,13 +48,13 @@ export declare class AdminApiClient {
|
|
|
48
48
|
deleteClient(clusterUuid: string, clientId: string): Promise<null>;
|
|
49
49
|
/**
|
|
50
50
|
*
|
|
51
|
-
*
|
|
51
|
+
* Return an array of clusters. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetClusters) for more details.
|
|
52
52
|
* @throws {RESTError}
|
|
53
53
|
*/
|
|
54
54
|
getClusters(): Promise<Dto.Cluster[]>;
|
|
55
55
|
/**
|
|
56
56
|
*
|
|
57
|
-
*
|
|
57
|
+
* Create a new cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/CreateCluster) for more details.
|
|
58
58
|
* @throws {RESTError}
|
|
59
59
|
*/
|
|
60
60
|
createCluster(createClusterRequest: Dto.CreateClusterBody): Promise<{
|
|
@@ -62,27 +62,27 @@ export declare class AdminApiClient {
|
|
|
62
62
|
}>;
|
|
63
63
|
/**
|
|
64
64
|
*
|
|
65
|
-
*
|
|
65
|
+
* Retrieve the metadata for a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetCluster) for more details.
|
|
66
66
|
* @throws {RESTError}
|
|
67
67
|
*
|
|
68
68
|
*/
|
|
69
69
|
getCluster(clusterUuid: string): Promise<Dto.Cluster>;
|
|
70
70
|
/**
|
|
71
71
|
*
|
|
72
|
-
*
|
|
72
|
+
* Delete a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/DeleteCluster) for more details.
|
|
73
73
|
* @throws {RESTError}
|
|
74
74
|
*
|
|
75
75
|
*/
|
|
76
76
|
deleteCluster(clusterUuid: string): Promise<null>;
|
|
77
77
|
/**
|
|
78
78
|
*
|
|
79
|
-
*
|
|
79
|
+
* Retrieve the available parameters for cluster creation. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetParameters) for more details.
|
|
80
80
|
* @throws {RESTError}
|
|
81
81
|
*/
|
|
82
82
|
getParameters(): Promise<Dto.Parameters>;
|
|
83
83
|
/**
|
|
84
84
|
*
|
|
85
|
-
*
|
|
85
|
+
* Retrieve the connector secrets. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetSecrets) for more details.
|
|
86
86
|
* @throws {RESTError}
|
|
87
87
|
*/
|
|
88
88
|
getSecrets(clusterUuid: string): Promise<{
|
|
@@ -90,7 +90,7 @@ export declare class AdminApiClient {
|
|
|
90
90
|
}>;
|
|
91
91
|
/**
|
|
92
92
|
*
|
|
93
|
-
*
|
|
93
|
+
* Create a new connector secret. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/CreateSecret) for more details.
|
|
94
94
|
* @throws {RESTError}
|
|
95
95
|
*/
|
|
96
96
|
createSecret({ clusterUuid, secretName, secretValue, }: {
|
|
@@ -100,13 +100,13 @@ export declare class AdminApiClient {
|
|
|
100
100
|
}): Promise<null>;
|
|
101
101
|
/**
|
|
102
102
|
*
|
|
103
|
-
*
|
|
103
|
+
* Delete a connector secret. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/DeleteSecret) for more details.
|
|
104
104
|
* @throws {RESTError}
|
|
105
105
|
*/
|
|
106
106
|
deleteSecret(clusterUuid: string, secretName: string): Promise<null>;
|
|
107
107
|
/**
|
|
108
108
|
*
|
|
109
|
-
*
|
|
109
|
+
* Add one or more IPs to the whitelist for the cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/UpdateIpWhitelist) for more details.
|
|
110
110
|
* @throws {RESTError}
|
|
111
111
|
* @param ipwhitelist
|
|
112
112
|
* @returns
|
|
@@ -119,20 +119,20 @@ export declare class AdminApiClient {
|
|
|
119
119
|
]): Promise<null>;
|
|
120
120
|
/**
|
|
121
121
|
*
|
|
122
|
-
*
|
|
122
|
+
* Retrieve a list of members and pending invites for your organisation. See the [API Documentation]() for more details.
|
|
123
123
|
* @throws {RESTError}
|
|
124
124
|
*/
|
|
125
125
|
getUsers(): Promise<Dto.Member[]>;
|
|
126
126
|
/**
|
|
127
127
|
*
|
|
128
|
-
*
|
|
128
|
+
* Add a member. See the [API Documentation]() for more details.
|
|
129
129
|
* @throws {RESTError}
|
|
130
130
|
*
|
|
131
131
|
*/
|
|
132
132
|
createMember(email: string, orgRoles: Dto.OrganizationRole[]): Promise<null>;
|
|
133
133
|
/**
|
|
134
134
|
*
|
|
135
|
-
*
|
|
135
|
+
* Delete a member from your organization. See the [API Documentation]() for more details.
|
|
136
136
|
* @throws {RESTError}
|
|
137
137
|
*
|
|
138
138
|
*/
|
|
@@ -25,12 +25,12 @@ class AdminApiClient {
|
|
|
25
25
|
https: {
|
|
26
26
|
certificateAuthority,
|
|
27
27
|
},
|
|
28
|
-
handlers: [lib_1.
|
|
28
|
+
handlers: [lib_1.beforeCallHook],
|
|
29
29
|
hooks: {
|
|
30
30
|
beforeRetry: [
|
|
31
31
|
(0, lib_1.makeBeforeRetryHandlerFor401TokenRetry)(this.getHeaders.bind(this)),
|
|
32
32
|
],
|
|
33
|
-
beforeError: [lib_1.gotBeforeErrorHook],
|
|
33
|
+
beforeError: [(0, lib_1.gotBeforeErrorHook)(config)],
|
|
34
34
|
beforeRequest: config.middleware ?? [],
|
|
35
35
|
},
|
|
36
36
|
}));
|
|
@@ -48,7 +48,7 @@ class AdminApiClient {
|
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
50
|
*
|
|
51
|
-
*
|
|
51
|
+
* Get an array of the current API clients for this cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetClients) for more details.
|
|
52
52
|
* @throws {RESTError}
|
|
53
53
|
* @param clusterUuid - The cluster UUID
|
|
54
54
|
*
|
|
@@ -61,7 +61,7 @@ class AdminApiClient {
|
|
|
61
61
|
}).json();
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
64
|
+
* Create a new API client for a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/CreateClient) for more details.
|
|
65
65
|
* @throws {RESTError}
|
|
66
66
|
*/
|
|
67
67
|
async createClient(req) {
|
|
@@ -78,7 +78,7 @@ class AdminApiClient {
|
|
|
78
78
|
.json();
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
81
|
+
* Get the details of an API client. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetClient) for more details.
|
|
82
82
|
* @param clusterUuid
|
|
83
83
|
* @param clientId
|
|
84
84
|
* @throws {RESTError}
|
|
@@ -92,7 +92,7 @@ class AdminApiClient {
|
|
|
92
92
|
}).json();
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
95
|
-
*
|
|
95
|
+
* See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/DeleteClient) for more details.
|
|
96
96
|
* @param clusterUuid
|
|
97
97
|
* @param clientId
|
|
98
98
|
* @throws {RESTError}
|
|
@@ -108,7 +108,7 @@ class AdminApiClient {
|
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
110
110
|
*
|
|
111
|
-
*
|
|
111
|
+
* Return an array of clusters. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetClusters) for more details.
|
|
112
112
|
* @throws {RESTError}
|
|
113
113
|
*/
|
|
114
114
|
async getClusters() {
|
|
@@ -120,7 +120,7 @@ class AdminApiClient {
|
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
122
122
|
*
|
|
123
|
-
*
|
|
123
|
+
* Create a new cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/CreateCluster) for more details.
|
|
124
124
|
* @throws {RESTError}
|
|
125
125
|
*/
|
|
126
126
|
async createCluster(createClusterRequest) {
|
|
@@ -134,7 +134,7 @@ class AdminApiClient {
|
|
|
134
134
|
}
|
|
135
135
|
/**
|
|
136
136
|
*
|
|
137
|
-
*
|
|
137
|
+
* Retrieve the metadata for a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetCluster) for more details.
|
|
138
138
|
* @throws {RESTError}
|
|
139
139
|
*
|
|
140
140
|
*/
|
|
@@ -147,7 +147,7 @@ class AdminApiClient {
|
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
149
|
*
|
|
150
|
-
*
|
|
150
|
+
* Delete a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/DeleteCluster) for more details.
|
|
151
151
|
* @throws {RESTError}
|
|
152
152
|
*
|
|
153
153
|
*/
|
|
@@ -162,7 +162,7 @@ class AdminApiClient {
|
|
|
162
162
|
}
|
|
163
163
|
/**
|
|
164
164
|
*
|
|
165
|
-
*
|
|
165
|
+
* Retrieve the available parameters for cluster creation. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetParameters) for more details.
|
|
166
166
|
* @throws {RESTError}
|
|
167
167
|
*/
|
|
168
168
|
async getParameters() {
|
|
@@ -174,7 +174,7 @@ class AdminApiClient {
|
|
|
174
174
|
}
|
|
175
175
|
/**
|
|
176
176
|
*
|
|
177
|
-
*
|
|
177
|
+
* Retrieve the connector secrets. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetSecrets) for more details.
|
|
178
178
|
* @throws {RESTError}
|
|
179
179
|
*/
|
|
180
180
|
async getSecrets(clusterUuid) {
|
|
@@ -186,7 +186,7 @@ class AdminApiClient {
|
|
|
186
186
|
}
|
|
187
187
|
/**
|
|
188
188
|
*
|
|
189
|
-
*
|
|
189
|
+
* Create a new connector secret. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/CreateSecret) for more details.
|
|
190
190
|
* @throws {RESTError}
|
|
191
191
|
*/
|
|
192
192
|
async createSecret({ clusterUuid, secretName, secretValue, }) {
|
|
@@ -200,7 +200,7 @@ class AdminApiClient {
|
|
|
200
200
|
}
|
|
201
201
|
/**
|
|
202
202
|
*
|
|
203
|
-
*
|
|
203
|
+
* Delete a connector secret. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/DeleteSecret) for more details.
|
|
204
204
|
* @throws {RESTError}
|
|
205
205
|
*/
|
|
206
206
|
async deleteSecret(clusterUuid, secretName) {
|
|
@@ -214,7 +214,7 @@ class AdminApiClient {
|
|
|
214
214
|
}
|
|
215
215
|
/**
|
|
216
216
|
*
|
|
217
|
-
*
|
|
217
|
+
* Add one or more IPs to the whitelist for the cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/UpdateIpWhitelist) for more details.
|
|
218
218
|
* @throws {RESTError}
|
|
219
219
|
* @param ipwhitelist
|
|
220
220
|
* @returns
|
|
@@ -233,7 +233,7 @@ class AdminApiClient {
|
|
|
233
233
|
}
|
|
234
234
|
/**
|
|
235
235
|
*
|
|
236
|
-
*
|
|
236
|
+
* Retrieve a list of members and pending invites for your organisation. See the [API Documentation]() for more details.
|
|
237
237
|
* @throws {RESTError}
|
|
238
238
|
*/
|
|
239
239
|
async getUsers() {
|
|
@@ -247,7 +247,7 @@ class AdminApiClient {
|
|
|
247
247
|
}
|
|
248
248
|
/**
|
|
249
249
|
*
|
|
250
|
-
*
|
|
250
|
+
* Add a member. See the [API Documentation]() for more details.
|
|
251
251
|
* @throws {RESTError}
|
|
252
252
|
*
|
|
253
253
|
*/
|
|
@@ -263,7 +263,7 @@ class AdminApiClient {
|
|
|
263
263
|
}
|
|
264
264
|
/**
|
|
265
265
|
*
|
|
266
|
-
*
|
|
266
|
+
* Delete a member from your organization. See the [API Documentation]() for more details.
|
|
267
267
|
* @throws {RESTError}
|
|
268
268
|
*
|
|
269
269
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminApiClient.js","sourceRoot":"","sources":["../../../src/admin/lib/AdminApiClient.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAqB;AACrB,8CAAqB;AAErB,mCAYkB;AAKlB,MAAM,KAAK,GAAG,IAAA,eAAC,EAAC,sBAAsB,CAAC,CAAA;AAEvC;;;GAGG;AACH,MAAa,cAAc;IAK1B,YAAY,OAGX;QACA,MAAM,MAAM,GAAG,oCAA8B,CAAC,0BAA0B,CACvE,OAAO,EAAE,MAAM,IAAI,EAAE,CACrB,CAAA;QACD,MAAM,SAAS,GAAG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AM,IAAI,CAAC,IAAI,CAAA;QAC5B,OAAO,IAAI;aACT,GAAG,CAAC,SAAS,EAAE;YACf,OAAO;SACP,CAAC;aACD,IAAI,EAAE,CAAA;IACT,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,YAAY,CACjB,KAAa,EACb,QAAgC;QAEhC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,UAAU,EAAE,CAAA;QACvC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAA;QAC5B,OAAO,IAAI;aACT,IAAI,CAAC,WAAW,KAAK,EAAE,EAAE;YACzB,OAAO;YACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;SAClC,CAAC;aACD,IAAI,EAAE,CAAA;IACT,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,YAAY,CAAC,KAAa;QAC/B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,UAAU,EAAE,CAAA;QACvC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAA;QAC5B,OAAO,IAAI;aACT,MAAM,CAAC,WAAW,KAAK,EAAE,EAAE;YAC3B,OAAO;SACP,CAAC;aACD,IAAI,EAAE,CAAA;IACT,CAAC;CACD;AAxUD,wCAwUC"}
|
package/dist/c8/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { CamundaRestClient } from './lib/CamundaRestClient';
|
|
|
11
11
|
/**
|
|
12
12
|
* A single point of configuration for all Camunda Platform 8 clients.
|
|
13
13
|
*
|
|
14
|
-
* This class is a
|
|
14
|
+
* This class is a factory for all the clients in the Camunda Platform 8 SDK. It allows a single point of configuration for all clients.
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* ```typescript
|
|
@@ -41,8 +41,19 @@ export declare class Camunda8 {
|
|
|
41
41
|
log: Logger;
|
|
42
42
|
/**
|
|
43
43
|
* All constructor parameters for configuration are optional. If no configuration is provided, the SDK will use environment variables to configure itself.
|
|
44
|
+
* See {@link CamundaSDKConfiguration} for the complete list of configuration parameters. Values can be passed in explicitly in code, or set via environment variables (recommended: separate configuration and application logic).
|
|
45
|
+
* Explicitly set values will override environment variables, which are merged into the configuration.
|
|
44
46
|
*/
|
|
45
|
-
constructor(
|
|
47
|
+
constructor(
|
|
48
|
+
/**
|
|
49
|
+
* Optional explicit overrides. With no configuration, the SDK will use environment variables to configure itself.
|
|
50
|
+
*/
|
|
51
|
+
config?: Camunda8ClientConfiguration & {
|
|
52
|
+
/**
|
|
53
|
+
* An optional {@link IOAuthProvider} implementation. This can be used to add headers to REST requests made by the SDK.
|
|
54
|
+
* In most cases, you will not need to supply this. You can use `CAMUNDA_AUTH_STRATEGY` and appropriate config values to configure
|
|
55
|
+
* a preconfigured auth strategy. This configuration parameter is provided for advanced use-cases.
|
|
56
|
+
**/
|
|
46
57
|
oAuthProvider?: IOAuthProvider;
|
|
47
58
|
});
|
|
48
59
|
/**
|
package/dist/c8/index.js
CHANGED
|
@@ -13,7 +13,7 @@ const CamundaRestClient_1 = require("./lib/CamundaRestClient");
|
|
|
13
13
|
/**
|
|
14
14
|
* A single point of configuration for all Camunda Platform 8 clients.
|
|
15
15
|
*
|
|
16
|
-
* This class is a
|
|
16
|
+
* This class is a factory for all the clients in the Camunda Platform 8 SDK. It allows a single point of configuration for all clients.
|
|
17
17
|
*
|
|
18
18
|
* @example
|
|
19
19
|
* ```typescript
|
|
@@ -32,8 +32,14 @@ const CamundaRestClient_1 = require("./lib/CamundaRestClient");
|
|
|
32
32
|
class Camunda8 {
|
|
33
33
|
/**
|
|
34
34
|
* All constructor parameters for configuration are optional. If no configuration is provided, the SDK will use environment variables to configure itself.
|
|
35
|
+
* See {@link CamundaSDKConfiguration} for the complete list of configuration parameters. Values can be passed in explicitly in code, or set via environment variables (recommended: separate configuration and application logic).
|
|
36
|
+
* Explicitly set values will override environment variables, which are merged into the configuration.
|
|
35
37
|
*/
|
|
36
|
-
constructor(
|
|
38
|
+
constructor(
|
|
39
|
+
/**
|
|
40
|
+
* Optional explicit overrides. With no configuration, the SDK will use environment variables to configure itself.
|
|
41
|
+
*/
|
|
42
|
+
config = {}) {
|
|
37
43
|
this.configuration =
|
|
38
44
|
lib_1.CamundaEnvironmentConfigurator.mergeConfigWithEnvironment(config);
|
|
39
45
|
// Allow custom oAuthProvider to be passed in.
|
package/dist/c8/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/c8/index.ts"],"names":[],"mappings":";;;AAAA,oCAAyC;AACzC,gCAKe;AACf,wCAA6C;AAE7C,wCAA6C;AAC7C,0CAA+C;AAC/C,0CAA+C;AAC/C,oCAA2D;AAE3D,6CAAkD;AAClD,+DAA2D;AAE3D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAa,QAAQ;IAapB;;OAEG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/c8/index.ts"],"names":[],"mappings":";;;AAAA,oCAAyC;AACzC,gCAKe;AACf,wCAA6C;AAE7C,wCAA6C;AAC7C,0CAA+C;AAC/C,0CAA+C;AAC/C,oCAA2D;AAE3D,6CAAkD;AAClD,+DAA2D;AAE3D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAa,QAAQ;IAapB;;;;OAIG;IAEH;IACC;;OAEG;IACH,SAOI,EAAE;QAEN,IAAI,CAAC,aAAa;YACjB,oCAA8B,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAAA;QAClE,8CAA8C;QAC9C,8DAA8D;QAC9D,IAAI,CAAC,aAAa;YACjB,MAAM,CAAC,aAAa,IAAI,IAAA,4BAAsB,EAAC,IAAI,CAAC,aAAa,CAAC,CAAA;QACnE,IAAI,CAAC,GAAG,GAAG,IAAA,oBAAS,EAAC,MAAM,CAAC,CAAA;QAC5B,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAA;IAC3C,CAAC;IAED;;;OAGG;IACI,mBAAm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IAAI,CAAC,iBAAiB,GAAG,IAAI,qCAAiB,CAAC;gBAC9C,MAAM,EAAE,EAAE,GAAG,IAAI,CAAC,aAAa,EAAE,GAAG,MAAM,EAAE;gBAC5C,aAAa,EAAE,IAAI,CAAC,aAAa;aACjC,CAAC,CAAA;QACH,CAAC;QACD,OAAO,IAAI,CAAC,iBAAiB,CAAA;IAC9B,CAAC;CACD;AAxKD,4BAwKC"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import winston from 'winston';
|
|
2
2
|
import { Camunda8ClientConfiguration } from '../../lib';
|
|
3
|
+
/**
|
|
4
|
+
* This is the interface for the logger used in the SDK.
|
|
5
|
+
* It is based on the Winston logger and provides methods for logging at different levels.
|
|
6
|
+
* You can use this interface to create your own logger that implements the same methods.
|
|
7
|
+
*/
|
|
3
8
|
export type Logger = {
|
|
4
9
|
info: (message: string | undefined, ...meta: any[]) => void;
|
|
5
10
|
warn: (message: string | undefined, ...meta: any[]) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"C8Logger.js","sourceRoot":"","sources":["../../../src/c8/lib/C8Logger.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAA6C,CAAC,iBAAiB;AAE/D,mCAGkB;
|
|
1
|
+
{"version":3,"file":"C8Logger.js","sourceRoot":"","sources":["../../../src/c8/lib/C8Logger.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAA6C,CAAC,iBAAiB;AAE/D,mCAGkB;AAiBlB,IAAI,aAAqB,CAAA;AACzB,IAAI,YAAgC,CAAA;AAEpC,SAAgB,SAAS,CAAC,MAAoC;IAC7D,MAAM,aAAa,GAClB,oCAA8B,CAAC,0BAA0B,CAAC,MAAM,IAAI,EAAE,CAAC,CAAA;IACxE,wIAAwI;IACxI,IAAI,MAAM,EAAE,MAAM,IAAI,YAAY,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC;QACtD,YAAY,GAAG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
|
22
22
|
export interface CamundaJobWorkerConfig<VariablesDto extends LosslessDto, CustomHeadersDto extends LosslessDto> extends ActivateJobsRequest {
|
|
23
|
+
/** An optional {@link LosslessDto} class to decode the job variables. This provides both runtime safety for `int64` numbers and design-time type hinting. */
|
|
23
24
|
inputVariableDto?: Ctor<VariablesDto>;
|
|
25
|
+
/** An optional {@link LosslessDto} class to decode the job custom headers. This provides both runtime safety for `int64` numbers and design-time type hinting. */
|
|
24
26
|
customHeadersDto?: Ctor<CustomHeadersDto>;
|
|
25
|
-
/** How often the worker will poll for new jobs. Defaults to 300ms */
|
|
27
|
+
/** How often the worker will poll for new jobs. Defaults to 300ms. */
|
|
26
28
|
pollIntervalMs?: number;
|
|
29
|
+
/**
|
|
30
|
+
* A callback function that is invoked for an activated job. All return paths must return the output from one of the job acknowledgement methods.
|
|
31
|
+
* This is done to ensure that job handlers do not have logic paths that neglect to acknowledge the job.
|
|
32
|
+
*/
|
|
27
33
|
jobHandler: (job: RestJob<VariablesDto, CustomHeadersDto> & JobCompletionInterfaceRest<IProcessVariables>, log: Logger) => MustReturnJobActionAcknowledgement;
|
|
34
|
+
/** An optional logger instance. */
|
|
28
35
|
logger?: Logger;
|
|
29
36
|
/** Default: true. Start the worker polling immediately. If set to `false`, call the worker's `start()` method to start polling for work. */
|
|
30
37
|
autoStart?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* The worker will back off polling for jobs if the poll request fails. This is to prevent overwhelming the broker with requests.
|
|
40
|
+
* The backoff time will double with each failed request, up to the maximum backoff time.
|
|
41
|
+
* The backoff time will be reset to the initial poll interval when a successful request is made.
|
|
42
|
+
* This can be set explicitly here, or it will be set to the value of `CAMUNDA_JOB_WORKER_MAX_BACKOFF_MS` in the environment.
|
|
43
|
+
*/
|
|
31
44
|
maxBackoffTimeMs?: number;
|
|
32
45
|
}
|
|
33
46
|
declare const CamundaJobWorker_base: new () => TypedEmitter<CamundaJobWorkerEvents>;
|