@quantumbpm/sdk 1.3.0 → 2.0.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 (128) 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 +81 -21
  5. package/dist/bpmn.js +61 -33
  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 +8 -2
  11. package/dist/generated/index.js +8 -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/DecisionSummary.d.ts +2 -2
  47. package/dist/generated/models/DecisionSummary.js +1 -1
  48. package/dist/generated/models/DecisionVersion.d.ts +25 -0
  49. package/dist/generated/models/DecisionVersion.js +3 -0
  50. package/dist/generated/models/DecisionVersionList.d.ts +7 -0
  51. package/dist/generated/models/DecisionVersionList.js +3 -0
  52. package/dist/generated/models/Definition.d.ts +16 -8
  53. package/dist/generated/models/Definition.js +1 -1
  54. package/dist/generated/models/Error.d.ts +4 -4
  55. package/dist/generated/models/Error.js +3 -3
  56. package/dist/generated/models/EvaluateStoredRequest.d.ts +5 -6
  57. package/dist/generated/models/EvaluateStoredRequest.js +1 -1
  58. package/dist/generated/models/EvaluationResult.d.ts +6 -0
  59. package/dist/generated/models/EvaluationResult.js +1 -1
  60. package/dist/generated/models/Execution.d.ts +30 -9
  61. package/dist/generated/models/Execution.js +1 -1
  62. package/dist/generated/models/ExternalJob.d.ts +8 -8
  63. package/dist/generated/models/ExternalJob.js +1 -1
  64. package/dist/generated/models/StartBpmnInstanceRequest.d.ts +6 -2
  65. package/dist/generated/models/StartBpmnInstanceRequest.js +1 -1
  66. package/dist/generated/models/SuspendBpmnInstanceRequest.d.ts +1 -1
  67. package/dist/generated/models/SuspendBpmnInstanceRequest.js +1 -1
  68. package/dist/generated/models/UpdateDefinitionRequest.d.ts +1 -5
  69. package/dist/generated/models/UpdateDefinitionRequest.js +1 -1
  70. package/dist/generated/models/UserTask.d.ts +15 -11
  71. package/dist/generated/models/UserTask.js +1 -1
  72. package/dist/generated/services/BpmnService.d.ts +183 -87
  73. package/dist/generated/services/BpmnService.js +267 -121
  74. package/dist/generated/services/DefaultService.d.ts +106 -113
  75. package/dist/generated/services/DefaultService.js +127 -164
  76. package/dist/index.d.ts +8 -8
  77. package/dist/index.js +7 -7
  78. package/dist/tracing.js +2 -2
  79. package/dist/workers.d.ts +2 -2
  80. package/dist/workers.js +4 -3
  81. package/package.json +2 -4
  82. package/src/auth.test.ts +128 -0
  83. package/src/auth.ts +67 -64
  84. package/src/bpmn.ts +128 -43
  85. package/src/dmn.ts +0 -19
  86. package/src/generated/RawClient.ts +1 -1
  87. package/src/generated/core/OpenAPI.ts +1 -1
  88. package/src/generated/index.ts +8 -2
  89. package/src/generated/models/BpmnActivityState.ts +90 -0
  90. package/src/generated/models/BpmnElementStatistics.ts +41 -0
  91. package/src/generated/models/BpmnExternalJobPaginatedResponse.ts +2 -2
  92. package/src/generated/models/BpmnHistoryPage.ts +20 -0
  93. package/src/generated/models/BpmnIncident.ts +11 -17
  94. package/src/generated/models/BpmnIncidentRecord.ts +7 -13
  95. package/src/generated/models/BpmnIncidentRecordPaginatedResponse.ts +2 -2
  96. package/src/generated/models/BpmnInstance.ts +14 -29
  97. package/src/generated/models/BpmnInstancePaginatedResponse.ts +2 -2
  98. package/src/generated/models/BpmnInstanceState.ts +31 -14
  99. package/src/generated/models/BpmnInstanceStatus.ts +14 -0
  100. package/src/generated/models/BpmnProcessDefinition.ts +5 -5
  101. package/src/generated/models/BpmnProcessVersion.ts +9 -9
  102. package/src/generated/models/BpmnUserTaskPaginatedResponse.ts +2 -2
  103. package/src/generated/models/CorrelationKeys.ts +7 -6
  104. package/src/generated/models/CreateDefinitionRequest.ts +1 -5
  105. package/src/generated/models/CursorPage.ts +17 -0
  106. package/src/generated/models/DecisionSummary.ts +2 -2
  107. package/src/generated/models/DecisionVersion.ts +30 -0
  108. package/src/generated/models/DecisionVersionList.ts +12 -0
  109. package/src/generated/models/Definition.ts +16 -8
  110. package/src/generated/models/Error.ts +4 -4
  111. package/src/generated/models/EvaluateStoredRequest.ts +5 -6
  112. package/src/generated/models/EvaluationResult.ts +6 -0
  113. package/src/generated/models/Execution.ts +30 -9
  114. package/src/generated/models/ExternalJob.ts +8 -8
  115. package/src/generated/models/StartBpmnInstanceRequest.ts +6 -2
  116. package/src/generated/models/SuspendBpmnInstanceRequest.ts +1 -1
  117. package/src/generated/models/UpdateDefinitionRequest.ts +1 -5
  118. package/src/generated/models/UserTask.ts +15 -11
  119. package/src/generated/services/BpmnService.ts +320 -137
  120. package/src/generated/services/DefaultService.ts +147 -192
  121. package/src/index.test.ts +74 -31
  122. package/src/index.ts +13 -6
  123. package/src/tracing.ts +1 -1
  124. package/src/workers.test.ts +2 -3
  125. package/src/workers.ts +5 -4
  126. package/dist/generated/models/CreateProjectRequest.d.ts +0 -9
  127. package/dist/generated/models/CreateProjectRequest.js +0 -3
  128. package/src/generated/models/CreateProjectRequest.ts +0 -14
