@quantumbpm/sdk 1.3.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/README.md +57 -34
  2. package/dist/auth.d.ts +19 -14
  3. package/dist/auth.js +62 -84
  4. package/dist/bpmn.d.ts +86 -23
  5. package/dist/bpmn.js +66 -34
  6. package/dist/dmn.d.ts +0 -6
  7. package/dist/dmn.js +1 -15
  8. package/dist/generated/RawClient.js +2 -2
  9. package/dist/generated/core/OpenAPI.js +2 -2
  10. package/dist/generated/index.d.ts +9 -3
  11. package/dist/generated/index.js +10 -4
  12. package/dist/generated/models/BpmnActivityState.d.ts +85 -0
  13. package/dist/generated/models/BpmnActivityState.js +18 -0
  14. package/dist/generated/models/BpmnElementStatistics.d.ts +36 -0
  15. package/dist/generated/models/BpmnElementStatistics.js +17 -0
  16. package/dist/generated/models/BpmnExternalJobPaginatedResponse.d.ts +2 -2
  17. package/dist/generated/models/BpmnExternalJobPaginatedResponse.js +1 -1
  18. package/dist/generated/models/BpmnHistoryPage.d.ts +15 -0
  19. package/dist/generated/models/BpmnHistoryPage.js +3 -0
  20. package/dist/generated/models/BpmnIncident.d.ts +11 -17
  21. package/dist/generated/models/BpmnIncident.js +7 -11
  22. package/dist/generated/models/BpmnIncidentRecord.d.ts +7 -13
  23. package/dist/generated/models/BpmnIncidentRecord.js +4 -6
  24. package/dist/generated/models/BpmnIncidentRecordPaginatedResponse.d.ts +2 -2
  25. package/dist/generated/models/BpmnIncidentRecordPaginatedResponse.js +1 -1
  26. package/dist/generated/models/BpmnInstance.d.ts +14 -29
  27. package/dist/generated/models/BpmnInstance.js +1 -17
  28. package/dist/generated/models/BpmnInstancePaginatedResponse.d.ts +2 -2
  29. package/dist/generated/models/BpmnInstancePaginatedResponse.js +1 -1
  30. package/dist/generated/models/BpmnInstanceState.d.ts +31 -14
  31. package/dist/generated/models/BpmnInstanceState.js +1 -1
  32. package/dist/generated/models/BpmnInstanceStatus.d.ts +10 -0
  33. package/dist/generated/models/BpmnInstanceStatus.js +19 -0
  34. package/dist/generated/models/BpmnProcessDefinition.d.ts +5 -5
  35. package/dist/generated/models/BpmnProcessDefinition.js +1 -1
  36. package/dist/generated/models/BpmnProcessVersion.d.ts +9 -9
  37. package/dist/generated/models/BpmnProcessVersion.js +1 -1
  38. package/dist/generated/models/BpmnUserTaskPaginatedResponse.d.ts +2 -2
  39. package/dist/generated/models/BpmnUserTaskPaginatedResponse.js +1 -1
  40. package/dist/generated/models/CorrelationKeys.d.ts +7 -6
  41. package/dist/generated/models/CorrelationKeys.js +1 -1
  42. package/dist/generated/models/CreateDefinitionRequest.d.ts +1 -5
  43. package/dist/generated/models/CreateDefinitionRequest.js +1 -1
  44. package/dist/generated/models/CursorPage.d.ts +12 -0
  45. package/dist/generated/models/CursorPage.js +3 -0
  46. package/dist/generated/models/DecisionKind.d.ts +10 -0
  47. package/dist/generated/models/DecisionKind.js +19 -0
  48. package/dist/generated/models/DecisionSummary.d.ts +8 -6
  49. package/dist/generated/models/DecisionSummary.js +1 -1
  50. package/dist/generated/models/DecisionVersion.d.ts +25 -0
  51. package/dist/generated/models/DecisionVersion.js +3 -0
  52. package/dist/generated/models/DecisionVersionList.d.ts +7 -0
  53. package/dist/generated/models/DecisionVersionList.js +3 -0
  54. package/dist/generated/models/Definition.d.ts +16 -8
  55. package/dist/generated/models/Definition.js +1 -1
  56. package/dist/generated/models/Error.d.ts +4 -4
  57. package/dist/generated/models/Error.js +3 -3
  58. package/dist/generated/models/EvaluateStoredRequest.d.ts +5 -6
  59. package/dist/generated/models/EvaluateStoredRequest.js +1 -1
  60. package/dist/generated/models/EvaluationResult.d.ts +6 -0
  61. package/dist/generated/models/EvaluationResult.js +1 -1
  62. package/dist/generated/models/Execution.d.ts +37 -9
  63. package/dist/generated/models/Execution.js +1 -1
  64. package/dist/generated/models/ExternalJob.d.ts +8 -8
  65. package/dist/generated/models/ExternalJob.js +1 -1
  66. package/dist/generated/models/HitRule.d.ts +4 -0
  67. package/dist/generated/models/HitRule.js +1 -1
  68. package/dist/generated/models/PaginatedExecutionsResponse.d.ts +2 -2
  69. package/dist/generated/models/PaginatedExecutionsResponse.js +1 -1
  70. package/dist/generated/models/StartBpmnInstanceRequest.d.ts +6 -2
  71. package/dist/generated/models/StartBpmnInstanceRequest.js +1 -1
  72. package/dist/generated/models/SuspendBpmnInstanceRequest.d.ts +1 -1
  73. package/dist/generated/models/SuspendBpmnInstanceRequest.js +1 -1
  74. package/dist/generated/models/UpdateDefinitionRequest.d.ts +1 -5
  75. package/dist/generated/models/UpdateDefinitionRequest.js +1 -1
  76. package/dist/generated/models/UserTask.d.ts +15 -11
  77. package/dist/generated/models/UserTask.js +1 -1
  78. package/dist/generated/services/BpmnService.d.ts +189 -91
  79. package/dist/generated/services/BpmnService.js +276 -124
  80. package/dist/generated/services/DefaultService.d.ts +111 -115
  81. package/dist/generated/services/DefaultService.js +136 -168
  82. package/dist/index.d.ts +8 -8
  83. package/dist/index.js +7 -7
  84. package/dist/tracing.js +2 -2
  85. package/dist/workers.d.ts +2 -2
  86. package/dist/workers.js +4 -3
  87. package/package.json +2 -4
  88. package/src/auth.test.ts +128 -0
  89. package/src/auth.ts +67 -64
  90. package/src/bpmn.ts +133 -46
  91. package/src/dmn.ts +0 -19
  92. package/src/generated/RawClient.ts +1 -1
  93. package/src/generated/core/OpenAPI.ts +1 -1
  94. package/src/generated/index.ts +9 -3
  95. package/src/generated/models/BpmnActivityState.ts +90 -0
  96. package/src/generated/models/BpmnElementStatistics.ts +41 -0
  97. package/src/generated/models/BpmnExternalJobPaginatedResponse.ts +2 -2
  98. package/src/generated/models/BpmnHistoryPage.ts +20 -0
  99. package/src/generated/models/BpmnIncident.ts +11 -17
  100. package/src/generated/models/BpmnIncidentRecord.ts +7 -13
  101. package/src/generated/models/BpmnIncidentRecordPaginatedResponse.ts +2 -2
  102. package/src/generated/models/BpmnInstance.ts +14 -29
  103. package/src/generated/models/BpmnInstancePaginatedResponse.ts +2 -2
  104. package/src/generated/models/BpmnInstanceState.ts +31 -14
  105. package/src/generated/models/BpmnInstanceStatus.ts +14 -0
  106. package/src/generated/models/BpmnProcessDefinition.ts +5 -5
  107. package/src/generated/models/BpmnProcessVersion.ts +9 -9
  108. package/src/generated/models/BpmnUserTaskPaginatedResponse.ts +2 -2
  109. package/src/generated/models/CorrelationKeys.ts +7 -6
  110. package/src/generated/models/CreateDefinitionRequest.ts +1 -5
  111. package/src/generated/models/CursorPage.ts +17 -0
  112. package/src/generated/models/DecisionKind.ts +14 -0
  113. package/src/generated/models/DecisionSummary.ts +8 -6
  114. package/src/generated/models/DecisionVersion.ts +30 -0
  115. package/src/generated/models/DecisionVersionList.ts +12 -0
  116. package/src/generated/models/Definition.ts +16 -8
  117. package/src/generated/models/Error.ts +4 -4
  118. package/src/generated/models/EvaluateStoredRequest.ts +5 -6
  119. package/src/generated/models/EvaluationResult.ts +6 -0
  120. package/src/generated/models/Execution.ts +37 -9
  121. package/src/generated/models/ExternalJob.ts +8 -8
  122. package/src/generated/models/HitRule.ts +4 -0
  123. package/src/generated/models/PaginatedExecutionsResponse.ts +2 -2
  124. package/src/generated/models/StartBpmnInstanceRequest.ts +6 -2
  125. package/src/generated/models/SuspendBpmnInstanceRequest.ts +1 -1
  126. package/src/generated/models/UpdateDefinitionRequest.ts +1 -5
  127. package/src/generated/models/UserTask.ts +15 -11
  128. package/src/generated/services/BpmnService.ts +333 -142
  129. package/src/generated/services/DefaultService.ts +160 -198
  130. package/src/index.test.ts +74 -31
  131. package/src/index.ts +13 -7
  132. package/src/tracing.ts +1 -1
  133. package/src/workers.test.ts +2 -3
  134. package/src/workers.ts +5 -4
  135. package/dist/generated/models/BpmnInstanceChildrenResponse.d.ts +0 -7
  136. package/dist/generated/models/BpmnInstanceChildrenResponse.js +0 -3
  137. package/dist/generated/models/CreateProjectRequest.d.ts +0 -9
  138. package/dist/generated/models/CreateProjectRequest.js +0 -3
  139. package/src/generated/models/BpmnInstanceChildrenResponse.ts +0 -12
  140. package/src/generated/models/CreateProjectRequest.ts +0 -14
