@camunda8/sdk 8.7.5 → 8.7.7

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 (80) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +99 -55
  3. package/dist/admin/lib/AdminApiClient.d.ts +16 -16
  4. package/dist/admin/lib/AdminApiClient.js +16 -16
  5. package/dist/c8/index.d.ts +16 -2
  6. package/dist/c8/index.js +12 -3
  7. package/dist/c8/index.js.map +1 -1
  8. package/dist/c8/lib/C8Logger.d.ts +5 -0
  9. package/dist/c8/lib/C8Logger.js.map +1 -1
  10. package/dist/c8/lib/CamundaJobWorker.d.ts +14 -1
  11. package/dist/c8/lib/CamundaJobWorker.js.map +1 -1
  12. package/dist/c8/lib/CamundaRestClient.d.ts +67 -5
  13. package/dist/c8/lib/CamundaRestClient.js +1 -8
  14. package/dist/c8/lib/CamundaRestClient.js.map +1 -1
  15. package/dist/c8/lib/RestApiJobClassFactory.js +6 -0
  16. package/dist/c8/lib/RestApiJobClassFactory.js.map +1 -1
  17. package/dist/index.d.ts +12 -1
  18. package/dist/index.js +14 -2
  19. package/dist/index.js.map +1 -1
  20. package/dist/lib/Configuration.d.ts +93 -81
  21. package/dist/lib/Configuration.js +112 -69
  22. package/dist/lib/Configuration.js.map +1 -1
  23. package/dist/lib/ConstructOAuthProvider.d.ts +1 -1
  24. package/dist/lib/CreateDtoInstance.d.ts +2 -2
  25. package/dist/lib/CreateDtoInstance.js +2 -2
  26. package/dist/lib/EnvironmentSetup.d.ts +3 -2
  27. package/dist/lib/EnvironmentSetup.js +18 -15
  28. package/dist/lib/EnvironmentSetup.js.map +1 -1
  29. package/dist/lib/LosslessJsonParser.d.ts +12 -2
  30. package/dist/lib/LosslessJsonParser.js +12 -2
  31. package/dist/lib/LosslessJsonParser.js.map +1 -1
  32. package/dist/lib/RequireConfiguration.d.ts +2 -2
  33. package/dist/lib/RequireConfiguration.js +1 -1
  34. package/dist/lib/RequireConfiguration.js.map +1 -1
  35. package/dist/lib/index.d.ts +0 -1
  36. package/dist/lib/index.js +0 -1
  37. package/dist/lib/index.js.map +1 -1
  38. package/dist/modeler/lib/ModelerAPIClient.d.ts +7 -1
  39. package/dist/modeler/lib/ModelerAPIClient.js +7 -1
  40. package/dist/modeler/lib/ModelerAPIClient.js.map +1 -1
  41. package/dist/oauth/index.d.ts +7 -0
  42. package/dist/oauth/index.js +5 -1
  43. package/dist/oauth/index.js.map +1 -1
  44. package/dist/oauth/lib/BasicAuthProvider.d.ts +5 -0
  45. package/dist/oauth/lib/BasicAuthProvider.js +5 -0
  46. package/dist/oauth/lib/BasicAuthProvider.js.map +1 -1
  47. package/dist/oauth/lib/BearerAuthProvider.d.ts +29 -1
  48. package/dist/oauth/lib/BearerAuthProvider.js +29 -1
  49. package/dist/oauth/lib/BearerAuthProvider.js.map +1 -1
  50. package/dist/oauth/lib/CookieAuthProvider.d.ts +17 -0
  51. package/dist/oauth/lib/CookieAuthProvider.js +22 -1
  52. package/dist/oauth/lib/CookieAuthProvider.js.map +1 -1
  53. package/dist/oauth/lib/IOAuthProvider.d.ts +56 -2
  54. package/dist/oauth/lib/NullAuthProvider.d.ts +6 -0
  55. package/dist/oauth/lib/NullAuthProvider.js +6 -0
  56. package/dist/oauth/lib/NullAuthProvider.js.map +1 -1
  57. package/dist/oauth/lib/OAuthProvider.d.ts +22 -0
  58. package/dist/oauth/lib/OAuthProvider.js +22 -0
  59. package/dist/oauth/lib/OAuthProvider.js.map +1 -1
  60. package/dist/operate/lib/OperateApiClient.d.ts +16 -13
  61. package/dist/operate/lib/OperateApiClient.js +16 -13
  62. package/dist/operate/lib/OperateApiClient.js.map +1 -1
  63. package/dist/optimize/lib/APIObjects.d.ts +9 -9
  64. package/dist/optimize/lib/OptimizeApiClient.d.ts +16 -14
  65. package/dist/optimize/lib/OptimizeApiClient.js +16 -14
  66. package/dist/optimize/lib/OptimizeApiClient.js.map +1 -1
  67. package/dist/tasklist/lib/TasklistApiClient.d.ts +13 -10
  68. package/dist/tasklist/lib/TasklistApiClient.js +13 -10
  69. package/dist/tasklist/lib/TasklistApiClient.js.map +1 -1
  70. package/dist/zeebe/lib/GrpcClient.js +6 -2
  71. package/dist/zeebe/lib/GrpcClient.js.map +1 -1
  72. package/dist/zeebe/zb/ZeebeGrpcClient.d.ts +33 -23
  73. package/dist/zeebe/zb/ZeebeGrpcClient.js +54 -23
  74. package/dist/zeebe/zb/ZeebeGrpcClient.js.map +1 -1
  75. package/dist/zeebe/zb/ZeebeRESTClient.d.ts +1 -1
  76. package/dist/zeebe/zb/ZeebeRESTClient.js +1 -1
  77. package/package.json +6 -5
  78. package/dist/lib/SuppressZeebeLogging.d.ts +0 -2
  79. package/dist/lib/SuppressZeebeLogging.js +0 -14
  80. package/dist/lib/SuppressZeebeLogging.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ## [8.7.7](https://github.com/camunda/camunda-8-js-sdk/compare/v8.7.6...v8.7.7) (2025-05-12)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * 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))