@@ -4,7 +4,7 @@ import type { BpmnExternalJobPaginatedResponse } from '../models/BpmnExternalJob
4
4
  import type { BpmnInstancePaginatedResponse } from '../models/BpmnInstancePaginatedResponse';
5
5
  import type { BpmnInstanceState } from '../models/BpmnInstanceState';
6
6
  import type { CreateDefinitionRequest } from '../models/CreateDefinitionRequest';
7
- import type { CreateProjectRequest } from '../models/CreateProjectRequest';
7
+ import type { DecisionVersionList } from '../models/DecisionVersionList';
8
8
  import type { Definition } from '../models/Definition';
9
9
  import type { ErrorMode } from '../models/ErrorMode';
10
10
  import type { EvaluateStoredRequest } from '../models/EvaluateStoredRequest';
@@ -31,8 +31,6 @@ export declare class DefaultService {
31
31
  */
32
32
  getVersion(): CancelablePromise<{
33
33
  version?: string;
34
- buildTime?: string;
35
- commit?: string;
36
34
  }>;
37
35
  /**
38
36
  * Evaluate ad-hoc DMN XML
@@ -78,22 +76,13 @@ export declare class DefaultService {
78
76
  evaluateDesignBatch(requestBody: BatchEvaluateDesignRequest): CancelablePromise<BatchEvaluationResponse>;
79
77
  /**
80
78
  * List Projects
81
- * Lists projects the caller has access to within their account.
79
+ * Lists the projects the caller's token grants access to. Projects come
80
+ * from the deployment's provisioning file.
81
+ *
82
82
  * @returns Project OK
83
83
  * @throws ApiError
84
84
  */
85
85
  listProjects(): CancelablePromise<Array<Project>>;
86
- /**
87
- * Create Project
88
- * Creates a new project. Projects are workspaces that group DMN definitions
89
- * and BPMN processes for execution and access control. The caller is
90
- * automatically added as a project administrator.
91
- *
92
- * @param requestBody
93
- * @returns Project Created
94
- * @throws ApiError
95
- */
96
- createProject(requestBody: CreateProjectRequest): CancelablePromise<Project>;
97
86
  /**
98
87
  * Get Project
99
88
  * Returns the project's metadata.
@@ -102,21 +91,9 @@ export declare class DefaultService {
102
91
  * @throws ApiError
103
92
  */
104
93
  getProject(projectId: string): CancelablePromise<Project>;
105
- /**
106
- * Delete Project
107
- * Permanently deletes a project and all of its data: DMN definitions and
108
- * executions, BPMN resources and instances, jobs, user tasks, messages,
109
- * signals, and members. Running BPMN instances are terminated. This
110
- * action cannot be undone.
111
- *
112
- * @param projectId Identifier of the project to delete.
113
- * @returns void
114
- * @throws ApiError
115
- */
116
- deleteProject(projectId: string): CancelablePromise<void>;
117
94
  /**
118
95
  * List DMN definitions
119
- * Lists all definition versions in the project. Each call to `CreateDefinition` produces a new version.
96
+ * Lists every saved definition in the project, drafts and deployed, newest first.
120
97
  * @param projectId
121
98
  * @param page Page number (1-indexed)
122
99
  * @param pageSize Number of items per page (max 100)
@@ -126,9 +103,11 @@ export declare class DefaultService {
126
103
  listDefinitions(projectId: string, page?: number, pageSize?: number): CancelablePromise<PaginatedDefinitionsResponse>;
127
104
  /**
128
105
  * Create a DMN definition
129
- * Stores a new DMN definition. Each call creates a new version
130
- * (auto-incremented). To replace an existing definition, post the new
131
- * XML with the same `definitionsID`.
106
+ * Saves a new draft. A draft is not evaluable until `DeployDefinition`
107
+ * deploys it. To change a deployed definition, save its new XML as
108
+ * another draft of the same `definitionsID` and deploy that. XML
109
+ * identical to the latest deployed version of its `definitionsID` is
110
+ * refused with 409, and nothing is saved.
132
111
  *
133
112
  * @param projectId
134
113
  * @param requestBody
@@ -138,7 +117,7 @@ export declare class DefaultService {
138
117
  createDefinition(projectId: string, requestBody: CreateDefinitionRequest): CancelablePromise<Definition>;
139
118
  /**
140
119
  * List latest DMN definitions
141
- * Returns the most recent version of each unique definition. Use this for picking a definition to evaluate.
120
+ * Returns the newest saved definition of each `definitionsID`, draft or deployed.
142
121
  * @param projectId
143
122
  * @param page Page number (1-indexed)
144
123
  * @param pageSize Number of items per page (max 100)
@@ -148,20 +127,21 @@ export declare class DefaultService {
148
127
  listLatestDefinitions(projectId: string, page?: number, pageSize?: number): CancelablePromise<PaginatedDefinitionsResponse>;
149
128
  /**
150
129
  * Get a DMN definition by its DMN definitions id
151
- * Looks up a definition by the `id` attribute on the `<definitions>` root
152
- * element of the DMN XML, instead of by the platform-internal `id`.
153
- * Returns the latest version unless a specific version is requested.
130
+ * Looks up a deployed definition by the `id` attribute on the
131
+ * `<definitions>` root element of the DMN XML, instead of by the
132
+ * platform-internal `id`. Returns the latest deployed version unless
133
+ * `version` names one. A draft is not found this way.
154
134
  *
155
135
  * @param projectId
156
136
  * @param definitionsId Stable identifier from the DMN XML's outer `<definitions id="…">` attribute.
157
- * @param version Specific version number (defaults to latest version)
137
+ * @param version Deployed version, the latest when omitted.
158
138
  * @returns Definition OK
159
139
  * @throws ApiError
160
140
  */
161
141
  getDefinitionByDefinitionsId(projectId: string, definitionsId: string, version?: number): CancelablePromise<Definition>;
162
142
  /**
163
143
  * List all versions of a DMN definition
164
- * Returns every stored version of a definition identified by its DMN `<definitions id>`, newest to oldest.
144
+ * Returns every saved definition of a DMN `<definitions id>`, drafts and deployed, newest first. A deployed one carries the version its deploy gave it.
165
145
  * @param projectId
166
146
  * @param definitionsId Stable identifier from the DMN XML's outer `<definitions id="…">` attribute.
167
147
  * @param page Page number (1-indexed)
@@ -172,15 +152,15 @@ export declare class DefaultService {
172
152
  listDefinitionVersions(projectId: string, definitionsId: string, page?: number, pageSize?: number): CancelablePromise<PaginatedDefinitionsResponse>;
173
153
  /**
174
154
  * Evaluate a DMN definition by its DMN definitions id
175
- * Evaluates a stored DMN definition addressed by its `<definitions id>`
176
- * XML attribute. Useful when callers know definitions by their DMN-level
177
- * identifier rather than the platform's internal `id`. Defaults to the
178
- * latest deployed version.
155
+ * Evaluates a deployed DMN definition addressed by its `<definitions id>`
156
+ * XML attribute, the latest deployed version unless `version` names one,
157
+ * and records the evaluation. A definition with no deployed version
158
+ * answers 404. Drafts evaluate through `EvaluateDesign`.
179
159
  *
180
160
  * @param projectId
181
161
  * @param definitionsId Stable identifier from the DMN XML's outer `<definitions id="…">` attribute.
182
162
  * @param requestBody
183
- * @param version Specific version number (defaults to latest version)
163
+ * @param version Deployed version, the latest when omitted.
184
164
  * @returns EvaluationResult OK
185
165
  * @throws ApiError
186
166
  */
@@ -196,7 +176,7 @@ export declare class DefaultService {
196
176
  getDefinition(projectId: string, definitionId: string): CancelablePromise<Definition>;
197
177
  /**
198
178
  * Update a DMN definition version
199
- * Replaces the name and XML of a stored definition version in place. Send `version` 0 to store the change as the next version of the same definition instead.
179
+ * Replaces the name and XML of a draft. A deployed definition is read-only and answers 409, so save the change as a new draft instead.
200
180
  * @param projectId
201
181
  * @param definitionId
202
182
  * @param requestBody
@@ -206,7 +186,7 @@ export declare class DefaultService {
206
186
  updateDefinition(projectId: string, definitionId: string, requestBody: UpdateDefinitionRequest): CancelablePromise<Definition>;
207
187
  /**
208
188
  * Delete a DMN definition version
209
- * Permanently deletes a single definition version. Past executions of this version remain in history.
189
+ * Permanently deletes a draft. A deployed definition answers 409, since the engine keeps its version and evaluations.
210
190
  * @param projectId
211
191
  * @param definitionId
212
192
  * @returns void
@@ -214,37 +194,24 @@ export declare class DefaultService {
214
194
  */
215
195
  deleteDefinition(projectId: string, definitionId: string): CancelablePromise<void>;
216
196
  /**
217
- * Evaluate a stored DMN definition
218
- * Evaluates a stored DMN definition against the supplied context.
219
- * Each call is recorded in execution history and counts toward the
220
- * account's evaluation quota.
197
+ * Deploy a DMN definition
198
+ * Deploys a draft, which makes its decisions evaluable and callable from
199
+ * business rule tasks. Its document gets the next version of its
200
+ * `definitionsID`, and each decision the next version of its decision id.
201
+ * A draft identical to the latest deployed version is refused with 409. A
202
+ * deployed definition is read-only, and deploying it again answers 409.
221
203
  *
222
204
  * @param projectId
223
205
  * @param definitionId
224
- * @param requestBody
225
- * @returns EvaluationResult OK
226
- * @throws ApiError
227
- */
228
- evaluateStored(projectId: string, definitionId: string, requestBody: EvaluateStoredRequest): CancelablePromise<Record<string, EvaluationResult>>;
229
- /**
230
- * List executions of a DMN definition
231
- * Returns paginated execution history for a single definition.
232
- * @param projectId
233
- * @param definitionId
234
- * @param definitionsId Filter by DMN `<definitions id>` (XML id).
235
- * @param startDate Filter executions after this date (ISO 8601)
236
- * @param businessId Exact-match filter on the caller-supplied correlation key.
237
- * @param page Page number (1-indexed)
238
- * @param pageSize Number of items per page (max 100)
239
- * @returns PaginatedExecutionsResponse OK
206
+ * @returns Definition OK
240
207
  * @throws ApiError
241
208
  */
242
- listExecutions(projectId: string, definitionId: string, definitionsId?: string, startDate?: string, businessId?: string, page?: number, pageSize?: number): CancelablePromise<PaginatedExecutionsResponse>;
209
+ deployDefinition(projectId: string, definitionId: string): CancelablePromise<Definition>;
243
210
  /**
244
211
  * List decisions
245
- * Returns one row per unique decision XML id in the project, with the
246
- * latest known version and the owning definition. Useful for picking
247
- * a target decision when wiring a BPMN BusinessRuleTask.
212
+ * Returns one row per deployed decision in the project, at its latest
213
+ * version and with the definition that version came from. Useful for
214
+ * picking a target decision when wiring a BPMN BusinessRuleTask.
248
215
  *
249
216
  * @param projectId
250
217
  * @param page Page number (1-indexed)
@@ -254,11 +221,28 @@ export declare class DefaultService {
254
221
  * @throws ApiError
255
222
  */
256
223
  listDecisions(projectId: string, page?: number, pageSize?: number, q?: string): CancelablePromise<PaginatedDecisionsResponse>;
224
+ /**
225
+ * List a decision's deployed versions
226
+ * Returns every deployed version of a decision, the latest first, with
227
+ * the DMN definition version it came from. Decision versions count per
228
+ * decision id, and a BPMN BusinessRuleTask that binds a version names one
229
+ * of them.
230
+ *
231
+ * @param projectId
232
+ * @param decisionId ID of the decision node from the DMN XML.
233
+ * @returns DecisionVersionList OK
234
+ * @throws ApiError
235
+ */
236
+ listDecisionVersions(projectId: string, decisionId: string): CancelablePromise<DecisionVersionList>;
257
237
  /**
258
238
  * List DMN executions across the project
259
- * Returns paginated execution history for the entire project, optionally filtered by DMN definition.
239
+ * Returns the project's recorded decision evaluations, newest first:
240
+ * those of `EvaluateByDefinitionsID` and of business rule tasks. A test
241
+ * run's evaluations are left out.
242
+ *
260
243
  * @param projectId
261
244
  * @param definitionsId Filter by DMN `<definitions id>` (XML id).
245
+ * @param version Only evaluations of this deployed version of `definitionsID`. Ignored without `definitionsID`.
262
246
  * @param businessId Exact-match filter on the caller-supplied correlation key.
263
247
  * @param startDate Only return executions at or after this instant (ISO 8601). Bounds the scan and the reported total; omit for the full unbounded history.
264
248
  * @param page Page number (1-indexed)
@@ -266,10 +250,10 @@ export declare class DefaultService {
266
250
  * @returns PaginatedExecutionsResponse OK
267
251
  * @throws ApiError
268
252
  */
269
- listProjectExecutions(projectId: string, definitionsId?: string, businessId?: string, startDate?: string, page?: number, pageSize?: number): CancelablePromise<PaginatedExecutionsResponse>;
253
+ listProjectExecutions(projectId: string, definitionsId?: string, version?: number, businessId?: string, startDate?: string, page?: number, pageSize?: number): CancelablePromise<PaginatedExecutionsResponse>;
270
254
  /**
271
255
  * Get a single DMN execution
272
- * Returns the inputs, outputs, and per-decision evaluation results for a single past execution.
256
+ * Returns the inputs and per-decision results of a single recorded evaluation.
273
257
  * @param projectId
274
258
  * @param executionId
275
259
  * @returns Execution OK
@@ -278,9 +262,8 @@ export declare class DefaultService {
278
262
  getExecution(projectId: string, executionId: string): CancelablePromise<Execution>;
279
263
  /**
280
264
  * List BPMN instances
281
- * Returns paginated process instances in the project, optionally filtered by definition or status.
265
+ * Returns paginated process instances in the project, optionally filtered by process, version or status.
282
266
  * @param projectId
283
- * @param definitionId
284
267
  * @param status
285
268
  * @param hasIncident Filter by whether the instance has at least one unresolved incident.
286
269
  * Omit to return all instances regardless of incident status; pass
@@ -295,26 +278,32 @@ export declare class DefaultService {
295
278
  * at a time.
296
279
  *
297
280
  * @param createdAfter Only return instances created at or after this timestamp. Strongly
298
- * recommended for monitoring views - terminal-state instance rows
299
- * accumulate indefinitely, and unfiltered queries grow linearly with
281
+ * recommended for monitoring views - ended instances stay until
282
+ * retention deletes them, and unfiltered queries grow linearly with
300
283
  * that history.
301
284
  *
302
285
  * @param businessId Prefix match on the caller-supplied correlation key set at start time.
303
- * @param processId Only instances of this process id, in any version. `definitionID` selects one version.
304
- * @param page
305
- * @param pageSize
286
+ * @param processId Only instances of this process id, in any version unless `version` names one.
287
+ * @param version Only instances of this version of `processId`. Ignored without `processId`.
288
+ * @param draft `true` keeps only test runs (see `StartBpmnTestInstance`), `false`
289
+ * leaves them out. Omit for both.
290
+ *
291
+ * @param cursor The `nextCursor` of the page before, absent for the first page.
292
+ * @param limit Most instances per page, 20 by default and 100 at most.
306
293
  * @returns BpmnInstancePaginatedResponse OK
307
294
  * @throws ApiError
308
295
  */
309
- listBpmnInstances(projectId: string, definitionId?: string, status?: 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELED' | 'TERMINATED' | 'TIMED_OUT', hasIncident?: boolean, suspended?: boolean, createdAfter?: string, businessId?: string, processId?: string, page?: number, pageSize?: number): CancelablePromise<BpmnInstancePaginatedResponse>;
296
+ listBpmnInstances(projectId: string, status?: 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELED' | 'TERMINATED', hasIncident?: boolean, suspended?: boolean, createdAfter?: string, businessId?: string, processId?: string, version?: number, draft?: boolean, cursor?: string, limit?: number): CancelablePromise<BpmnInstancePaginatedResponse>;
310
297
  /**
311
298
  * Start a BPMN process instance
312
- * Starts a new instance of a deployed BPMN process. The returned
313
- * `workflowID` is the stable execution identifier - use it to fetch
314
- * state, send signals/messages, complete user tasks, etc.
299
+ * Starts a new instance of a deployed BPMN process, the latest version
300
+ * unless the request names one. The returned `instanceID` addresses the
301
+ * instance - use it to fetch state, send signals/messages, complete user
302
+ * tasks, etc.
315
303
  *
316
- * A process from a resource that is not deployed yet is refused with a
317
- * 400. Drafts only start test instances, see `StartBpmnTestInstance`.
304
+ * A process with no deployed version, or without the requested one,
305
+ * answers 404, also when it exists in a resource that is not deployed yet.
306
+ * Drafts only start test instances, see `StartBpmnTestInstance`.
318
307
  *
319
308
  * @param projectId
320
309
  * @param requestBody
@@ -323,65 +312,65 @@ export declare class DefaultService {
323
312
  */
324
313
  startBpmnInstance(projectId: string, requestBody: StartBpmnInstanceRequest): CancelablePromise<{
325
314
  /**
326
- * Stable execution identifier of the new instance.
315
+ * Identifier of the new instance.
327
316
  */
328
- workflowID?: string;
317
+ instanceID?: string;
329
318
  }>;
330
319
  /**
331
320
  * Get BPMN instance state
332
- * Returns the full runtime state of a process instance - current variables,
333
- * activity history, active scopes, and any unresolved incidents. Use this
334
- * to render dashboards or to drive operational decisions on a single
335
- * instance.
321
+ * Returns the runtime state of a process instance - current variables,
322
+ * active scopes, and any unresolved incidents. Its history is paged
323
+ * separately, see `GetBpmnInstanceHistory`.
336
324
  *
337
325
  * @param projectId
338
- * @param workflowId
326
+ * @param instanceId
339
327
  * @returns BpmnInstanceState OK
340
328
  * @throws ApiError
341
329
  */
342
- getBpmnInstance(projectId: string, workflowId: string): CancelablePromise<BpmnInstanceState>;
330
+ getBpmnInstance(projectId: string, instanceId: string): CancelablePromise<BpmnInstanceState>;
343
331
  /**
344
332
  * Cancel a BPMN instance
345
333
  * Cancels a running instance and all of its active activities, jobs, and
346
334
  * child instances. Cancellation is best-effort - handlers in flight may
347
335
  * still complete before the cancel propagates. Cancelled instances move
348
336
  * to status `CANCELED` and stop consuming further work.
337
+ * The cancel is recorded in the instance's history as a
338
+ * `CancelInstanceEvent` naming who cancelled it.
349
339
  *
350
340
  * @param projectId
351
- * @param workflowId
341
+ * @param instanceId
352
342
  * @returns void
353
343
  * @throws ApiError
354
344
  */
355
- cancelBpmnInstance(projectId: string, workflowId: string): CancelablePromise<void>;
345
+ cancelBpmnInstance(projectId: string, instanceId: string): CancelablePromise<void>;
356
346
  /**
357
347
  * List external jobs
358
348
  * Returns paginated external jobs in the project, with optional filters
359
- * by `taskType`, `status`, and originating instance. Use this to drive
360
- * a dashboard or to inspect a specific job's history. For pulling
361
- * pending work as a job worker, use `Poll` instead.
349
+ * by `taskType`, `status`, and originating instance. The list holds the
350
+ * pending jobs and the finished jobs of running instances. An instance's
351
+ * jobs leave the list when it ends, and its history keeps each job's task
352
+ * type, retries left and worker. For pulling pending work as a job
353
+ * worker, use `Poll` instead.
362
354
  *
363
355
  * @param projectId
364
356
  * @param taskType Filter jobs by task type
365
357
  * @param status Filter jobs by status
366
- * @param workflowId Filter jobs by workflow ID
358
+ * @param instanceId Only this instance's jobs. A test run's jobs list only by its instance.
367
359
  * @param businessId Prefix match on the caller-supplied correlation key.
368
- * @param createdAfter Only return jobs created at or after this timestamp. Strongly
369
- * recommended for monitoring views - completed-job records accumulate
370
- * indefinitely, and unfiltered queries grow linearly with that history.
371
- *
372
- * @param page
373
- * @param pageSize
360
+ * @param createdAfter Only return jobs created at or after this timestamp.
361
+ * @param cursor The `nextCursor` of the page before, absent for the first page.
362
+ * @param limit Most jobs per page, 20 by default and 100 at most.
374
363
  * @returns BpmnExternalJobPaginatedResponse OK
375
364
  * @throws ApiError
376
365
  */
377
- listBpmnExternalJobs(projectId: string, taskType?: string, status?: 'PENDING' | 'COMPLETED' | 'FAILED' | 'CANCELED', workflowId?: string, businessId?: string, createdAfter?: string, page?: number, pageSize?: number): CancelablePromise<BpmnExternalJobPaginatedResponse>;
366
+ listBpmnExternalJobs(projectId: string, taskType?: string, status?: 'PENDING' | 'COMPLETED' | 'FAILED' | 'CANCELED', instanceId?: string, businessId?: string, createdAfter?: string, cursor?: string, limit?: number): CancelablePromise<BpmnExternalJobPaginatedResponse>;
378
367
  /**
379
368
  * Poll for external jobs (long-poll)
380
369
  * Long-polls for PENDING jobs of a given `taskType`. Returns a batch of
381
370
  * jobs (up to `maxJobs`) as soon as any are available, or `204 No Content`
382
371
  * when the timeout elapses with no work. Each returned job is locked to
383
372
  * the caller until `lockDuration` passes without a `Heartbeat`, and for at
384
- * most the server's `BPMN_JOB_MAX_HOLD` (30m by default) in total. Finish
373
+ * most the server's `ENGINE_JOB_MAX_HOLD` (30m by default) in total. Finish
385
374
  * with `Complete` or `ThrowError`. A lock that runs out costs the job a
386
375
  * retry, and with no retries left it raises an incident.
387
376
  *
@@ -394,7 +383,7 @@ export declare class DefaultService {
394
383
  /**
395
384
  * Extend the lock on an acquired job
396
385
  * Keeps the caller's lock on a job it acquired via `Poll` for another
397
- * `lockDuration`, up to `BPMN_JOB_MAX_HOLD` after the job was handed out.
386
+ * `lockDuration`, up to `ENGINE_JOB_MAX_HOLD` after the job was handed out.
398
387
  * SDK workers send it at half of the lock the poll granted
399
388
  * (`lockExpiresAt`) while a handler runs.
400
389
  * Other workers cannot claim the job while the lock holds.
@@ -417,7 +406,9 @@ export declare class DefaultService {
417
406
  * Finalizes an acquired external job successfully. The supplied
418
407
  * `variables` are merged into the originating instance's scope and the
419
408
  * process resumes after the service task. Idempotent on the executionKey:
420
- * a second call with the same key after success is a no-op.
409
+ * a second call with the same key after success is a no-op. Once the
410
+ * instance has ended, any report on its jobs answers 200 and changes
411
+ * nothing.
421
412
  *
422
413
  * @param projectId
423
414
  * @param executionKey
@@ -427,15 +418,17 @@ export declare class DefaultService {
427
418
  */
428
419
  completeBpmnExternalJob(projectId: string, executionKey: string, requestBody: {
429
420
  /**
430
- * Workflow ID returned by the poll response.
421
+ * Instance ID returned by the poll response.
431
422
  */
432
- workflowID: string;
423
+ instanceID: string;
433
424
  /**
434
425
  * Optional worker identity (the same `clientID` used to poll).
435
426
  * When supplied, a worker that no longer holds the job's lock
436
- * gets 409 and its result is discarded. Completing a job this
437
- * worker already completed answers 200 again. Omit for the
438
- * legacy unchecked behavior.
427
+ * gets 409 and its result is discarded. Repeating the report
428
+ * this worker last made on the job answers 200 again and changes
429
+ * nothing. Without it, the completion applies to an open job no
430
+ * worker holds a live lock on, as a completion from the console
431
+ * does.
439
432
  *
440
433
  */
441
434
  clientID?: string;