@@ -2,9 +2,12 @@
2
2
  /* istanbul ignore file */
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
5
+ import type { BpmnActivityState } from '../models/BpmnActivityState';
6
+ import type { BpmnHistoryPage } from '../models/BpmnHistoryPage';
5
7
  import type { BpmnIncidentRecordPaginatedResponse } from '../models/BpmnIncidentRecordPaginatedResponse';
6
- import type { BpmnInstanceChildrenResponse } from '../models/BpmnInstanceChildrenResponse';
8
+ import type { BpmnInstancePaginatedResponse } from '../models/BpmnInstancePaginatedResponse';
7
9
  import type { BpmnProcessSummaryPaginatedResponse } from '../models/BpmnProcessSummaryPaginatedResponse';
10
+ import type { BpmnProcessVersion } from '../models/BpmnProcessVersion';
8
11
  import type { BpmnProcessVersionPaginatedResponse } from '../models/BpmnProcessVersionPaginatedResponse';
9
12
  import type { BpmnResourceDetail } from '../models/BpmnResourceDetail';
10
13
  import type { BpmnResourcePaginatedResponse } from '../models/BpmnResourcePaginatedResponse';
@@ -58,7 +61,9 @@ export class BpmnService {
58
61
  * Create a BPMN resource
59
62
  * Uploads a new BPMN XML resource as a draft. Drafts can be edited and
60
63
  * tested but cannot start production instances until they are deployed.
61
- * The XML is validated; invalid XML is rejected.
64
+ * Invalid XML is rejected. XML identical to the latest deployed resource
65
+ * of the same `<definitions id>` is refused with 409, and nothing is
66
+ * saved.
62
67
  *
63
68
  * @param projectId
64
69
  * @param requestBody
@@ -77,6 +82,9 @@ export class BpmnService {
77
82
  },
78
83
  body: requestBody,
79
84
  mediaType: 'application/json',
85
+ errors: {
86
+ 409: `Conflict`,
87
+ },
80
88
  });
81
89
  }
