@quantumbpm/sdk 1.2.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 (146) hide show
  1. package/README.md +93 -34
  2. package/dist/auth.d.ts +19 -14
  3. package/dist/auth.js +62 -84
  4. package/dist/bpmn.d.ts +83 -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 +9 -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 +17 -17
  21. package/dist/generated/models/BpmnIncident.js +11 -11
  22. package/dist/generated/models/BpmnIncidentRecord.d.ts +10 -18
  23. package/dist/generated/models/BpmnIncidentRecord.js +6 -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 +21 -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 +49 -16
  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/CorrelationKeyNumber.d.ts +1 -1
  41. package/dist/generated/models/CorrelationKeyNumber.js +1 -1
  42. package/dist/generated/models/CorrelationKeys.d.ts +7 -6
  43. package/dist/generated/models/CorrelationKeys.js +1 -1
  44. package/dist/generated/models/CreateDefinitionRequest.d.ts +1 -5
  45. package/dist/generated/models/CreateDefinitionRequest.js +1 -1
  46. package/dist/generated/models/CursorPage.d.ts +12 -0
  47. package/dist/generated/models/CursorPage.js +3 -0
  48. package/dist/generated/models/DecisionSummary.d.ts +2 -2
  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 +8 -2
  57. package/dist/generated/models/Error.js +6 -2
  58. package/dist/generated/models/EvaluateStoredRequest.d.ts +6 -4
  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 +30 -9
  63. package/dist/generated/models/Execution.js +1 -1
  64. package/dist/generated/models/ExternalJob.d.ts +9 -9
  65. package/dist/generated/models/ExternalJob.js +1 -1
  66. package/dist/generated/models/ExternalJobBatchResponse.d.ts +2 -2
  67. package/dist/generated/models/ExternalJobBatchResponse.js +1 -1
  68. package/dist/generated/models/JoinArrivals.d.ts +8 -0
  69. package/dist/generated/models/JoinArrivals.js +3 -0
  70. package/dist/generated/models/PollBpmnJobRequest.d.ts +1 -1
  71. package/dist/generated/models/PollBpmnJobRequest.js +1 -1
  72. package/dist/generated/models/StartBpmnInstanceRequest.d.ts +6 -2
  73. package/dist/generated/models/StartBpmnInstanceRequest.js +1 -1
  74. package/dist/generated/models/SuspendBpmnInstanceRequest.d.ts +1 -1
  75. package/dist/generated/models/SuspendBpmnInstanceRequest.js +1 -1
  76. package/dist/generated/models/SuspensionEntry.d.ts +2 -2
  77. package/dist/generated/models/SuspensionEntry.js +1 -1
  78. package/dist/generated/models/UpdateDefinitionRequest.d.ts +1 -5
  79. package/dist/generated/models/UpdateDefinitionRequest.js +1 -1
  80. package/dist/generated/models/UpdateUserTaskAssignmentRequest.d.ts +11 -4
  81. package/dist/generated/models/UpdateUserTaskAssignmentRequest.js +1 -1
  82. package/dist/generated/models/UserTask.d.ts +15 -11
  83. package/dist/generated/models/UserTask.js +1 -1
  84. package/dist/generated/services/BpmnService.d.ts +191 -94
  85. package/dist/generated/services/BpmnService.js +300 -119
  86. package/dist/generated/services/DefaultService.d.ts +118 -118
  87. package/dist/generated/services/DefaultService.js +156 -160
  88. package/dist/index.d.ts +8 -8
  89. package/dist/index.js +7 -7
  90. package/dist/tracing.js +2 -2
  91. package/dist/workers.d.ts +41 -7
  92. package/dist/workers.js +186 -53
  93. package/package.json +2 -4
  94. package/src/auth.test.ts +128 -0
  95. package/src/auth.ts +67 -64
  96. package/src/bpmn.ts +131 -43
  97. package/src/dmn.ts +0 -19
  98. package/src/generated/RawClient.ts +1 -1
  99. package/src/generated/core/OpenAPI.ts +1 -1
  100. package/src/generated/index.ts +9 -2
  101. package/src/generated/models/BpmnActivityState.ts +90 -0
  102. package/src/generated/models/BpmnElementStatistics.ts +41 -0
  103. package/src/generated/models/BpmnExternalJobPaginatedResponse.ts +2 -2
  104. package/src/generated/models/BpmnHistoryPage.ts +20 -0
  105. package/src/generated/models/BpmnIncident.ts +17 -17
  106. package/src/generated/models/BpmnIncidentRecord.ts +10 -18
  107. package/src/generated/models/BpmnIncidentRecordPaginatedResponse.ts +2 -2
  108. package/src/generated/models/BpmnInstance.ts +21 -29
  109. package/src/generated/models/BpmnInstancePaginatedResponse.ts +2 -2
  110. package/src/generated/models/BpmnInstanceState.ts +49 -16
  111. package/src/generated/models/BpmnInstanceStatus.ts +14 -0
  112. package/src/generated/models/BpmnProcessDefinition.ts +5 -5
  113. package/src/generated/models/BpmnProcessVersion.ts +9 -9
  114. package/src/generated/models/BpmnUserTaskPaginatedResponse.ts +2 -2
  115. package/src/generated/models/CorrelationKeyNumber.ts +1 -1
  116. package/src/generated/models/CorrelationKeys.ts +7 -6
  117. package/src/generated/models/CreateDefinitionRequest.ts +1 -5
  118. package/src/generated/models/CursorPage.ts +17 -0
  119. package/src/generated/models/DecisionSummary.ts +2 -2
  120. package/src/generated/models/DecisionVersion.ts +30 -0
  121. package/src/generated/models/DecisionVersionList.ts +12 -0
  122. package/src/generated/models/Definition.ts +16 -8
  123. package/src/generated/models/Error.ts +8 -2
  124. package/src/generated/models/EvaluateStoredRequest.ts +6 -4
  125. package/src/generated/models/EvaluationResult.ts +6 -0
  126. package/src/generated/models/Execution.ts +30 -9
  127. package/src/generated/models/ExternalJob.ts +9 -9
  128. package/src/generated/models/ExternalJobBatchResponse.ts +2 -2
  129. package/src/generated/models/JoinArrivals.ts +13 -0
  130. package/src/generated/models/PollBpmnJobRequest.ts +1 -1
  131. package/src/generated/models/StartBpmnInstanceRequest.ts +6 -2
  132. package/src/generated/models/SuspendBpmnInstanceRequest.ts +1 -1
  133. package/src/generated/models/SuspensionEntry.ts +2 -2
  134. package/src/generated/models/UpdateDefinitionRequest.ts +1 -5
  135. package/src/generated/models/UpdateUserTaskAssignmentRequest.ts +11 -4
  136. package/src/generated/models/UserTask.ts +15 -11
  137. package/src/generated/services/BpmnService.ts +357 -140
  138. package/src/generated/services/DefaultService.ts +178 -189
  139. package/src/index.test.ts +77 -31
  140. package/src/index.ts +13 -6
  141. package/src/tracing.ts +1 -1
  142. package/src/workers.test.ts +280 -3
  143. package/src/workers.ts +200 -60
  144. package/dist/generated/models/CreateProjectRequest.d.ts +0 -9
  145. package/dist/generated/models/CreateProjectRequest.js +0 -3
  146. package/src/generated/models/CreateProjectRequest.ts +0 -14