7
+ * refactor tests for configuration change ([4b33ad4](https://github.com/camunda/camunda-8-js-sdk/commit/4b33ad45f3e5bebf02801b535c5bc38252bf938a))
8
+
9
+ ## [8.7.6](https://github.com/camunda/camunda-8-js-sdk/compare/v8.7.5...v8.7.6) (2025-05-08)
10
+
11
+
12
+ ### Features
13
+
14
+ * enable arbitrary headers on requests. fixes [#448](https://github.com/camunda/camunda-8-js-sdk/issues/448) ([e07ab76](https://github.com/camunda/camunda-8-js-sdk/commit/e07ab7629ef55f124242eed0c8fb27279c3b76a2))
15
+
1
16
  ## [8.7.5](https://github.com/camunda/camunda-8-js-sdk/compare/v8.7.4...v8.7.5) (2025-05-07)
2
17
 
3
18
 
package/README.md CHANGED
@@ -66,47 +66,20 @@ For `int64` values whose type is not known ahead of time, such as job variables,
66
66
 
67
67
  ## Authorization
68
68
 
69
- Calls to APIs can be authorized using basic auth or via OAuth - a token that is obtained via a client id/secret pair exchange.
69
+ 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
70
 
71
- ### Disable OAuth
71
+ - 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.
72
+ - 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.
73
+ - 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.
74
+ - 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.
75
+ - 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.
76
+ - You can also disable header auth completely and use mTLS (client certificate) — or no authentication at all — with the `NONE` strategy.
72
77
 
73
- To disable OAuth, set the environment variable `CAMUNDA_OAUTH_DISABLED=true`. You can use this when running against a minimal Zeebe broker in a development environment, for example. You can also use this when your authentication is being done using an x509 mTLS certificate.
78
+ For more details on each of these scenarios, see the relevant section below.
74
79
 
75
- ### Basic Auth
76
-
77
- To use basic auth, set the following values either via the environment or explicitly in code via the constructor:
78
-
79
- ```bash
80
- CAMUNDA_AUTH_STRATEGY=BASIC
81
- CAMUNDA_BASIC_AUTH_USERNAME=....
82
- CAMUNDA_BASIC_AUTH_PASSWORD=...
83
- ```
84
-
85
- ### Bearer Token Auth
80
+ ### Disable Auth
86
81
 
87
- To use a Bearer token that you have already obtained, set the following value:
88
-
89
- ```bash
90
- CAMUNDA_AUTH_STRATEGY=BEARER
91
- CAMUNDA_OAUTH_TOKEN=....
92
- ```
93
-
94
- To refresh the bearer token dynamically at runtime (for example, when it has expired), call `CamundaRestClient.setBearerToken(newTokenValue)`. This will also update the bearer token for all workers created by this client.
95
-
96
- ### Cookie Auth
97
-
98
- For C8Run with 8.7, you need to use [Cookie Authentication](https://docs.camunda.io/docs/apis-tools/camunda-api-rest/camunda-api-rest-authentication/#authentication-via-cookie-c8run-only).
99
-
100
- To use cookie auth, set the following value:
101
-
102
- ```
103
- CAMUNDA_AUTH_STRATEGY=COOKIE
104
-
105
- # Optional configurable values - these are the defaults
106
- CAMUNDA_AUTH_COOKIE_URL=http://localhost:8080/api/login
107
- CAMUNDA_AUTH_COOKIE_USERNAME=demo
108
- CAMUNDA_AUTH_COOKIE_PASSWORD=demo
109
- ```
82
+ To disable Auth, set the environment variable `CAMUNDA_AUTH_STRATEGY=NONE`. You can use this when running against a minimal Zeebe broker in a development environment, for example. You can also use this when your authentication is being done using an x509 mTLS certificate (see the section on mTLS).
110
83
 
111
84
  ### OAuth
112
85
 
@@ -114,7 +87,7 @@ If your platform is secured with OAuth token exchange (Camunda SaaS or Self-Mana
114
87
 
115
88
  ```bash
116
89
  CAMUNDA_AUTH_STRATEGY=OAUTH
117
- ZEEBE_GRPC_ADDRESS=...
90
+ ZEEBE_ADDRESS=...
118
91
  ZEEBE_CLIENT_ID=...
119
92
  ZEEBE_CLIENT_SECRET=...
120
93
  CAMUNDA_OAUTH_URL=...
@@ -148,6 +121,77 @@ const c8 = new Camunda8({
148
121
 
149
122
  If the cache directory does not exist, the SDK will attempt to create it (recursively). If the SDK is unable to create it, or the directory exists but is not writeable by your application, the SDK will throw an exception.
150
123
 
124
+ ### Basic Auth
125
+
126
+ To use basic auth, set the following values either via the environment or explicitly in code via the constructor:
127
+
128
+ ```bash
129
+ CAMUNDA_AUTH_STRATEGY=BASIC
130
+ CAMUNDA_BASIC_AUTH_USERNAME=....
131
+ CAMUNDA_BASIC_AUTH_PASSWORD=...
132
+ ```
133
+
134
+ ### Cookie Auth
135
+
136
+ For C8Run with 8.7, you need to use [Cookie Authentication](https://docs.camunda.io/docs/apis-tools/camunda-api-rest/camunda-api-rest-authentication/#authentication-via-cookie-c8run-only).
137
+
138
+ To use cookie auth, set the following value:
139
+
140
+ ```
141
+ CAMUNDA_AUTH_STRATEGY=COOKIE
142
+
143
+ # Optional configurable values - these are the defaults
144
+ CAMUNDA_AUTH_COOKIE_URL=http://localhost:8080/api/login
145
+ CAMUNDA_AUTH_COOKIE_USERNAME=demo
146
+ CAMUNDA_AUTH_COOKIE_PASSWORD=demo
147
+ ```
148
+
149
+ ### Bearer Token Auth
150
+
151
+ The BEARER auth strategy is provided as a low-level primitive for advanced use-cases that are not covered by the others. In this case, you need to pass an `authorization` header with a `Bearer` token on requests, but it is not issued by a supported OAuth token exchange endpoint. In this case, you can implement a token exchange mechanism and manage the lifecycle of the token, and dynamically inject it as a header through a `BearerAuthProvider`.
152
+
153
+ To use a Bearer token that you have already obtained, and that does not need to be dynamically updated during the lifetime of the application, simply set the following values:
154
+
155
+ ```bash
156
+ CAMUNDA_AUTH_STRATEGY=BEARER
157
+ CAMUNDA_OAUTH_TOKEN=....
158
+ ```
159
+
160
+ To refresh the bearer token dynamically at runtime (for example, when it has expired and your obtain a new one), you pass in a `BearerAuthProvider` that you control:
161
+
162
+ ```typescript
163
+ import { Camunda8, Auth } from '@camunda8/sdk'
164
+
165
+ const bearerAuth = new Auth.BearerAuthProvider()
166
+ const c8 = new Camunda8({ oauthProvider: bearerAuth }) // All clients and workers will use bearerAuth
167
+ // ... after obtaining a new token
168
+ bearerAuth.setToken('SOMETOKENVALUE....') // Dynamically update the bearer token value
169
+ ```
170
+
171
+ ### Advanced Custom Headers
172
+
173
+ You can add arbitrary headers to all requests by implementing `IOAuthProvider`:
174
+
175
+ ```typescript
176
+ import { Camunda8, Auth } from '@camunda8/sdk'
177
+
178
+ class MyCustomAuthProvider implements Auth.IOAuthProvider {
179
+ async getToken(audience: string) {
180
+ // here we give a static example, but this class may read configuration,
181
+ // exchange credentials with an endpoint, manage token lifecycles, and so forth...
182
+ // Return an object which will be merged with the headers on the request
183
+ return {
184
+ 'x-custom-auth-header': 'someCustomValue',
185
+ }
186
+ }
187
+ }
188
+
189
+ const customAuthProvider = new MyCustomAuthProvider()
190
+ const c8 = new Camunda8({ oauthProvider: customAuthProvider })
191
+ ```
192
+
193
+ You can use this approach to wrap one of the existing strategy classes using a facade pattern to encapsulate and extend it.
194
+
151
195
  ## TLS
152
196
 
153
197
  If you are using self-signed certificates, you can provide the self-signed certificate path using the configuration parameter / environment variable: `CAMUNDA_CUSTOM_ROOT_CERT_PATH`.
@@ -169,7 +213,7 @@ This is the complete environment configuration needed to run against the Dockeri
169
213
 
170
214
  ```bash
171
215
  # Self-Managed
172
- export ZEEBE_GRPC_ADDRESS='localhost:26500'
216
+ export ZEEBE_ADDRESS='localhost:26500'
173
217
  export ZEEBE_REST_ADDRESS='http://localhost:8080'
174
218
  export ZEEBE_CLIENT_ID='zeebe'
175
219
  export ZEEBE_CLIENT_SECRET='zecret'
@@ -200,7 +244,7 @@ Here is an example of doing this via the constructor, rather than via the enviro
200
244
  import { Camunda8 } from '@camunda8/sdk'
201
245
 
202
246
  const c8 = new Camunda8({
203
- ZEEBE_GRPC_ADDRESS: 'localhost:26500',
247
+ ZEEBE_ADDRESS: 'localhost:26500',
204
248
  ZEEBE_REST_ADDRESS: 'http://localhost:8080',
205
249
  ZEEBE_CLIENT_ID: 'zeebe',
206
250
  ZEEBE_CLIENT_SECRET: 'zecret',
@@ -221,7 +265,7 @@ const c8 = new Camunda8({
221
265
  Here is a complete configuration example for connection to Camunda SaaS:
222
266
 
223
267
  ```bash
224
- export ZEEBE_GRPC_ADDRESS='5c34c0a7-7f29-4424-8414-125615f7a9b9.syd-1.zeebe.camunda.io:443'
268
+ export ZEEBE_ADDRESS='5c34c0a7-7f29-4424-8414-125615f7a9b9.syd-1.zeebe.camunda.io:443'
225
269
  export ZEEBE_REST_ADDRESS='https://syd-1.zeebe.camunda.io/5c34c0a7-7f29-4424-8414-125615f7a9b9'
226
270
  export ZEEBE_CLIENT_ID='yvvURO9TmBnP3zx4Xd8Ho6apgeiZTjn6'
227
271
  export ZEEBE_CLIENT_SECRET='iJJu-SHgUtuJTTAMnMLdcb8WGF8s2mHfXhXutEwe8eSbLXn98vUpoxtuLk5uG0en'
@@ -247,6 +291,7 @@ export CAMUNDA_CONSOLE_OAUTH_AUDIENCE='api.cloud.camunda.io'
247
291
  The SDK uses a Winston / Pino compatible logging setup. By default it uses Winston.
248
292
 
249
293
  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`.
294
+
250
295
  ### Custom logger
251
296
 
252
297
  You can supply a custom logger via the constructor. For example, to use the [Pino](https://getpino.io/) logging library:
@@ -261,7 +306,7 @@ const logger = pino({ level }) // Logging level controlled via the logging libra
261
306
 
262
307
  logger.info('Pino logger created')
263
308
  const c8 = new Camunda8({
264
- logger,
309
+ logger,
265
310
  })
266
311
  c8.log.info('Using pino logger')
267
312
  ```
@@ -272,18 +317,18 @@ The SDK uses the [`debug`](https://github.com/debug-js/debug) library to help yo
272
317
 
273
318
  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:
274
319
 
275
- | Value | Component |
276
- | ---------------------- | -------------------- |
277
- | `camunda:adminconsole` | Administration API |
278
- | `camunda:modeler` | Modeler API |
279
- | `camunda:operate` | Operate API |
280
- | `camunda:optimize` | Optimize API |
281
- | `camunda:tasklist` | Tasklist API |
282
- | `camunda:oauth` | OAuth Token Exchange |
283
- | `camunda:grpc` | Zeebe gRPC channel |
284
- | `camunda:worker` | Zeebe Worker |
285
- | `camunda:worker:verbose`| Zeebe Worker (additional detail) |
286
- | `camunda:zeebeclient` | Zeebe Client |
320
+ | Value | Component |
321
+ | ------------------------ | -------------------------------- |
322
+ | `camunda:adminconsole` | Administration API |
323
+ | `camunda:modeler` | Modeler API |
324
+ | `camunda:operate` | Operate API |
325
+ | `camunda:optimize` | Optimize API |
326
+ | `camunda:tasklist` | Tasklist API |
327
+ | `camunda:oauth` | OAuth Token Exchange |
328
+ | `camunda:grpc` | Zeebe gRPC channel |
329
+ | `camunda:worker` | Zeebe Worker |
330
+ | `camunda:worker:verbose` | Zeebe Worker (additional detail) |
331
+ | `camunda:zeebeclient` | Zeebe Client |
287
332
 
288
333
  Here is an example of turning on debugging for the OAuth and Operate components:
289
334
 
@@ -408,4 +453,3 @@ When a polling worker encounters an error, including not being authenticated, th
408
453
  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...
409
454
 
410
455
  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.....
411
-
@@ -16,14 +16,14 @@ export declare class AdminApiClient {
16
16
  private getHeaders;
17
17
  /**
18
18
  *
19
- * @description 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.
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
- * @description 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.
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
- * @description 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.
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
- * @description See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/DeleteClient) for more details.
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
- * @description Return an array of clusters. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetClusters) for more details.
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
- * @description Create a new cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/CreateCluster) for more details.
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
- * @description Retrieve the metadata for a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetCluster) for more details.
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
- * @description Delete a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/DeleteCluster) for more details.
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
- * @description 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.
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
- * @description Retrieve the connector secrets. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetSecrets) for more details.
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
- * @description Create a new connector secret. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/CreateSecret) for more details.
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
- * @description Delete a connector secret. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/DeleteSecret) for more details.
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
- * @description 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.
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
- * @description Retrieve a list of members and pending invites for your organisation. See the [API Documentation]() for more details.
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
- * @description Add a member. See the [API Documentation]() for more details.
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
- * @description Delete a member from your organization. See the [API Documentation]() for more details.
135
+ * Delete a member from your organization. See the [API Documentation]() for more details.
136
136
  * @throws {RESTError}
137
137
  *
138
138
  */
@@ -48,7 +48,7 @@ class AdminApiClient {
48
48
  }
49
49
  /**
50
50
  *
51
- * @description 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.
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
- * @description 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.
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
- * @description 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.
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
- * @description See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/DeleteClient) for more details.
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
- * @description Return an array of clusters. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetClusters) for more details.
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
- * @description Create a new cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/CreateCluster) for more details.
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
- * @description Retrieve the metadata for a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetCluster) for more details.
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
- * @description Delete a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/DeleteCluster) for more details.
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
- * @description 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.
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
- * @description Retrieve the connector secrets. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetSecrets) for more details.
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
- * @description Create a new connector secret. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/CreateSecret) for more details.
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
- * @description Delete a connector secret. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/DeleteSecret) for more details.
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
- * @description 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.
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
- * @description Retrieve a list of members and pending invites for your organisation. See the [API Documentation]() for more details.
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
- * @description Add a member. See the [API Documentation]() for more details.
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
- * @description Delete a member from your organization. See the [API Documentation]() for more details.
266
+ * Delete a member from your organization. See the [API Documentation]() for more details.
267
267
  * @throws {RESTError}
268
268
  *
269
269
  */
@@ -1,6 +1,7 @@
1
1
  import { AdminApiClient } from '../admin';
2
2
  import { Camunda8ClientConfiguration } from '../lib';
3
3
  import { ModelerApiClient } from '../modeler';
4
+ import { IOAuthProvider } from '../oauth';
4
5
  import { OperateApiClient } from '../operate';
5
6
  import { OptimizeApiClient } from '../optimize';
6
7
  import { TasklistApiClient } from '../tasklist';
@@ -10,7 +11,7 @@ import { CamundaRestClient } from './lib/CamundaRestClient';
10
11
  /**
11
12
  * A single point of configuration for all Camunda Platform 8 clients.
12
13
  *
13
- * This class is a facade for all the clients in the Camunda Platform 8 SDK.
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.
14
15
  *
15
16
  * @example
16
17
  * ```typescript
@@ -40,8 +41,21 @@ export declare class Camunda8 {
40
41
  log: Logger;
41
42
  /**
42
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.
43
46
  */
44
- constructor(config?: Camunda8ClientConfiguration);
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
+ **/
57
+ oAuthProvider?: IOAuthProvider;
58
+ });
45
59
  /**
46
60
  * Returns a client for the "Operate REST API"
47
61
  * See: https://docs.camunda.io/docs/apis-tools/operate-api/overview/
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 facade for all the clients in the Camunda Platform 8 SDK.
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,11 +32,20 @@ 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(config = {}) {
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
- this.oAuthProvider = (0, lib_1.constructOAuthProvider)(this.configuration);
45
+ // Allow custom oAuthProvider to be passed in.
46
+ // See: https://github.com/camunda/camunda-8-js-sdk/issues/448
47
+ this.oAuthProvider =
48
+ config.oAuthProvider ?? (0, lib_1.constructOAuthProvider)(this.configuration);
40
49
  this.log = (0, C8Logger_1.getLogger)(config);
41
50
  this.log.debug('Camunda8 SDK initialized');
42
51
  }
@@ -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,+DA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AI,CAAC,eAAe,CAAA;IAC5B,CAAC;IAED;;;OAGG;IACI,oBAAoB,CAC1B,SAAsC,EAAE;QAExC,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC7B,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;AAYlB,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,MAAM,CAAC,MAAM,CAAA;QAC5B,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAA;IAC7C,CAAC;IACD,IAAI,CA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