@bpmnkit/api 0.0.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/README.md +150 -0
- package/dist/generated/admin-resources.d.ts +199 -0
- package/dist/generated/admin-resources.js +381 -0
- package/dist/generated/admin-types.d.ts +283 -0
- package/dist/generated/admin-types.js +4 -0
- package/dist/generated/resources.d.ts +1519 -0
- package/dist/generated/resources.js +2650 -0
- package/dist/generated/types.d.ts +11946 -0
- package/dist/generated/types.js +4 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +10 -0
- package/dist/runtime/auth.d.ts +31 -0
- package/dist/runtime/auth.js +136 -0
- package/dist/runtime/cache.d.ts +13 -0
- package/dist/runtime/cache.js +48 -0
- package/dist/runtime/cache.test.d.ts +2 -0
- package/dist/runtime/cache.test.js +38 -0
- package/dist/runtime/client.d.ts +25 -0
- package/dist/runtime/client.js +33 -0
- package/dist/runtime/config.d.ts +15 -0
- package/dist/runtime/config.js +371 -0
- package/dist/runtime/errors.d.ts +53 -0
- package/dist/runtime/errors.js +101 -0
- package/dist/runtime/errors.test.d.ts +2 -0
- package/dist/runtime/errors.test.js +40 -0
- package/dist/runtime/events.d.ts +12 -0
- package/dist/runtime/events.js +48 -0
- package/dist/runtime/events.test.d.ts +2 -0
- package/dist/runtime/events.test.js +57 -0
- package/dist/runtime/http.d.ts +15 -0
- package/dist/runtime/http.js +210 -0
- package/dist/runtime/logger.d.ts +9 -0
- package/dist/runtime/logger.js +34 -0
- package/dist/runtime/relations.d.ts +43 -0
- package/dist/runtime/relations.js +54 -0
- package/dist/runtime/retry.d.ts +14 -0
- package/dist/runtime/retry.js +41 -0
- package/dist/runtime/retry.test.d.ts +2 -0
- package/dist/runtime/retry.test.js +46 -0
- package/dist/runtime/token-cache.d.ts +42 -0
- package/dist/runtime/token-cache.js +104 -0
- package/dist/runtime/types.d.ts +191 -0
- package/dist/runtime/types.js +2 -0
- package/dist/runtime/yaml.d.ts +14 -0
- package/dist/runtime/yaml.js +234 -0
- package/dist/runtime/yaml.test.d.ts +2 -0
- package/dist/runtime/yaml.test.js +93 -0
- package/package.json +31 -0
|
@@ -0,0 +1,2650 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate.mjs
|
|
2
|
+
// Do not edit manually. Run `pnpm --filter @bpmnkit/api generate` to regenerate.
|
|
3
|
+
import { CamundaBaseClient } from "../runtime/client.js";
|
|
4
|
+
import { ResourceBase } from "../runtime/client.js";
|
|
5
|
+
// ── Audit Log ──
|
|
6
|
+
export class AuditLogResource extends ResourceBase {
|
|
7
|
+
/**
|
|
8
|
+
* Search audit logs
|
|
9
|
+
*
|
|
10
|
+
* Search for audit logs based on given criteria.
|
|
11
|
+
* @see POST /audit-logs/search
|
|
12
|
+
*/
|
|
13
|
+
async searchAuditLogs(body) {
|
|
14
|
+
return this._http.request({
|
|
15
|
+
method: "POST",
|
|
16
|
+
path: "/audit-logs/search",
|
|
17
|
+
body,
|
|
18
|
+
cacheable: true,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Get audit log
|
|
23
|
+
*
|
|
24
|
+
* Get an audit log entry by auditLogKey.
|
|
25
|
+
* @see GET /audit-logs/{auditLogKey}
|
|
26
|
+
*/
|
|
27
|
+
async getAuditLog(auditLogKey) {
|
|
28
|
+
return this._http.request({
|
|
29
|
+
method: "GET",
|
|
30
|
+
path: `/audit-logs/${auditLogKey}`,
|
|
31
|
+
cacheable: true,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
// ── Authentication ──
|
|
36
|
+
export class AuthenticationResource extends ResourceBase {
|
|
37
|
+
/**
|
|
38
|
+
* Get current user
|
|
39
|
+
*
|
|
40
|
+
* Retrieves the current authenticated user.
|
|
41
|
+
* @see GET /authentication/me
|
|
42
|
+
*/
|
|
43
|
+
async getAuthentication() {
|
|
44
|
+
return this._http.request({
|
|
45
|
+
method: "GET",
|
|
46
|
+
path: "/authentication/me",
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
// ── Authorization ──
|
|
51
|
+
export class AuthorizationResource extends ResourceBase {
|
|
52
|
+
/**
|
|
53
|
+
* Create authorization
|
|
54
|
+
*
|
|
55
|
+
* Create the authorization.
|
|
56
|
+
* @see POST /authorizations
|
|
57
|
+
*/
|
|
58
|
+
async createAuthorization(body) {
|
|
59
|
+
return this._http.request({
|
|
60
|
+
method: "POST",
|
|
61
|
+
path: "/authorizations",
|
|
62
|
+
body,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Search authorizations
|
|
67
|
+
*
|
|
68
|
+
* Search for authorizations based on given criteria.
|
|
69
|
+
* @see POST /authorizations/search
|
|
70
|
+
*/
|
|
71
|
+
async searchAuthorizations(body) {
|
|
72
|
+
return this._http.request({
|
|
73
|
+
method: "POST",
|
|
74
|
+
path: "/authorizations/search",
|
|
75
|
+
body,
|
|
76
|
+
cacheable: true,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Get authorization
|
|
81
|
+
*
|
|
82
|
+
* Get authorization by the given key.
|
|
83
|
+
* @see GET /authorizations/{authorizationKey}
|
|
84
|
+
*/
|
|
85
|
+
async getAuthorization(authorizationKey) {
|
|
86
|
+
return this._http.request({
|
|
87
|
+
method: "GET",
|
|
88
|
+
path: `/authorizations/${authorizationKey}`,
|
|
89
|
+
cacheable: true,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Update authorization
|
|
94
|
+
*
|
|
95
|
+
* Update the authorization with the given key.
|
|
96
|
+
* @see PUT /authorizations/{authorizationKey}
|
|
97
|
+
*/
|
|
98
|
+
async updateAuthorization(authorizationKey, body) {
|
|
99
|
+
return this._http.request({
|
|
100
|
+
method: "PUT",
|
|
101
|
+
path: `/authorizations/${authorizationKey}`,
|
|
102
|
+
body,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Delete authorization
|
|
107
|
+
*
|
|
108
|
+
* Deletes the authorization with the given key.
|
|
109
|
+
* @see DELETE /authorizations/{authorizationKey}
|
|
110
|
+
*/
|
|
111
|
+
async deleteAuthorization(authorizationKey) {
|
|
112
|
+
return this._http.request({
|
|
113
|
+
method: "DELETE",
|
|
114
|
+
path: `/authorizations/${authorizationKey}`,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
// ── Batch operation ──
|
|
119
|
+
export class BatchOperationResource extends ResourceBase {
|
|
120
|
+
/**
|
|
121
|
+
* Search batch operation items
|
|
122
|
+
*
|
|
123
|
+
* Search for batch operation items based on given criteria.
|
|
124
|
+
* @see POST /batch-operation-items/search
|
|
125
|
+
*/
|
|
126
|
+
async searchBatchOperationItems(body) {
|
|
127
|
+
return this._http.request({
|
|
128
|
+
method: "POST",
|
|
129
|
+
path: "/batch-operation-items/search",
|
|
130
|
+
body,
|
|
131
|
+
cacheable: true,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Search batch operations
|
|
136
|
+
*
|
|
137
|
+
* Search for batch operations based on given criteria.
|
|
138
|
+
* @see POST /batch-operations/search
|
|
139
|
+
*/
|
|
140
|
+
async searchBatchOperations(body) {
|
|
141
|
+
return this._http.request({
|
|
142
|
+
method: "POST",
|
|
143
|
+
path: "/batch-operations/search",
|
|
144
|
+
body,
|
|
145
|
+
cacheable: true,
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Get batch operation
|
|
150
|
+
*
|
|
151
|
+
* Get batch operation by key.
|
|
152
|
+
* @see GET /batch-operations/{batchOperationKey}
|
|
153
|
+
*/
|
|
154
|
+
async getBatchOperation(batchOperationKey) {
|
|
155
|
+
return this._http.request({
|
|
156
|
+
method: "GET",
|
|
157
|
+
path: `/batch-operations/${batchOperationKey}`,
|
|
158
|
+
cacheable: true,
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Cancel Batch operation
|
|
163
|
+
*
|
|
164
|
+
* Cancels a running batch operation.
|
|
165
|
+
* This is done asynchronously, the progress can be tracked using the batch operation status endpoint (/batch-operations/{batchOperationKey}).
|
|
166
|
+
* @see POST /batch-operations/{batchOperationKey}/cancellation
|
|
167
|
+
*/
|
|
168
|
+
async cancelBatchOperation(batchOperationKey) {
|
|
169
|
+
return this._http.request({
|
|
170
|
+
method: "POST",
|
|
171
|
+
path: `/batch-operations/${batchOperationKey}/cancellation`,
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Resume Batch operation
|
|
176
|
+
*
|
|
177
|
+
* Resumes a suspended batch operation.
|
|
178
|
+
* This is done asynchronously, the progress can be tracked using the batch operation status endpoint (/batch-operations/{batchOperationKey}).
|
|
179
|
+
* @see POST /batch-operations/{batchOperationKey}/resumption
|
|
180
|
+
*/
|
|
181
|
+
async resumeBatchOperation(batchOperationKey) {
|
|
182
|
+
return this._http.request({
|
|
183
|
+
method: "POST",
|
|
184
|
+
path: `/batch-operations/${batchOperationKey}/resumption`,
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Suspend Batch operation
|
|
189
|
+
*
|
|
190
|
+
* Suspends a running batch operation.
|
|
191
|
+
* This is done asynchronously, the progress can be tracked using the batch operation status endpoint (/batch-operations/{batchOperationKey}).
|
|
192
|
+
* @see POST /batch-operations/{batchOperationKey}/suspension
|
|
193
|
+
*/
|
|
194
|
+
async suspendBatchOperation(batchOperationKey) {
|
|
195
|
+
return this._http.request({
|
|
196
|
+
method: "POST",
|
|
197
|
+
path: `/batch-operations/${batchOperationKey}/suspension`,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
// ── Clock ──
|
|
202
|
+
export class ClockResource extends ResourceBase {
|
|
203
|
+
/**
|
|
204
|
+
* Pin internal clock (alpha)
|
|
205
|
+
*
|
|
206
|
+
* Set a precise, static time for the Zeebe engine's internal clock.
|
|
207
|
+
* When the clock is pinned, it remains at the specified time and does not advance.
|
|
208
|
+
* To change the time, the clock must be pinned again with a new timestamp.
|
|
209
|
+
* @see PUT /clock
|
|
210
|
+
*/
|
|
211
|
+
async pinClock(body) {
|
|
212
|
+
return this._http.request({
|
|
213
|
+
method: "PUT",
|
|
214
|
+
path: "/clock",
|
|
215
|
+
body,
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Reset internal clock (alpha)
|
|
220
|
+
*
|
|
221
|
+
* Resets the Zeebe engine's internal clock to the current system time, enabling it to tick in real-time.
|
|
222
|
+
* This operation is useful for returning the clock to
|
|
223
|
+
* normal behavior after it has been pinned to a specific time.
|
|
224
|
+
* @see POST /clock/reset
|
|
225
|
+
*/
|
|
226
|
+
async resetClock() {
|
|
227
|
+
return this._http.request({
|
|
228
|
+
method: "POST",
|
|
229
|
+
path: "/clock/reset",
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
// ── Cluster Variable ──
|
|
234
|
+
export class ClusterVariableResource extends ResourceBase {
|
|
235
|
+
/**
|
|
236
|
+
* Create a global-scoped cluster variable
|
|
237
|
+
*
|
|
238
|
+
* Create a global-scoped cluster variable.
|
|
239
|
+
* @see POST /cluster-variables/global
|
|
240
|
+
*/
|
|
241
|
+
async createGlobalClusterVariable(body) {
|
|
242
|
+
return this._http.request({
|
|
243
|
+
method: "POST",
|
|
244
|
+
path: "/cluster-variables/global",
|
|
245
|
+
body,
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Get a global-scoped cluster variable
|
|
250
|
+
*
|
|
251
|
+
* Get a global-scoped cluster variable.
|
|
252
|
+
* @see GET /cluster-variables/global/{name}
|
|
253
|
+
*/
|
|
254
|
+
async getGlobalClusterVariable(name) {
|
|
255
|
+
return this._http.request({
|
|
256
|
+
method: "GET",
|
|
257
|
+
path: `/cluster-variables/global/${name}`,
|
|
258
|
+
cacheable: true,
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Update a global-scoped cluster variable
|
|
263
|
+
*
|
|
264
|
+
* Updates the value of an existing global cluster variable.
|
|
265
|
+
* The variable must exist, otherwise a 404 error is returned.
|
|
266
|
+
* @see PUT /cluster-variables/global/{name}
|
|
267
|
+
*/
|
|
268
|
+
async updateGlobalClusterVariable(name, body) {
|
|
269
|
+
return this._http.request({
|
|
270
|
+
method: "PUT",
|
|
271
|
+
path: `/cluster-variables/global/${name}`,
|
|
272
|
+
body,
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Delete a global-scoped cluster variable
|
|
277
|
+
*
|
|
278
|
+
* Delete a global-scoped cluster variable.
|
|
279
|
+
* @see DELETE /cluster-variables/global/{name}
|
|
280
|
+
*/
|
|
281
|
+
async deleteGlobalClusterVariable(name) {
|
|
282
|
+
return this._http.request({
|
|
283
|
+
method: "DELETE",
|
|
284
|
+
path: `/cluster-variables/global/${name}`,
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
*
|
|
289
|
+
* Search for cluster variables based on given criteria. By default, long variable values in the response are truncated.
|
|
290
|
+
* @see POST /cluster-variables/search
|
|
291
|
+
*/
|
|
292
|
+
async searchClusterVariables(body, query) {
|
|
293
|
+
return this._http.request({
|
|
294
|
+
method: "POST",
|
|
295
|
+
path: "/cluster-variables/search",
|
|
296
|
+
body,
|
|
297
|
+
query: query,
|
|
298
|
+
cacheable: true,
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Create a tenant-scoped cluster variable
|
|
303
|
+
*
|
|
304
|
+
* Create a new cluster variable for the given tenant.
|
|
305
|
+
* @see POST /cluster-variables/tenants/{tenantId}
|
|
306
|
+
*/
|
|
307
|
+
async createTenantClusterVariable(tenantId, body) {
|
|
308
|
+
return this._http.request({
|
|
309
|
+
method: "POST",
|
|
310
|
+
path: `/cluster-variables/tenants/${tenantId}`,
|
|
311
|
+
body,
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Get a tenant-scoped cluster variable
|
|
316
|
+
*
|
|
317
|
+
* Get a tenant-scoped cluster variable.
|
|
318
|
+
* @see GET /cluster-variables/tenants/{tenantId}/{name}
|
|
319
|
+
*/
|
|
320
|
+
async getTenantClusterVariable(tenantId, name) {
|
|
321
|
+
return this._http.request({
|
|
322
|
+
method: "GET",
|
|
323
|
+
path: `/cluster-variables/tenants/${tenantId}/${name}`,
|
|
324
|
+
cacheable: true,
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Update a tenant-scoped cluster variable
|
|
329
|
+
*
|
|
330
|
+
* Updates the value of an existing tenant-scoped cluster variable.
|
|
331
|
+
* The variable must exist, otherwise a 404 error is returned.
|
|
332
|
+
* @see PUT /cluster-variables/tenants/{tenantId}/{name}
|
|
333
|
+
*/
|
|
334
|
+
async updateTenantClusterVariable(tenantId, name, body) {
|
|
335
|
+
return this._http.request({
|
|
336
|
+
method: "PUT",
|
|
337
|
+
path: `/cluster-variables/tenants/${tenantId}/${name}`,
|
|
338
|
+
body,
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Delete a tenant-scoped cluster variable
|
|
343
|
+
*
|
|
344
|
+
* Delete a tenant-scoped cluster variable.
|
|
345
|
+
* @see DELETE /cluster-variables/tenants/{tenantId}/{name}
|
|
346
|
+
*/
|
|
347
|
+
async deleteTenantClusterVariable(tenantId, name) {
|
|
348
|
+
return this._http.request({
|
|
349
|
+
method: "DELETE",
|
|
350
|
+
path: `/cluster-variables/tenants/${tenantId}/${name}`,
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
// ── Conditional ──
|
|
355
|
+
export class ConditionalResource extends ResourceBase {
|
|
356
|
+
/**
|
|
357
|
+
* Evaluate root level conditional start events
|
|
358
|
+
*
|
|
359
|
+
* Evaluates root-level conditional start events for process definitions.
|
|
360
|
+
* If the evaluation is successful, it will return the keys of all created process instances, along with their associated process definition key.
|
|
361
|
+
* Multiple root-level conditional start events of the same process definition can trigger if their conditions evaluate to true.
|
|
362
|
+
* @see POST /conditionals/evaluation
|
|
363
|
+
*/
|
|
364
|
+
async evaluateConditionals(body) {
|
|
365
|
+
return this._http.request({
|
|
366
|
+
method: "POST",
|
|
367
|
+
path: "/conditionals/evaluation",
|
|
368
|
+
body,
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
// ── Message subscription ──
|
|
373
|
+
export class MessageSubscriptionResource extends ResourceBase {
|
|
374
|
+
/**
|
|
375
|
+
* Search correlated message subscriptions
|
|
376
|
+
*
|
|
377
|
+
* Search correlated message subscriptions based on given criteria.
|
|
378
|
+
* @see POST /correlated-message-subscriptions/search
|
|
379
|
+
*/
|
|
380
|
+
async searchCorrelatedMessageSubscriptions(body) {
|
|
381
|
+
return this._http.request({
|
|
382
|
+
method: "POST",
|
|
383
|
+
path: "/correlated-message-subscriptions/search",
|
|
384
|
+
body,
|
|
385
|
+
cacheable: true,
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Search message subscriptions
|
|
390
|
+
*
|
|
391
|
+
* Search for message subscriptions based on given criteria.
|
|
392
|
+
* @see POST /message-subscriptions/search
|
|
393
|
+
*/
|
|
394
|
+
async searchMessageSubscriptions(body) {
|
|
395
|
+
return this._http.request({
|
|
396
|
+
method: "POST",
|
|
397
|
+
path: "/message-subscriptions/search",
|
|
398
|
+
body,
|
|
399
|
+
cacheable: true,
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
// ── Decision definition ──
|
|
404
|
+
export class DecisionDefinitionResource extends ResourceBase {
|
|
405
|
+
/**
|
|
406
|
+
* Evaluate decision
|
|
407
|
+
*
|
|
408
|
+
* Evaluates a decision.
|
|
409
|
+
* You specify the decision to evaluate either by using its unique key (as returned by
|
|
410
|
+
* DeployResource), or using the decision ID. When using the decision ID, the latest deployed
|
|
411
|
+
* @see POST /decision-definitions/evaluation
|
|
412
|
+
*/
|
|
413
|
+
async evaluateDecision(body) {
|
|
414
|
+
return this._http.request({
|
|
415
|
+
method: "POST",
|
|
416
|
+
path: "/decision-definitions/evaluation",
|
|
417
|
+
body,
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Search decision definitions
|
|
422
|
+
*
|
|
423
|
+
* Search for decision definitions based on given criteria.
|
|
424
|
+
* @see POST /decision-definitions/search
|
|
425
|
+
*/
|
|
426
|
+
async searchDecisionDefinitions(body) {
|
|
427
|
+
return this._http.request({
|
|
428
|
+
method: "POST",
|
|
429
|
+
path: "/decision-definitions/search",
|
|
430
|
+
body,
|
|
431
|
+
cacheable: true,
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* Get decision definition
|
|
436
|
+
*
|
|
437
|
+
* Returns a decision definition by key.
|
|
438
|
+
* @see GET /decision-definitions/{decisionDefinitionKey}
|
|
439
|
+
*/
|
|
440
|
+
async getDecisionDefinition(decisionDefinitionKey) {
|
|
441
|
+
return this._http.request({
|
|
442
|
+
method: "GET",
|
|
443
|
+
path: `/decision-definitions/${decisionDefinitionKey}`,
|
|
444
|
+
cacheable: true,
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Get decision definition XML
|
|
449
|
+
*
|
|
450
|
+
* Returns decision definition as XML.
|
|
451
|
+
* @see GET /decision-definitions/{decisionDefinitionKey}/xml
|
|
452
|
+
*/
|
|
453
|
+
async getDecisionDefinitionXML(decisionDefinitionKey) {
|
|
454
|
+
return this._http.request({
|
|
455
|
+
method: "GET",
|
|
456
|
+
path: `/decision-definitions/${decisionDefinitionKey}/xml`,
|
|
457
|
+
cacheable: true,
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
// ── Decision instance ──
|
|
462
|
+
export class DecisionInstanceResource extends ResourceBase {
|
|
463
|
+
/**
|
|
464
|
+
* Search decision instances
|
|
465
|
+
*
|
|
466
|
+
* Search for decision instances based on given criteria.
|
|
467
|
+
* @see POST /decision-instances/search
|
|
468
|
+
*/
|
|
469
|
+
async searchDecisionInstances(body) {
|
|
470
|
+
return this._http.request({
|
|
471
|
+
method: "POST",
|
|
472
|
+
path: "/decision-instances/search",
|
|
473
|
+
body,
|
|
474
|
+
cacheable: true,
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* Get decision instance
|
|
479
|
+
*
|
|
480
|
+
* Returns a decision instance.
|
|
481
|
+
* @see GET /decision-instances/{decisionEvaluationInstanceKey}
|
|
482
|
+
*/
|
|
483
|
+
async getDecisionInstance(decisionEvaluationInstanceKey) {
|
|
484
|
+
return this._http.request({
|
|
485
|
+
method: "GET",
|
|
486
|
+
path: `/decision-instances/${decisionEvaluationInstanceKey}`,
|
|
487
|
+
cacheable: true,
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* Delete decision instance
|
|
492
|
+
*
|
|
493
|
+
* Delete all associated decision evaluations based on provided key.
|
|
494
|
+
* @see POST /decision-instances/{decisionInstanceKey}/deletion
|
|
495
|
+
*/
|
|
496
|
+
async deleteDecisionInstance(decisionInstanceKey, body) {
|
|
497
|
+
return this._http.request({
|
|
498
|
+
method: "POST",
|
|
499
|
+
path: `/decision-instances/${decisionInstanceKey}/deletion`,
|
|
500
|
+
body,
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Delete decision instances (batch)
|
|
505
|
+
*
|
|
506
|
+
* Delete multiple decision instances. This will delete the historic data from secondary storage.
|
|
507
|
+
* This is done asynchronously, the progress can be tracked using the batchOperationKey from the response and the batch operation status endpoint (/batch-operations/{batchOperationKey}).
|
|
508
|
+
* @see POST /decision-instances/deletion
|
|
509
|
+
*/
|
|
510
|
+
async deleteDecisionInstancesBatchOperation(body) {
|
|
511
|
+
return this._http.request({
|
|
512
|
+
method: "POST",
|
|
513
|
+
path: "/decision-instances/deletion",
|
|
514
|
+
body,
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
// ── Decision requirements ──
|
|
519
|
+
export class DecisionRequirementsResource extends ResourceBase {
|
|
520
|
+
/**
|
|
521
|
+
* Search decision requirements
|
|
522
|
+
*
|
|
523
|
+
* Search for decision requirements based on given criteria.
|
|
524
|
+
* @see POST /decision-requirements/search
|
|
525
|
+
*/
|
|
526
|
+
async searchDecisionRequirements(body) {
|
|
527
|
+
return this._http.request({
|
|
528
|
+
method: "POST",
|
|
529
|
+
path: "/decision-requirements/search",
|
|
530
|
+
body,
|
|
531
|
+
cacheable: true,
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* Get decision requirements
|
|
536
|
+
*
|
|
537
|
+
* Returns Decision Requirements as JSON.
|
|
538
|
+
* @see GET /decision-requirements/{decisionRequirementsKey}
|
|
539
|
+
*/
|
|
540
|
+
async getDecisionRequirements(decisionRequirementsKey) {
|
|
541
|
+
return this._http.request({
|
|
542
|
+
method: "GET",
|
|
543
|
+
path: `/decision-requirements/${decisionRequirementsKey}`,
|
|
544
|
+
cacheable: true,
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Get decision requirements XML
|
|
549
|
+
*
|
|
550
|
+
* Returns decision requirements as XML.
|
|
551
|
+
* @see GET /decision-requirements/{decisionRequirementsKey}/xml
|
|
552
|
+
*/
|
|
553
|
+
async getDecisionRequirementsXML(decisionRequirementsKey) {
|
|
554
|
+
return this._http.request({
|
|
555
|
+
method: "GET",
|
|
556
|
+
path: `/decision-requirements/${decisionRequirementsKey}/xml`,
|
|
557
|
+
cacheable: true,
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
// ── Resource ──
|
|
562
|
+
export class ResourceResource extends ResourceBase {
|
|
563
|
+
/**
|
|
564
|
+
* Deploy resources
|
|
565
|
+
*
|
|
566
|
+
* Deploys one or more resources (e.g. processes, decision models, or forms).
|
|
567
|
+
* This is an atomic call, i.e. either all resources are deployed or none of them are.
|
|
568
|
+
* @see POST /deployments
|
|
569
|
+
*/
|
|
570
|
+
async createDeployment() {
|
|
571
|
+
return this._http.request({
|
|
572
|
+
method: "POST",
|
|
573
|
+
path: "/deployments",
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* Get resource
|
|
578
|
+
*
|
|
579
|
+
* Returns a deployed resource.
|
|
580
|
+
* :::info
|
|
581
|
+
* Currently, this endpoint only supports RPA resources.
|
|
582
|
+
* @see GET /resources/{resourceKey}
|
|
583
|
+
*/
|
|
584
|
+
async getResource(resourceKey) {
|
|
585
|
+
return this._http.request({
|
|
586
|
+
method: "GET",
|
|
587
|
+
path: `/resources/${resourceKey}`,
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* Get resource content
|
|
592
|
+
*
|
|
593
|
+
* Returns the content of a deployed resource.
|
|
594
|
+
* :::info
|
|
595
|
+
* Currently, this endpoint only supports RPA resources.
|
|
596
|
+
* @see GET /resources/{resourceKey}/content
|
|
597
|
+
*/
|
|
598
|
+
async getResourceContent(resourceKey) {
|
|
599
|
+
return this._http.request({
|
|
600
|
+
method: "GET",
|
|
601
|
+
path: `/resources/${resourceKey}/content`,
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* Delete resource
|
|
606
|
+
*
|
|
607
|
+
* Deletes a deployed resource. This can be a process definition, decision requirements
|
|
608
|
+
* definition, or form definition deployed using the deploy resources endpoint. Specify the
|
|
609
|
+
* resource you want to delete in the `resourceKey` parameter.
|
|
610
|
+
* @see POST /resources/{resourceKey}/deletion
|
|
611
|
+
*/
|
|
612
|
+
async deleteResource(resourceKey, body) {
|
|
613
|
+
return this._http.request({
|
|
614
|
+
method: "POST",
|
|
615
|
+
path: `/resources/${resourceKey}/deletion`,
|
|
616
|
+
body,
|
|
617
|
+
});
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
// ── Document ──
|
|
621
|
+
export class DocumentResource extends ResourceBase {
|
|
622
|
+
/**
|
|
623
|
+
* Upload document
|
|
624
|
+
*
|
|
625
|
+
* Upload a document to the Camunda 8 cluster.
|
|
626
|
+
*
|
|
627
|
+
* Note that this is currently supported for document stores of type: AWS, GCP, in-memory (non-production), local (non-production)
|
|
628
|
+
* @see POST /documents
|
|
629
|
+
*/
|
|
630
|
+
async createDocument(query) {
|
|
631
|
+
return this._http.request({
|
|
632
|
+
method: "POST",
|
|
633
|
+
path: "/documents",
|
|
634
|
+
query: query,
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* Upload multiple documents
|
|
639
|
+
*
|
|
640
|
+
* Upload multiple documents to the Camunda 8 cluster.
|
|
641
|
+
*
|
|
642
|
+
* The caller must provide a file name for each document, which will be used in case of a multi-status response
|
|
643
|
+
* @see POST /documents/batch
|
|
644
|
+
*/
|
|
645
|
+
async createDocuments(query) {
|
|
646
|
+
return this._http.request({
|
|
647
|
+
method: "POST",
|
|
648
|
+
path: "/documents/batch",
|
|
649
|
+
query: query,
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Download document
|
|
654
|
+
*
|
|
655
|
+
* Download a document from the Camunda 8 cluster.
|
|
656
|
+
*
|
|
657
|
+
* Note that this is currently supported for document stores of type: AWS, GCP, in-memory (non-production), local (non-production)
|
|
658
|
+
* @see GET /documents/{documentId}
|
|
659
|
+
*/
|
|
660
|
+
async getDocument(documentId, query) {
|
|
661
|
+
return this._http.request({
|
|
662
|
+
method: "GET",
|
|
663
|
+
path: `/documents/${documentId}`,
|
|
664
|
+
query: query,
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
/**
|
|
668
|
+
* Delete document
|
|
669
|
+
*
|
|
670
|
+
* Delete a document from the Camunda 8 cluster.
|
|
671
|
+
*
|
|
672
|
+
* Note that this is currently supported for document stores of type: AWS, GCP, in-memory (non-production), local (non-production)
|
|
673
|
+
* @see DELETE /documents/{documentId}
|
|
674
|
+
*/
|
|
675
|
+
async deleteDocument(documentId, query) {
|
|
676
|
+
return this._http.request({
|
|
677
|
+
method: "DELETE",
|
|
678
|
+
path: `/documents/${documentId}`,
|
|
679
|
+
query: query,
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
/**
|
|
683
|
+
* Create document link
|
|
684
|
+
*
|
|
685
|
+
* Create a link to a document in the Camunda 8 cluster.
|
|
686
|
+
*
|
|
687
|
+
* Note that this is currently supported for document stores of type: AWS, GCP
|
|
688
|
+
* @see POST /documents/{documentId}/links
|
|
689
|
+
*/
|
|
690
|
+
async createDocumentLink(documentId, body, query) {
|
|
691
|
+
return this._http.request({
|
|
692
|
+
method: "POST",
|
|
693
|
+
path: `/documents/${documentId}/links`,
|
|
694
|
+
body,
|
|
695
|
+
query: query,
|
|
696
|
+
});
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
// ── Ad-hoc sub-process ──
|
|
700
|
+
export class AdHocSubProcessResource extends ResourceBase {
|
|
701
|
+
/**
|
|
702
|
+
* Activate activities within an ad-hoc sub-process
|
|
703
|
+
*
|
|
704
|
+
* Activates selected activities within an ad-hoc sub-process identified by element ID.
|
|
705
|
+
* The provided element IDs must exist within the ad-hoc sub-process instance identified by the
|
|
706
|
+
* provided adHocSubProcessInstanceKey.
|
|
707
|
+
* @see POST /element-instances/ad-hoc-activities/{adHocSubProcessInstanceKey}/activation
|
|
708
|
+
*/
|
|
709
|
+
async activateAdHocSubProcessActivities(adHocSubProcessInstanceKey, body) {
|
|
710
|
+
return this._http.request({
|
|
711
|
+
method: "POST",
|
|
712
|
+
path: `/element-instances/ad-hoc-activities/${adHocSubProcessInstanceKey}/activation`,
|
|
713
|
+
body,
|
|
714
|
+
});
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
// ── Element instance ──
|
|
718
|
+
export class ElementInstanceResource extends ResourceBase {
|
|
719
|
+
/**
|
|
720
|
+
* Search element instances
|
|
721
|
+
*
|
|
722
|
+
* Search for element instances based on given criteria.
|
|
723
|
+
* @see POST /element-instances/search
|
|
724
|
+
*/
|
|
725
|
+
async searchElementInstances(body) {
|
|
726
|
+
return this._http.request({
|
|
727
|
+
method: "POST",
|
|
728
|
+
path: "/element-instances/search",
|
|
729
|
+
body,
|
|
730
|
+
cacheable: true,
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
/**
|
|
734
|
+
* Get element instance
|
|
735
|
+
*
|
|
736
|
+
* Returns element instance as JSON.
|
|
737
|
+
* @see GET /element-instances/{elementInstanceKey}
|
|
738
|
+
*/
|
|
739
|
+
async getElementInstance(elementInstanceKey) {
|
|
740
|
+
return this._http.request({
|
|
741
|
+
method: "GET",
|
|
742
|
+
path: `/element-instances/${elementInstanceKey}`,
|
|
743
|
+
cacheable: true,
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* Search for incidents of a specific element instance
|
|
748
|
+
*
|
|
749
|
+
* Search for incidents caused by the specified element instance, including incidents of any child instances created from this element instance.
|
|
750
|
+
*
|
|
751
|
+
* Although the `elementInstanceKey` is provided as a path parameter to indicate the root element instance,
|
|
752
|
+
* @see POST /element-instances/{elementInstanceKey}/incidents/search
|
|
753
|
+
*/
|
|
754
|
+
async searchElementInstanceIncidents(elementInstanceKey, body) {
|
|
755
|
+
return this._http.request({
|
|
756
|
+
method: "POST",
|
|
757
|
+
path: `/element-instances/${elementInstanceKey}/incidents/search`,
|
|
758
|
+
body,
|
|
759
|
+
cacheable: true,
|
|
760
|
+
});
|
|
761
|
+
}
|
|
762
|
+
/**
|
|
763
|
+
* Update element instance variables
|
|
764
|
+
*
|
|
765
|
+
* Updates all the variables of a particular scope (for example, process instance, element instance) with the given variable data.
|
|
766
|
+
* Specify the element instance in the `elementInstanceKey` parameter.
|
|
767
|
+
* @see PUT /element-instances/{elementInstanceKey}/variables
|
|
768
|
+
*/
|
|
769
|
+
async createElementInstanceVariables(elementInstanceKey, body) {
|
|
770
|
+
return this._http.request({
|
|
771
|
+
method: "PUT",
|
|
772
|
+
path: `/element-instances/${elementInstanceKey}/variables`,
|
|
773
|
+
body,
|
|
774
|
+
});
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
// ── Expression ──
|
|
778
|
+
export class ExpressionResource extends ResourceBase {
|
|
779
|
+
/**
|
|
780
|
+
* Evaluate an expression
|
|
781
|
+
*
|
|
782
|
+
* Evaluates a FEEL expression and returns the result. Supports references to tenant scoped cluster variables when a tenant ID is provided.
|
|
783
|
+
* @see POST /expression/evaluation
|
|
784
|
+
*/
|
|
785
|
+
async evaluateExpression(body) {
|
|
786
|
+
return this._http.request({
|
|
787
|
+
method: "POST",
|
|
788
|
+
path: "/expression/evaluation",
|
|
789
|
+
body,
|
|
790
|
+
});
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
// ── Global listener ──
|
|
794
|
+
export class GlobalListenerResource extends ResourceBase {
|
|
795
|
+
/**
|
|
796
|
+
* Create global user task listener
|
|
797
|
+
*
|
|
798
|
+
* Create a new global user task listener.
|
|
799
|
+
* @see POST /global-task-listeners
|
|
800
|
+
*/
|
|
801
|
+
async createGlobalTaskListener(body) {
|
|
802
|
+
return this._http.request({
|
|
803
|
+
method: "POST",
|
|
804
|
+
path: "/global-task-listeners",
|
|
805
|
+
body,
|
|
806
|
+
});
|
|
807
|
+
}
|
|
808
|
+
/**
|
|
809
|
+
* Get global user task listener
|
|
810
|
+
*
|
|
811
|
+
* Get a global user task listener by its id.
|
|
812
|
+
* @see GET /global-task-listeners/{id}
|
|
813
|
+
*/
|
|
814
|
+
async getGlobalTaskListener(id) {
|
|
815
|
+
return this._http.request({
|
|
816
|
+
method: "GET",
|
|
817
|
+
path: `/global-task-listeners/${id}`,
|
|
818
|
+
cacheable: true,
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
/**
|
|
822
|
+
* Update global user task listener
|
|
823
|
+
*
|
|
824
|
+
* Updates a global user task listener.
|
|
825
|
+
* @see PUT /global-task-listeners/{id}
|
|
826
|
+
*/
|
|
827
|
+
async updateGlobalTaskListener(id, body) {
|
|
828
|
+
return this._http.request({
|
|
829
|
+
method: "PUT",
|
|
830
|
+
path: `/global-task-listeners/${id}`,
|
|
831
|
+
body,
|
|
832
|
+
});
|
|
833
|
+
}
|
|
834
|
+
/**
|
|
835
|
+
* Delete global user task listener
|
|
836
|
+
*
|
|
837
|
+
* Deletes a global user task listener.
|
|
838
|
+
* @see DELETE /global-task-listeners/{id}
|
|
839
|
+
*/
|
|
840
|
+
async deleteGlobalTaskListener(id) {
|
|
841
|
+
return this._http.request({
|
|
842
|
+
method: "DELETE",
|
|
843
|
+
path: `/global-task-listeners/${id}`,
|
|
844
|
+
});
|
|
845
|
+
}
|
|
846
|
+
/**
|
|
847
|
+
* Search global user task listeners
|
|
848
|
+
*
|
|
849
|
+
* Search for global user task listeners based on given criteria.
|
|
850
|
+
* @see POST /global-task-listeners/search
|
|
851
|
+
*/
|
|
852
|
+
async searchGlobalTaskListeners(body) {
|
|
853
|
+
return this._http.request({
|
|
854
|
+
method: "POST",
|
|
855
|
+
path: "/global-task-listeners/search",
|
|
856
|
+
body,
|
|
857
|
+
cacheable: true,
|
|
858
|
+
});
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
// ── Group ──
|
|
862
|
+
export class GroupResource extends ResourceBase {
|
|
863
|
+
/**
|
|
864
|
+
* Create group
|
|
865
|
+
*
|
|
866
|
+
* Create a new group.
|
|
867
|
+
* @see POST /groups
|
|
868
|
+
*/
|
|
869
|
+
async createGroup(body) {
|
|
870
|
+
return this._http.request({
|
|
871
|
+
method: "POST",
|
|
872
|
+
path: "/groups",
|
|
873
|
+
body,
|
|
874
|
+
});
|
|
875
|
+
}
|
|
876
|
+
/**
|
|
877
|
+
* Search groups
|
|
878
|
+
*
|
|
879
|
+
* Search for groups based on given criteria.
|
|
880
|
+
* @see POST /groups/search
|
|
881
|
+
*/
|
|
882
|
+
async searchGroups(body) {
|
|
883
|
+
return this._http.request({
|
|
884
|
+
method: "POST",
|
|
885
|
+
path: "/groups/search",
|
|
886
|
+
body,
|
|
887
|
+
cacheable: true,
|
|
888
|
+
});
|
|
889
|
+
}
|
|
890
|
+
/**
|
|
891
|
+
* Get group
|
|
892
|
+
*
|
|
893
|
+
* Get a group by its ID.
|
|
894
|
+
* @see GET /groups/{groupId}
|
|
895
|
+
*/
|
|
896
|
+
async getGroup(groupId) {
|
|
897
|
+
return this._http.request({
|
|
898
|
+
method: "GET",
|
|
899
|
+
path: `/groups/${groupId}`,
|
|
900
|
+
cacheable: true,
|
|
901
|
+
});
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* Update group
|
|
905
|
+
*
|
|
906
|
+
* Update a group with the given ID.
|
|
907
|
+
* @see PUT /groups/{groupId}
|
|
908
|
+
*/
|
|
909
|
+
async updateGroup(groupId, body) {
|
|
910
|
+
return this._http.request({
|
|
911
|
+
method: "PUT",
|
|
912
|
+
path: `/groups/${groupId}`,
|
|
913
|
+
body,
|
|
914
|
+
});
|
|
915
|
+
}
|
|
916
|
+
/**
|
|
917
|
+
* Delete group
|
|
918
|
+
*
|
|
919
|
+
* Deletes the group with the given ID.
|
|
920
|
+
* @see DELETE /groups/{groupId}
|
|
921
|
+
*/
|
|
922
|
+
async deleteGroup(groupId) {
|
|
923
|
+
return this._http.request({
|
|
924
|
+
method: "DELETE",
|
|
925
|
+
path: `/groups/${groupId}`,
|
|
926
|
+
});
|
|
927
|
+
}
|
|
928
|
+
/**
|
|
929
|
+
* Search group clients
|
|
930
|
+
*
|
|
931
|
+
* Search clients assigned to a group.
|
|
932
|
+
* @see POST /groups/{groupId}/clients/search
|
|
933
|
+
*/
|
|
934
|
+
async searchClientsForGroup(groupId, body) {
|
|
935
|
+
return this._http.request({
|
|
936
|
+
method: "POST",
|
|
937
|
+
path: `/groups/${groupId}/clients/search`,
|
|
938
|
+
body,
|
|
939
|
+
cacheable: true,
|
|
940
|
+
});
|
|
941
|
+
}
|
|
942
|
+
/**
|
|
943
|
+
* Assign a client to a group
|
|
944
|
+
*
|
|
945
|
+
* Assigns a client to a group, making it a member of the group.
|
|
946
|
+
* Members of the group inherit the group authorizations, roles, and tenant assignments.
|
|
947
|
+
* @see PUT /groups/{groupId}/clients/{clientId}
|
|
948
|
+
*/
|
|
949
|
+
async assignClientToGroup(groupId, clientId) {
|
|
950
|
+
return this._http.request({
|
|
951
|
+
method: "PUT",
|
|
952
|
+
path: `/groups/${groupId}/clients/${clientId}`,
|
|
953
|
+
});
|
|
954
|
+
}
|
|
955
|
+
/**
|
|
956
|
+
* Unassign a client from a group
|
|
957
|
+
*
|
|
958
|
+
* Unassigns a client from a group.
|
|
959
|
+
* The client is removed as a group member, with associated authorizations, roles, and tenant assignments no longer applied.
|
|
960
|
+
* @see DELETE /groups/{groupId}/clients/{clientId}
|
|
961
|
+
*/
|
|
962
|
+
async unassignClientFromGroup(groupId, clientId) {
|
|
963
|
+
return this._http.request({
|
|
964
|
+
method: "DELETE",
|
|
965
|
+
path: `/groups/${groupId}/clients/${clientId}`,
|
|
966
|
+
});
|
|
967
|
+
}
|
|
968
|
+
/**
|
|
969
|
+
* Search group mapping rules
|
|
970
|
+
*
|
|
971
|
+
* Search mapping rules assigned to a group.
|
|
972
|
+
* @see POST /groups/{groupId}/mapping-rules/search
|
|
973
|
+
*/
|
|
974
|
+
async searchMappingRulesForGroup(groupId, body) {
|
|
975
|
+
return this._http.request({
|
|
976
|
+
method: "POST",
|
|
977
|
+
path: `/groups/${groupId}/mapping-rules/search`,
|
|
978
|
+
body,
|
|
979
|
+
cacheable: true,
|
|
980
|
+
});
|
|
981
|
+
}
|
|
982
|
+
/**
|
|
983
|
+
* Assign a mapping rule to a group
|
|
984
|
+
*
|
|
985
|
+
* Assigns a mapping rule to a group.
|
|
986
|
+
* @see PUT /groups/{groupId}/mapping-rules/{mappingRuleId}
|
|
987
|
+
*/
|
|
988
|
+
async assignMappingRuleToGroup(groupId, mappingRuleId) {
|
|
989
|
+
return this._http.request({
|
|
990
|
+
method: "PUT",
|
|
991
|
+
path: `/groups/${groupId}/mapping-rules/${mappingRuleId}`,
|
|
992
|
+
});
|
|
993
|
+
}
|
|
994
|
+
/**
|
|
995
|
+
* Unassign a mapping rule from a group
|
|
996
|
+
*
|
|
997
|
+
* Unassigns a mapping rule from a group.
|
|
998
|
+
* @see DELETE /groups/{groupId}/mapping-rules/{mappingRuleId}
|
|
999
|
+
*/
|
|
1000
|
+
async unassignMappingRuleFromGroup(groupId, mappingRuleId) {
|
|
1001
|
+
return this._http.request({
|
|
1002
|
+
method: "DELETE",
|
|
1003
|
+
path: `/groups/${groupId}/mapping-rules/${mappingRuleId}`,
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
/**
|
|
1007
|
+
* Search group roles
|
|
1008
|
+
*
|
|
1009
|
+
* Search roles assigned to a group.
|
|
1010
|
+
* @see POST /groups/{groupId}/roles/search
|
|
1011
|
+
*/
|
|
1012
|
+
async searchRolesForGroup(groupId, body) {
|
|
1013
|
+
return this._http.request({
|
|
1014
|
+
method: "POST",
|
|
1015
|
+
path: `/groups/${groupId}/roles/search`,
|
|
1016
|
+
body,
|
|
1017
|
+
cacheable: true,
|
|
1018
|
+
});
|
|
1019
|
+
}
|
|
1020
|
+
/**
|
|
1021
|
+
* Search group users
|
|
1022
|
+
*
|
|
1023
|
+
* Search users assigned to a group.
|
|
1024
|
+
* @see POST /groups/{groupId}/users/search
|
|
1025
|
+
*/
|
|
1026
|
+
async searchUsersForGroup(groupId, body) {
|
|
1027
|
+
return this._http.request({
|
|
1028
|
+
method: "POST",
|
|
1029
|
+
path: `/groups/${groupId}/users/search`,
|
|
1030
|
+
body,
|
|
1031
|
+
cacheable: true,
|
|
1032
|
+
});
|
|
1033
|
+
}
|
|
1034
|
+
/**
|
|
1035
|
+
* Assign a user to a group
|
|
1036
|
+
*
|
|
1037
|
+
* Assigns a user to a group, making the user a member of the group.
|
|
1038
|
+
* Group members inherit the group authorizations, roles, and tenant assignments.
|
|
1039
|
+
* @see PUT /groups/{groupId}/users/{username}
|
|
1040
|
+
*/
|
|
1041
|
+
async assignUserToGroup(groupId, username) {
|
|
1042
|
+
return this._http.request({
|
|
1043
|
+
method: "PUT",
|
|
1044
|
+
path: `/groups/${groupId}/users/${username}`,
|
|
1045
|
+
});
|
|
1046
|
+
}
|
|
1047
|
+
/**
|
|
1048
|
+
* Unassign a user from a group
|
|
1049
|
+
*
|
|
1050
|
+
* Unassigns a user from a group.
|
|
1051
|
+
* The user is removed as a group member, with associated authorizations, roles, and tenant assignments no longer applied.
|
|
1052
|
+
* @see DELETE /groups/{groupId}/users/{username}
|
|
1053
|
+
*/
|
|
1054
|
+
async unassignUserFromGroup(groupId, username) {
|
|
1055
|
+
return this._http.request({
|
|
1056
|
+
method: "DELETE",
|
|
1057
|
+
path: `/groups/${groupId}/users/${username}`,
|
|
1058
|
+
});
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
// ── Incident ──
|
|
1062
|
+
export class IncidentResource extends ResourceBase {
|
|
1063
|
+
/**
|
|
1064
|
+
* Search incidents
|
|
1065
|
+
*
|
|
1066
|
+
* Search for incidents based on given criteria.
|
|
1067
|
+
* @see POST /incidents/search
|
|
1068
|
+
*/
|
|
1069
|
+
async searchIncidents(body) {
|
|
1070
|
+
return this._http.request({
|
|
1071
|
+
method: "POST",
|
|
1072
|
+
path: "/incidents/search",
|
|
1073
|
+
body,
|
|
1074
|
+
cacheable: true,
|
|
1075
|
+
});
|
|
1076
|
+
}
|
|
1077
|
+
/**
|
|
1078
|
+
* Get incident
|
|
1079
|
+
*
|
|
1080
|
+
* Returns incident as JSON.
|
|
1081
|
+
* @see GET /incidents/{incidentKey}
|
|
1082
|
+
*/
|
|
1083
|
+
async getIncident(incidentKey) {
|
|
1084
|
+
return this._http.request({
|
|
1085
|
+
method: "GET",
|
|
1086
|
+
path: `/incidents/${incidentKey}`,
|
|
1087
|
+
cacheable: true,
|
|
1088
|
+
});
|
|
1089
|
+
}
|
|
1090
|
+
/**
|
|
1091
|
+
* Resolve incident
|
|
1092
|
+
*
|
|
1093
|
+
* Marks the incident as resolved; most likely a call to Update job will be necessary
|
|
1094
|
+
* to reset the job's retries, followed by this call.
|
|
1095
|
+
* @see POST /incidents/{incidentKey}/resolution
|
|
1096
|
+
*/
|
|
1097
|
+
async resolveIncident(incidentKey, body) {
|
|
1098
|
+
return this._http.request({
|
|
1099
|
+
method: "POST",
|
|
1100
|
+
path: `/incidents/${incidentKey}/resolution`,
|
|
1101
|
+
body,
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* Get process instance statistics by definition
|
|
1106
|
+
*
|
|
1107
|
+
* Returns statistics for active process instances with incidents, grouped by process
|
|
1108
|
+
* definition. The result set is scoped to a specific incident error hash code, which must be
|
|
1109
|
+
* provided as a filter in the request body.
|
|
1110
|
+
* @see POST /incidents/statistics/process-instances-by-definition
|
|
1111
|
+
*/
|
|
1112
|
+
async getProcessInstanceStatisticsByDefinition(body) {
|
|
1113
|
+
return this._http.request({
|
|
1114
|
+
method: "POST",
|
|
1115
|
+
path: "/incidents/statistics/process-instances-by-definition",
|
|
1116
|
+
body,
|
|
1117
|
+
cacheable: true,
|
|
1118
|
+
});
|
|
1119
|
+
}
|
|
1120
|
+
/**
|
|
1121
|
+
* Get process instance statistics by error
|
|
1122
|
+
*
|
|
1123
|
+
* Returns statistics for active process instances that currently have active incidents,
|
|
1124
|
+
* grouped by incident error hash code.
|
|
1125
|
+
* @see POST /incidents/statistics/process-instances-by-error
|
|
1126
|
+
*/
|
|
1127
|
+
async getProcessInstanceStatisticsByError(body) {
|
|
1128
|
+
return this._http.request({
|
|
1129
|
+
method: "POST",
|
|
1130
|
+
path: "/incidents/statistics/process-instances-by-error",
|
|
1131
|
+
body,
|
|
1132
|
+
cacheable: true,
|
|
1133
|
+
});
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
// ── Job ──
|
|
1137
|
+
export class JobResource extends ResourceBase {
|
|
1138
|
+
/**
|
|
1139
|
+
* Activate jobs
|
|
1140
|
+
*
|
|
1141
|
+
* Iterate through all known partitions and activate jobs up to the requested maximum.
|
|
1142
|
+
* @see POST /jobs/activation
|
|
1143
|
+
*/
|
|
1144
|
+
async activateJobs(body) {
|
|
1145
|
+
return this._http.request({
|
|
1146
|
+
method: "POST",
|
|
1147
|
+
path: "/jobs/activation",
|
|
1148
|
+
body,
|
|
1149
|
+
});
|
|
1150
|
+
}
|
|
1151
|
+
/**
|
|
1152
|
+
* Search jobs
|
|
1153
|
+
*
|
|
1154
|
+
* Search for jobs based on given criteria.
|
|
1155
|
+
* @see POST /jobs/search
|
|
1156
|
+
*/
|
|
1157
|
+
async searchJobs(body) {
|
|
1158
|
+
return this._http.request({
|
|
1159
|
+
method: "POST",
|
|
1160
|
+
path: "/jobs/search",
|
|
1161
|
+
body,
|
|
1162
|
+
cacheable: true,
|
|
1163
|
+
});
|
|
1164
|
+
}
|
|
1165
|
+
/**
|
|
1166
|
+
* Update job
|
|
1167
|
+
*
|
|
1168
|
+
* Update a job with the given key.
|
|
1169
|
+
* @see PATCH /jobs/{jobKey}
|
|
1170
|
+
*/
|
|
1171
|
+
async updateJob(jobKey, body) {
|
|
1172
|
+
return this._http.request({
|
|
1173
|
+
method: "PATCH",
|
|
1174
|
+
path: `/jobs/${jobKey}`,
|
|
1175
|
+
body,
|
|
1176
|
+
});
|
|
1177
|
+
}
|
|
1178
|
+
/**
|
|
1179
|
+
* Complete job
|
|
1180
|
+
*
|
|
1181
|
+
* Complete a job with the given payload, which allows completing the associated service task.
|
|
1182
|
+
* @see POST /jobs/{jobKey}/completion
|
|
1183
|
+
*/
|
|
1184
|
+
async completeJob(jobKey, body) {
|
|
1185
|
+
return this._http.request({
|
|
1186
|
+
method: "POST",
|
|
1187
|
+
path: `/jobs/${jobKey}/completion`,
|
|
1188
|
+
body,
|
|
1189
|
+
});
|
|
1190
|
+
}
|
|
1191
|
+
/**
|
|
1192
|
+
* Throw error for job
|
|
1193
|
+
*
|
|
1194
|
+
* Reports a business error (i.e. non-technical) that occurs while processing a job.
|
|
1195
|
+
* @see POST /jobs/{jobKey}/error
|
|
1196
|
+
*/
|
|
1197
|
+
async throwJobError(jobKey, body) {
|
|
1198
|
+
return this._http.request({
|
|
1199
|
+
method: "POST",
|
|
1200
|
+
path: `/jobs/${jobKey}/error`,
|
|
1201
|
+
body,
|
|
1202
|
+
});
|
|
1203
|
+
}
|
|
1204
|
+
/**
|
|
1205
|
+
* Fail job
|
|
1206
|
+
*
|
|
1207
|
+
* Mark the job as failed.
|
|
1208
|
+
* @see POST /jobs/{jobKey}/failure
|
|
1209
|
+
*/
|
|
1210
|
+
async failJob(jobKey, body) {
|
|
1211
|
+
return this._http.request({
|
|
1212
|
+
method: "POST",
|
|
1213
|
+
path: `/jobs/${jobKey}/failure`,
|
|
1214
|
+
body,
|
|
1215
|
+
});
|
|
1216
|
+
}
|
|
1217
|
+
/**
|
|
1218
|
+
* Global job statistics
|
|
1219
|
+
*
|
|
1220
|
+
* Returns global aggregated counts for jobs. Optionally filter by the creation time window and/or jobType.
|
|
1221
|
+
* @see GET /jobs/statistics/global
|
|
1222
|
+
*/
|
|
1223
|
+
async getGlobalJobStatistics(query) {
|
|
1224
|
+
return this._http.request({
|
|
1225
|
+
method: "GET",
|
|
1226
|
+
path: "/jobs/statistics/global",
|
|
1227
|
+
query: query,
|
|
1228
|
+
cacheable: true,
|
|
1229
|
+
});
|
|
1230
|
+
}
|
|
1231
|
+
/**
|
|
1232
|
+
* Get job statistics by type
|
|
1233
|
+
*
|
|
1234
|
+
* Get statistics about jobs, grouped by job type.
|
|
1235
|
+
* @see POST /jobs/statistics/by-types
|
|
1236
|
+
*/
|
|
1237
|
+
async getJobTypeStatistics(body) {
|
|
1238
|
+
return this._http.request({
|
|
1239
|
+
method: "POST",
|
|
1240
|
+
path: "/jobs/statistics/by-types",
|
|
1241
|
+
body,
|
|
1242
|
+
cacheable: true,
|
|
1243
|
+
});
|
|
1244
|
+
}
|
|
1245
|
+
/**
|
|
1246
|
+
* Get job statistics by worker
|
|
1247
|
+
*
|
|
1248
|
+
* Returns aggregated metrics per worker for the given jobType.
|
|
1249
|
+
* @see POST /jobs/statistics/by-workers
|
|
1250
|
+
*/
|
|
1251
|
+
async getJobWorkerStatistics(body) {
|
|
1252
|
+
return this._http.request({
|
|
1253
|
+
method: "POST",
|
|
1254
|
+
path: "/jobs/statistics/by-workers",
|
|
1255
|
+
body,
|
|
1256
|
+
cacheable: true,
|
|
1257
|
+
});
|
|
1258
|
+
}
|
|
1259
|
+
/**
|
|
1260
|
+
* Get time-series metrics for a job type
|
|
1261
|
+
*
|
|
1262
|
+
* Returns a list of time-bucketed metrics ordered ascending by time.
|
|
1263
|
+
* The `from` and `to` fields select the time window of interest.
|
|
1264
|
+
* Each item in the response corresponds to one time bucket of the requested resolution.
|
|
1265
|
+
* @see POST /jobs/statistics/time-series
|
|
1266
|
+
*/
|
|
1267
|
+
async getJobTimeSeriesStatistics(body) {
|
|
1268
|
+
return this._http.request({
|
|
1269
|
+
method: "POST",
|
|
1270
|
+
path: "/jobs/statistics/time-series",
|
|
1271
|
+
body,
|
|
1272
|
+
cacheable: true,
|
|
1273
|
+
});
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
// ── License ──
|
|
1277
|
+
export class LicenseResource extends ResourceBase {
|
|
1278
|
+
/**
|
|
1279
|
+
* Get license status
|
|
1280
|
+
*
|
|
1281
|
+
* Obtains the status of the current Camunda license.
|
|
1282
|
+
* @see GET /license
|
|
1283
|
+
*/
|
|
1284
|
+
async getLicense() {
|
|
1285
|
+
return this._http.request({
|
|
1286
|
+
method: "GET",
|
|
1287
|
+
path: "/license",
|
|
1288
|
+
});
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
// ── Mapping rule ──
|
|
1292
|
+
export class MappingRuleResource extends ResourceBase {
|
|
1293
|
+
/**
|
|
1294
|
+
* Create mapping rule
|
|
1295
|
+
*
|
|
1296
|
+
* Create a new mapping rule
|
|
1297
|
+
* @see POST /mapping-rules
|
|
1298
|
+
*/
|
|
1299
|
+
async createMappingRule(body) {
|
|
1300
|
+
return this._http.request({
|
|
1301
|
+
method: "POST",
|
|
1302
|
+
path: "/mapping-rules",
|
|
1303
|
+
body,
|
|
1304
|
+
});
|
|
1305
|
+
}
|
|
1306
|
+
/**
|
|
1307
|
+
* Search mapping rules
|
|
1308
|
+
*
|
|
1309
|
+
* Search for mapping rules based on given criteria.
|
|
1310
|
+
* @see POST /mapping-rules/search
|
|
1311
|
+
*/
|
|
1312
|
+
async searchMappingRule(body) {
|
|
1313
|
+
return this._http.request({
|
|
1314
|
+
method: "POST",
|
|
1315
|
+
path: "/mapping-rules/search",
|
|
1316
|
+
body,
|
|
1317
|
+
cacheable: true,
|
|
1318
|
+
});
|
|
1319
|
+
}
|
|
1320
|
+
/**
|
|
1321
|
+
* Get a mapping rule
|
|
1322
|
+
*
|
|
1323
|
+
* Gets the mapping rule with the given ID.
|
|
1324
|
+
* @see GET /mapping-rules/{mappingRuleId}
|
|
1325
|
+
*/
|
|
1326
|
+
async getMappingRule(mappingRuleId) {
|
|
1327
|
+
return this._http.request({
|
|
1328
|
+
method: "GET",
|
|
1329
|
+
path: `/mapping-rules/${mappingRuleId}`,
|
|
1330
|
+
cacheable: true,
|
|
1331
|
+
});
|
|
1332
|
+
}
|
|
1333
|
+
/**
|
|
1334
|
+
* Update mapping rule
|
|
1335
|
+
*
|
|
1336
|
+
* Update a mapping rule.
|
|
1337
|
+
* @see PUT /mapping-rules/{mappingRuleId}
|
|
1338
|
+
*/
|
|
1339
|
+
async updateMappingRule(mappingRuleId, body) {
|
|
1340
|
+
return this._http.request({
|
|
1341
|
+
method: "PUT",
|
|
1342
|
+
path: `/mapping-rules/${mappingRuleId}`,
|
|
1343
|
+
body,
|
|
1344
|
+
});
|
|
1345
|
+
}
|
|
1346
|
+
/**
|
|
1347
|
+
* Delete a mapping rule
|
|
1348
|
+
*
|
|
1349
|
+
* Deletes the mapping rule with the given ID.
|
|
1350
|
+
* @see DELETE /mapping-rules/{mappingRuleId}
|
|
1351
|
+
*/
|
|
1352
|
+
async deleteMappingRule(mappingRuleId) {
|
|
1353
|
+
return this._http.request({
|
|
1354
|
+
method: "DELETE",
|
|
1355
|
+
path: `/mapping-rules/${mappingRuleId}`,
|
|
1356
|
+
});
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
// ── Message ──
|
|
1360
|
+
export class MessageResource extends ResourceBase {
|
|
1361
|
+
/**
|
|
1362
|
+
* Correlate message
|
|
1363
|
+
*
|
|
1364
|
+
* Publishes a message and correlates it to a subscription.
|
|
1365
|
+
* If correlation is successful it will return the first process instance key the message correlated with.
|
|
1366
|
+
* The message is not buffered.
|
|
1367
|
+
* @see POST /messages/correlation
|
|
1368
|
+
*/
|
|
1369
|
+
async correlateMessage(body) {
|
|
1370
|
+
return this._http.request({
|
|
1371
|
+
method: "POST",
|
|
1372
|
+
path: "/messages/correlation",
|
|
1373
|
+
body,
|
|
1374
|
+
});
|
|
1375
|
+
}
|
|
1376
|
+
/**
|
|
1377
|
+
* Publish message
|
|
1378
|
+
*
|
|
1379
|
+
* Publishes a single message.
|
|
1380
|
+
* Messages are published to specific partitions computed from their correlation keys.
|
|
1381
|
+
* Messages can be buffered.
|
|
1382
|
+
* @see POST /messages/publication
|
|
1383
|
+
*/
|
|
1384
|
+
async publishMessage(body) {
|
|
1385
|
+
return this._http.request({
|
|
1386
|
+
method: "POST",
|
|
1387
|
+
path: "/messages/publication",
|
|
1388
|
+
body,
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
// ── Process definition ──
|
|
1393
|
+
export class ProcessDefinitionResource extends ResourceBase {
|
|
1394
|
+
/**
|
|
1395
|
+
* Search process definitions
|
|
1396
|
+
*
|
|
1397
|
+
* Search for process definitions based on given criteria.
|
|
1398
|
+
* @see POST /process-definitions/search
|
|
1399
|
+
*/
|
|
1400
|
+
async searchProcessDefinitions(body) {
|
|
1401
|
+
return this._http.request({
|
|
1402
|
+
method: "POST",
|
|
1403
|
+
path: "/process-definitions/search",
|
|
1404
|
+
body,
|
|
1405
|
+
cacheable: true,
|
|
1406
|
+
});
|
|
1407
|
+
}
|
|
1408
|
+
/**
|
|
1409
|
+
* Get message subscription statistics
|
|
1410
|
+
*
|
|
1411
|
+
* Get message subscription statistics, grouped by process definition.
|
|
1412
|
+
* @see POST /process-definitions/statistics/message-subscriptions
|
|
1413
|
+
*/
|
|
1414
|
+
async getProcessDefinitionMessageSubscriptionStatistics(body) {
|
|
1415
|
+
return this._http.request({
|
|
1416
|
+
method: "POST",
|
|
1417
|
+
path: "/process-definitions/statistics/message-subscriptions",
|
|
1418
|
+
body,
|
|
1419
|
+
cacheable: true,
|
|
1420
|
+
});
|
|
1421
|
+
}
|
|
1422
|
+
/**
|
|
1423
|
+
* Get process instance statistics
|
|
1424
|
+
*
|
|
1425
|
+
* Get statistics about process instances, grouped by process definition and tenant.
|
|
1426
|
+
* @see POST /process-definitions/statistics/process-instances
|
|
1427
|
+
*/
|
|
1428
|
+
async getProcessDefinitionInstanceStatistics(body) {
|
|
1429
|
+
return this._http.request({
|
|
1430
|
+
method: "POST",
|
|
1431
|
+
path: "/process-definitions/statistics/process-instances",
|
|
1432
|
+
body,
|
|
1433
|
+
cacheable: true,
|
|
1434
|
+
});
|
|
1435
|
+
}
|
|
1436
|
+
/**
|
|
1437
|
+
* Get process definition
|
|
1438
|
+
*
|
|
1439
|
+
* Returns process definition as JSON.
|
|
1440
|
+
* @see GET /process-definitions/{processDefinitionKey}
|
|
1441
|
+
*/
|
|
1442
|
+
async getProcessDefinition(processDefinitionKey) {
|
|
1443
|
+
return this._http.request({
|
|
1444
|
+
method: "GET",
|
|
1445
|
+
path: `/process-definitions/${processDefinitionKey}`,
|
|
1446
|
+
cacheable: true,
|
|
1447
|
+
});
|
|
1448
|
+
}
|
|
1449
|
+
/**
|
|
1450
|
+
* Get process start form
|
|
1451
|
+
*
|
|
1452
|
+
* Get the start form of a process.
|
|
1453
|
+
* Note that this endpoint will only return linked forms. This endpoint does not support embedded forms.
|
|
1454
|
+
* @see GET /process-definitions/{processDefinitionKey}/form
|
|
1455
|
+
*/
|
|
1456
|
+
async getStartProcessForm(processDefinitionKey) {
|
|
1457
|
+
return this._http.request({
|
|
1458
|
+
method: "GET",
|
|
1459
|
+
path: `/process-definitions/${processDefinitionKey}/form`,
|
|
1460
|
+
cacheable: true,
|
|
1461
|
+
});
|
|
1462
|
+
}
|
|
1463
|
+
/**
|
|
1464
|
+
* Get process definition statistics
|
|
1465
|
+
*
|
|
1466
|
+
* Get statistics about elements in currently running process instances by process definition key and search filter.
|
|
1467
|
+
* @see POST /process-definitions/{processDefinitionKey}/statistics/element-instances
|
|
1468
|
+
*/
|
|
1469
|
+
async getProcessDefinitionStatistics(processDefinitionKey, body) {
|
|
1470
|
+
return this._http.request({
|
|
1471
|
+
method: "POST",
|
|
1472
|
+
path: `/process-definitions/${processDefinitionKey}/statistics/element-instances`,
|
|
1473
|
+
body,
|
|
1474
|
+
cacheable: true,
|
|
1475
|
+
});
|
|
1476
|
+
}
|
|
1477
|
+
/**
|
|
1478
|
+
* Get process definition XML
|
|
1479
|
+
*
|
|
1480
|
+
* Returns process definition as XML.
|
|
1481
|
+
* @see GET /process-definitions/{processDefinitionKey}/xml
|
|
1482
|
+
*/
|
|
1483
|
+
async getProcessDefinitionXML(processDefinitionKey) {
|
|
1484
|
+
return this._http.request({
|
|
1485
|
+
method: "GET",
|
|
1486
|
+
path: `/process-definitions/${processDefinitionKey}/xml`,
|
|
1487
|
+
cacheable: true,
|
|
1488
|
+
});
|
|
1489
|
+
}
|
|
1490
|
+
/**
|
|
1491
|
+
* Get process instance statistics by version
|
|
1492
|
+
*
|
|
1493
|
+
* Get statistics about process instances, grouped by version for a given process definition.
|
|
1494
|
+
* The process definition ID must be provided as a required field in the request body filter.
|
|
1495
|
+
* @see POST /process-definitions/statistics/process-instances-by-version
|
|
1496
|
+
*/
|
|
1497
|
+
async getProcessDefinitionInstanceVersionStatistics(body) {
|
|
1498
|
+
return this._http.request({
|
|
1499
|
+
method: "POST",
|
|
1500
|
+
path: "/process-definitions/statistics/process-instances-by-version",
|
|
1501
|
+
body,
|
|
1502
|
+
cacheable: true,
|
|
1503
|
+
});
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
// ── Process instance ──
|
|
1507
|
+
export class ProcessInstanceResource extends ResourceBase {
|
|
1508
|
+
/**
|
|
1509
|
+
* Create process instance
|
|
1510
|
+
*
|
|
1511
|
+
* Creates and starts an instance of the specified process.
|
|
1512
|
+
* The process definition to use to create the instance can be specified either using its unique key
|
|
1513
|
+
* (as returned by Deploy resources), or using the BPMN process id and a version.
|
|
1514
|
+
* @see POST /process-instances
|
|
1515
|
+
*/
|
|
1516
|
+
async createProcessInstance(body) {
|
|
1517
|
+
return this._http.request({
|
|
1518
|
+
method: "POST",
|
|
1519
|
+
path: "/process-instances",
|
|
1520
|
+
body,
|
|
1521
|
+
});
|
|
1522
|
+
}
|
|
1523
|
+
/**
|
|
1524
|
+
* Cancel process instances (batch)
|
|
1525
|
+
*
|
|
1526
|
+
* Cancels multiple running process instances.
|
|
1527
|
+
* Since only ACTIVE root instances can be cancelled, any given filters for state and
|
|
1528
|
+
* parentProcessInstanceKey are ignored and overridden during this batch operation.
|
|
1529
|
+
* @see POST /process-instances/cancellation
|
|
1530
|
+
*/
|
|
1531
|
+
async cancelProcessInstancesBatchOperation(body) {
|
|
1532
|
+
return this._http.request({
|
|
1533
|
+
method: "POST",
|
|
1534
|
+
path: "/process-instances/cancellation",
|
|
1535
|
+
body,
|
|
1536
|
+
});
|
|
1537
|
+
}
|
|
1538
|
+
/**
|
|
1539
|
+
* Delete process instances (batch)
|
|
1540
|
+
*
|
|
1541
|
+
* Delete multiple process instances. This will delete the historic data from secondary storage.
|
|
1542
|
+
* Only process instances in a final state (COMPLETED or TERMINATED) can be deleted.
|
|
1543
|
+
* This is done asynchronously, the progress can be tracked using the batchOperationKey from the response and the batch operation status endpoint (/batch-operations/{batchOperationKey}).
|
|
1544
|
+
* @see POST /process-instances/deletion
|
|
1545
|
+
*/
|
|
1546
|
+
async deleteProcessInstancesBatchOperation(body) {
|
|
1547
|
+
return this._http.request({
|
|
1548
|
+
method: "POST",
|
|
1549
|
+
path: "/process-instances/deletion",
|
|
1550
|
+
body,
|
|
1551
|
+
});
|
|
1552
|
+
}
|
|
1553
|
+
/**
|
|
1554
|
+
* Resolve related incidents (batch)
|
|
1555
|
+
*
|
|
1556
|
+
* Resolves multiple instances of process instances.
|
|
1557
|
+
* Since only process instances with ACTIVE state can have unresolved incidents, any given
|
|
1558
|
+
* filters for state are ignored and overridden during this batch operation.
|
|
1559
|
+
* @see POST /process-instances/incident-resolution
|
|
1560
|
+
*/
|
|
1561
|
+
async resolveIncidentsBatchOperation(body) {
|
|
1562
|
+
return this._http.request({
|
|
1563
|
+
method: "POST",
|
|
1564
|
+
path: "/process-instances/incident-resolution",
|
|
1565
|
+
body,
|
|
1566
|
+
});
|
|
1567
|
+
}
|
|
1568
|
+
/**
|
|
1569
|
+
* Migrate process instances (batch)
|
|
1570
|
+
*
|
|
1571
|
+
* Migrate multiple process instances.
|
|
1572
|
+
* Since only process instances with ACTIVE state can be migrated, any given
|
|
1573
|
+
* filters for state are ignored and overridden during this batch operation.
|
|
1574
|
+
* @see POST /process-instances/migration
|
|
1575
|
+
*/
|
|
1576
|
+
async migrateProcessInstancesBatchOperation(body) {
|
|
1577
|
+
return this._http.request({
|
|
1578
|
+
method: "POST",
|
|
1579
|
+
path: "/process-instances/migration",
|
|
1580
|
+
body,
|
|
1581
|
+
});
|
|
1582
|
+
}
|
|
1583
|
+
/**
|
|
1584
|
+
* Modify process instances (batch)
|
|
1585
|
+
*
|
|
1586
|
+
* Modify multiple process instances.
|
|
1587
|
+
* Since only process instances with ACTIVE state can be modified, any given
|
|
1588
|
+
* filters for state are ignored and overridden during this batch operation.
|
|
1589
|
+
* @see POST /process-instances/modification
|
|
1590
|
+
*/
|
|
1591
|
+
async modifyProcessInstancesBatchOperation(body) {
|
|
1592
|
+
return this._http.request({
|
|
1593
|
+
method: "POST",
|
|
1594
|
+
path: "/process-instances/modification",
|
|
1595
|
+
body,
|
|
1596
|
+
});
|
|
1597
|
+
}
|
|
1598
|
+
/**
|
|
1599
|
+
* Search process instances
|
|
1600
|
+
*
|
|
1601
|
+
* Search for process instances based on given criteria.
|
|
1602
|
+
* @see POST /process-instances/search
|
|
1603
|
+
*/
|
|
1604
|
+
async searchProcessInstances(body) {
|
|
1605
|
+
return this._http.request({
|
|
1606
|
+
method: "POST",
|
|
1607
|
+
path: "/process-instances/search",
|
|
1608
|
+
body,
|
|
1609
|
+
cacheable: true,
|
|
1610
|
+
});
|
|
1611
|
+
}
|
|
1612
|
+
/**
|
|
1613
|
+
* Get process instance
|
|
1614
|
+
*
|
|
1615
|
+
* Get the process instance by the process instance key.
|
|
1616
|
+
* @see GET /process-instances/{processInstanceKey}
|
|
1617
|
+
*/
|
|
1618
|
+
async getProcessInstance(processInstanceKey) {
|
|
1619
|
+
return this._http.request({
|
|
1620
|
+
method: "GET",
|
|
1621
|
+
path: `/process-instances/${processInstanceKey}`,
|
|
1622
|
+
cacheable: true,
|
|
1623
|
+
});
|
|
1624
|
+
}
|
|
1625
|
+
/**
|
|
1626
|
+
* Get call hierarchy
|
|
1627
|
+
*
|
|
1628
|
+
* Returns the call hierarchy for a given process instance, showing its ancestry up to the root instance.
|
|
1629
|
+
* @see GET /process-instances/{processInstanceKey}/call-hierarchy
|
|
1630
|
+
*/
|
|
1631
|
+
async getProcessInstanceCallHierarchy(processInstanceKey) {
|
|
1632
|
+
return this._http.request({
|
|
1633
|
+
method: "GET",
|
|
1634
|
+
path: `/process-instances/${processInstanceKey}/call-hierarchy`,
|
|
1635
|
+
cacheable: true,
|
|
1636
|
+
});
|
|
1637
|
+
}
|
|
1638
|
+
/**
|
|
1639
|
+
* Cancel process instance
|
|
1640
|
+
*
|
|
1641
|
+
* Cancels a running process instance. As a cancellation includes more than just the removal of the process instance resource, the cancellation resource must be posted.
|
|
1642
|
+
* @see POST /process-instances/{processInstanceKey}/cancellation
|
|
1643
|
+
*/
|
|
1644
|
+
async cancelProcessInstance(processInstanceKey, body) {
|
|
1645
|
+
return this._http.request({
|
|
1646
|
+
method: "POST",
|
|
1647
|
+
path: `/process-instances/${processInstanceKey}/cancellation`,
|
|
1648
|
+
body,
|
|
1649
|
+
});
|
|
1650
|
+
}
|
|
1651
|
+
/**
|
|
1652
|
+
* Delete process instance
|
|
1653
|
+
*
|
|
1654
|
+
* Deletes a process instance. Only instances that are completed or terminated can be deleted.
|
|
1655
|
+
* @see POST /process-instances/{processInstanceKey}/deletion
|
|
1656
|
+
*/
|
|
1657
|
+
async deleteProcessInstance(processInstanceKey, body) {
|
|
1658
|
+
return this._http.request({
|
|
1659
|
+
method: "POST",
|
|
1660
|
+
path: `/process-instances/${processInstanceKey}/deletion`,
|
|
1661
|
+
body,
|
|
1662
|
+
});
|
|
1663
|
+
}
|
|
1664
|
+
/**
|
|
1665
|
+
* Resolve related incidents
|
|
1666
|
+
*
|
|
1667
|
+
* Creates a batch operation to resolve multiple incidents of a process instance.
|
|
1668
|
+
* @see POST /process-instances/{processInstanceKey}/incident-resolution
|
|
1669
|
+
*/
|
|
1670
|
+
async resolveProcessInstanceIncidents(processInstanceKey) {
|
|
1671
|
+
return this._http.request({
|
|
1672
|
+
method: "POST",
|
|
1673
|
+
path: `/process-instances/${processInstanceKey}/incident-resolution`,
|
|
1674
|
+
});
|
|
1675
|
+
}
|
|
1676
|
+
/**
|
|
1677
|
+
* Search related incidents
|
|
1678
|
+
*
|
|
1679
|
+
* Search for incidents caused by the process instance or any of its called process or decision instances.
|
|
1680
|
+
*
|
|
1681
|
+
* Although the `processInstanceKey` is provided as a path parameter to indicate the root process instance,
|
|
1682
|
+
* @see POST /process-instances/{processInstanceKey}/incidents/search
|
|
1683
|
+
*/
|
|
1684
|
+
async searchProcessInstanceIncidents(processInstanceKey, body) {
|
|
1685
|
+
return this._http.request({
|
|
1686
|
+
method: "POST",
|
|
1687
|
+
path: `/process-instances/${processInstanceKey}/incidents/search`,
|
|
1688
|
+
body,
|
|
1689
|
+
cacheable: true,
|
|
1690
|
+
});
|
|
1691
|
+
}
|
|
1692
|
+
/**
|
|
1693
|
+
* Migrate process instance
|
|
1694
|
+
*
|
|
1695
|
+
* Migrates a process instance to a new process definition.
|
|
1696
|
+
* This request can contain multiple mapping instructions to define mapping between the active
|
|
1697
|
+
* process instance's elements and target process definition elements.
|
|
1698
|
+
* @see POST /process-instances/{processInstanceKey}/migration
|
|
1699
|
+
*/
|
|
1700
|
+
async migrateProcessInstance(processInstanceKey, body) {
|
|
1701
|
+
return this._http.request({
|
|
1702
|
+
method: "POST",
|
|
1703
|
+
path: `/process-instances/${processInstanceKey}/migration`,
|
|
1704
|
+
body,
|
|
1705
|
+
});
|
|
1706
|
+
}
|
|
1707
|
+
/**
|
|
1708
|
+
* Modify process instance
|
|
1709
|
+
*
|
|
1710
|
+
* Modifies a running process instance.
|
|
1711
|
+
* This request can contain multiple instructions to activate an element of the process or
|
|
1712
|
+
* to terminate an active instance of an element.
|
|
1713
|
+
* @see POST /process-instances/{processInstanceKey}/modification
|
|
1714
|
+
*/
|
|
1715
|
+
async modifyProcessInstance(processInstanceKey, body) {
|
|
1716
|
+
return this._http.request({
|
|
1717
|
+
method: "POST",
|
|
1718
|
+
path: `/process-instances/${processInstanceKey}/modification`,
|
|
1719
|
+
body,
|
|
1720
|
+
});
|
|
1721
|
+
}
|
|
1722
|
+
/**
|
|
1723
|
+
* Get sequence flows
|
|
1724
|
+
*
|
|
1725
|
+
* Get sequence flows taken by the process instance.
|
|
1726
|
+
* @see GET /process-instances/{processInstanceKey}/sequence-flows
|
|
1727
|
+
*/
|
|
1728
|
+
async getProcessInstanceSequenceFlows(processInstanceKey) {
|
|
1729
|
+
return this._http.request({
|
|
1730
|
+
method: "GET",
|
|
1731
|
+
path: `/process-instances/${processInstanceKey}/sequence-flows`,
|
|
1732
|
+
cacheable: true,
|
|
1733
|
+
});
|
|
1734
|
+
}
|
|
1735
|
+
/**
|
|
1736
|
+
* Get element instance statistics
|
|
1737
|
+
*
|
|
1738
|
+
* Get statistics about elements by the process instance key.
|
|
1739
|
+
* @see GET /process-instances/{processInstanceKey}/statistics/element-instances
|
|
1740
|
+
*/
|
|
1741
|
+
async getProcessInstanceStatistics(processInstanceKey) {
|
|
1742
|
+
return this._http.request({
|
|
1743
|
+
method: "GET",
|
|
1744
|
+
path: `/process-instances/${processInstanceKey}/statistics/element-instances`,
|
|
1745
|
+
cacheable: true,
|
|
1746
|
+
});
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
// ── Role ──
|
|
1750
|
+
export class RoleResource extends ResourceBase {
|
|
1751
|
+
/**
|
|
1752
|
+
* Create role
|
|
1753
|
+
*
|
|
1754
|
+
* Create a new role.
|
|
1755
|
+
* @see POST /roles
|
|
1756
|
+
*/
|
|
1757
|
+
async createRole(body) {
|
|
1758
|
+
return this._http.request({
|
|
1759
|
+
method: "POST",
|
|
1760
|
+
path: "/roles",
|
|
1761
|
+
body,
|
|
1762
|
+
});
|
|
1763
|
+
}
|
|
1764
|
+
/**
|
|
1765
|
+
* Search roles
|
|
1766
|
+
*
|
|
1767
|
+
* Search for roles based on given criteria.
|
|
1768
|
+
* @see POST /roles/search
|
|
1769
|
+
*/
|
|
1770
|
+
async searchRoles(body) {
|
|
1771
|
+
return this._http.request({
|
|
1772
|
+
method: "POST",
|
|
1773
|
+
path: "/roles/search",
|
|
1774
|
+
body,
|
|
1775
|
+
cacheable: true,
|
|
1776
|
+
});
|
|
1777
|
+
}
|
|
1778
|
+
/**
|
|
1779
|
+
* Get role
|
|
1780
|
+
*
|
|
1781
|
+
* Get a role by its ID.
|
|
1782
|
+
* @see GET /roles/{roleId}
|
|
1783
|
+
*/
|
|
1784
|
+
async getRole(roleId) {
|
|
1785
|
+
return this._http.request({
|
|
1786
|
+
method: "GET",
|
|
1787
|
+
path: `/roles/${roleId}`,
|
|
1788
|
+
cacheable: true,
|
|
1789
|
+
});
|
|
1790
|
+
}
|
|
1791
|
+
/**
|
|
1792
|
+
* Update role
|
|
1793
|
+
*
|
|
1794
|
+
* Update a role with the given ID.
|
|
1795
|
+
* @see PUT /roles/{roleId}
|
|
1796
|
+
*/
|
|
1797
|
+
async updateRole(roleId, body) {
|
|
1798
|
+
return this._http.request({
|
|
1799
|
+
method: "PUT",
|
|
1800
|
+
path: `/roles/${roleId}`,
|
|
1801
|
+
body,
|
|
1802
|
+
});
|
|
1803
|
+
}
|
|
1804
|
+
/**
|
|
1805
|
+
* Delete role
|
|
1806
|
+
*
|
|
1807
|
+
* Deletes the role with the given ID.
|
|
1808
|
+
* @see DELETE /roles/{roleId}
|
|
1809
|
+
*/
|
|
1810
|
+
async deleteRole(roleId) {
|
|
1811
|
+
return this._http.request({
|
|
1812
|
+
method: "DELETE",
|
|
1813
|
+
path: `/roles/${roleId}`,
|
|
1814
|
+
});
|
|
1815
|
+
}
|
|
1816
|
+
/**
|
|
1817
|
+
* Search role clients
|
|
1818
|
+
*
|
|
1819
|
+
* Search clients with assigned role.
|
|
1820
|
+
* @see POST /roles/{roleId}/clients/search
|
|
1821
|
+
*/
|
|
1822
|
+
async searchClientsForRole(roleId, body) {
|
|
1823
|
+
return this._http.request({
|
|
1824
|
+
method: "POST",
|
|
1825
|
+
path: `/roles/${roleId}/clients/search`,
|
|
1826
|
+
body,
|
|
1827
|
+
cacheable: true,
|
|
1828
|
+
});
|
|
1829
|
+
}
|
|
1830
|
+
/**
|
|
1831
|
+
* Assign a role to a client
|
|
1832
|
+
*
|
|
1833
|
+
* Assigns the specified role to the client. The client will inherit the authorizations associated with this role.
|
|
1834
|
+
* @see PUT /roles/{roleId}/clients/{clientId}
|
|
1835
|
+
*/
|
|
1836
|
+
async assignRoleToClient(roleId, clientId) {
|
|
1837
|
+
return this._http.request({
|
|
1838
|
+
method: "PUT",
|
|
1839
|
+
path: `/roles/${roleId}/clients/${clientId}`,
|
|
1840
|
+
});
|
|
1841
|
+
}
|
|
1842
|
+
/**
|
|
1843
|
+
* Unassign a role from a client
|
|
1844
|
+
*
|
|
1845
|
+
* Unassigns the specified role from the client. The client will no longer inherit the authorizations associated with this role.
|
|
1846
|
+
* @see DELETE /roles/{roleId}/clients/{clientId}
|
|
1847
|
+
*/
|
|
1848
|
+
async unassignRoleFromClient(roleId, clientId) {
|
|
1849
|
+
return this._http.request({
|
|
1850
|
+
method: "DELETE",
|
|
1851
|
+
path: `/roles/${roleId}/clients/${clientId}`,
|
|
1852
|
+
});
|
|
1853
|
+
}
|
|
1854
|
+
/**
|
|
1855
|
+
* Search role groups
|
|
1856
|
+
*
|
|
1857
|
+
* Search groups with assigned role.
|
|
1858
|
+
* @see POST /roles/{roleId}/groups/search
|
|
1859
|
+
*/
|
|
1860
|
+
async searchGroupsForRole(roleId, body) {
|
|
1861
|
+
return this._http.request({
|
|
1862
|
+
method: "POST",
|
|
1863
|
+
path: `/roles/${roleId}/groups/search`,
|
|
1864
|
+
body,
|
|
1865
|
+
cacheable: true,
|
|
1866
|
+
});
|
|
1867
|
+
}
|
|
1868
|
+
/**
|
|
1869
|
+
* Assign a role to a group
|
|
1870
|
+
*
|
|
1871
|
+
* Assigns the specified role to the group. Every member of the group (user or client) will inherit the authorizations associated with this role.
|
|
1872
|
+
* @see PUT /roles/{roleId}/groups/{groupId}
|
|
1873
|
+
*/
|
|
1874
|
+
async assignRoleToGroup(roleId, groupId) {
|
|
1875
|
+
return this._http.request({
|
|
1876
|
+
method: "PUT",
|
|
1877
|
+
path: `/roles/${roleId}/groups/${groupId}`,
|
|
1878
|
+
});
|
|
1879
|
+
}
|
|
1880
|
+
/**
|
|
1881
|
+
* Unassign a role from a group
|
|
1882
|
+
*
|
|
1883
|
+
* Unassigns the specified role from the group. All group members (user or client) no longer inherit the authorizations associated with this role.
|
|
1884
|
+
* @see DELETE /roles/{roleId}/groups/{groupId}
|
|
1885
|
+
*/
|
|
1886
|
+
async unassignRoleFromGroup(roleId, groupId) {
|
|
1887
|
+
return this._http.request({
|
|
1888
|
+
method: "DELETE",
|
|
1889
|
+
path: `/roles/${roleId}/groups/${groupId}`,
|
|
1890
|
+
});
|
|
1891
|
+
}
|
|
1892
|
+
/**
|
|
1893
|
+
* Search role mapping rules
|
|
1894
|
+
*
|
|
1895
|
+
* Search mapping rules with assigned role.
|
|
1896
|
+
* @see POST /roles/{roleId}/mapping-rules/search
|
|
1897
|
+
*/
|
|
1898
|
+
async searchMappingRulesForRole(roleId, body) {
|
|
1899
|
+
return this._http.request({
|
|
1900
|
+
method: "POST",
|
|
1901
|
+
path: `/roles/${roleId}/mapping-rules/search`,
|
|
1902
|
+
body,
|
|
1903
|
+
cacheable: true,
|
|
1904
|
+
});
|
|
1905
|
+
}
|
|
1906
|
+
/**
|
|
1907
|
+
* Assign a role to a mapping rule
|
|
1908
|
+
*
|
|
1909
|
+
* Assigns a role to a mapping rule.
|
|
1910
|
+
* @see PUT /roles/{roleId}/mapping-rules/{mappingRuleId}
|
|
1911
|
+
*/
|
|
1912
|
+
async assignRoleToMappingRule(roleId, mappingRuleId) {
|
|
1913
|
+
return this._http.request({
|
|
1914
|
+
method: "PUT",
|
|
1915
|
+
path: `/roles/${roleId}/mapping-rules/${mappingRuleId}`,
|
|
1916
|
+
});
|
|
1917
|
+
}
|
|
1918
|
+
/**
|
|
1919
|
+
* Unassign a role from a mapping rule
|
|
1920
|
+
*
|
|
1921
|
+
* Unassigns a role from a mapping rule.
|
|
1922
|
+
* @see DELETE /roles/{roleId}/mapping-rules/{mappingRuleId}
|
|
1923
|
+
*/
|
|
1924
|
+
async unassignRoleFromMappingRule(roleId, mappingRuleId) {
|
|
1925
|
+
return this._http.request({
|
|
1926
|
+
method: "DELETE",
|
|
1927
|
+
path: `/roles/${roleId}/mapping-rules/${mappingRuleId}`,
|
|
1928
|
+
});
|
|
1929
|
+
}
|
|
1930
|
+
/**
|
|
1931
|
+
* Search role users
|
|
1932
|
+
*
|
|
1933
|
+
* Search users with assigned role.
|
|
1934
|
+
* @see POST /roles/{roleId}/users/search
|
|
1935
|
+
*/
|
|
1936
|
+
async searchUsersForRole(roleId, body) {
|
|
1937
|
+
return this._http.request({
|
|
1938
|
+
method: "POST",
|
|
1939
|
+
path: `/roles/${roleId}/users/search`,
|
|
1940
|
+
body,
|
|
1941
|
+
cacheable: true,
|
|
1942
|
+
});
|
|
1943
|
+
}
|
|
1944
|
+
/**
|
|
1945
|
+
* Assign a role to a user
|
|
1946
|
+
*
|
|
1947
|
+
* Assigns the specified role to the user. The user will inherit the authorizations associated with this role.
|
|
1948
|
+
* @see PUT /roles/{roleId}/users/{username}
|
|
1949
|
+
*/
|
|
1950
|
+
async assignRoleToUser(roleId, username) {
|
|
1951
|
+
return this._http.request({
|
|
1952
|
+
method: "PUT",
|
|
1953
|
+
path: `/roles/${roleId}/users/${username}`,
|
|
1954
|
+
});
|
|
1955
|
+
}
|
|
1956
|
+
/**
|
|
1957
|
+
* Unassign a role from a user
|
|
1958
|
+
*
|
|
1959
|
+
* Unassigns a role from a user. The user will no longer inherit the authorizations associated with this role.
|
|
1960
|
+
* @see DELETE /roles/{roleId}/users/{username}
|
|
1961
|
+
*/
|
|
1962
|
+
async unassignRoleFromUser(roleId, username) {
|
|
1963
|
+
return this._http.request({
|
|
1964
|
+
method: "DELETE",
|
|
1965
|
+
path: `/roles/${roleId}/users/${username}`,
|
|
1966
|
+
});
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
// ── Setup ──
|
|
1970
|
+
export class SetupResource extends ResourceBase {
|
|
1971
|
+
/**
|
|
1972
|
+
* Create admin user
|
|
1973
|
+
*
|
|
1974
|
+
* Creates a new user and assigns the admin role to it. This endpoint is only usable when users are managed in the Orchestration Cluster and while no user is assigned to the admin role.
|
|
1975
|
+
* @see POST /setup/user
|
|
1976
|
+
*/
|
|
1977
|
+
async createAdminUser(body) {
|
|
1978
|
+
return this._http.request({
|
|
1979
|
+
method: "POST",
|
|
1980
|
+
path: "/setup/user",
|
|
1981
|
+
body,
|
|
1982
|
+
});
|
|
1983
|
+
}
|
|
1984
|
+
}
|
|
1985
|
+
// ── Signal ──
|
|
1986
|
+
export class SignalResource extends ResourceBase {
|
|
1987
|
+
/**
|
|
1988
|
+
* Broadcast signal
|
|
1989
|
+
*
|
|
1990
|
+
* Broadcasts a signal.
|
|
1991
|
+
* @see POST /signals/broadcast
|
|
1992
|
+
*/
|
|
1993
|
+
async broadcastSignal(body) {
|
|
1994
|
+
return this._http.request({
|
|
1995
|
+
method: "POST",
|
|
1996
|
+
path: "/signals/broadcast",
|
|
1997
|
+
body,
|
|
1998
|
+
});
|
|
1999
|
+
}
|
|
2000
|
+
}
|
|
2001
|
+
// ── Cluster ──
|
|
2002
|
+
export class ClusterResource extends ResourceBase {
|
|
2003
|
+
/**
|
|
2004
|
+
* Get cluster status
|
|
2005
|
+
*
|
|
2006
|
+
* Checks the health status of the cluster by verifying if there's at least one partition with a healthy leader.
|
|
2007
|
+
* @see GET /status
|
|
2008
|
+
*/
|
|
2009
|
+
async getStatus() {
|
|
2010
|
+
return this._http.request({
|
|
2011
|
+
method: "GET",
|
|
2012
|
+
path: "/status",
|
|
2013
|
+
});
|
|
2014
|
+
}
|
|
2015
|
+
/**
|
|
2016
|
+
* Get cluster topology
|
|
2017
|
+
*
|
|
2018
|
+
* Obtains the current topology of the cluster the gateway is part of.
|
|
2019
|
+
* @see GET /topology
|
|
2020
|
+
*/
|
|
2021
|
+
async getTopology() {
|
|
2022
|
+
return this._http.request({
|
|
2023
|
+
method: "GET",
|
|
2024
|
+
path: "/topology",
|
|
2025
|
+
});
|
|
2026
|
+
}
|
|
2027
|
+
}
|
|
2028
|
+
// ── System ──
|
|
2029
|
+
export class SystemResource extends ResourceBase {
|
|
2030
|
+
/**
|
|
2031
|
+
* Get usage metrics
|
|
2032
|
+
*
|
|
2033
|
+
* Retrieve the usage metrics based on given criteria.
|
|
2034
|
+
* @see GET /system/usage-metrics
|
|
2035
|
+
*/
|
|
2036
|
+
async getUsageMetrics(query) {
|
|
2037
|
+
return this._http.request({
|
|
2038
|
+
method: "GET",
|
|
2039
|
+
path: "/system/usage-metrics",
|
|
2040
|
+
query: query,
|
|
2041
|
+
cacheable: true,
|
|
2042
|
+
});
|
|
2043
|
+
}
|
|
2044
|
+
}
|
|
2045
|
+
// ── Tenant ──
|
|
2046
|
+
export class TenantResource extends ResourceBase {
|
|
2047
|
+
/**
|
|
2048
|
+
* Create tenant
|
|
2049
|
+
*
|
|
2050
|
+
* Creates a new tenant.
|
|
2051
|
+
* @see POST /tenants
|
|
2052
|
+
*/
|
|
2053
|
+
async createTenant(body) {
|
|
2054
|
+
return this._http.request({
|
|
2055
|
+
method: "POST",
|
|
2056
|
+
path: "/tenants",
|
|
2057
|
+
body,
|
|
2058
|
+
});
|
|
2059
|
+
}
|
|
2060
|
+
/**
|
|
2061
|
+
* Search tenants
|
|
2062
|
+
*
|
|
2063
|
+
* Retrieves a filtered and sorted list of tenants.
|
|
2064
|
+
* @see POST /tenants/search
|
|
2065
|
+
*/
|
|
2066
|
+
async searchTenants(body) {
|
|
2067
|
+
return this._http.request({
|
|
2068
|
+
method: "POST",
|
|
2069
|
+
path: "/tenants/search",
|
|
2070
|
+
body,
|
|
2071
|
+
cacheable: true,
|
|
2072
|
+
});
|
|
2073
|
+
}
|
|
2074
|
+
/**
|
|
2075
|
+
* Get tenant
|
|
2076
|
+
*
|
|
2077
|
+
* Retrieves a single tenant by tenant ID.
|
|
2078
|
+
* @see GET /tenants/{tenantId}
|
|
2079
|
+
*/
|
|
2080
|
+
async getTenant(tenantId) {
|
|
2081
|
+
return this._http.request({
|
|
2082
|
+
method: "GET",
|
|
2083
|
+
path: `/tenants/${tenantId}`,
|
|
2084
|
+
cacheable: true,
|
|
2085
|
+
});
|
|
2086
|
+
}
|
|
2087
|
+
/**
|
|
2088
|
+
* Update tenant
|
|
2089
|
+
*
|
|
2090
|
+
* Updates an existing tenant.
|
|
2091
|
+
* @see PUT /tenants/{tenantId}
|
|
2092
|
+
*/
|
|
2093
|
+
async updateTenant(tenantId, body) {
|
|
2094
|
+
return this._http.request({
|
|
2095
|
+
method: "PUT",
|
|
2096
|
+
path: `/tenants/${tenantId}`,
|
|
2097
|
+
body,
|
|
2098
|
+
});
|
|
2099
|
+
}
|
|
2100
|
+
/**
|
|
2101
|
+
* Delete tenant
|
|
2102
|
+
*
|
|
2103
|
+
* Deletes an existing tenant.
|
|
2104
|
+
* @see DELETE /tenants/{tenantId}
|
|
2105
|
+
*/
|
|
2106
|
+
async deleteTenant(tenantId) {
|
|
2107
|
+
return this._http.request({
|
|
2108
|
+
method: "DELETE",
|
|
2109
|
+
path: `/tenants/${tenantId}`,
|
|
2110
|
+
});
|
|
2111
|
+
}
|
|
2112
|
+
/**
|
|
2113
|
+
* Search clients for tenant
|
|
2114
|
+
*
|
|
2115
|
+
* Retrieves a filtered and sorted list of clients for a specified tenant.
|
|
2116
|
+
* @see POST /tenants/{tenantId}/clients/search
|
|
2117
|
+
*/
|
|
2118
|
+
async searchClientsForTenant(tenantId, body) {
|
|
2119
|
+
return this._http.request({
|
|
2120
|
+
method: "POST",
|
|
2121
|
+
path: `/tenants/${tenantId}/clients/search`,
|
|
2122
|
+
body,
|
|
2123
|
+
cacheable: true,
|
|
2124
|
+
});
|
|
2125
|
+
}
|
|
2126
|
+
/**
|
|
2127
|
+
* Assign a client to a tenant
|
|
2128
|
+
*
|
|
2129
|
+
* Assign the client to the specified tenant.
|
|
2130
|
+
* The client can then access tenant data and perform authorized actions.
|
|
2131
|
+
* @see PUT /tenants/{tenantId}/clients/{clientId}
|
|
2132
|
+
*/
|
|
2133
|
+
async assignClientToTenant(tenantId, clientId) {
|
|
2134
|
+
return this._http.request({
|
|
2135
|
+
method: "PUT",
|
|
2136
|
+
path: `/tenants/${tenantId}/clients/${clientId}`,
|
|
2137
|
+
});
|
|
2138
|
+
}
|
|
2139
|
+
/**
|
|
2140
|
+
* Unassign a client from a tenant
|
|
2141
|
+
*
|
|
2142
|
+
* Unassigns the client from the specified tenant.
|
|
2143
|
+
* The client can no longer access tenant data.
|
|
2144
|
+
* @see DELETE /tenants/{tenantId}/clients/{clientId}
|
|
2145
|
+
*/
|
|
2146
|
+
async unassignClientFromTenant(tenantId, clientId) {
|
|
2147
|
+
return this._http.request({
|
|
2148
|
+
method: "DELETE",
|
|
2149
|
+
path: `/tenants/${tenantId}/clients/${clientId}`,
|
|
2150
|
+
});
|
|
2151
|
+
}
|
|
2152
|
+
/**
|
|
2153
|
+
* Search groups for tenant
|
|
2154
|
+
*
|
|
2155
|
+
* Retrieves a filtered and sorted list of groups for a specified tenant.
|
|
2156
|
+
* @see POST /tenants/{tenantId}/groups/search
|
|
2157
|
+
*/
|
|
2158
|
+
async searchGroupIdsForTenant(tenantId, body) {
|
|
2159
|
+
return this._http.request({
|
|
2160
|
+
method: "POST",
|
|
2161
|
+
path: `/tenants/${tenantId}/groups/search`,
|
|
2162
|
+
body,
|
|
2163
|
+
cacheable: true,
|
|
2164
|
+
});
|
|
2165
|
+
}
|
|
2166
|
+
/**
|
|
2167
|
+
* Assign a group to a tenant
|
|
2168
|
+
*
|
|
2169
|
+
* Assigns a group to a specified tenant.
|
|
2170
|
+
* Group members (users, clients) can then access tenant data and perform authorized actions.
|
|
2171
|
+
* @see PUT /tenants/{tenantId}/groups/{groupId}
|
|
2172
|
+
*/
|
|
2173
|
+
async assignGroupToTenant(tenantId, groupId) {
|
|
2174
|
+
return this._http.request({
|
|
2175
|
+
method: "PUT",
|
|
2176
|
+
path: `/tenants/${tenantId}/groups/${groupId}`,
|
|
2177
|
+
});
|
|
2178
|
+
}
|
|
2179
|
+
/**
|
|
2180
|
+
* Unassign a group from a tenant
|
|
2181
|
+
*
|
|
2182
|
+
* Unassigns a group from a specified tenant.
|
|
2183
|
+
* Members of the group (users, clients) will no longer have access to the tenant's data - except they are assigned directly to the tenant.
|
|
2184
|
+
* @see DELETE /tenants/{tenantId}/groups/{groupId}
|
|
2185
|
+
*/
|
|
2186
|
+
async unassignGroupFromTenant(tenantId, groupId) {
|
|
2187
|
+
return this._http.request({
|
|
2188
|
+
method: "DELETE",
|
|
2189
|
+
path: `/tenants/${tenantId}/groups/${groupId}`,
|
|
2190
|
+
});
|
|
2191
|
+
}
|
|
2192
|
+
/**
|
|
2193
|
+
* Search mapping rules for tenant
|
|
2194
|
+
*
|
|
2195
|
+
* Retrieves a filtered and sorted list of MappingRules for a specified tenant.
|
|
2196
|
+
* @see POST /tenants/{tenantId}/mapping-rules/search
|
|
2197
|
+
*/
|
|
2198
|
+
async searchMappingRulesForTenant(tenantId, body) {
|
|
2199
|
+
return this._http.request({
|
|
2200
|
+
method: "POST",
|
|
2201
|
+
path: `/tenants/${tenantId}/mapping-rules/search`,
|
|
2202
|
+
body,
|
|
2203
|
+
cacheable: true,
|
|
2204
|
+
});
|
|
2205
|
+
}
|
|
2206
|
+
/**
|
|
2207
|
+
* Assign a mapping rule to a tenant
|
|
2208
|
+
*
|
|
2209
|
+
* Assign a single mapping rule to a specified tenant.
|
|
2210
|
+
* @see PUT /tenants/{tenantId}/mapping-rules/{mappingRuleId}
|
|
2211
|
+
*/
|
|
2212
|
+
async assignMappingRuleToTenant(tenantId, mappingRuleId) {
|
|
2213
|
+
return this._http.request({
|
|
2214
|
+
method: "PUT",
|
|
2215
|
+
path: `/tenants/${tenantId}/mapping-rules/${mappingRuleId}`,
|
|
2216
|
+
});
|
|
2217
|
+
}
|
|
2218
|
+
/**
|
|
2219
|
+
* Unassign a mapping rule from a tenant
|
|
2220
|
+
*
|
|
2221
|
+
* Unassigns a single mapping rule from a specified tenant without deleting the rule.
|
|
2222
|
+
* @see DELETE /tenants/{tenantId}/mapping-rules/{mappingRuleId}
|
|
2223
|
+
*/
|
|
2224
|
+
async unassignMappingRuleFromTenant(tenantId, mappingRuleId) {
|
|
2225
|
+
return this._http.request({
|
|
2226
|
+
method: "DELETE",
|
|
2227
|
+
path: `/tenants/${tenantId}/mapping-rules/${mappingRuleId}`,
|
|
2228
|
+
});
|
|
2229
|
+
}
|
|
2230
|
+
/**
|
|
2231
|
+
* Search roles for tenant
|
|
2232
|
+
*
|
|
2233
|
+
* Retrieves a filtered and sorted list of roles for a specified tenant.
|
|
2234
|
+
* @see POST /tenants/{tenantId}/roles/search
|
|
2235
|
+
*/
|
|
2236
|
+
async searchRolesForTenant(tenantId, body) {
|
|
2237
|
+
return this._http.request({
|
|
2238
|
+
method: "POST",
|
|
2239
|
+
path: `/tenants/${tenantId}/roles/search`,
|
|
2240
|
+
body,
|
|
2241
|
+
cacheable: true,
|
|
2242
|
+
});
|
|
2243
|
+
}
|
|
2244
|
+
/**
|
|
2245
|
+
* Assign a role to a tenant
|
|
2246
|
+
*
|
|
2247
|
+
* Assigns a role to a specified tenant.
|
|
2248
|
+
* Users, Clients or Groups, that have the role assigned, will get access to the tenant's data and can perform actions according to their authorizations.
|
|
2249
|
+
* @see PUT /tenants/{tenantId}/roles/{roleId}
|
|
2250
|
+
*/
|
|
2251
|
+
async assignRoleToTenant(tenantId, roleId) {
|
|
2252
|
+
return this._http.request({
|
|
2253
|
+
method: "PUT",
|
|
2254
|
+
path: `/tenants/${tenantId}/roles/${roleId}`,
|
|
2255
|
+
});
|
|
2256
|
+
}
|
|
2257
|
+
/**
|
|
2258
|
+
* Unassign a role from a tenant
|
|
2259
|
+
*
|
|
2260
|
+
* Unassigns a role from a specified tenant.
|
|
2261
|
+
* Users, Clients or Groups, that have the role assigned, will no longer have access to the
|
|
2262
|
+
* tenant's data - unless they are assigned directly to the tenant.
|
|
2263
|
+
* @see DELETE /tenants/{tenantId}/roles/{roleId}
|
|
2264
|
+
*/
|
|
2265
|
+
async unassignRoleFromTenant(tenantId, roleId) {
|
|
2266
|
+
return this._http.request({
|
|
2267
|
+
method: "DELETE",
|
|
2268
|
+
path: `/tenants/${tenantId}/roles/${roleId}`,
|
|
2269
|
+
});
|
|
2270
|
+
}
|
|
2271
|
+
/**
|
|
2272
|
+
* Search users for tenant
|
|
2273
|
+
*
|
|
2274
|
+
* Retrieves a filtered and sorted list of users for a specified tenant.
|
|
2275
|
+
* @see POST /tenants/{tenantId}/users/search
|
|
2276
|
+
*/
|
|
2277
|
+
async searchUsersForTenant(tenantId, body) {
|
|
2278
|
+
return this._http.request({
|
|
2279
|
+
method: "POST",
|
|
2280
|
+
path: `/tenants/${tenantId}/users/search`,
|
|
2281
|
+
body,
|
|
2282
|
+
cacheable: true,
|
|
2283
|
+
});
|
|
2284
|
+
}
|
|
2285
|
+
/**
|
|
2286
|
+
* Assign a user to a tenant
|
|
2287
|
+
*
|
|
2288
|
+
* Assign a single user to a specified tenant. The user can then access tenant data and perform authorized actions.
|
|
2289
|
+
* @see PUT /tenants/{tenantId}/users/{username}
|
|
2290
|
+
*/
|
|
2291
|
+
async assignUserToTenant(tenantId, username) {
|
|
2292
|
+
return this._http.request({
|
|
2293
|
+
method: "PUT",
|
|
2294
|
+
path: `/tenants/${tenantId}/users/${username}`,
|
|
2295
|
+
});
|
|
2296
|
+
}
|
|
2297
|
+
/**
|
|
2298
|
+
* Unassign a user from a tenant
|
|
2299
|
+
*
|
|
2300
|
+
* Unassigns the user from the specified tenant.
|
|
2301
|
+
* The user can no longer access tenant data.
|
|
2302
|
+
* @see DELETE /tenants/{tenantId}/users/{username}
|
|
2303
|
+
*/
|
|
2304
|
+
async unassignUserFromTenant(tenantId, username) {
|
|
2305
|
+
return this._http.request({
|
|
2306
|
+
method: "DELETE",
|
|
2307
|
+
path: `/tenants/${tenantId}/users/${username}`,
|
|
2308
|
+
});
|
|
2309
|
+
}
|
|
2310
|
+
}
|
|
2311
|
+
// ── User ──
|
|
2312
|
+
export class UserResource extends ResourceBase {
|
|
2313
|
+
/**
|
|
2314
|
+
* Create user
|
|
2315
|
+
*
|
|
2316
|
+
* Create a new user.
|
|
2317
|
+
* @see POST /users
|
|
2318
|
+
*/
|
|
2319
|
+
async createUser(body) {
|
|
2320
|
+
return this._http.request({
|
|
2321
|
+
method: "POST",
|
|
2322
|
+
path: "/users",
|
|
2323
|
+
body,
|
|
2324
|
+
});
|
|
2325
|
+
}
|
|
2326
|
+
/**
|
|
2327
|
+
* Search users
|
|
2328
|
+
*
|
|
2329
|
+
* Search for users based on given criteria.
|
|
2330
|
+
* @see POST /users/search
|
|
2331
|
+
*/
|
|
2332
|
+
async searchUsers(body) {
|
|
2333
|
+
return this._http.request({
|
|
2334
|
+
method: "POST",
|
|
2335
|
+
path: "/users/search",
|
|
2336
|
+
body,
|
|
2337
|
+
cacheable: true,
|
|
2338
|
+
});
|
|
2339
|
+
}
|
|
2340
|
+
/**
|
|
2341
|
+
* Get user
|
|
2342
|
+
*
|
|
2343
|
+
* Get a user by its username.
|
|
2344
|
+
* @see GET /users/{username}
|
|
2345
|
+
*/
|
|
2346
|
+
async getUser(username) {
|
|
2347
|
+
return this._http.request({
|
|
2348
|
+
method: "GET",
|
|
2349
|
+
path: `/users/${username}`,
|
|
2350
|
+
cacheable: true,
|
|
2351
|
+
});
|
|
2352
|
+
}
|
|
2353
|
+
/**
|
|
2354
|
+
* Update user
|
|
2355
|
+
*
|
|
2356
|
+
* Updates a user.
|
|
2357
|
+
* @see PUT /users/{username}
|
|
2358
|
+
*/
|
|
2359
|
+
async updateUser(username, body) {
|
|
2360
|
+
return this._http.request({
|
|
2361
|
+
method: "PUT",
|
|
2362
|
+
path: `/users/${username}`,
|
|
2363
|
+
body,
|
|
2364
|
+
});
|
|
2365
|
+
}
|
|
2366
|
+
/**
|
|
2367
|
+
* Delete user
|
|
2368
|
+
*
|
|
2369
|
+
* Deletes a user.
|
|
2370
|
+
* @see DELETE /users/{username}
|
|
2371
|
+
*/
|
|
2372
|
+
async deleteUser(username) {
|
|
2373
|
+
return this._http.request({
|
|
2374
|
+
method: "DELETE",
|
|
2375
|
+
path: `/users/${username}`,
|
|
2376
|
+
});
|
|
2377
|
+
}
|
|
2378
|
+
}
|
|
2379
|
+
// ── User task ──
|
|
2380
|
+
export class UserTaskResource extends ResourceBase {
|
|
2381
|
+
/**
|
|
2382
|
+
* Search user tasks
|
|
2383
|
+
*
|
|
2384
|
+
* Search for user tasks based on given criteria.
|
|
2385
|
+
* @see POST /user-tasks/search
|
|
2386
|
+
*/
|
|
2387
|
+
async searchUserTasks(body) {
|
|
2388
|
+
return this._http.request({
|
|
2389
|
+
method: "POST",
|
|
2390
|
+
path: "/user-tasks/search",
|
|
2391
|
+
body,
|
|
2392
|
+
cacheable: true,
|
|
2393
|
+
});
|
|
2394
|
+
}
|
|
2395
|
+
/**
|
|
2396
|
+
* Get user task
|
|
2397
|
+
*
|
|
2398
|
+
* Get the user task by the user task key.
|
|
2399
|
+
* @see GET /user-tasks/{userTaskKey}
|
|
2400
|
+
*/
|
|
2401
|
+
async getUserTask(userTaskKey) {
|
|
2402
|
+
return this._http.request({
|
|
2403
|
+
method: "GET",
|
|
2404
|
+
path: `/user-tasks/${userTaskKey}`,
|
|
2405
|
+
cacheable: true,
|
|
2406
|
+
});
|
|
2407
|
+
}
|
|
2408
|
+
/**
|
|
2409
|
+
* Update user task
|
|
2410
|
+
*
|
|
2411
|
+
* Update a user task with the given key.
|
|
2412
|
+
* @see PATCH /user-tasks/{userTaskKey}
|
|
2413
|
+
*/
|
|
2414
|
+
async updateUserTask(userTaskKey, body) {
|
|
2415
|
+
return this._http.request({
|
|
2416
|
+
method: "PATCH",
|
|
2417
|
+
path: `/user-tasks/${userTaskKey}`,
|
|
2418
|
+
body,
|
|
2419
|
+
});
|
|
2420
|
+
}
|
|
2421
|
+
/**
|
|
2422
|
+
* Unassign user task
|
|
2423
|
+
*
|
|
2424
|
+
* Removes the assignee of a task with the given key.
|
|
2425
|
+
* @see DELETE /user-tasks/{userTaskKey}/assignee
|
|
2426
|
+
*/
|
|
2427
|
+
async unassignUserTask(userTaskKey) {
|
|
2428
|
+
return this._http.request({
|
|
2429
|
+
method: "DELETE",
|
|
2430
|
+
path: `/user-tasks/${userTaskKey}/assignee`,
|
|
2431
|
+
});
|
|
2432
|
+
}
|
|
2433
|
+
/**
|
|
2434
|
+
* Assign user task
|
|
2435
|
+
*
|
|
2436
|
+
* Assigns a user task with the given key to the given assignee.
|
|
2437
|
+
* @see POST /user-tasks/{userTaskKey}/assignment
|
|
2438
|
+
*/
|
|
2439
|
+
async assignUserTask(userTaskKey, body) {
|
|
2440
|
+
return this._http.request({
|
|
2441
|
+
method: "POST",
|
|
2442
|
+
path: `/user-tasks/${userTaskKey}/assignment`,
|
|
2443
|
+
body,
|
|
2444
|
+
});
|
|
2445
|
+
}
|
|
2446
|
+
/**
|
|
2447
|
+
* Search user task audit logs
|
|
2448
|
+
*
|
|
2449
|
+
* Search for user task audit logs based on given criteria.
|
|
2450
|
+
* @see POST /user-tasks/{userTaskKey}/audit-logs/search
|
|
2451
|
+
*/
|
|
2452
|
+
async searchUserTaskAuditLogs(userTaskKey, body) {
|
|
2453
|
+
return this._http.request({
|
|
2454
|
+
method: "POST",
|
|
2455
|
+
path: `/user-tasks/${userTaskKey}/audit-logs/search`,
|
|
2456
|
+
body,
|
|
2457
|
+
cacheable: true,
|
|
2458
|
+
});
|
|
2459
|
+
}
|
|
2460
|
+
/**
|
|
2461
|
+
* Complete user task
|
|
2462
|
+
*
|
|
2463
|
+
* Completes a user task with the given key.
|
|
2464
|
+
* @see POST /user-tasks/{userTaskKey}/completion
|
|
2465
|
+
*/
|
|
2466
|
+
async completeUserTask(userTaskKey, body) {
|
|
2467
|
+
return this._http.request({
|
|
2468
|
+
method: "POST",
|
|
2469
|
+
path: `/user-tasks/${userTaskKey}/completion`,
|
|
2470
|
+
body,
|
|
2471
|
+
});
|
|
2472
|
+
}
|
|
2473
|
+
/**
|
|
2474
|
+
* Get user task form
|
|
2475
|
+
*
|
|
2476
|
+
* Get the form of a user task.
|
|
2477
|
+
* Note that this endpoint will only return linked forms. This endpoint does not support embedded forms.
|
|
2478
|
+
* @see GET /user-tasks/{userTaskKey}/form
|
|
2479
|
+
*/
|
|
2480
|
+
async getUserTaskForm(userTaskKey) {
|
|
2481
|
+
return this._http.request({
|
|
2482
|
+
method: "GET",
|
|
2483
|
+
path: `/user-tasks/${userTaskKey}/form`,
|
|
2484
|
+
cacheable: true,
|
|
2485
|
+
});
|
|
2486
|
+
}
|
|
2487
|
+
/**
|
|
2488
|
+
* Search user task variables
|
|
2489
|
+
*
|
|
2490
|
+
* Search for user task variables based on given criteria. This endpoint returns all variables
|
|
2491
|
+
* visible from the user task's scope, including variables from parent scopes in the scope
|
|
2492
|
+
* hierarchy. By default, long variable values in the response are truncated.
|
|
2493
|
+
* @see POST /user-tasks/{userTaskKey}/variables/search
|
|
2494
|
+
*/
|
|
2495
|
+
async searchUserTaskVariables(userTaskKey, body, query) {
|
|
2496
|
+
return this._http.request({
|
|
2497
|
+
method: "POST",
|
|
2498
|
+
path: `/user-tasks/${userTaskKey}/variables/search`,
|
|
2499
|
+
body,
|
|
2500
|
+
query: query,
|
|
2501
|
+
cacheable: true,
|
|
2502
|
+
});
|
|
2503
|
+
}
|
|
2504
|
+
}
|
|
2505
|
+
// ── Variable ──
|
|
2506
|
+
export class VariableResource extends ResourceBase {
|
|
2507
|
+
/**
|
|
2508
|
+
* Search variables
|
|
2509
|
+
*
|
|
2510
|
+
* Search for variables based on given criteria.
|
|
2511
|
+
*
|
|
2512
|
+
* This endpoint returns variables that exist directly at the specified scopes - it does not
|
|
2513
|
+
* @see POST /variables/search
|
|
2514
|
+
*/
|
|
2515
|
+
async searchVariables(body, query) {
|
|
2516
|
+
return this._http.request({
|
|
2517
|
+
method: "POST",
|
|
2518
|
+
path: "/variables/search",
|
|
2519
|
+
body,
|
|
2520
|
+
query: query,
|
|
2521
|
+
cacheable: true,
|
|
2522
|
+
});
|
|
2523
|
+
}
|
|
2524
|
+
/**
|
|
2525
|
+
* Get variable
|
|
2526
|
+
*
|
|
2527
|
+
* Get a variable by its key.
|
|
2528
|
+
*
|
|
2529
|
+
* This endpoint returns both process-level and local (element-scoped) variables.
|
|
2530
|
+
* @see GET /variables/{variableKey}
|
|
2531
|
+
*/
|
|
2532
|
+
async getVariable(variableKey) {
|
|
2533
|
+
return this._http.request({
|
|
2534
|
+
method: "GET",
|
|
2535
|
+
path: `/variables/${variableKey}`,
|
|
2536
|
+
cacheable: true,
|
|
2537
|
+
});
|
|
2538
|
+
}
|
|
2539
|
+
}
|
|
2540
|
+
/**
|
|
2541
|
+
* Camunda Orchestration Cluster API client.
|
|
2542
|
+
*/
|
|
2543
|
+
export class CamundaClient extends CamundaBaseClient {
|
|
2544
|
+
/** Audit Log operations */
|
|
2545
|
+
auditLog;
|
|
2546
|
+
/** Authentication operations */
|
|
2547
|
+
authentication;
|
|
2548
|
+
/** Authorization operations */
|
|
2549
|
+
authorization;
|
|
2550
|
+
/** Batch operation operations */
|
|
2551
|
+
batchOperation;
|
|
2552
|
+
/** Clock operations */
|
|
2553
|
+
clock;
|
|
2554
|
+
/** Cluster Variable operations */
|
|
2555
|
+
clusterVariable;
|
|
2556
|
+
/** Conditional operations */
|
|
2557
|
+
conditional;
|
|
2558
|
+
/** Message subscription operations */
|
|
2559
|
+
messageSubscription;
|
|
2560
|
+
/** Decision definition operations */
|
|
2561
|
+
decisionDefinition;
|
|
2562
|
+
/** Decision instance operations */
|
|
2563
|
+
decisionInstance;
|
|
2564
|
+
/** Decision requirements operations */
|
|
2565
|
+
decisionRequirements;
|
|
2566
|
+
/** Resource operations */
|
|
2567
|
+
resource;
|
|
2568
|
+
/** Document operations */
|
|
2569
|
+
document;
|
|
2570
|
+
/** Ad-hoc sub-process operations */
|
|
2571
|
+
adHocSubProcess;
|
|
2572
|
+
/** Element instance operations */
|
|
2573
|
+
elementInstance;
|
|
2574
|
+
/** Expression operations */
|
|
2575
|
+
expression;
|
|
2576
|
+
/** Global listener operations */
|
|
2577
|
+
globalListener;
|
|
2578
|
+
/** Group operations */
|
|
2579
|
+
group;
|
|
2580
|
+
/** Incident operations */
|
|
2581
|
+
incident;
|
|
2582
|
+
/** Job operations */
|
|
2583
|
+
job;
|
|
2584
|
+
/** License operations */
|
|
2585
|
+
license;
|
|
2586
|
+
/** Mapping rule operations */
|
|
2587
|
+
mappingRule;
|
|
2588
|
+
/** Message operations */
|
|
2589
|
+
message;
|
|
2590
|
+
/** Process definition operations */
|
|
2591
|
+
processDefinition;
|
|
2592
|
+
/** Process instance operations */
|
|
2593
|
+
processInstance;
|
|
2594
|
+
/** Role operations */
|
|
2595
|
+
role;
|
|
2596
|
+
/** Setup operations */
|
|
2597
|
+
setup;
|
|
2598
|
+
/** Signal operations */
|
|
2599
|
+
signal;
|
|
2600
|
+
/** Cluster operations */
|
|
2601
|
+
cluster;
|
|
2602
|
+
/** System operations */
|
|
2603
|
+
system;
|
|
2604
|
+
/** Tenant operations */
|
|
2605
|
+
tenant;
|
|
2606
|
+
/** User operations */
|
|
2607
|
+
user;
|
|
2608
|
+
/** User task operations */
|
|
2609
|
+
userTask;
|
|
2610
|
+
/** Variable operations */
|
|
2611
|
+
variable;
|
|
2612
|
+
constructor(config = {}) {
|
|
2613
|
+
super(config);
|
|
2614
|
+
this.auditLog = new AuditLogResource(this.http);
|
|
2615
|
+
this.authentication = new AuthenticationResource(this.http);
|
|
2616
|
+
this.authorization = new AuthorizationResource(this.http);
|
|
2617
|
+
this.batchOperation = new BatchOperationResource(this.http);
|
|
2618
|
+
this.clock = new ClockResource(this.http);
|
|
2619
|
+
this.clusterVariable = new ClusterVariableResource(this.http);
|
|
2620
|
+
this.conditional = new ConditionalResource(this.http);
|
|
2621
|
+
this.messageSubscription = new MessageSubscriptionResource(this.http);
|
|
2622
|
+
this.decisionDefinition = new DecisionDefinitionResource(this.http);
|
|
2623
|
+
this.decisionInstance = new DecisionInstanceResource(this.http);
|
|
2624
|
+
this.decisionRequirements = new DecisionRequirementsResource(this.http);
|
|
2625
|
+
this.resource = new ResourceResource(this.http);
|
|
2626
|
+
this.document = new DocumentResource(this.http);
|
|
2627
|
+
this.adHocSubProcess = new AdHocSubProcessResource(this.http);
|
|
2628
|
+
this.elementInstance = new ElementInstanceResource(this.http);
|
|
2629
|
+
this.expression = new ExpressionResource(this.http);
|
|
2630
|
+
this.globalListener = new GlobalListenerResource(this.http);
|
|
2631
|
+
this.group = new GroupResource(this.http);
|
|
2632
|
+
this.incident = new IncidentResource(this.http);
|
|
2633
|
+
this.job = new JobResource(this.http);
|
|
2634
|
+
this.license = new LicenseResource(this.http);
|
|
2635
|
+
this.mappingRule = new MappingRuleResource(this.http);
|
|
2636
|
+
this.message = new MessageResource(this.http);
|
|
2637
|
+
this.processDefinition = new ProcessDefinitionResource(this.http);
|
|
2638
|
+
this.processInstance = new ProcessInstanceResource(this.http);
|
|
2639
|
+
this.role = new RoleResource(this.http);
|
|
2640
|
+
this.setup = new SetupResource(this.http);
|
|
2641
|
+
this.signal = new SignalResource(this.http);
|
|
2642
|
+
this.cluster = new ClusterResource(this.http);
|
|
2643
|
+
this.system = new SystemResource(this.http);
|
|
2644
|
+
this.tenant = new TenantResource(this.http);
|
|
2645
|
+
this.user = new UserResource(this.http);
|
|
2646
|
+
this.userTask = new UserTaskResource(this.http);
|
|
2647
|
+
this.variable = new VariableResource(this.http);
|
|
2648
|
+
}
|
|
2649
|
+
}
|
|
2650
|
+
//# sourceMappingURL=resources.js.map
|