82
90
  /**
@@ -129,7 +137,7 @@ export class BpmnService {
129
137
  body: requestBody,
130
138
  mediaType: 'application/json',
131
139
  errors: {
132
- 409: `Conflict - resource is already deployed`,
140
+ 409: `Conflict`,
133
141
  },
134
142
  });
135
143
  }
@@ -156,15 +164,18 @@ export class BpmnService {
156
164
  'resourceID': resourceId,
157
165
  },
158
166
  errors: {
159
- 409: `Conflict - resource has running instances`,
167
+ 409: `Conflict`,
160
168
  },
161
169
  });
162
170
  }
163
171
  /**
164
172
  * Deploy a BPMN resource
165
173
  * Marks all processes inside the resource as executable, making them
166
- * available to start instances of. Deployment is one-way; to change a
167
- * deployed resource, upload a new version and deploy that.
174
+ * available to start instances of. Each of them gets its next version.
175
+ * Deployment is one-way. To change a deployed resource, upload a new
176
+ * version and deploy that. A resource identical to the latest deployed
177
+ * resource of the same `<definitions id>` is refused with 409, and
178
+ * deploying that latest one again changes nothing.
168
179
  *
169
180
  * @param projectId
170
181
  * @param resourceId
@@ -186,6 +197,7 @@ export class BpmnService {
186
197
  400: `Bad Request`,
187
198
  401: `Unauthorized`,
188
199
  404: `Not Found`,
200
+ 409: `Conflict`,
189
201
  500: `Internal Server Error`,
190
202
  },
191
203
  });
@@ -194,9 +206,19 @@ export class BpmnService {
194
206
  * Start a test instance from a resource
195
207
  * Starts a test instance of a resource, draft or deployed. A draft can
196
208
  * only be started this way, which makes it the way to try out an
197
- * in-progress design before deploying.
198
- * Test instances run with the same engine as production but are flagged
199
- * so they can be filtered out of dashboards.
209
+ * in-progress design before deploying. A suspended definition does not
210
+ * stop it, since the test run takes no deployed version.
211
+ *
212
+ * A test run runs on the same engine as production but stays apart from
213
+ * it, and so do its call-activity children. It stays a test run for
214
+ * life, also after a migration to a deployed version.
215
+ * - Its job task types, message names and signal names carry the
216
+ * `draft:` prefix. A worker activates `draft:<type>` to work its jobs,
217
+ * and a publish names `draft:<name>` to reach it.
218
+ * - Its user tasks, jobs and incidents list only when `instanceID` names
219
+ * it.
220
+ * - Instance counts, analytics and job queue depth leave it out. The
221
+ * instance list shows it, with `draft` set.
200
222
  *
201
223
  * @param projectId
202
224
  * @param resourceId
@@ -210,9 +232,9 @@ export class BpmnService {
210
232
  requestBody: StartBpmnTestInstanceRequest,
211
233
  ): CancelablePromise<{
212
234
  /**
213
- * Stable execution identifier of the new test instance.
235
+ * Identifier of the new test instance.
214
236
  */
