@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
@@ -0,0 +1,41 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ /**
6
+ * What an instance's history recorded for one element.
7
+ */
8
+ export type BpmnElementStatistics = {
9
+ /**
10
+ * Times the element completed.
11
+ */
12
+ completed?: number;
13
+ /**
14
+ * Times the element failed.
15
+ */
16
+ failed?: number;
17
+ /**
18
+ * Times the element was canceled.
19
+ */
20
+ canceled?: number;
21
+ /**
22
+ * The element's latest Completed, Failed, Canceled or Resolved entry.
23
+ */
24
+ lastStatus?: BpmnElementStatistics.lastStatus;
25
+ /**
26
+ * For a call activity, the child its latest execution started.
27
+ */
28
+ childInstanceID?: string;
29
+ };
30
+ export namespace BpmnElementStatistics {
31
+ /**
32
+ * The element's latest Completed, Failed, Canceled or Resolved entry.
33
+ */
34
+ export enum lastStatus {
35
+ COMPLETED = 'Completed',
36
+ FAILED = 'Failed',
37
+ CANCELED = 'Canceled',
38
+ RESOLVED = 'Resolved',
39
+ }
40
+ }
41
+
@@ -2,13 +2,13 @@
2
2
  /* istanbul ignore file */
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
5
+ import type { CursorPage } from './CursorPage';
5
6
  import type { ExternalJob } from './ExternalJob';
6
- import type { PaginationMetadata } from './PaginationMetadata';
7
7
  /**
8
8
  * Page of external jobs.
9
9
  */
10
10
  export type BpmnExternalJobPaginatedResponse = {
11
11
  data: Array<ExternalJob>;
12
- pagination: PaginationMetadata;
12
+ pagination: CursorPage;
13
13
  };
14
14
 