@@ -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
 
@@ -3,6 +3,6 @@
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
5
5
  /**
6
- * A scalar numeric correlation value.
6
+ * A scalar numeric correlation value, kept exact (json.Number) so large ids such as order numbers correlate.
7
7
  */
8
8
  export type CorrelationKeyNumber = number;
@@ -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
+
@@ -3,11 +3,11 @@
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
5
5
  /**
6
- * A stored DMN definition. Each call to CreateDefinition produces a new version of a `definitionsID`.
6
+ * A saved DMN definition, a draft until it is deployed.
7
7
  */
8
8
  export type Definition = {
9
9
  /**
10
- * Platform identifier for this specific definition version.
10
+ * Platform identifier of this saved definition.
11
11
  */
12
12
  id: string;
13
13
  /**
@@ -15,7 +15,7 @@ export type Definition = {
15
15
  */
16
16
  name: string;
17
17
  /**
18
- * Stable identifier from the DMN XML's outer `<definitions id="…">` attribute. Shared across versions.
18
+ * Stable identifier from the DMN XML's outer `<definitions id="…">` attribute. Shared across the definitions saved for one model.
19
19
  */
20
20
  definitionsID: string;
21
21
  /**
@@ -23,19 +23,27 @@ export type Definition = {
23
23
  */
24
24
  xml: string;
25
25
  /**
26
- * Auto-incremented version number, starting at 1 for the first upload of a `definitionsID`.
26
+ * True once the definition is deployed, which makes it read-only and its decisions evaluable.
27
27
  */
28
- version: number;
28
+ isDeployed: boolean;
29
29
  /**
30
- * User who uploaded this version.
30
+ * The version its deploy gave it, counted per `definitionsID`. Absent on a draft.
31
+ */
32
+ version?: number;
33
+ /**
34
+ * Timestamp of the deploy. Absent on a draft.
35
+ */
36
+ deployedAt?: string;
37
+ /**
38
+ * User who saved this definition.
31
39
  */
32
40
  createdBy?: string;
33
41
  /**
34
- * Timestamp when this version was uploaded.
42
+ * Timestamp of the last save.
35
43
  */
36
44
  createdAt: string;
37
45
  /**
38
- * Total number of stored versions under this `definitionsID`. Populated by the latest-listing endpoint; absent on single-version reads.
46
+ * How many definitions are saved under this `definitionsID`. Populated by the latest-listing endpoint and absent on single reads.
39
47
  */
40
48
  versionCount?: number;
41
49
  };
