@quantumbpm/sdk 0.0.1 → 0.12.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.
- package/dist/bpmn.d.ts +15 -0
- package/dist/bpmn.js +5 -2
- package/dist/generated/index.d.ts +5 -1
- package/dist/generated/index.js +4 -4
- package/dist/generated/models/BpmnIncidentRecord.d.ts +88 -0
- package/dist/generated/models/BpmnIncidentRecord.js +23 -0
- package/dist/generated/models/BpmnIncidentRecordPaginatedResponse.d.ts +9 -0
- package/dist/generated/models/BpmnIncidentRecordPaginatedResponse.js +3 -0
- package/dist/generated/models/BpmnInstance.d.ts +20 -0
- package/dist/generated/models/BpmnInstance.js +1 -1
- package/dist/generated/models/BpmnInstanceState.d.ts +24 -5
- package/dist/generated/models/BpmnInstanceState.js +1 -1
- package/dist/generated/models/BpmnProcessVersion.d.ts +16 -0
- package/dist/generated/models/BpmnProcessVersion.js +1 -1
- package/dist/generated/models/SuspendBpmnDefinitionRequest.d.ts +6 -0
- package/dist/generated/models/SuspendBpmnDefinitionRequest.js +3 -0
- package/dist/generated/models/SuspendBpmnInstanceRequest.d.ts +9 -0
- package/dist/generated/models/SuspendBpmnInstanceRequest.js +3 -0
- package/dist/generated/models/SuspensionEntry.d.ts +22 -0
- package/dist/generated/models/SuspensionEntry.js +3 -0
- package/dist/generated/services/BpmnService.d.ts +102 -0
- package/dist/generated/services/BpmnService.js +164 -1
- package/dist/generated/services/DefaultService.d.ts +17 -1
- package/dist/generated/services/DefaultService.js +26 -2
- package/dist/workers.d.ts +13 -0
- package/dist/workers.js +29 -2
- package/package.json +1 -1
- package/src/bpmn.ts +21 -0
- package/src/generated/index.ts +5 -1
- package/src/generated/models/BpmnIncidentRecord.ts +93 -0
- package/src/generated/models/BpmnIncidentRecordPaginatedResponse.ts +14 -0
- package/src/generated/models/BpmnInstance.ts +20 -0
- package/src/generated/models/BpmnInstanceState.ts +24 -5
- package/src/generated/models/BpmnProcessVersion.ts +16 -0
- package/src/generated/models/SuspendBpmnDefinitionRequest.ts +11 -0
- package/src/generated/models/SuspendBpmnInstanceRequest.ts +14 -0
- package/src/generated/models/SuspensionEntry.ts +27 -0
- package/src/generated/services/BpmnService.ts +190 -0
- package/src/generated/services/DefaultService.ts +27 -0
- package/src/index.test.ts +67 -0
- package/src/workers.test.ts +51 -0
- package/src/workers.ts +38 -1
- package/dist/generated/models/BpmnActivityState.d.ts +0 -52
- package/dist/generated/models/BpmnActivityState.js +0 -17
- package/src/generated/models/BpmnActivityState.ts +0 -57
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BpmnIncidentRecordPaginatedResponse } from '../models/BpmnIncidentRecordPaginatedResponse';
|
|
1
2
|
import type { BpmnInstanceChildrenResponse } from '../models/BpmnInstanceChildrenResponse';
|
|
2
3
|
import type { BpmnProcessSummaryPaginatedResponse } from '../models/BpmnProcessSummaryPaginatedResponse';
|
|
3
4
|
import type { BpmnProcessVersionPaginatedResponse } from '../models/BpmnProcessVersionPaginatedResponse';
|
|
@@ -15,6 +16,8 @@ import type { MigrateBpmnInstanceRequest } from '../models/MigrateBpmnInstanceRe
|
|
|
15
16
|
import type { MigrationValidationResult } from '../models/MigrationValidationResult';
|
|
16
17
|
import type { ModifyBpmnInstanceRequest } from '../models/ModifyBpmnInstanceRequest';
|
|
17
18
|
import type { StartBpmnTestInstanceRequest } from '../models/StartBpmnTestInstanceRequest';
|
|
19
|
+
import type { SuspendBpmnDefinitionRequest } from '../models/SuspendBpmnDefinitionRequest';
|
|
20
|
+
import type { SuspendBpmnInstanceRequest } from '../models/SuspendBpmnInstanceRequest';
|
|
18
21
|
import type { UpdateUserTaskAssignmentRequest } from '../models/UpdateUserTaskAssignmentRequest';
|
|
19
22
|
import type { UserTask } from '../models/UserTask';
|
|
20
23
|
import type { ValidateBpmnResourceRequest } from '../models/ValidateBpmnResourceRequest';
|
|
@@ -199,6 +202,32 @@ export declare class BpmnService {
|
|
|
199
202
|
resolveBpmnIncident(projectId: string, workflowId: string, incidentId: string, requestBody?: {
|
|
200
203
|
variables?: Record<string, any>;
|
|
201
204
|
}): CancelablePromise<any>;
|
|
205
|
+
/**
|
|
206
|
+
* List BPMN incidents
|
|
207
|
+
* Cross-instance audit listing of incidents in the project. By default
|
|
208
|
+
* returns open incidents first (unresolved), ordered by recency.
|
|
209
|
+
* Filterable by definition, error type, status, and time window.
|
|
210
|
+
*
|
|
211
|
+
* Each row carries the parent process metadata (processID, processName)
|
|
212
|
+
* so a single page render needs no follow-up queries against the
|
|
213
|
+
* instances endpoint. Click-through to a specific instance still uses
|
|
214
|
+
* the workflow-scoped detail endpoint.
|
|
215
|
+
*
|
|
216
|
+
* @param projectId
|
|
217
|
+
* @param definitionId Restrict to incidents on instances of a single process definition.
|
|
218
|
+
* @param workflowId Restrict to incidents on a single instance — useful for an instance-detail "all incidents ever raised here" view that includes resolved rows.
|
|
219
|
+
* @param status Filter by lifecycle status. `open` returns unresolved incidents;
|
|
220
|
+
* `resolved` returns only resolved ones. Omit to return both.
|
|
221
|
+
*
|
|
222
|
+
* @param errorType Restrict to a single error category (matches `BpmnIncidentRecord.errorType`).
|
|
223
|
+
* @param since Earliest `raisedAt` to include (inclusive).
|
|
224
|
+
* @param until Latest `raisedAt` to include (exclusive).
|
|
225
|
+
* @param page
|
|
226
|
+
* @param pageSize
|
|
227
|
+
* @returns BpmnIncidentRecordPaginatedResponse OK
|
|
228
|
+
* @throws ApiError
|
|
229
|
+
*/
|
|
230
|
+
listBpmnIncidents(projectId: string, definitionId?: string, workflowId?: string, status?: 'open' | 'resolved', errorType?: 'BpmnError' | 'EscalationError' | 'CompensationError' | 'FeelError' | 'NoHandler' | 'GatewayNoMatch' | 'TimerResolution' | 'LinkNotFound' | 'MigrationError' | 'Unknown', since?: string, until?: string, page?: number, pageSize?: number): CancelablePromise<BpmnIncidentRecordPaginatedResponse>;
|
|
202
231
|
/**
|
|
203
232
|
* Migrate a running instance to a newer process version
|
|
204
233
|
* Moves a running instance from its current process version to a newer
|
|
@@ -273,6 +302,79 @@ export declare class BpmnService {
|
|
|
273
302
|
setBpmnAdHocVariables(projectId: string, workflowId: string, adHocNodeId: string, requestBody: {
|
|
274
303
|
variables?: Record<string, any>;
|
|
275
304
|
}): CancelablePromise<any>;
|
|
305
|
+
/**
|
|
306
|
+
* Suspend a BPMN instance
|
|
307
|
+
* Pauses forward token dispatch on a single running instance. The
|
|
308
|
+
* instance's lifecycle status stays RUNNING; an orthogonal `suspendedAt`
|
|
309
|
+
* flag layers on top. Idempotent — a second call against an already-
|
|
310
|
+
* suspended instance is a no-op.
|
|
311
|
+
*
|
|
312
|
+
* While suspended: cancel / terminate / migrate / force-rotate / resolve-
|
|
313
|
+
* incident / variable update / modify all still work. Parked tokens
|
|
314
|
+
* released by signal demuxes or timer fires queue internally and dispatch
|
|
315
|
+
* on resume.
|
|
316
|
+
*
|
|
317
|
+
* The audit (operator, reason, timestamp) is also recorded in the
|
|
318
|
+
* workflow's Temporal history as a `SuspendInstanceEvent` so the timeline
|
|
319
|
+
* view on the instance detail page can render the cycle.
|
|
320
|
+
*
|
|
321
|
+
* @param projectId
|
|
322
|
+
* @param workflowId
|
|
323
|
+
* @param requestBody
|
|
324
|
+
* @returns void
|
|
325
|
+
* @throws ApiError
|
|
326
|
+
*/
|
|
327
|
+
suspendBpmnInstance(projectId: string, workflowId: string, requestBody?: SuspendBpmnInstanceRequest): CancelablePromise<void>;
|
|
328
|
+
/**
|
|
329
|
+
* Resume a suspended BPMN instance
|
|
330
|
+
* Clears the instance-scope suspension. If the parent definition is also
|
|
331
|
+
* suspended the instance remains effectively paused until the definition
|
|
332
|
+
* is resumed as well. Idempotent.
|
|
333
|
+
*
|
|
334
|
+
* @param projectId
|
|
335
|
+
* @param workflowId
|
|
336
|
+
* @returns void
|
|
337
|
+
* @throws ApiError
|
|
338
|
+
*/
|
|
339
|
+
resumeBpmnInstance(projectId: string, workflowId: string): CancelablePromise<void>;
|
|
340
|
+
/**
|
|
341
|
+
* Suspend every running instance of a BPMN definition
|
|
342
|
+
* Pauses every running instance of one deployed process definition AND
|
|
343
|
+
* rejects new instance starts on that definition until it is resumed.
|
|
344
|
+
*
|
|
345
|
+
* The handler acquires a row-level lock on the definition before flipping
|
|
346
|
+
* the flag so a `StartBpmnInstance` racing the suspend can't slip through.
|
|
347
|
+
* It then iterates over every running instance (`status='RUNNING'`) and
|
|
348
|
+
* sends each one a definition-scope suspend signal via the engine API.
|
|
349
|
+
* Instances that were also explicitly instance-suspended stay paused
|
|
350
|
+
* after a definition-scope resume — the operator must clear that scope
|
|
351
|
+
* too.
|
|
352
|
+
*
|
|
353
|
+
* Idempotent. The reason cascades to every affected instance's history
|
|
354
|
+
* audit (`SuspendDefinitionEvent`) so the UI can render where the pause
|
|
355
|
+
* came from.
|
|
356
|
+
*
|
|
357
|
+
* @param projectId
|
|
358
|
+
* @param definitionId Platform identifier of the process definition version (same UUID `BpmnProcessVersion.id` exposes).
|
|
359
|
+
* @param requestBody
|
|
360
|
+
* @returns void
|
|
361
|
+
* @throws ApiError
|
|
362
|
+
*/
|
|
363
|
+
suspendBpmnDefinition(projectId: string, definitionId: string, requestBody?: SuspendBpmnDefinitionRequest): CancelablePromise<void>;
|
|
364
|
+
/**
|
|
365
|
+
* Resume a suspended BPMN definition
|
|
366
|
+
* Clears the definition-scope suspension and fans out a resume signal to
|
|
367
|
+
* every running instance of the definition. Instances that were also
|
|
368
|
+
* instance-suspended stay paused until their own scope is cleared. New
|
|
369
|
+
* instance starts are accepted again once the definition flag clears.
|
|
370
|
+
* Idempotent.
|
|
371
|
+
*
|
|
372
|
+
* @param projectId
|
|
373
|
+
* @param definitionId
|
|
374
|
+
* @returns void
|
|
375
|
+
* @throws ApiError
|
|
376
|
+
*/
|
|
377
|
+
resumeBpmnDefinition(projectId: string, definitionId: string): CancelablePromise<void>;
|
|
276
378
|
/**
|
|
277
379
|
* PENDING job counts grouped by taskType
|
|
278
380
|
* Returns one entry per `taskType` with at least one PENDING job. Useful for
|