@@ -0,0 +1,20 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ import type { BpmnActivityState } from './BpmnActivityState';
6
+ /**
7
+ * A window of an instance's BPMN history, oldest first. Its entries carry
8
+ * no `inputs` or `outputs`. `total` is the entry count at the time of the
9
+ * call, which is also the newest entry's `seq`. It grows while the
10
+ * instance runs. New entries never reorder earlier ones.
11
+ *
12
+ */
13
+ export type BpmnHistoryPage = {
14
+ items: Array<BpmnActivityState>;
15
+ /**
16
+ * Number of history entries at the time of the call.
17
+ */
18
+ total: number;
19
+ };
20
+
@@ -41,21 +41,19 @@ export type BpmnIncident = {
41
41
  /**
42
42
  * Category of the error. Values:
43
43
  * * `BpmnError` - A `bpmn:error` thrown by the process or an external job worker.
44
- * * `EscalationError` - A `bpmn:escalation` raised by the process.
45
44
  * * `CompensationError` - Failure during compensation handler execution.
46
45
  * * `FeelError` - A FEEL expression failed to evaluate.
47
- * * `NoHandler` - A thrown error/escalation has no matching catch event.
48
46
  * * `GatewayNoMatch` - An exclusive gateway evaluated all conditions to false with no default flow.
49
47
  * * `TimerResolution` - A timer expression could not be parsed or resolved.
50
48
  * * `LinkNotFound` - A link throw event has no matching link catch.
51
49
  * * `MigrationError` - A process instance migration could not be applied.
52
- * * `SubscriptionError` - A message/signal listener's registry row could not be written; the listener is dead until resolved.
53
- * * `RotationLimitError` - The instance reached its ContinueAsNew rotation cap.
54
- * * `SnapshotSizeExceeded` - A ContinueAsNew snapshot exceeded the configured size cap.
55
50
  * * `CallActivityCanceled` - A call-activity child terminated as Canceled out-of-band.
56
51
  * * `ExternalRowRefreshError` - A migration could not rewrite a parked wait's external row (job, user task or subscription) against the target definition. Resolving re-runs the refresh.
57
52
  * * `JobLockLost` - An external job's worker lock ran out, by missed heartbeats or the maximum hold, with no retries left.
58
53
  * * `DecisionNotFound` - A business rule task called a decision, or a pinned version of one, that is not deployed.
54
+ * * `DecisionEvaluationError` - The decision a business rule task called failed while it was evaluated, such as a FEEL error or a violated hit policy. The failed evaluation is recorded.
55
+ * * `ProcessNotFound` - A call activity called a process, or a pinned version of one, that is not deployed.
56
+ * * `ProcessSuspended` - A call activity called a suspended process version.
59
57
  * * `Unknown` - Internal error not classified above.
60
58
  *
61
59
  */
@@ -65,49 +63,45 @@ export type BpmnIncident = {
65
63
  */
66
64
  variables?: Record<string, any>;
67
65
  /**
68
- * Unix epoch milliseconds when the incident was recorded.
66
+ * When the incident was raised.
69
67
  */
70
- timestamp?: number;
68
+ raisedAt?: string;
71
69
  };
72
70
  export namespace BpmnIncident {
73
71
  /**
74
72
  * Category of the error. Values:
75
73
  * * `BpmnError` - A `bpmn:error` thrown by the process or an external job worker.
76
- * * `EscalationError` - A `bpmn:escalation` raised by the process.
77
74
  * * `CompensationError` - Failure during compensation handler execution.
78
75
  * * `FeelError` - A FEEL expression failed to evaluate.
79
- * * `NoHandler` - A thrown error/escalation has no matching catch event.
80
76
  * * `GatewayNoMatch` - An exclusive gateway evaluated all conditions to false with no default flow.
81
77
  * * `TimerResolution` - A timer expression could not be parsed or resolved.
82
78
  * * `LinkNotFound` - A link throw event has no matching link catch.
83
79
  * * `MigrationError` - A process instance migration could not be applied.
84
- * * `SubscriptionError` - A message/signal listener's registry row could not be written; the listener is dead until resolved.
85
- * * `RotationLimitError` - The instance reached its ContinueAsNew rotation cap.
86
- * * `SnapshotSizeExceeded` - A ContinueAsNew snapshot exceeded the configured size cap.
87
80
  * * `CallActivityCanceled` - A call-activity child terminated as Canceled out-of-band.
88
81
  * * `ExternalRowRefreshError` - A migration could not rewrite a parked wait's external row (job, user task or subscription) against the target definition. Resolving re-runs the refresh.
89
82
  * * `JobLockLost` - An external job's worker lock ran out, by missed heartbeats or the maximum hold, with no retries left.
90
83
  * * `DecisionNotFound` - A business rule task called a decision, or a pinned version of one, that is not deployed.
84
+ * * `DecisionEvaluationError` - The decision a business rule task called failed while it was evaluated, such as a FEEL error or a violated hit policy. The failed evaluation is recorded.
85
+ * * `ProcessNotFound` - A call activity called a process, or a pinned version of one, that is not deployed.
86
+ * * `ProcessSuspended` - A call activity called a suspended process version.
91
87
  * * `Unknown` - Internal error not classified above.
92
88
  *
93
89
  */
94
90
  export enum errorType {
95
91
  BPMN_ERROR = 'BpmnError',
96
- ESCALATION_ERROR = 'EscalationError',
97
92
  COMPENSATION_ERROR = 'CompensationError',
98
93
  FEEL_ERROR = 'FeelError',
99
- NO_HANDLER = 'NoHandler',
100
94
  GATEWAY_NO_MATCH = 'GatewayNoMatch',
101
95
  TIMER_RESOLUTION = 'TimerResolution',
102
96
  LINK_NOT_FOUND = 'LinkNotFound',
103
97
  MIGRATION_ERROR = 'MigrationError',
104
- SUBSCRIPTION_ERROR = 'SubscriptionError',
105
- ROTATION_LIMIT_ERROR = 'RotationLimitError',
106
- SNAPSHOT_SIZE_EXCEEDED = 'SnapshotSizeExceeded',
107
98
  CALL_ACTIVITY_CANCELED = 'CallActivityCanceled',
108
99
  EXTERNAL_ROW_REFRESH_ERROR = 'ExternalRowRefreshError',
109
100
  JOB_LOCK_LOST = 'JobLockLost',
110
101
  DECISION_NOT_FOUND = 'DecisionNotFound',
102
+ DECISION_EVALUATION_ERROR = 'DecisionEvaluationError',
103
+ PROCESS_NOT_FOUND = 'ProcessNotFound',
104
+ PROCESS_SUSPENDED = 'ProcessSuspended',
111
105
  UNKNOWN = 'Unknown',
112
106
  }
113
107
  }
@@ -13,19 +13,15 @@
13
13
  */
14
14
  export type BpmnIncidentRecord = {
15
15
  /**
16
- * Engine-assigned incident identifier, unique within the workflow. Resolve the incident with it.
16
+ * Engine-assigned incident identifier, unique within the instance. Resolve the incident with it.
17
17
  */
18
18
  incidentID: string;
19
19
  /**
20
20
  * Identifier of the instance that produced the incident.
21
21
  */
22
- workflowID: string;
22
+ instanceID: string;
23
23
  /**
24
- * ID of the process definition the instance is running. May be absent when the source definition was deleted.
25
- */
26
- definitionID?: string;
27
- /**
28
- * BPMN process ID of the parent definition. Convenience field; absent when definitionID is unresolved.
24
+ * BPMN process ID of the definition the instance is running.
29
25
  */
30
26
  processID?: string;
31
27
  /**
@@ -77,7 +73,7 @@ export type BpmnIncidentRecord = {
77
73
  */
78
74
  resolvedAt?: string;
79
75
  /**
80
- * Identifier of the user who resolved the incident, or "system:reconcile" when corrected by drift reconciliation. Empty for engine-internal resolves (boundary catches, modification cancel) and for open incidents.
76
+ * User or service account that resolved the incident. Empty for engine-internal resolves (boundary catches, modification cancel) and for open incidents.
81
77
  */
82
78
  resolvedBy?: string;
83
79
  };
@@ -87,21 +83,19 @@ export namespace BpmnIncidentRecord {
87
83
  */
88
84
  export enum errorType {
89
85
  BPMN_ERROR = 'BpmnError',
90
- ESCALATION_ERROR = 'EscalationError',
91
86
  COMPENSATION_ERROR = 'CompensationError',
92
87
  FEEL_ERROR = 'FeelError',
93
- NO_HANDLER = 'NoHandler',
94
88
  GATEWAY_NO_MATCH = 'GatewayNoMatch',
95
89
  TIMER_RESOLUTION = 'TimerResolution',
96
90
  LINK_NOT_FOUND = 'LinkNotFound',
97
91
  MIGRATION_ERROR = 'MigrationError',
98
- SUBSCRIPTION_ERROR = 'SubscriptionError',
99
- ROTATION_LIMIT_ERROR = 'RotationLimitError',
100
- SNAPSHOT_SIZE_EXCEEDED = 'SnapshotSizeExceeded',
101
92
  CALL_ACTIVITY_CANCELED = 'CallActivityCanceled',
102
93
  EXTERNAL_ROW_REFRESH_ERROR = 'ExternalRowRefreshError',
103
94
  JOB_LOCK_LOST = 'JobLockLost',
104
95
  DECISION_NOT_FOUND = 'DecisionNotFound',
96
+ DECISION_EVALUATION_ERROR = 'DecisionEvaluationError',
97
+ PROCESS_NOT_FOUND = 'ProcessNotFound',
98
+ PROCESS_SUSPENDED = 'ProcessSuspended',
105
99
  UNKNOWN = 'Unknown',
106
100
  }
107
101
  }
@@ -3,12 +3,12 @@
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
5
5
  import type { BpmnIncidentRecord } from './BpmnIncidentRecord';
6
- import type { PaginationMetadata } from './PaginationMetadata';
6
+ import type { CursorPage } from './CursorPage';
7
7
  /**
8
8
  * Page of persisted incidents.
9
9
  */
10
10
  export type BpmnIncidentRecordPaginatedResponse = {
11
11
  data: Array<BpmnIncidentRecord>;
12
- pagination: PaginationMetadata;
12
+ pagination: CursorPage;
13
13
  };
14
14
 
@@ -2,26 +2,20 @@
2
2
  /* istanbul ignore file */
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
5
+ import type { BpmnInstanceStatus } from './BpmnInstanceStatus';
5
6
  /**
6
7
  * A running or completed execution of a BPMN process.
7
8
  */
8
9
  export type BpmnInstance = {
9
10
  /**
10
- * ID of the deployed BPMN process definition this instance is running.
11
+ * Identifier of this instance. Use it to address the instance in all API calls - fetch state, send signals/messages, complete user tasks, list children, cancel, etc.
11
12
  */
12
- definitionID: string;
13
+ instanceID: string;
13
14
  /**
14
- * Stable execution identifier for this instance. Use this to address the instance in all API calls - fetch state, send signals/messages, complete user tasks, list children, cancel, etc.
15
+ * Identifier of the parent instance that started this one via a CallActivity. Empty for top-level instances.
15
16
  */
16
- workflowID: string;
17
- /**
18
- * Execution identifier of the parent instance that started this one via a CallActivity. Empty for top-level instances.
19
- */
20
- parentWorkflowID?: string;
21
- /**
22
- * Current lifecycle status of the instance.
23
- */
24
- status: BpmnInstance.status;
17
+ parentInstanceID?: string;
18
+ status: BpmnInstanceStatus;
25
19
  /**
26
20
  * User or service account that initiated the instance.
27
21
  */
@@ -38,6 +32,10 @@ export type BpmnInstance = {
38
32
  * True when at least one unresolved incident is currently attached to this instance. Computed at query time against the open-incidents index - useful for rendering a "needs attention" indicator in instance lists without paying for a per-row state fetch from the engine.
39
33
  */
40
34
  hasIncident?: boolean;
35
+ /**
36
+ * True for a test run, see `StartBpmnTestInstance`.
37
+ */
38
+ draft?: boolean;
41
39
  /**
42
40
  * Timestamp at which this instance was paused at INSTANCE scope. Empty
43
41
  * when not instance-suspended. The instance may still be effectively
@@ -73,29 +71,16 @@ export type BpmnInstance = {
73
71
  */
74
72
  businessId?: string;
75
73
  /**
76
- * BPMN process ID of the definition this instance was started from. Together with `processVersion` it addresses the version, which `definitionID` alone does not.
74
+ * BPMN process ID of the definition this instance was started from. Together with `processVersion` it addresses the version.
77
75
  */
78
- processId?: string;
76
+ processId: string;
79
77
  /**
80
78
  * Human-readable name of that process definition.
81
79
  */
82
80
  processName?: string;
83
81
  /**
84
- * Version of the process definition this instance was started from.
82
+ * Version of the process definition this instance was started from. 0 on a test run, which runs no deployed version.
85
83
  */
86
- processVersion?: number;
84
+ processVersion: number;
87
85
  };
88
- export namespace BpmnInstance {
89
- /**
90
- * Current lifecycle status of the instance.
91
- */
92
- export enum status {
93
- RUNNING = 'RUNNING',
94
- COMPLETED = 'COMPLETED',
95
- FAILED = 'FAILED',
96
- CANCELED = 'CANCELED',
97
- TERMINATED = 'TERMINATED',
98
- TIMED_OUT = 'TIMED_OUT',
99
- }
100
- }
101
86
 
@@ -3,12 +3,12 @@
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
5
5
  import type { BpmnInstance } from './BpmnInstance';
6
- import type { PaginationMetadata } from './PaginationMetadata';
6
+ import type { CursorPage } from './CursorPage';
7
7
  /**
8
8
  * Page of BPMN process instances.
9
9
  */
10
10
  export type BpmnInstancePaginatedResponse = {
11
11
  data: Array<BpmnInstance>;
12
- pagination: PaginationMetadata;
12
+ pagination: CursorPage;
13
13
  };
14
14
 
@@ -3,7 +3,9 @@
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
5
5
  import type { ActiveScope } from './ActiveScope';
6
+ import type { BpmnElementStatistics } from './BpmnElementStatistics';
6
7
  import type { BpmnIncident } from './BpmnIncident';
8
+ import type { BpmnInstanceStatus } from './BpmnInstanceStatus';
7
9
  import type { JoinArrivals } from './JoinArrivals';
8
10
  import type { SuspensionEntry } from './SuspensionEntry';
9
11
  /**
@@ -11,17 +13,21 @@ import type { SuspensionEntry } from './SuspensionEntry';
11
13
  */
12
14
  export type BpmnInstanceState = {
13
15
  /**
14
- * ID of the BPMN resource (definition file) that produced this instance.
16
+ * ID of the BPMN resource the instance's process version was deployed from. Empty for a version deployed from no resource.
15
17
  */
16
- resourceID: string;
18
+ resourceID?: string;
17
19
  /**
18
- * Execution identifier for this instance.
20
+ * Identifier of this instance.
19
21
  */
20
- workflowID?: string;
22
+ instanceID: string;
21
23
  /**
22
- * Execution identifier of the parent instance that started this one via a CallActivity. Empty for top-level instances.
24
+ * Identifier of the parent instance that started this one via a CallActivity. Empty for top-level instances.
23
25
  */
24
- parentWorkflowID?: string;
26
+ parentInstanceID?: string;
27
+ /**
28
+ * User or service account that started the instance. For an instance a message or signal started, its publisher. Empty for a timer start or a call-activity child.
29
+ */
30
+ startedBy?: string;
25
31
  /**
26
32
  * BPMN process definition ID this instance was started from.
27
33
  */
@@ -30,10 +36,7 @@ export type BpmnInstanceState = {
30
36
  * Version of the BPMN process definition this instance is currently running. Updated by migration operations.
31
37
  */
32
38
  processVersion?: number;
33
- /**
34
- * Current lifecycle status of the instance (e.g. RUNNING, COMPLETED, FAILED, TERMINATED).
35
- */
36
- status?: string;
39
+ status?: BpmnInstanceStatus;
37
40
  /**
38
41
  * All variables currently in scope for the root process.
39
42
  */
@@ -42,6 +45,12 @@ export type BpmnInstanceState = {
42
45
  * True when the instance failed or has an unresolved incident.
43
46
  */
44
47
  error?: boolean;
48
+ /**
49
+ * True for a test run, see `StartBpmnTestInstance`. Messages and signals
50
+ * reach it under their names with the `draft:` prefix.
51
+ *
52
+ */
53
+ draft?: boolean;
45
54
  /**
46
55
  * Active incidents that require resolution before the process can
47
56
  * continue. Empty once the instance has finished: the incident list keeps
@@ -54,14 +63,14 @@ export type BpmnInstanceState = {
54
63
  */
55
64
  activeScopes?: Array<ActiveScope>;
56
65
  /**
57
- * Error message from the workflow when status is FAILED.
66
+ * Error message of the instance when status is FAILED.
58
67
  */
59
68
  failureReason?: string;
60
69
  /**
61
70
  * Present when this instance has been explicitly suspended by an
62
- * operator. Persisted across CaN rotations. Clear via the resume
63
- * instance endpoint. Composes with `definitionSuspension` - both must
64
- * be null for the instance to dispatch tokens.
71
+ * operator. Clear via the resume instance endpoint. Composes with
72
+ * `definitionSuspension` - both must be null for the instance to
73
+ * dispatch tokens.
65
74
  *
66
75
  */
67
76
  instanceSuspension?: SuspensionEntry;
@@ -84,6 +93,14 @@ export type BpmnInstanceState = {
84
93
  * Joins still waiting to fire, with the flows that have reached them.
85
94
  */
86
95
  pendingJoinArrivals?: Array<JoinArrivals>;
96
+ /**
97
+ * The whole history summarised per element ID, so a diagram can show what each element did without reading the history.
98
+ */
99
+ elementStatistics?: Record<string, BpmnElementStatistics>;
100
+ /**
101
+ * Sequence flows a token has taken, by flow ID.
102
+ */
103
+ takenFlows?: Array<string>;
87
104
  /**
88
105
  * Caller-supplied correlation key set when the instance was started.
89
106
  */
@@ -0,0 +1,14 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ /**
6
+ * Current lifecycle status of the instance.
7
+ */
8
+ export enum BpmnInstanceStatus {
9
+ RUNNING = 'RUNNING',
10
+ COMPLETED = 'COMPLETED',
11
+ FAILED = 'FAILED',
12
+ CANCELED = 'CANCELED',
13
+ TERMINATED = 'TERMINATED',
14
+ }
@@ -3,13 +3,9 @@
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
5
5
  /**
6
- * A single deployable process parsed out of a BPMN resource.
6
+ * A deployed process version from a BPMN resource. `processID` and `version` address it.
7
7
  */
8
8
  export type BpmnProcessDefinition = {
9
- /**
10
- * Platform identifier of this process definition. Used as `processDefinitionID` when starting instances.
11
- */
12
- id: string;
13
9
  /**
14
10
  * Platform identifier of the owning BPMN resource.
15
11
  */
@@ -30,6 +26,10 @@ export type BpmnProcessDefinition = {
30
26
  * Timestamp when this version became available.
31
27
  */
32
28
  createdAt: string;
29
+ /**
30
+ * User or service account that deployed this version.
31
+ */
32
+ deployedBy?: string;
33
33
  /**
34
34
  * Timestamp at which this process definition was paused. Empty when active.
35
35
  */
@@ -3,21 +3,17 @@
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
5
5
  /**
6
- * One deployed version of a process, with instance counts.
6
+ * One deployed version of a process, with instance counts. `processID` and `version` address it.
7
7
  */
8
8
  export type BpmnProcessVersion = {
9
9
  /**
10
- * Platform identifier of this process definition version. Use it to filter instances or as the source/target of a migration.
10
+ * BPMN resource version it was deployed from. Empty for a version deployed from no resource.
11
11
  */
12
- id: string;
12
+ resourceID?: string;
13
13
  /**
14
- * Owning BPMN resource version.
14
+ * Display name of that resource.
15
15
  */
16
- resourceID: string;
17
- /**
18
- * Display name of the owning resource.
19
- */
20
- resourceName: string;
16
+ resourceName?: string;
21
17
  /**
22
18
  * BPMN process id.
23
19
  */
@@ -34,6 +30,10 @@ export type BpmnProcessVersion = {
34
30
  * Timestamp when this version was deployed.
35
31
  */
36
32
  createdAt: string;
33
+ /**
34
+ * User or service account that deployed this version.
35
+ */
36
+ deployedBy?: string;
37
37
  /**
38
38
  * Instances of this version with status RUNNING.
39
39
  */
@@ -2,13 +2,13 @@
2
2
  /* istanbul ignore file */
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
5
- import type { PaginationMetadata } from './PaginationMetadata';
5
+ import type { CursorPage } from './CursorPage';
6
6
  import type { UserTask } from './UserTask';
7
7
  /**
8
8
  * Page of user tasks.
9
9
  */
10
10
  export type BpmnUserTaskPaginatedResponse = {
11
11
  data: Array<UserTask>;
12
- pagination: PaginationMetadata;
12
+ pagination: CursorPage;
13
13
  };
14
14
 
@@ -10,13 +10,14 @@ import type { CorrelationKeyString } from './CorrelationKeyString';
10
10
  * Selects which subscription(s) receive a published message.
11
11
  *
12
12
  * The provided value - primitive (string, number, boolean) or object -
13
- * is matched against the subscription's resolved correlation value.
14
- * Matching is type-sensitive (the number `123` does not match the
15
- * string `"123"`); for objects, the publisher's keys must be a
16
- * recursive subset of the subscription's stored keys.
13
+ * must equal the subscription's resolved correlation value. Matching is
14
+ * type-sensitive: the number `123` does not match the string `"123"`.
15
+ * Numbers compare by value, so `1` matches `1.0`. Objects match when
16
+ * they hold the same keys with equal values, in any key order. Lists
17
+ * match element by element, in order.
17
18
  *
18
- * Empty / omitted broadcasts to subscriptions with no correlation
19
- * requirement.
19
+ * Omitted, the publish only triggers message start events, since every
20
+ * waiting catch declares a correlation value.
20
21
  *
21
22
  */
22
23
  export type CorrelationKeys = (CorrelationKeyString | CorrelationKeyNumber | CorrelationKeyBoolean | CorrelationKeyMap);
@@ -3,7 +3,7 @@
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
5
5
  /**
6
- * Payload for creating a new DMN definition version.
6
+ * Payload for saving a new draft DMN definition.
7
7
  */
8
8
  export type CreateDefinitionRequest = {
9
9
  /**
@@ -14,9 +14,5 @@ export type CreateDefinitionRequest = {
14
14
  * DMN XML body.
15
15
  */
16
16
  xml: string;
17
- /**
18
- * Optional explicit version number. If omitted, the server assigns one.
19
- */
20
- version?: number;
21
17
  };
22
18
 
@@ -0,0 +1,17 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ /**
6
+ * Where a list paged by cursor stands. Pass `nextCursor` back as `cursor`
7
+ * for the next page. It is absent on the last page. `total` counts the
8
+ * matches on the first page only, the one read without a cursor, and stops
9
+ * at 10,000, which `totalCapped` reports.
10
+ *
11
+ */
12
+ export type CursorPage = {
13
+ nextCursor?: string;
14
+ total?: number;
15
+ totalCapped?: boolean;
16
+ };
17
+
@@ -20,11 +20,11 @@ export type DecisionSummary = {
20
20
  */
21
21
  definitionsID: string;
22
22
  /**
23
- * Human-readable name of the parent DMN definition.
23
+ * Human-readable name of the DMN definition the latest version came from.
24
24
  */
25
25
  definitionName: string;
26
26
  /**
27
- * Highest deployed version that contains this decision.
27
+ * The decision's latest deployed version, counted per decision id. A business rule task that binds a version names this number.
28
28
  */
29
29
  latestVersion: number;
30
30
  /**
@@ -0,0 +1,30 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ /**
6
+ * A deployed version of a decision.
7
+ */
8
+ export type DecisionVersion = {
9
+ /**
10
+ * The decision's version, counted per decision id.
11
+ */
12
+ version: number;
13
+ /**
14
+ * Human-readable name of the decision in this version.
15
+ */
16
+ decisionName?: string;
17
+ /**
18
+ * Stable identifier of the DMN definition this version came from.
19
+ */
20
+ definitionsID: string;
21
+ /**
22
+ * The deployed version of that DMN definition.
23
+ */
24
+ definitionVersion: number;
25
+ /**
26
+ * When that DMN definition version was deployed.
27
+ */
28
+ deployedAt: string;
29
+ };
30
+
@@ -0,0 +1,12 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ import type { DecisionVersion } from './DecisionVersion';
6
+ /**
7
+ * A decision's deployed versions, the latest first.
8
+ */
9
+ export type DecisionVersionList = {
10
+ data: Array<DecisionVersion>;
11
+ };
12
+