@@ -10,8 +10,10 @@ export type Error = {
10
10
  * Machine-readable error category. Values:
11
11
  * * `BAD_REQUEST` - request is malformed or fails validation.
12
12
  * * `UNAUTHORIZED` - request lacks or has an invalid authentication token.
13
- * * `FORBIDDEN` - caller is authenticated but lacks permission, or has hit a quota.
13
+ * * `FORBIDDEN` - caller is authenticated but lacks permission.
14
14
  * * `NOT_FOUND` - the addressed resource does not exist.
15
+ * * `CONFLICT` - the request collides with the resource's current state, such as reporting on a job this worker no longer holds.
16
+ * * `UNAVAILABLE` - the resource cannot answer right now, such as while the engine's database is unreachable. Try again shortly.
15
17
  * * `INTERNAL_ERROR` - unexpected server-side failure.
16
18
  *
17
19
  */
@@ -30,8 +32,10 @@ export namespace Error {
30
32
  * Machine-readable error category. Values:
31
33
  * * `BAD_REQUEST` - request is malformed or fails validation.
32
34
  * * `UNAUTHORIZED` - request lacks or has an invalid authentication token.
33
- * * `FORBIDDEN` - caller is authenticated but lacks permission, or has hit a quota.
35
+ * * `FORBIDDEN` - caller is authenticated but lacks permission.
34
36
  * * `NOT_FOUND` - the addressed resource does not exist.
37
+ * * `CONFLICT` - the request collides with the resource's current state, such as reporting on a job this worker no longer holds.
38
+ * * `UNAVAILABLE` - the resource cannot answer right now, such as while the engine's database is unreachable. Try again shortly.
35
39
  * * `INTERNAL_ERROR` - unexpected server-side failure.
36
40
  *
37
41
  */
@@ -40,6 +44,8 @@ export namespace Error {
40
44
  UNAUTHORIZED = 'UNAUTHORIZED',
41
45
  FORBIDDEN = 'FORBIDDEN',
42
46
  NOT_FOUND = 'NOT_FOUND',
47
+ CONFLICT = 'CONFLICT',
48
+ UNAVAILABLE = 'UNAVAILABLE',
43
49
  INTERNAL_ERROR = 'INTERNAL_ERROR',
44
50
  }
45
51
  }
@@ -5,17 +5,19 @@
5
5
  import type { ErrorMode } from './ErrorMode';
6
6
  import type { FeelContext } from './FeelContext';
7
7
  /**
8
- * Payload for evaluating a stored DMN definition.
8
+ * Payload for evaluating a deployed DMN definition.
9
9
  */
10
10
  export type EvaluateStoredRequest = {
11
11
  /**
12
- * Specific definition version to evaluate. Defaults to the latest version.
12
+ * Deployed version to evaluate, the latest when omitted. The `version` query parameter does
13
+ * the same, and a request giving both with different values is rejected.
14
+ *
13
15
  */
14
16
  version?: number;
15
17
  context: FeelContext;
16
18
  errorMode?: ErrorMode;
17
19
  /**
18
- * Names of decision services to evaluate. If empty, no decision services are evaluated.
20
+ * Names of decision services to evaluate. When given, `decisions` is ignored.
19
21
  */
20
22
  decisionServices?: Array<string>;
21
23
  /**
@@ -23,7 +25,7 @@ export type EvaluateStoredRequest = {
23
25
  */
24
26
  decisions?: Array<string>;
25
27
  /**
26
- * Optional caller-supplied correlation key persisted with the resulting execution row for cross-system tracing.
28
+ * Optional caller-supplied correlation key recorded with the evaluation for cross-system tracing.
27
29
  */
28
30
  businessId?: string;
29
31
  };
@@ -13,6 +13,12 @@ export type EvaluationResult = {
13
13
  * ID of the decision element from the DMN XML.
14
14
  */
15
15
  decisionID?: string;
16
+ /**
17
+ * The decision's version, counted per decision id. Present on a decision of a deployed
18
+ * definition, absent on a draft evaluation.
19
+ *
20
+ */
21
+ decisionVersion?: number;
16
22
  /**
17
23
  * Human-readable name of the decision.
18
24
  */
@@ -2,34 +2,55 @@
2
2
  /* istanbul ignore file */
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
5
+ import type { EvaluationResult } from './EvaluationResult';
5
6
  import type { FeelContext } from './FeelContext';
6
- import type { FeelValue } from './FeelValue';
7
7
  /**
8
- * A single recorded DMN evaluation against a stored definition.
8
+ * A recorded evaluation of a deployed DMN definition, by `EvaluateByDefinitionsID` or by a
9
+ * business rule task. A business rule task's names its instance, task and decision.
10
+ *
9
11
  */
10
12
  export type Execution = {
11
13
  /**
12
- * Unique identifier of this execution.
14
+ * Unique identifier of this evaluation.
13
15
  */
14
16
  id: string;
15
17
  /**
16
- * Platform identifier of the definition version that was evaluated.
18
+ * The DMN XML's `<definitions id="…">` value.
17
19
  */
18
- definitionID: string;
20
+ definitionsID: string;
21
+ /**
22
+ * The deployed version of `definitionsID` that was evaluated.
23
+ */
24
+ version: number;
25
+ /**
26
+ * The decision a business rule task called. Absent on an evaluation through the API.
27
+ */
28
+ decisionID?: string;
29
+ /**
30
+ * The version of `decisionID` the business rule task called. Absent on an evaluation through the API.
31
+ */
32
+ decisionVersion?: number;
33
+ /**
34
+ * The process instance of the business rule task. Absent on an evaluation through the API.
35
+ */
36
+ instanceID?: string;
37
+ /**
38
+ * The business rule task's element id. Absent on an evaluation through the API.
39
+ */
40
+ nodeID?: string;
19
41
  /**
20
42
  * Timestamp when the evaluation ran.
21
43
  */
22
44
  executedAt: string;
23
45
  /**
24
- * User or service account that issued the evaluation.
46
+ * User or service account that issued the evaluation. Absent on a business rule task's.
25
47
  */
26
48
  executedBy?: string;
27
49
  inputs: FeelContext;
28
- outputs: FeelValue;
29
50
  /**
30
- * The DMN XML's `<definitions id="…">` value, useful for grouping executions across versions.
51
+ * Each evaluated decision's result, by decision name.
31
52
  */
32
- definitionsID?: string;
53
+ outputs: Record<string, EvaluationResult>;
33
54
  /**
34
55
  * Caller-supplied correlation key passed at evaluation time (REST) or inherited from the parent BPMN process (business rule task).
35
56
  */
@@ -3,13 +3,9 @@
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
5
5
  /**
6
- * A unit of work emitted by a BPMN service task that an external worker is expected to handle.
6
+ * A unit of work emitted by a BPMN service task that an external worker is expected to handle. A job is kept until its instance ends, and from then on its instance's history holds it.
7
7
  */
8
8
  export type ExternalJob = {
9
- /**
10
- * Unique identifier of this job record.
11
- */
12
- id: string;
13
9
  /**
14
10
  * Stable key for the activity execution that produced the job. Used as the path parameter when completing or failing the job.
15
11
  */
@@ -17,7 +13,7 @@ export type ExternalJob = {
17
13
  /**
18
14
  * Identifier of the instance that produced the job. Required when calling Complete / ThrowError.
19
15
  */
20
- workflowID: string;
16
+ instanceID: string;
21
17
  /**
22
18
  * ID of the BPMN service-task node.
23
19
  */
@@ -33,13 +29,13 @@ export type ExternalJob = {
33
29
  /**
34
30
  * Identifier of the parent instance (set when the producing instance was started by a CallActivity).
35
31
  */
36
- parentWorkflowID?: string;
32
+ parentInstanceID?: string;
37
33
  /**
38
34
  * Lifecycle status of the job.
39
35
  */
40
36
  status: ExternalJob.status;
41
37
  /**
42
- * Remaining retry budget. Decremented each time the worker reports a failure that the BPMN model maps to a retry.
38
+ * Remaining retry budget. A retryable worker error and a lock that runs out each use one.
43
39
  */
44
40
  retries?: number;
45
41
  /**
@@ -54,6 +50,10 @@ export type ExternalJob = {
54
50
  * Timestamp when the job reached a terminal status.
55
51
  */
56
52
  completedAt?: string;
53
+ /**
54
+ * User or service account that reported the job's outcome. Empty while pending, and for a job the engine ended itself.
55
+ */
56
+ completedBy?: string;
57
57
  /**
58
58
  * Worker `clientID` that currently holds the exclusive lock on the job.
59
59
  */
@@ -63,7 +63,7 @@ export type ExternalJob = {
63
63
  */
64
64
  lockExpiresAt?: string;
65
65
  /**
66
- * Best-effort label describing why a CANCELED job was interrupted (e.g. instance cancelled, instance terminated).
66
+ * Best-effort label describing why a CANCELED job was interrupted (e.g. an interrupting boundary event, a migration).
67
67
  */
68
68
  cancelReason?: string;
69
69
  /**
@@ -14,9 +14,9 @@ export type ExternalJobBatchResponse = {
14
14
  /**
15
15
  * Outcome for this item:
16
16
  * * `completed` - the job was completed successfully.
17
- * * `failed` - the job exhausted its retries and surfaced as an incident.
17
+ * * `failed` - the error was raised on the process, because no retries were left or `retryable` was false. An error boundary catches it, or it raises an incident.
18
18
  * * `requeued` - a retry budget remained, the job is back in PENDING.
19
- * * `error` - the per-item operation itself failed; the job's state is unchanged.
19
+ * * `error` - the per-item operation itself failed, and the job's state is unchanged.
20
20
  *
21
21
  */
22
22
  status: 'completed' | 'failed' | 'requeued' | 'error';
@@ -0,0 +1,13 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ /**
6
+ * The flows that have delivered tokens to a join that has not fired yet.
7
+ */
8
+ export type JoinArrivals = {
9
+ nodeId: string;
10
+ scopeId: string;
11
+ incomingFlows: Array<string>;
12
+ };
13
+
@@ -15,7 +15,7 @@ export type PollBpmnJobRequest = {
15
15
  */
16
16
  clientID: string;
17
17
  /**
18
- * Exclusive lock duration on each acquired job. Accepts Go duration strings (e.g. `5s`, `2m`). Defaults to `30s`.
18
+ * How long each acquired job stays locked to this worker without a heartbeat. Accepts Go duration strings (e.g. `5s`, `2m`). Defaults to `30s`, clamped by the server to 10s..5m.
19
19
  */
20
20
  lockDuration?: string;
21
21
  /**
@@ -7,9 +7,13 @@
7
7
  */
8
8
  export type StartBpmnInstanceRequest = {
9
9
  /**
10
- * ID of a deployed `BpmnProcessDefinition` to start.
10
+ * BPMN process ID of a deployed process to start.
11
11
  */
12
- processDefinitionID: string;
12
+ processID: string;
13
+ /**
14
+ * Deployed version to start. Omit for the latest version.
15
+ */
16
+ version?: number;
13
17
  /**
14
18
  * Initial process variables. Available to FEEL expressions and service tasks from the first activity onward.
15
19
  */
@@ -7,7 +7,7 @@
7
7
  */
8
8
  export type SuspendBpmnInstanceRequest = {
9
9
  /**
10
- * Free-text rationale. Surfaces in the operator UI and the workflow's history audit.
10
+ * Free-text rationale. Surfaces in the operator UI and the instance's history.
11
11
  */
12
12
  reason?: string;
13
13
  };
@@ -12,9 +12,9 @@
12
12
  */
13
13
  export type SuspensionEntry = {
14
14
  /**
15
- * Unix epoch nanoseconds at which the suspension was applied.
15
+ * When the suspension was applied.
16
16
  */
17
- suspendedAt: number;
17
+ suspendedAt: string;
18
18
  /**
19
19
  * Identifier of the operator (or service account) that initiated the suspension.
20
20
  */
@@ -3,17 +3,13 @@
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
5
5
  /**
6
- * Payload for updating an existing definition version.
6
+ * Payload for changing a draft DMN definition.
7
7
  */
8
8
  export type UpdateDefinitionRequest = {
9
9
  /**
10
10
  * Replacement XML. The `definitionsID` is read from its `<definitions id>`, falling back to the original.
11
11
  */
12
12
  xml?: string;
13
- /**
14
- * Omit to overwrite the version in place. 0 stores the change as the next version instead.
15
- */
16
- version?: number;
17
13
  /**
18
14
  * New display name.
19
15
  */
@@ -4,16 +4,23 @@
4
4
  /* eslint-disable */
5
5
  /**
6
6
  * Reassign a CREATED user task. All fields are optional but at least one
7
- * must be present. Fields are REPLACED atomically - pass the full set of
8
- * candidateUsers / candidateGroups you want stored, not a delta.
7
+ * must be present, an empty body is rejected with 400. A field you leave out
8
+ * keeps its value. A list you send replaces the stored one, so pass the full
9
+ * set of candidateUsers / candidateGroups you want, not a delta.
9
10
  *
10
11
  */
11
12
  export type UpdateUserTaskAssignmentRequest = {
12
13
  /**
13
- * New assignee. Pass null to clear.
14
+ * New assignee. An empty string clears it.
15
+ */
16
+ assignee?: string;
17
+ /**
18
+ * Replaces the candidate users. An empty list clears them.
14
19
  */
15
- assignee?: string | null;
16
20
  candidateUsers?: Array<string>;
21
+ /**
22
+ * Replaces the candidate groups. An empty list clears them.
23
+ */
17
24
  candidateGroups?: Array<string>;
18
25
  };
19
26
 
@@ -3,13 +3,9 @@
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
5
5
  /**
6
- * A human-handled work item produced by a BPMN user task or manual task.
6
+ * A human-handled work item produced by a BPMN user task.
7
7
  */
8
8
  export type UserTask = {
9
- /**
10
- * Unique identifier of this user task record.
11
- */
12
- id: string;
13
9
  /**
14
10
  * Stable key for the activity execution. Used as the path parameter when completing or failing the task.
15
11
  */
@@ -17,19 +13,15 @@ export type UserTask = {
17
13
  /**
18
14
  * Identifier of the instance that produced the task.
19
15
  */
20
- workflowID: string;
16
+ instanceID: string;
21
17
  /**
22
18
  * Identifier of the parent instance (set when the producing instance was started by a CallActivity).
23
19
  */
24
- parentWorkflowID?: string;
20
+ parentInstanceID?: string;
25
21
  /**
26
22
  * ID of the BPMN node that emitted the task.
27
23
  */
28
24
  nodeID: string;
29
- /**
30
- * BPMN element type - typically `UserTask` or `ManualTask`.
31
- */
32
- taskType?: string;
33
25
  /**
34
26
  * User the task is currently assigned to. Empty when the task is in a candidate pool but not yet claimed.
35
27
  */
@@ -42,6 +34,14 @@ export type UserTask = {
42
34
  * Identity-provider groups whose members may claim or complete this task.
43
35
  */
44
36
  candidateGroups?: Array<string>;
37
+ /**
38
+ * When the task is due, from the model's `taskSchedule`. Absent when the task has none.
39
+ */
40
+ dueDate?: string;
41
+ /**
42
+ * The task's priority from the model's `priorityDefinition`, 50 when the model sets none.
43
+ */
44
+ priority: number;
45
45
  /**
46
46
  * Static form reference declared on the task (BPMN `formKey`). Resolved by the consumer to display the right UI.
47
47
  */
@@ -82,6 +82,10 @@ export type UserTask = {
82
82
  * Timestamp when the task reached a terminal status.
83
83
  */
84
84
  completedAt?: string;
85
+ /**
86
+ * User or service account that completed or failed the task. Empty while open, and for a task the engine ended itself.
87
+ */
88
+ completedBy?: string;
85
89
  /**
86
90
  * Caller-supplied correlation key inherited from the parent BPMN process.
87
91
  */