215
- workflowID?: string;
237
+ instanceID?: string;
216
238
  }> {
217
239
  return this.httpRequest.request({
218
240
  method: 'POST',
@@ -263,7 +285,7 @@ export class BpmnService {
263
285
  }
264
286
  /**
265
287
  * List all versions of a BPMN resource
266
- * Returns every stored version of a resource identified by the BPMN XML's outer `definitions` id, oldest to newest.
288
+ * Returns every stored version of a resource identified by the BPMN XML's outer `definitions` id, newest first.
267
289
  * @param projectId
268
290
  * @param definitionsId
269
291
  * @param page
@@ -322,25 +344,33 @@ export class BpmnService {
322
344
  }
323
345
  /**
324
346
  * List child instances of a BPMN instance
325
- * Returns instances that this instance spawned via CallActivity elements.
326
- * Useful for navigating into a multi-level process hierarchy (parents
327
- * can be discovered via `parentWorkflowID` on the child).
347
+ * Returns instances that this instance spawned via CallActivity elements,
348
+ * newest first. Useful for navigating into a multi-level process hierarchy
349
+ * (parents can be discovered via `parentInstanceID` on the child).
328
350
  *
329
351
  * @param projectId
330
- * @param workflowId
331
- * @returns BpmnInstanceChildrenResponse OK
352
+ * @param instanceId
353
+ * @param cursor The `nextCursor` of the page before, absent for the first page.
354
+ * @param limit Most instances per page, 20 by default and 100 at most.
355
+ * @returns BpmnInstancePaginatedResponse OK
332
356
  * @throws ApiError
333
357
  */
334
358
  public getBpmnInstanceChildren(
335
359
  projectId: string,
336
- workflowId: string,
337
- ): CancelablePromise<BpmnInstanceChildrenResponse> {
360
+ instanceId: string,
361
+ cursor?: string,
362
+ limit?: number,
363
+ ): CancelablePromise<BpmnInstancePaginatedResponse> {
338
364
  return this.httpRequest.request({
339
365
  method: 'GET',
340
- url: '/projects/{projectID}/bpmn/instances/{workflowID}/children',
366
+ url: '/projects/{projectID}/bpmn/instances/{instanceID}/children',
341
367
  path: {
342
368
  'projectID': projectId,
343
- 'workflowID': workflowId,
369
+ 'instanceID': instanceId,
370
+ },
371
+ query: {
372
+ 'cursor': cursor,
373
+ 'limit': limit,
344
374
  },
345
375
  });
346
376
  }
@@ -348,22 +378,22 @@ export class BpmnService {
348
378
  * Get BPMN instance variables
349
379
  * Returns the current variables in the root scope of a running or completed instance.
350
380
  * @param projectId
351
- * @param workflowId
381
+ * @param instanceId
352
382
  * @returns any OK
353
383
  * @throws ApiError
354
384
  */
355
385
  public getBpmnInstanceVariables(
356
386
  projectId: string,
357
- workflowId: string,
387
+ instanceId: string,
358
388
  ): CancelablePromise<{
359
389
  variables?: Record<string, any>;
360
390
  }> {
361
391
  return this.httpRequest.request({
362
392
  method: 'GET',
363
- url: '/projects/{projectID}/bpmn/instances/{workflowID}/variables',
393
+ url: '/projects/{projectID}/bpmn/instances/{instanceID}/variables',
364
394
  path: {
365
395
  'projectID': projectId,
366
- 'workflowID': workflowId,
396
+ 'instanceID': instanceId,
367
397
  },
368
398
  });
369
399
  }
@@ -375,29 +405,104 @@ export class BpmnService {
375
405
  * payload are kept; pass `null` to clear a key.
376
406
  *
377
407
  * @param projectId
378
- * @param workflowId
408
+ * @param instanceId
379
409
  * @param requestBody
380
410
  * @returns any OK
381
411
  * @throws ApiError
382
412
  */
383
413
  public updateBpmnInstanceVariables(
384
414
  projectId: string,
385
- workflowId: string,
415
+ instanceId: string,
386
416
  requestBody: {
387
417
  variables: Record<string, any>;
388
418
  },
389
419
  ): CancelablePromise<any> {
390
420
  return this.httpRequest.request({
391
421
  method: 'PUT',
392
- url: '/projects/{projectID}/bpmn/instances/{workflowID}/variables',
422
+ url: '/projects/{projectID}/bpmn/instances/{instanceID}/variables',
393
423
  path: {
394
424
  'projectID': projectId,
395
- 'workflowID': workflowId,
425
+ 'instanceID': instanceId,
396
426
  },
397
427
  body: requestBody,
398
428
  mediaType: 'application/json',
399
429
  });
400
430
  }
431
+ /**
432
+ * Get a page of a BPMN instance's history
433
+ * A window of an instance's BPMN history, oldest first, for a running or
434
+ * an ended instance. Without a cursor it is the newest entries.
435
+ * `beforeSeq` reads the entries before one, to walk back, and `fromSeq`
436
+ * the entries from one on, to follow a running instance. Every entry
437
+ * carries its `seq`.
438
+ *
439
+ * Page entries leave out `inputs` and `outputs`, so a page costs the same
440
+ * however long the history is. Read one entry's payload from
441
+ * `GetBpmnInstanceHistoryEntry`. The diagram needs no history at all: the
442
+ * instance state's `elementStatistics` and `takenFlows` summarise it.
443
+ *
444
+ * @param projectId
445
+ * @param instanceId
446
+ * @param fromSeq Read the entries from this seq on. Takes precedence over `beforeSeq`.
447
+ * @param beforeSeq Read the newest entries before this seq.
448
+ * @param limit Max entries per page. Clamped server-side to the engine's max page size.
449
+ * @returns BpmnHistoryPage OK
450
+ * @throws ApiError
451
+ */
452
+ public getBpmnInstanceHistory(
453
+ projectId: string,
454
+ instanceId: string,
455
+ fromSeq?: number,
456
+ beforeSeq?: number,
457
+ limit?: number,
458
+ ): CancelablePromise<BpmnHistoryPage> {
459
+ return this.httpRequest.request({
460
+ method: 'GET',
461
+ url: '/projects/{projectID}/bpmn/instances/{instanceID}/history',
462
+ path: {
463
+ 'projectID': projectId,
464
+ 'instanceID': instanceId,
465
+ },
466
+ query: {
467
+ 'fromSeq': fromSeq,
468
+ 'beforeSeq': beforeSeq,
469
+ 'limit': limit,
470
+ },
471
+ errors: {
472
+ 404: `Not Found`,
473
+ },
474
+ });
475
+ }
476
+ /**
477
+ * Get one BPMN history entry with its payload
478
+ * One history entry with its `inputs` and `outputs`. The engine rebuilds
479
+ * them from the variable writes of every entry before it, so the read
480
+ * grows with the entry's position: around 0.3 s at entry 40,000.
481
+ *
482
+ * @param projectId
483
+ * @param instanceId
484
+ * @param seq
485
+ * @returns BpmnActivityState OK
486
+ * @throws ApiError
487
+ */
488
+ public getBpmnInstanceHistoryEntry(
489
+ projectId: string,
490
+ instanceId: string,
491
+ seq: number,
492
+ ): CancelablePromise<BpmnActivityState> {
493
+ return this.httpRequest.request({
494
+ method: 'GET',
495
+ url: '/projects/{projectID}/bpmn/instances/{instanceID}/history/{seq}',
496
+ path: {
497
+ 'projectID': projectId,
498
+ 'instanceID': instanceId,
499
+ 'seq': seq,
500
+ },
501
+ errors: {
502
+ 404: `Not Found`,
503
+ },
504
+ });
505
+ }
401
506
  /**
402
507
  * Resolve an incident and retry the failed activity
403
508
  * Marks an incident as resolved and re-runs the activity that produced it.
@@ -406,7 +511,7 @@ export class BpmnService {
406
511
  * that triggered a FEEL evaluation error).
407
512
  *
408
513
  * @param projectId
409
- * @param workflowId
514
+ * @param instanceId
410
515
  * @param incidentId
411
516
  * @param requestBody
412
517
  * @returns any OK
@@ -414,7 +519,7 @@ export class BpmnService {
414
519
  */
415
520
  public resolveBpmnIncident(
416
521
  projectId: string,
417
- workflowId: string,
522
+ instanceId: string,
418
523
  incidentId: string,
419
524
  requestBody?: {
420
525
  variables?: Record<string, any>;
@@ -422,10 +527,10 @@ export class BpmnService {
422
527
  ): CancelablePromise<any> {
423
528
  return this.httpRequest.request({
424
529
  method: 'POST',
425
- url: '/projects/{projectID}/bpmn/instances/{workflowID}/incidents/{incidentID}/resolve',
530
+ url: '/projects/{projectID}/bpmn/instances/{instanceID}/incidents/{incidentID}/resolve',
426
531
  path: {
427
532
  'projectID': projectId,
428
- 'workflowID': workflowId,
533
+ 'instanceID': instanceId,
429
534
  'incidentID': incidentId,
430
535
  },
431
536
  body: requestBody,
@@ -436,37 +541,39 @@ export class BpmnService {
436
541
  * List BPMN incidents
437
542
  * Cross-instance audit listing of incidents in the project. By default
438
543
  * returns open incidents first (unresolved), ordered by recency.
439
- * Filterable by definition, error type, status, and time window.
544
+ * Filterable by process version, error type, status, and time window.
440
545
  *
441
546
  * Each row carries the parent process metadata (processID, processName)
442
547
  * so a single page render needs no follow-up queries against the
443
548
  * instances endpoint. Click-through to a specific instance still uses
444
- * the workflow-scoped detail endpoint.
549
+ * the instance detail endpoint.
445
550
  *
446
551
  * @param projectId
447
- * @param definitionId Restrict to incidents on instances of a single process definition.
448
- * @param workflowId Restrict to incidents on a single instance - useful for an instance-detail "all incidents ever raised here" view that includes resolved rows.
552
+ * @param processId Restrict to incidents on instances of one process, in any version unless `version` names one.
553
+ * @param version Restrict to one version of `processID`. Ignored without `processID`.
554
+ * @param instanceId Restrict to incidents on a single instance - useful for an instance-detail "all incidents ever raised here" view that includes resolved rows. A test run's incidents list only by its instance.
449
555
  * @param status Filter by lifecycle status. `open` returns unresolved incidents;
450
556
  * `resolved` returns only resolved ones. Omit to return both.
451
557
  *
452
558
  * @param errorType Restrict to a single error category (matches `BpmnIncidentRecord.errorType`).
453
559
  * @param since Earliest `raisedAt` to include (inclusive).
454
560
  * @param until Latest `raisedAt` to include (exclusive).
455
- * @param page
456
- * @param pageSize
561
+ * @param cursor The `nextCursor` of the page before, absent for the first page.
562
+ * @param limit Most incidents per page, 20 by default and 100 at most.
457
563
  * @returns BpmnIncidentRecordPaginatedResponse OK
458
564
  * @throws ApiError
459
565
  */
460
566
  public listBpmnIncidents(
461
567
  projectId: string,
462
- definitionId?: string,
463
- workflowId?: string,
568
+ processId?: string,
569
+ version?: number,
570
+ instanceId?: string,
464
571
  status?: 'open' | 'resolved',
465
- errorType?: 'BpmnError' | 'EscalationError' | 'CompensationError' | 'FeelError' | 'NoHandler' | 'GatewayNoMatch' | 'TimerResolution' | 'LinkNotFound' | 'MigrationError' | 'SubscriptionError' | 'RotationLimitError' | 'SnapshotSizeExceeded' | 'CallActivityCanceled' | 'ExternalRowRefreshError' | 'JobLockLost' | 'DecisionNotFound' | 'Unknown',
572
+ errorType?: 'BpmnError' | 'CompensationError' | 'FeelError' | 'GatewayNoMatch' | 'TimerResolution' | 'LinkNotFound' | 'MigrationError' | 'CallActivityCanceled' | 'ExternalRowRefreshError' | 'JobLockLost' | 'DecisionNotFound' | 'DecisionEvaluationError' | 'ProcessNotFound' | 'ProcessSuspended' | 'Unknown',
466
573
  since?: string,
467
574
  until?: string,
468
- page?: number,
469
- pageSize?: number,
575
+ cursor?: string,
576
+ limit?: number,
470
577
  ): CancelablePromise<BpmnIncidentRecordPaginatedResponse> {
471
578
  return this.httpRequest.request({
472
579
  method: 'GET',
@@ -475,14 +582,15 @@ export class BpmnService {
475
582
  'projectID': projectId,
476
583
  },
477
584
  query: {
478
- 'definitionID': definitionId,
479
- 'workflowID': workflowId,
585
+ 'processID': processId,
586
+ 'version': version,
587
+ 'instanceID': instanceId,
480
588
  'status': status,
481
589
  'errorType': errorType,
482
590
  'since': since,
483
591
  'until': until,
484
- 'page': page,
485
- 'pageSize': pageSize,
592
+ 'cursor': cursor,
593
+ 'limit': limit,
486
594
  },
487
595
  });
488
596
  }
@@ -494,22 +602,22 @@ export class BpmnService {
494
602
  * and target. Validate the migration plan first via `MigrateValidate`.
495
603
  *
496
604
  * @param projectId
497
- * @param workflowId
605
+ * @param instanceId
498
606
  * @param requestBody
499
607
  * @returns any OK
500
608
  * @throws ApiError
501
609
  */
502
610
  public migrateBpmnInstance(
503
611
  projectId: string,
504
- workflowId: string,
612
+ instanceId: string,
505
613
  requestBody: MigrateBpmnInstanceRequest,
506
614
  ): CancelablePromise<any> {
507
615
  return this.httpRequest.request({
508
616
  method: 'POST',
509
- url: '/projects/{projectID}/bpmn/instances/{workflowID}/migrate',
617
+ url: '/projects/{projectID}/bpmn/instances/{instanceID}/migrate',
510
618
  path: {
511
619
  'projectID': projectId,
512
- 'workflowID': workflowId,
620
+ 'instanceID': instanceId,
513
621
  },
514
622
  body: requestBody,
515
623
  mediaType: 'application/json',
@@ -523,22 +631,22 @@ export class BpmnService {
523
631
  * to the user.
524
632
  *
525
633
  * @param projectId
526
- * @param workflowId
634
+ * @param instanceId
527
635
  * @param requestBody
528
636
  * @returns MigrationValidationResult OK
529
637
  * @throws ApiError
530
638
  */
531
639
  public validateBpmnInstanceMigration(
532
640
  projectId: string,
533
- workflowId: string,
641
+ instanceId: string,
534
642
  requestBody: MigrateBpmnInstanceRequest,
535
643
  ): CancelablePromise<MigrationValidationResult> {
536
644
  return this.httpRequest.request({
537
645
  method: 'POST',
538
- url: '/projects/{projectID}/bpmn/instances/{workflowID}/migrate/validate',
646
+ url: '/projects/{projectID}/bpmn/instances/{instanceID}/migrate/validate',
539
647
  path: {
540
648
  'projectID': projectId,
541
- 'workflowID': workflowId,
649
+ 'instanceID': instanceId,
542
650
  },
543
651
  body: requestBody,
544
652
  mediaType: 'application/json',
@@ -559,22 +667,22 @@ export class BpmnService {
559
667
  * A batch is applied whole or not at all.
560
668
  *
561
669
  * @param projectId
562
- * @param workflowId
670
+ * @param instanceId
563
671
  * @param requestBody
564
672
  * @returns any OK
565
673
  * @throws ApiError
566
674
  */
567
675
  public modifyBpmnInstance(
568
676
  projectId: string,
569
- workflowId: string,
677
+ instanceId: string,
570
678
  requestBody: ModifyBpmnInstanceRequest,
571
679
  ): CancelablePromise<any> {
572
680
  return this.httpRequest.request({
573
681
  method: 'POST',
574
- url: '/projects/{projectID}/bpmn/instances/{workflowID}/modify',
682
+ url: '/projects/{projectID}/bpmn/instances/{instanceID}/modify',
575
683
  path: {
576
684
  'projectID': projectId,
577
- 'workflowID': workflowId,
685
+ 'instanceID': instanceId,
578
686
  },
579
687
  body: requestBody,
580
688
  mediaType: 'application/json',
@@ -591,7 +699,7 @@ export class BpmnService {
591
699
  * can be triggered repeatedly until the ad-hoc subprocess completes.
592
700
  *
593
701
  * @param projectId
594
- * @param workflowId
702
+ * @param instanceId
595
703
  * @param adHocNodeId
596
704
  * @param requestBody
597
705
  * @returns any OK
@@ -599,7 +707,7 @@ export class BpmnService {
599
707
  */
600
708
  public triggerBpmnAdHocNode(
601
709
  projectId: string,
602
- workflowId: string,
710
+ instanceId: string,
603
711
  adHocNodeId: string,
604
712
  requestBody: {
605
713
  nodeID: string;
@@ -607,10 +715,10 @@ export class BpmnService {
607
715
  ): CancelablePromise<any> {
608
716
  return this.httpRequest.request({
609
717
  method: 'POST',
610
- url: '/projects/{projectID}/bpmn/instances/{workflowID}/adhoc/{adHocNodeID}/trigger',
718
+ url: '/projects/{projectID}/bpmn/instances/{instanceID}/adhoc/{adHocNodeID}/trigger',
611
719
  path: {
612
720
  'projectID': projectId,
613
- 'workflowID': workflowId,
721
+ 'instanceID': instanceId,
614
722
  'adHocNodeID': adHocNodeId,
615
723
  },
616
724
  body: requestBody,
@@ -624,7 +732,7 @@ export class BpmnService {
624
732
  * values, which may cause the subprocess to complete or branch.
625
733
  *
626
734
  * @param projectId
627
- * @param workflowId
735
+ * @param instanceId
628
736
  * @param adHocNodeId
629
737
  * @param requestBody
630
738
  * @returns any OK
@@ -632,7 +740,7 @@ export class BpmnService {
632
740
  */
633
741
  public setBpmnAdHocVariables(
634
742
  projectId: string,
635
- workflowId: string,
743
+ instanceId: string,
636
744
  adHocNodeId: string,
637
745
  requestBody: {
638
746
  variables?: Record<string, any>;
@@ -640,10 +748,10 @@ export class BpmnService {
640
748
  ): CancelablePromise<any> {
641
749
  return this.httpRequest.request({
642
750
  method: 'POST',
643
- url: '/projects/{projectID}/bpmn/instances/{workflowID}/adhoc/{adHocNodeID}/variables',
751
+ url: '/projects/{projectID}/bpmn/instances/{instanceID}/adhoc/{adHocNodeID}/variables',
644
752
  path: {
645
753
  'projectID': projectId,
646
- 'workflowID': workflowId,
754
+ 'instanceID': instanceId,
647
755
  'adHocNodeID': adHocNodeId,
648
756
  },
649
757
  body: requestBody,
@@ -657,32 +765,32 @@ export class BpmnService {
657
765
  * flag layers on top. Idempotent - a second call against an already-
658
766
  * suspended instance is a no-op.
659
767
  *
660
- * While suspended: cancel / terminate / migrate / force-rotate / resolve-
661
- * incident / variable update / modify all still work. Parked tokens
662
- * released by signal demuxes or timer fires queue internally and dispatch
663
- * on resume.
768
+ * While suspended, cancel, terminate, resolve-incident and variable
769
+ * update still apply. Anything else that reaches the instance, such as a
770
+ * job completion, a message or a due timer, applies on resume, in the
771
+ * order it arrived.
664
772
  *
665
- * The audit (operator, reason, timestamp) is also recorded in the
666
- * workflow's Temporal history as a `SuspendInstanceEvent` so the timeline
667
- * view on the instance detail page can render the cycle.
773
+ * The suspension (operator, reason, timestamp) is also recorded in the
774
+ * instance's history as a `SuspendInstanceEvent`, so the timeline view on
775
+ * the instance detail page can render the cycle.
668
776
  *
669
777
  * @param projectId
670
- * @param workflowId
778
+ * @param instanceId
671
779
  * @param requestBody
672
780
  * @returns void
673
781
  * @throws ApiError
674
782
  */
675
783
  public suspendBpmnInstance(
676
784
  projectId: string,
677
- workflowId: string,
785
+ instanceId: string,
678
786
  requestBody?: SuspendBpmnInstanceRequest,
679
787
  ): CancelablePromise<void> {
680
788
  return this.httpRequest.request({
681
789
  method: 'POST',
682
- url: '/projects/{projectID}/bpmn/instances/{workflowID}/suspend',
790
+ url: '/projects/{projectID}/bpmn/instances/{instanceID}/suspend',
683
791
  path: {
684
792
  'projectID': projectId,
685
- 'workflowID': workflowId,
793
+ 'instanceID': instanceId,
686
794
  },
687
795
  body: requestBody,
688
796
  mediaType: 'application/json',
@@ -695,91 +803,93 @@ export class BpmnService {
695
803
  * is resumed as well. Idempotent.
696
804
  *
697
805
  * @param projectId
698
- * @param workflowId
806
+ * @param instanceId
699
807
  * @returns void
700
808
  * @throws ApiError
701
809
  */
702
810
  public resumeBpmnInstance(
703
811
  projectId: string,
704
- workflowId: string,
812
+ instanceId: string,
705
813
  ): CancelablePromise<void> {
706
814
  return this.httpRequest.request({
707
815
  method: 'POST',
708
- url: '/projects/{projectID}/bpmn/instances/{workflowID}/resume',
816
+ url: '/projects/{projectID}/bpmn/instances/{instanceID}/resume',
709
817
  path: {
710
818
  'projectID': projectId,
711
- 'workflowID': workflowId,
819
+ 'instanceID': instanceId,
712
820
  },
713
821
  });
714
822
  }
715
823
  /**
716
- * Suspend every running instance of a BPMN definition
717
- * Pauses every running instance of one deployed process definition AND
718
- * rejects new instance starts on that definition until it is resumed.
824
+ * Suspend a deployed version of a BPMN process
825
+ * Pauses every running instance of one deployed process version AND
826
+ * rejects new instance starts on that version until it is resumed.
719
827
  *
720
- * The handler acquires a row-level lock on the definition before flipping
721
- * the flag so a `StartBpmnInstance` racing the suspend can't slip through.
722
- * It then iterates over every running instance (`status='RUNNING'`) and
723
- * sends each one a definition-scope suspend signal via the engine API.
724
828
  * Instances that were also explicitly instance-suspended stay paused
725
829
  * after a definition-scope resume - the operator must clear that scope
726
830
  * too.
727
831
  *
728
- * Idempotent. The reason cascades to every affected instance's history
729
- * audit (`SuspendDefinitionEvent`) so the UI can render where the pause
730
- * came from.
832
+ * Idempotent. Suspending again reaches the running instances an earlier
833
+ * call missed. The reason reaches every affected instance's history
834
+ * (`SuspendDefinitionEvent`) so the UI can render where the pause came
835
+ * from.
731
836
  *
732
837
  * @param projectId
733
- * @param definitionId Platform identifier of the process definition version (same UUID `BpmnProcessVersion.id` exposes).
838
+ * @param processId
839
+ * @param version
734
840
  * @param requestBody
735
841
  * @returns void
736
842
  * @throws ApiError
737
843
  */
738
844
  public suspendBpmnDefinition(
739
845
  projectId: string,
740
- definitionId: string,
846
+ processId: string,
847
+ version: number,
741
848
  requestBody?: SuspendBpmnDefinitionRequest,
742
849
  ): CancelablePromise<void> {
743
850
  return this.httpRequest.request({
744
851
  method: 'POST',
745
- url: '/projects/{projectID}/bpmn/definitions/{definitionID}/suspend',
852
+ url: '/projects/{projectID}/bpmn/processes/{processID}/versions/{version}/suspend',
746
853
  path: {
747
854
  'projectID': projectId,
748
- 'definitionID': definitionId,
855
+ 'processID': processId,
856
+ 'version': version,
749
857
  },
750
858
  body: requestBody,
751
859
  mediaType: 'application/json',
752
860
  errors: {
753
- 404: `Definition not found`,
861
+ 404: `Process version not found`,
754
862
  },
755
863
  });
756
864
  }
757
865
  /**
758
- * Resume a suspended BPMN definition
759
- * Clears the definition-scope suspension and fans out a resume signal to
760
- * every running instance of the definition. Instances that were also
761
- * instance-suspended stay paused until their own scope is cleared. New
762
- * instance starts are accepted again once the definition flag clears.
763
- * Idempotent.
866
+ * Resume a suspended version of a BPMN process
867
+ * Clears the definition-scope suspension and resumes every running
868
+ * instance of the version. Instances that were also instance-suspended
869
+ * stay paused until their own scope is cleared. New instance starts are
870
+ * accepted again. Idempotent.
764
871
  *
765
872
  * @param projectId
766
- * @param definitionId
873
+ * @param processId
874
+ * @param version
767
875
  * @returns void
768
876
  * @throws ApiError
769
877
  */
770
878
  public resumeBpmnDefinition(
771
879
  projectId: string,
772
- definitionId: string,
880
+ processId: string,
881
+ version: number,
773
882
  ): CancelablePromise<void> {
774
883
  return this.httpRequest.request({
775
884
  method: 'POST',
776
- url: '/projects/{projectID}/bpmn/definitions/{definitionID}/resume',
885
+ url: '/projects/{projectID}/bpmn/processes/{processID}/versions/{version}/resume',
777
886
  path: {
778
887
  'projectID': projectId,
779
- 'definitionID': definitionId,
888
+ 'processID': processId,
889
+ 'version': version,
780
890
  },
781
891
  errors: {
782
- 404: `Definition not found`,
892
+ 404: `Process version not found`,
783
893
  },
784
894
  });
785
895
  }
@@ -827,6 +937,9 @@ export class BpmnService {
827
937
  * never fix (e.g. `PAYMENT_DECLINED`). SDK workers send this automatically
828
938
  * when a handler throws a typed `BpmnError`.
829
939
  *
940
+ * Once the instance has ended, any report on its jobs answers 200 and
941
+ * changes nothing.
942
+ *
830
943
  * @param projectId
831
944
  * @param executionKey
832
945
  * @param requestBody
@@ -837,13 +950,19 @@ export class BpmnService {
837
950
  projectId: string,
838
951
  executionKey: string,
839
952
  requestBody: {
953
+ /**
954
+ * Instance ID returned by the poll response.
955
+ */
956
+ instanceID: string;
840
957
  errorCode: string;
841
958
  /**
842
959
  * Optional worker identity (the same `clientID` used to poll).
843
960
  * When supplied, a worker that no longer holds the job's lock
844
961
  * gets 409 and its report is discarded, so a stale report can't
845
- * requeue or fail the job. Omit for the legacy unchecked
846
- * behavior.
962
+ * requeue or fail the job. Repeating the report this worker last
963
+ * made on the job answers 200 again and changes nothing. Without
964
+ * it, the report applies to an open job no worker holds a live
965
+ * lock on.
847
966
  *
848
967
  */
849
968
  clientID?: string;
@@ -872,10 +991,12 @@ export class BpmnService {
872
991
  body: requestBody,
873
992
  mediaType: 'application/json',
874
993
  errors: {
875
- 404: `No job has this execution key.`,
876
- 409: `This worker no longer holds the job, so the report was discarded.
877
- Its lock ran out, another worker holds it, or the job has finished.
878
- The message says when the job was cancelled.
994
+ 404: `The instance is running and has no job with this execution key.`,
995
+ 409: `The report was discarded. This worker no longer holds the job: its
996
+ lock ran out, another worker holds it, or the job has finished.
997
+ Without a \`clientID\`, a worker holds a live lock on the job, named in
998
+ the message, or the job already ended. The message says when the job
999
+ was cancelled.
879
1000
  `,
880
1001
  },
881
1002
  });
@@ -898,14 +1019,16 @@ export class BpmnService {
898
1019
  * Optional worker identity (the same `clientID` used to poll)
899
1020
  * applied to every item in the batch - a batch is one worker's
900
1021
  * report. When supplied, an item this worker no longer holds
901
- * comes back with status `error` and its result is discarded.
902
- * Omit for the legacy unchecked behavior.
1022
+ * comes back with status `error` and its result is discarded,
1023
+ * and repeating this worker's last report on an item changes
1024
+ * nothing. Without it, an item a worker holds a live lock on, or
1025
+ * one that already ended, comes back with status `error`.
903
1026
  *
904
1027
  */
905
1028
  clientID?: string;
906
1029
  items: Array<{
907
1030
  executionKey: string;
908
- workflowID: string;
1031
+ instanceID: string;
909
1032
  variables?: Record<string, any>;
910
1033
  }>;
911
1034
  },
@@ -943,8 +1066,10 @@ export class BpmnService {
943
1066
  * Optional worker identity (the same `clientID` used to poll)
944
1067
  * applied to every item in the batch - a batch is one worker's
945
1068
  * report. When supplied, an item this worker no longer holds
946
- * comes back with status `error` and the job is left untouched.
947
- * Omit for the legacy unchecked behavior.
1069
+ * comes back with status `error` and the job is left untouched,
1070
+ * and repeating this worker's last report on an item changes
1071
+ * nothing. Without it, an item a worker holds a live lock on, or
1072
+ * one that already ended, comes back with status `error`.
948
1073
  *
949
1074
  */
950
1075
  clientID?: string;
@@ -959,7 +1084,7 @@ export class BpmnService {
959
1084
  retryable?: boolean;
960
1085
  items: Array<{
961
1086
  executionKey: string;
962
- workflowID: string;
1087
+ instanceID: string;
963
1088
  errorCode: string;
964
1089
  variables?: Record<string, any>;
965
1090
  }>;
@@ -978,31 +1103,41 @@ export class BpmnService {
978
1103
  /**
979
1104
  * List User Tasks
980
1105
  * Paginated list of user tasks for the project, optionally filtered by
981
- * workflow, status, assignee, candidate user or candidate group.
1106
+ * instance, status, assignee, candidate user, candidate group or due date.
982
1107
  * Requires Executor role on the project.
983
1108
  *
984
1109
  * @param projectId
985
- * @param workflowId
1110
+ * @param instanceId Only this instance's tasks. A test run's tasks list only by its instance.
986
1111
  * @param status
987
1112
  * @param assignee
988
1113
  * @param candidateUser
989
1114
  * @param candidateGroup
990
1115
  * @param businessId Exact-match filter on the caller-supplied correlation key.
991
- * @param page
992
- * @param pageSize
1116
+ * @param dueAfter Only tasks due at or after this time.
1117
+ * @param dueBefore Only tasks due before this time. With `status=CREATED` and the current time, the overdue tasks.
1118
+ * @param sort `created` lists the newest first, and is the default. `dueDate` lists
1119
+ * the soonest due first and tasks without a due date last. `priority`
1120
+ * lists the highest priority first. Both list the oldest first among
1121
+ * equals. A cursor continues only a list of the same sort.
1122
+ *
1123
+ * @param cursor The `nextCursor` of the page before, absent for the first page.
1124
+ * @param limit Most tasks per page, 20 by default and 100 at most.
993
1125
  * @returns BpmnUserTaskPaginatedResponse OK
994
1126
  * @throws ApiError
995
1127
  */
996
1128
  public listBpmnUserTasks(
997
1129
  projectId: string,
998
- workflowId?: string,
1130
+ instanceId?: string,
999
1131
  status?: 'CREATED' | 'COMPLETED' | 'CANCELED' | 'FAILED',
1000
1132
  assignee?: string,
1001
1133
  candidateUser?: string,
1002
1134
  candidateGroup?: string,
1003
1135
  businessId?: string,
1004
- page?: number,
1005
- pageSize?: number,
1136
+ dueAfter?: string,
1137
+ dueBefore?: string,
1138
+ sort?: 'created' | 'dueDate' | 'priority',
1139
+ cursor?: string,
1140
+ limit?: number,
1006
1141
  ): CancelablePromise<BpmnUserTaskPaginatedResponse> {
1007
1142
  return this.httpRequest.request({
1008
1143
  method: 'GET',
@@ -1011,14 +1146,17 @@ export class BpmnService {
1011
1146
  'projectID': projectId,
1012
1147
  },
1013
1148
  query: {
1014
- 'workflowID': workflowId,
1149
+ 'instanceID': instanceId,
1015
1150
  'status': status,
1016
1151
  'assignee': assignee,
1017
1152
  'candidateUser': candidateUser,
1018
1153
  'candidateGroup': candidateGroup,
1019
1154
  'businessId': businessId,
1020
- 'page': page,
1021
- 'pageSize': pageSize,
1155
+ 'dueAfter': dueAfter,
1156
+ 'dueBefore': dueBefore,
1157
+ 'sort': sort,
1158
+ 'cursor': cursor,
1159
+ 'limit': limit,
1022
1160
  },
1023
1161
  });
1024
1162
  }
@@ -1029,15 +1167,25 @@ export class BpmnService {
1029
1167
  * the caller's identity-provider groups. Requires Viewer role on the project.
1030
1168
  *
1031
1169
  * @param projectId
1032
- * @param page
1033
- * @param pageSize
1170
+ * @param dueAfter Only tasks due at or after this time.
1171
+ * @param dueBefore Only tasks due before this time. With the current time, the caller's overdue tasks.
1172
+ * @param sort `created` lists the newest first, and is the default. `dueDate` lists
1173
+ * the soonest due first and tasks without a due date last. `priority`
1174
+ * lists the highest priority first. Both list the oldest first among
1175
+ * equals. A cursor continues only a list of the same sort.
1176
+ *
1177
+ * @param cursor The `nextCursor` of the page before, absent for the first page.
1178
+ * @param limit Most tasks per page, 20 by default and 100 at most.
1034
1179
  * @returns BpmnUserTaskPaginatedResponse OK
1035
1180
  * @throws ApiError
1036
1181
  */
1037
1182
  public listBpmnUserTasksForCaller(
1038
1183
  projectId: string,
1039
- page?: number,
1040
- pageSize?: number,
1184
+ dueAfter?: string,
1185
+ dueBefore?: string,
1186
+ sort?: 'created' | 'dueDate' | 'priority',
1187
+ cursor?: string,
1188
+ limit?: number,
1041
1189
  ): CancelablePromise<BpmnUserTaskPaginatedResponse> {
1042
1190
  return this.httpRequest.request({
1043
1191
  method: 'GET',
@@ -1046,8 +1194,11 @@ export class BpmnService {
1046
1194
  'projectID': projectId,
1047
1195
  },
1048
1196
  query: {
1049
- 'page': page,
1050
- 'pageSize': pageSize,
1197
+ 'dueAfter': dueAfter,
1198
+ 'dueBefore': dueBefore,
1199
+ 'sort': sort,
1200
+ 'cursor': cursor,
1201
+ 'limit': limit,
1051
1202
  },
1052
1203
  });
1053
1204
  }
@@ -1195,7 +1346,7 @@ export class BpmnService {
1195
1346
  * Publish a BPMN message
1196
1347
  * Publishes a message into the project. Each message is delivered to at
1197
1348
  * most one waiting catch event whose subscription matches `messageName`
1198
- * and whose correlation keys are a subset of `correlationKeys`. If no
1349
+ * and whose correlation value equals `correlationKeys`. If no
1199
1350
  * subscriber is currently waiting the message is buffered up to its TTL
1200
1351
  * and delivered to the first matching subscriber that registers.
1201
1352
  *
@@ -1303,11 +1454,11 @@ export class BpmnService {
1303
1454
  * @param projectId
1304
1455
  * @param page
1305
1456
  * @param pageSize
1306
- * @param q Optional case-insensitive prefix match against process id or process name.
1457
+ * @param q Optional case-insensitive substring match against process id or process name.
1307
1458
  * @param createdAfter Bounds the totalCount aggregate to instances created at or after this
1308
- * timestamp. Strongly recommended for monitoring views - instance
1309
- * history accumulates indefinitely and unfiltered totals scan the full
1310
- * table per definition. runningCount ignores this filter (it is always
1459
+ * timestamp. Strongly recommended for monitoring views - ended
1460
+ * instances stay until retention deletes them, and unfiltered totals
1461
+ * scan every kept instance per definition. runningCount ignores this filter (it is always
1311
1462
  * point-in-time).
1312
1463
  *
1313
1464
  * @param suspended Filter by paused versions. `true` → only processes with at least one
@@ -1392,4 +1543,44 @@ export class BpmnService {
1392
1543
  },
1393
1544
  });
1394
1545
  }
1546
+ /**
1547
+ * Get one deployed version of a BPMN process
1548
+ * Returns the single deployed version identified by (processID, version)
1549
+ * with its instance counts and suspension state, wherever it falls in the
1550
+ * pages of `ListBpmnProcessVersions`.
1551
+ *
1552
+ * @param projectId
1553
+ * @param processId
1554
+ * @param version
1555
+ * @param createdAfter Bounds the totalCount aggregate to instances created at or after this
1556
+ * timestamp. See ListBpmnProcesses for rationale. runningCount ignores
1557
+ * this filter.
1558
+ *
1559
+ * @returns BpmnProcessVersion OK
1560
+ * @throws ApiError
1561
+ */
1562
+ public getBpmnProcessVersion(
1563
+ projectId: string,
1564
+ processId: string,
1565
+ version: number,
1566
+ createdAfter?: string,
1567
+ ): CancelablePromise<BpmnProcessVersion> {
1568
+ return this.httpRequest.request({
1569
+ method: 'GET',
1570
+ url: '/projects/{projectID}/bpmn/processes/{processID}/versions/{version}',
1571
+ path: {
1572
+ 'projectID': projectId,
1573
+ 'processID': processId,
1574
+ 'version': version,
1575
+ },
1576
+ query: {
1577
+ 'createdAfter': createdAfter,
1578
+ },
1579
+ errors: {
1580
+ 401: `Unauthorized`,
1581
+ 404: `Not Found`,
1582
+ 500: `Internal Server Error`,
1583
+ },
1584
+ });
1585
+ }
1395
1586
  }