@camunda8/sdk 8.7.21 → 8.7.23

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/AGENT.md ADDED
@@ -0,0 +1,181 @@
1
+ # Agent Information for Camunda 8 JavaScript SDK
2
+
3
+ This file contains information for AI agents working on the Camunda 8 JavaScript SDK repository.
4
+
5
+ ## Project Overview
6
+
7
+ The Camunda 8 JavaScript SDK is the official TypeScript/Node.js SDK for Camunda Platform 8. It provides unified access to all Camunda 8 APIs including Zeebe, Operate, Optimize, Tasklist, Modeler, and Admin.
8
+
9
+ ## Essential Commands
10
+
11
+ ### Build & Compilation
12
+ ```bash
13
+ npm run build # Clean, compile TypeScript, and copy proto files
14
+ npm run clean # Remove dist folder and build artifacts
15
+ npm run compile # Compile TypeScript to JavaScript
16
+ ```
17
+
18
+ ### Testing
19
+ ```bash
20
+ npm test # Run unit tests only
21
+ npm run test:integration # Run integration tests (requires Docker)
22
+ npm run test:local # Run local integration tests
23
+ npm run test:smoketest # Build and run smoke tests
24
+ npm run test:c8run # Run Camunda 8 specific tests
25
+ ```
26
+
27
+ ### Code Quality
28
+ ```bash
29
+ npm run lint # Run ESLint on TypeScript files
30
+ npm run format # Format code with Prettier
31
+ ```
32
+
33
+ ### Development Environment
34
+ ```bash
35
+ npm run sm:start # Start Docker Compose for Self-Managed Camunda 8
36
+ npm run sm:stop # Stop Docker Compose services
37
+ npm run sm:start8.8 # Start Camunda 8.8 specific environment
38
+ npm run sm:stop8.8 # Stop Camunda 8.8 environment
39
+ ```
40
+
41
+ ### Documentation
42
+ ```bash
43
+ npm run docs # Generate TypeDoc documentation
44
+ npm run docs:watch # Generate and watch docs for changes
45
+ ```
46
+
47
+ ## Project Structure
48
+
49
+ ```
50
+ src/
51
+ ├── index.ts # Main entry point
52
+ ├── lib/ # Common utilities and base classes
53
+ ├── c8/ # Camunda 8 unified client and REST API
54
+ │ ├── index.ts # Camunda8 main class
55
+ │ └── lib/
56
+ │ ├── C8Dto.ts # Data Transfer Objects for REST API
57
+ │ └── CamundaRestClient.ts # REST API client implementation
58
+ ├── zeebe/ # Zeebe gRPC and REST clients
59
+ ├── operate/ # Operate API client
60
+ ├── optimize/ # Optimize API client
61
+ ├── tasklist/ # Tasklist API client
62
+ ├── modeler/ # Web Modeler API client
63
+ ├── admin/ # Admin API client
64
+ ├── oauth/ # OAuth authentication providers
65
+ └── __tests__/ # Test files organized by component
66
+ ```
67
+
68
+ ## Key Architecture Patterns
69
+
70
+ ### Client Pattern
71
+ - Each API has its own client class (e.g., `OperateApiClient`, `TasklistApiClient`)
72
+ - All clients are instantiated through the main `Camunda8` factory class
73
+ - Clients support both SaaS and Self-Managed configurations
74
+
75
+ ### DTO Pattern
76
+ - Data Transfer Objects (DTOs) extend `LosslessDto` for int64 handling
77
+ - Use decorators like `@Int64String` for precise number handling
78
+ - Search request DTOs extend `BaseSearchRequest<TSortFields, TFilter>` or `BaseSearchRequestWithOptionalFilter<TSortFields, TFilter>`
79
+ - Response DTOs use `PaginatedCamundaRestSearchResponse<T>` pattern for consistent pagination
80
+
81
+ ### Authentication
82
+ - OAuth2/OIDC support for SaaS
83
+ - Basic auth and custom auth providers for Self-Managed
84
+ - Token caching and automatic refresh
85
+
86
+ ### Pagination
87
+ - **CamundaRestClient**: Uses `startCursor`/`endCursor` (string values)
88
+ - **Other APIs**: Use `firstSortValues`/`lastSortValues` or `sortValues` (arrays)
89
+
90
+ ## Testing Patterns
91
+
92
+ ### Test Organization
93
+ - Unit tests: `*.unit.spec.ts` - Mock external dependencies
94
+ - Integration tests: `*.integration.spec.ts` - Test against real services
95
+ - Local integration: `*local-integration.spec.ts` - Test local Docker setup
96
+
97
+ ### Test Environment Variables
98
+ - `CAMUNDA_UNIT_TEST=true` - Forces unit test mode
99
+ - Various `ZEEBE_*`, `OPERATE_*` environment variables for service configuration
100
+ - Integration tests use environment files from `env/` directory (e.g., `env/8.8-alpha.env`)
101
+
102
+ ### Test Utilities
103
+ - Use `jest` as the test framework
104
+ - Tests are organized by component in `src/__tests__/`
105
+ - Integration tests require either Docker services or sourced environment variables
106
+ - **Running Integration Tests**: `source env/8.8-alpha.env && npx jest path/to/test.rest.spec.ts`
107
+ - **Running Unit Tests**: `npm test -- --testPathPattern="testname.unit"`
108
+
109
+ ## Common Development Tasks
110
+
111
+ ### Adding New Search Endpoints
112
+ 1. Define filter interface (e.g., `ProcessInstanceSearchFilter`)
113
+ 2. Extend `BaseSearchRequest<TSortFields, TFilter>` or `BaseSearchRequestWithOptionalFilter<TSortFields, TFilter>`
114
+ 3. Define details interface for response items (e.g., `DecisionInstanceDetails`)
115
+ 4. Create `CamundaRest*Response` interface extending `PaginatedCamundaRestSearchResponse<DetailsType>`
116
+ 5. Add method to `CamundaRestClient` using `callApiEndpoint` pattern
117
+ 6. Write comprehensive unit tests with mocked `callApiEndpoint`
118
+ 7. Write integration tests that source environment variables from `env/` directory
119
+
120
+ ### Adding New API Clients
121
+ 1. Create client class in appropriate directory (e.g., `src/newservice/`)
122
+ 2. Define DTOs in `*Dto.ts` file
123
+ 3. Add client factory method to main `Camunda8` class
124
+ 4. Export client from main `index.ts`
125
+
126
+ ### Handling Authentication
127
+ - Clients accept `IHeadersProvider` for custom auth
128
+ - Use `constructOAuthProvider()` for standard OAuth flows
129
+ - Set appropriate environment variables for configuration
130
+
131
+ ## Important Files
132
+
133
+ - `src/c8/lib/C8Dto.ts` - Main DTO definitions for REST API
134
+ - `src/c8/lib/CamundaRestClient.ts` - Unified REST API client
135
+ - `src/lib/Configuration.ts` - Configuration management
136
+ - `src/lib/LosslessDto.ts` - Base class for DTOs with int64 support
137
+ - `package.json` - Scripts and dependencies
138
+ - `tsconfig.json` - TypeScript configuration
139
+
140
+ ## Common Issues & Solutions
141
+
142
+ ### Build Issues
143
+ - Run `npm run clean` before building if encountering cache issues
144
+ - Ensure all imports use correct relative paths
145
+ - Check for TypeScript errors with `npm run compile`
146
+
147
+ ### Test Issues
148
+ - Integration tests require Docker services: `npm run sm:start`
149
+ - Use `npm run test` for unit tests only
150
+ - Check test environment variables are set correctly
151
+
152
+ ### Authentication Issues
153
+ - Verify OAuth configuration for SaaS
154
+ - Check basic auth credentials for Self-Managed
155
+ - Ensure certificates are properly configured for custom CA
156
+
157
+ ## Code Style Guidelines
158
+
159
+ - Use TypeScript strict mode
160
+ - Follow existing patterns for DTO definitions
161
+ - Use `LosslessDto` base class for API responses
162
+ - Prefer composition over inheritance for client features
163
+ - Write comprehensive JSDoc comments for public APIs
164
+
165
+ ## Recent Additions
166
+
167
+ ### Search Decision Instances API
168
+ - `searchDecisionInstances()` method in `CamundaRestClient`
169
+ - `DecisionInstanceSearchFilter` and `SearchDecisionInstancesRequest` DTOs
170
+ - `CamundaRestSearchDecisionInstancesResponse` with cursor-based pagination
171
+ - Comprehensive unit and integration tests
172
+ - Follows established patterns for search endpoints
173
+
174
+ ## Dependencies
175
+
176
+ Key dependencies to be aware of:
177
+ - `got` - HTTP client library
178
+ - `@grpc/grpc-js` - gRPC client
179
+ - `lossless-json` - JSON parsing with int64 support
180
+ - `form-data` - Multipart form handling
181
+ - `jest` - Testing framework
package/CHANGELOG.md CHANGED
@@ -1,3 +1,30 @@
1
+ ## [8.7.23](https://github.com/camunda/camunda-8-js-sdk/compare/v8.7.22...v8.7.23) (2025-07-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add missing fields to getDecisionInstance Response Dto. fixes [#545](https://github.com/camunda/camunda-8-js-sdk/issues/545) ([2378d6b](https://github.com/camunda/camunda-8-js-sdk/commit/2378d6bbfd653bf6fe0d6d415084e998fa0b55d2))
7
+
8
+ ## [8.7.22](https://github.com/camunda/camunda-8-js-sdk/compare/v8.7.21...v8.7.22) (2025-07-22)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * fix QuerySubscription duplicate item emission. fixes [#540](https://github.com/camunda/camunda-8-js-sdk/issues/540) ([8d61bcb](https://github.com/camunda/camunda-8-js-sdk/commit/8d61bcb7a191b7bf561c1ed65dccb53e8d0fa22e))
14
+
15
+
16
+ ### Features
17
+
18
+ * correctly handle backpressure 503 response. fixes [#509](https://github.com/camunda/camunda-8-js-sdk/issues/509) ([7994b5f](https://github.com/camunda/camunda-8-js-sdk/commit/7994b5fbef0852eb49a19b37089070d3225a7f89))
19
+ * enable debugging for Camunda Rest Client ([cba989f](https://github.com/camunda/camunda-8-js-sdk/commit/cba989f72ed446e40eb9dcd8dfd0b898bf1a90a8))
20
+ * implement getDecisionInstance. fixes [#293](https://github.com/camunda/camunda-8-js-sdk/issues/293) ([eea159d](https://github.com/camunda/camunda-8-js-sdk/commit/eea159d11cc411144c6472f1dfe364380d856592))
21
+ * implement searchDecisionInstances. fixes [#292](https://github.com/camunda/camunda-8-js-sdk/issues/292) ([83a7d7b](https://github.com/camunda/camunda-8-js-sdk/commit/83a7d7b0abd163abeb3311588305c7c0b9db8caa))
22
+
23
+
24
+ ### Reverts
25
+
26
+ * remove logging for [#491](https://github.com/camunda/camunda-8-js-sdk/issues/491) ([ae69149](https://github.com/camunda/camunda-8-js-sdk/commit/ae69149bd2e10d143fd1186a721fa02cd8ccbabb))
27
+
1
28
  ## [8.7.21](https://github.com/camunda/camunda-8-js-sdk/compare/v8.7.20...v8.7.21) (2025-07-17)
2
29
 
3
30
 
package/README.md CHANGED
@@ -394,6 +394,7 @@ const subscription = QuerySubscription({
394
394
  return false // No new items, do not emit
395
395
  },
396
396
  interval: 5000,
397
+ trackingWindow: 5, // Remember emitted items from last 5 poll cycles (default)
397
398
  })
398
399
 
399
400
  subscription.on('data', data => {
@@ -404,24 +405,46 @@ subscription.cancel() // close subscription and free resources
404
405
  // You can also use subscription.pause() and subscription.resume() to pause and resume the subscription
405
406
  ```
406
407
 
408
+ **Note**:
409
+ - `QuerySubscription` uses a rolling window approach to prevent memory leaks when tracking emitted items. By default, it remembers items from the last 5 poll cycles to prevent duplicates. You can adjust this with the `trackingWindow` parameter:
410
+
411
+ ```typescript
412
+ const subscription = QuerySubscription({
413
+ query,
414
+ predicate: myCustomPredicate,
415
+ interval: 5000,
416
+ trackingWindow: 10, // Remember items from the last 10 polling cycles
417
+ })
418
+ ```
419
+
420
+ If you implement a custom predicate, your predicate determines what data should be emitted, and then the rolling window mechanism prevents duplicate emissions across multiple poll cycles.
421
+
422
+ **Important:** The rolling window mechanism operates by serializing each emitted item to a string and tracking it for the specified number of poll cycles. This means that if an entity changes state and then returns to a previous state within the tracking window timeframe, the second appearance in the original state might not trigger an emission. For example, if a process instance transitions from "READY" to "NOT_READY" and back to "READY" within the tracking window, the second "READY" state might not be emitted. If you need to track all state transitions regardless of previous states, consider:
423
+
424
+ 1. Setting a smaller `trackingWindow` value to reduce the tracking period
425
+ 2. Implementing a custom state tracking mechanism in your application
426
+ 3. Including a timestamp or version field in your item identification logic
427
+
407
428
  ## Debugging
408
429
 
409
430
  The SDK uses the [`debug`](https://github.com/debug-js/debug) library to help you debug specific issues. This produces verbose, low-level output from specific components to the console.
410
431
 
411
432
  To enable debugging output, set a value for the `DEBUG` environment variable. The value is a comma-separated list of debugging namespaces. The SDK has the following namespaces:
412
433
 
413
- | Value | Component |
414
- | ------------------------ | -------------------------------- |
415
- | `camunda:adminconsole` | Administration API |
416
- | `camunda:modeler` | Modeler API |
417
- | `camunda:operate` | Operate API |
418
- | `camunda:optimize` | Optimize API |
419
- | `camunda:tasklist` | Tasklist API |
420
- | `camunda:oauth` | OAuth Token Exchange |
421
- | `camunda:grpc` | Zeebe gRPC channel |
422
- | `camunda:worker` | Zeebe Worker |
423
- | `camunda:worker:verbose` | Zeebe Worker (additional detail) |
424
- | `camunda:zeebeclient` | Zeebe Client |
434
+ | Value | Component |
435
+ | --------------------------- | ----------------------------------------- |
436
+ | `camunda:adminconsole` | Administration API |
437
+ | `camunda:modeler` | Modeler API |
438
+ | `camunda:operate` | Operate API |
439
+ | `camunda:optimize` | Optimize API |
440
+ | `camunda:tasklist` | Tasklist API |
441
+ | `camunda:oauth` | OAuth Token Exchange |
442
+ | `camunda:querySubscription` | QuerySubscription debugging |
443
+ | `camunda:grpc` | Zeebe gRPC channel |
444
+ | `camunda:worker` | Zeebe Worker |
445
+ | `camunda:worker:verbose` | Zeebe Worker (additional detail) |
446
+ | `camunda:zeebeclient` | Zeebe Client |
447
+ | `camunda:orchestration-rest` | Camunda Orchestration Cluster API Client |
425
448
 
426
449
  Here is an example of turning on debugging for the OAuth and Operate components:
427
450
 
@@ -50,20 +50,21 @@ export declare class ProcessDeployment extends LosslessDto {
50
50
  tenantId: string;
51
51
  }
52
52
  export declare class DecisionDeployment extends LosslessDto {
53
- dmnDecisionId: string;
53
+ decisionDefinitionId: string;
54
54
  version: number;
55
55
  decisionKey: string;
56
- dmnDecisionName: string;
56
+ name: string;
57
57
  tenantId: string;
58
- dmnDecisionRequirementsId: string;
59
- dmnDecisionRequirementsKey: string;
58
+ decisionRequirementsId: string;
59
+ decisionRequirementsKey: string;
60
+ decisionDefinitionKey: string;
60
61
  }
61
62
  export declare class DecisionRequirementsDeployment extends LosslessDto {
62
- dmnDecisionRequirementsId: string;
63
+ decisionRequirementsId: string;
63
64
  version: number;
64
- dmnDecisionRequirementsName: string;
65
+ decisionRequirementsName: string;
65
66
  tenantId: string;
66
- dmnDecisionRequirementsKey: string;
67
+ decisionRequirementsKey: string;
67
68
  resourceName: string;
68
69
  }
69
70
  export declare class FormDeployment {
@@ -105,7 +106,7 @@ export declare class CreateProcessInstanceResponse<T = Record<string, never>> {
105
106
  /**
106
107
  * The version of the process; set to -1 to use the latest version
107
108
  */
108
- readonly version: number;
109
+ readonly processDefinitionVersion: number;
109
110
  readonly processInstanceKey: string;
110
111
  /**
111
112
  * the tenant identifier of the created process instance
@@ -180,7 +181,7 @@ export interface CreateProcessBaseRequest<V extends JSONDoc | LosslessDto> {
180
181
  /**
181
182
  * the version of the process; if not specified it will use the latest version
182
183
  */
183
- version?: number;
184
+ processDefinitionVersion?: number;
184
185
  /**
185
186
  * JSON document that will instantiate the variables for the root variable scope of the
186
187
  * process instance.
@@ -323,19 +324,27 @@ export interface AdvancedStringFilter {
323
324
  /** Checks if the current property exists. */
324
325
  $exists?: boolean;
325
326
  /** Checks if the property matches any of the provided values. */
326
- $in: string[];
327
+ $in?: string[];
327
328
  /** Checks if the property matches the provided like value. Supported wildcard characters depend on the configured search client. */
328
- $like: string;
329
+ $like?: string;
329
330
  }
330
331
  export interface AdvancedNumberFilter {
332
+ /** Checks for equality with the provided value. */
331
333
  $eq?: number;
334
+ /** Checks for inequality with the provided value. */
332
335
  $neq?: number;
333
- $exists: boolean;
334
- $in: number[];
335
- $gt: number;
336
- $gte: number;
337
- $lt: number;
338
- $lte: number;
336
+ /** Checks if the current property exists. */
337
+ $exists?: boolean;
338
+ /** Checks if the property matches any of the provided values. */
339
+ $in?: number[];
340
+ /** Checks if the property is greater than the provided value. */
341
+ $gt?: number;
342
+ /** Checks if the property is greater than or equal to the provided value. */
343
+ $gte?: number;
344
+ /** Checks if the property is less than the provided value. */
345
+ $lt?: number;
346
+ /** Checks if the property is less than or equal to the provided value. */
347
+ $lte?: number;
339
348
  }
340
349
  export interface VariableSearchFilterRequest {
341
350
  /** The key for this variable. */
@@ -574,7 +583,7 @@ export interface ProcessInstanceSearchFilter {
574
583
  /** The process definition name. */
575
584
  processDefinitionName?: string | AdvancedStringFilter;
576
585
  /** The process definition version. */
577
- processDefinitionVersion?: string | AdvancedStringFilter;
586
+ processDefinitionVersion?: number | AdvancedStringFilter;
578
587
  /** The process definition version tag. */
579
588
  processDefinitionVersionTag?: string | AdvancedStringFilter;
580
589
  /** The process definition key. */
@@ -596,21 +605,21 @@ export interface ProcessInstanceSearchFilter {
596
605
  /** Name of the variable. */
597
606
  name: string;
598
607
  /** The value of the variable */
599
- value: string;
608
+ value: string | AdvancedStringFilter;
600
609
  }>;
601
610
  }
602
611
  /** This is the 8.8 API. */
603
612
  export interface SearchProcessInstanceRequest extends BaseSearchRequest<'processInstanceKey' | 'processDefinitionId' | 'processDefinitionName' | 'processDefinitionVersion' | 'processDefinitionVersionTag' | 'processDefinitionKey' | 'parentProcessInstanceKey' | 'parentFlowNodeInstanceKey' | 'state' | 'startDate' | 'endDate' | 'tenantId' | 'hasIncident', ProcessInstanceSearchFilter> {
604
613
  }
605
- interface ProcessInstanceDetails {
614
+ export interface ProcessInstanceDetails {
606
615
  /** The key of the process instance. */
607
616
  processInstanceKey: string;
608
617
  /** The key of the process definition. */
609
618
  processDefinitionKey: string;
610
619
  /** The key of the parent process instance. */
611
- parentProcessInstanceKey: string;
620
+ parentProcessInstanceKey?: string;
612
621
  /** The key of the parent flow node instance. */
613
- parentFlowNodeInstanceKey: string;
622
+ parentFlowNodeInstanceKey?: string;
614
623
  /** The BPMN process ID of the process definition. */
615
624
  processDefinitionId: string;
616
625
  /** The name of the process definition. */
@@ -1034,4 +1043,116 @@ interface IncidentDetails {
1034
1043
  }
1035
1044
  export interface CamundaRestSearchIncidentsResponse extends PaginatedCamundaRestSearchResponse<IncidentDetails> {
1036
1045
  }
1046
+ export interface DecisionInstanceSearchFilter {
1047
+ /** The decision instance key. */
1048
+ decisionInstanceKey?: string | AdvancedStringFilter;
1049
+ /** The decision definition ID. */
1050
+ decisionDefinitionId?: string | AdvancedStringFilter;
1051
+ /** The decision definition key. */
1052
+ decisionDefinitionKey?: string | AdvancedStringFilter;
1053
+ /** The decision definition name. */
1054
+ decisionDefinitionName?: string | AdvancedStringFilter;
1055
+ /** The decision definition version. */
1056
+ decisionDefinitionVersion?: number | AdvancedNumberFilter;
1057
+ /** The process definition key associated to this decision instance. */
1058
+ processDefinitionKey?: string | AdvancedStringFilter;
1059
+ /** The process instance key associated to this decision instance. */
1060
+ processInstanceKey?: string | AdvancedStringFilter;
1061
+ /** The state of the decision instance. */
1062
+ state?: 'EVALUATED' | 'FAILED' | 'UNKNOWN' | 'UNSPECIFIED';
1063
+ /** The evaluation date. */
1064
+ evaluationDate?: string | AdvancedDateTimeFilter;
1065
+ /** The tenant ID. */
1066
+ tenantId?: string | AdvancedStringFilter;
1067
+ /** The decision type. */
1068
+ decisionType?: 'DECISION_TABLE' | 'LITERAL_EXPRESSION' | 'UNSPECIFIED' | 'UNKNOWN';
1069
+ }
1070
+ export interface CamundaRestSearchDecisionInstancesRequest extends BaseSearchRequest<'decisionInstanceKey' | 'decisionDefinitionId' | 'decisionDefinitionKey' | 'decisionDefinitionName' | 'decisionDefinitionVersion' | 'processDefinitionKey' | 'processInstanceKey' | 'state' | 'evaluationDate' | 'tenantId' | 'decisionType', DecisionInstanceSearchFilter> {
1071
+ }
1072
+ interface DecisionInstanceDetails {
1073
+ /** The decision instance key. */
1074
+ decisionInstanceKey: string;
1075
+ /** The decision definition ID. */
1076
+ decisionDefinitionId: string;
1077
+ /** The decision definition key. */
1078
+ decisionDefinitionKey: string;
1079
+ /** The decision definition name. */
1080
+ decisionDefinitionName: string;
1081
+ /** The decision definition version. */
1082
+ decisionDefinitionVersion: number;
1083
+ /** The process definition key associated to this decision instance. */
1084
+ processDefinitionKey: string;
1085
+ /** The process instance key associated to this decision instance. */
1086
+ processInstanceKey: string;
1087
+ /** The state of the decision instance. */
1088
+ state: 'EVALUATED' | 'FAILED' | 'UNKNOWN' | 'UNSPECIFIED';
1089
+ /** The evaluation date. */
1090
+ evaluationDate: string;
1091
+ /** The evaluation failure message, if any. */
1092
+ evaluationFailure?: string;
1093
+ /** The tenant ID. */
1094
+ tenantId: string;
1095
+ /** The decision type. */
1096
+ decisionType: 'DECISION_TABLE' | 'LITERAL_EXPRESSION' | 'UNSPECIFIED' | 'UNKNOWN';
1097
+ /** The result of the decision evaluation. */
1098
+ result: string;
1099
+ /** The ID of the decision instance. */
1100
+ decisionInstanceId: string;
1101
+ }
1102
+ export interface CamundaRestSearchDecisionInstancesResponse extends PaginatedCamundaRestSearchResponse<DecisionInstanceDetails> {
1103
+ }
1104
+ /**
1105
+ * Response from getting a single decision instance by its key.
1106
+ */
1107
+ export interface GetDecisionInstanceResponse {
1108
+ /** The decision instance key. Note that this is not the unique identifier of the entity itself; the decisionInstanceId serves as the primary identifier. */
1109
+ decisionInstanceKey: string;
1110
+ /** The decision definition ID. */
1111
+ decisionDefinitionId: string;
1112
+ /** The decision definition key. */
1113
+ decisionDefinitionKey: string;
1114
+ /** The decision definition name. */
1115
+ decisionDefinitionName: string;
1116
+ /** The decision definition version. */
1117
+ decisionDefinitionVersion: number;
1118
+ /** The process definition key associated to this decision instance. */
1119
+ processDefinitionKey: string;
1120
+ /** The process instance key associated to this decision instance. */
1121
+ processInstanceKey: string;
1122
+ /** The state of the decision instance. */
1123
+ state: 'EVALUATED' | 'FAILED' | 'UNKNOWN' | 'UNSPECIFIED';
1124
+ /** The evaluation date. */
1125
+ evaluationDate: string;
1126
+ /** The evaluation failure message, if any. */
1127
+ evaluationFailure?: string;
1128
+ /** The tenant ID. */
1129
+ tenantId: string;
1130
+ /** The decision type. */
1131
+ decisionDefinitionType: 'DECISION_TABLE' | 'LITERAL_EXPRESSION' | 'UNSPECIFIED' | 'UNKNOWN';
1132
+ /** The result of the decision evaluation. */
1133
+ result: string;
1134
+ /** The evaluated inputs of the decision instance. */
1135
+ evaluatedInputs: Array<{
1136
+ /** The ID of the evaluated decision input. */
1137
+ inputId: string;
1138
+ /** The name of the evaluated decision input. */
1139
+ inputName: string;
1140
+ /** The value of the evaluated decision input. */
1141
+ inputValue: string;
1142
+ }>;
1143
+ matchedRules: Array<{
1144
+ /** The ID of the matched rule. */
1145
+ ruleId: string;
1146
+ /** The index of the matched rule. */
1147
+ ruleIndex: number;
1148
+ evaluatedOutputs: Array<{
1149
+ /** The ID of the evaluated decision output. */
1150
+ outputId: string;
1151
+ /** The name of the evaluated decision output. */
1152
+ outputName: string;
1153
+ /** The value of the evaluated decision output. */
1154
+ outputValue: string;
1155
+ }>;
1156
+ }>;
1157
+ }
1037
1158
  export {};
@@ -40,13 +40,13 @@ __decorate([
40
40
  ], DecisionDeployment.prototype, "decisionKey", void 0);
41
41
  __decorate([
42
42
  lib_1.Int64String
43
- ], DecisionDeployment.prototype, "dmnDecisionRequirementsKey", void 0);
43
+ ], DecisionDeployment.prototype, "decisionRequirementsKey", void 0);
44
44
  class DecisionRequirementsDeployment extends lib_1.LosslessDto {
45
45
  }
46
46
  exports.DecisionRequirementsDeployment = DecisionRequirementsDeployment;
47
47
  __decorate([
48
48
  lib_1.Int64String
49
- ], DecisionRequirementsDeployment.prototype, "dmnDecisionRequirementsKey", void 0);
49
+ ], DecisionRequirementsDeployment.prototype, "decisionRequirementsKey", void 0);
50
50
  class FormDeployment {
51
51
  }
52
52
  exports.FormDeployment = FormDeployment;
@@ -1 +1 @@
1
- {"version":3,"file":"C8Dto.js","sourceRoot":"","sources":["../../../src/c8/lib/C8Dto.ts"],"names":[],"mappings":";;;;;;;;;AAIA,mCAA8D;AAS9D,MAAa,UAGX,SAAQ,iBAAW;CAoBpB;AAvBD,gCAuBC;AAlBA;IADC,iBAAW;0CACG;AAGf;IADC,iBAAW;sDACe;AAI3B;IADC,iBAAW;wDACiB;AAG7B;IADC,iBAAW;sDACe;AAK3B;IADC,iBAAW;4CACK;AAuClB,MAAa,iBAAkB,SAAQ,iBAAW;CAOjD;AAPD,8CAOC;AAHA;IADC,iBAAW;+DACiB;AAK9B,MAAa,kBAAmB,SAAQ,iBAAW;CAUlD;AAVD,gDAUC;AANA;IADC,iBAAW;uDACQ;AAKpB;IADC,iBAAW;sEACuB;AAGpC,MAAa,8BAA+B,SAAQ,iBAAW;CAQ9D;AARD,wEAQC;AAFA;IADC,iBAAW;kFACuB;AAGpC,MAAa,cAAc;CAO1B;AAPD,wCAOC;AAHA;IADC,iBAAW;+CACI;AAKjB,MAAa,yBAA0B,SAAQ,iBAAW;CAUzD;AAVD,8DAUC;AARA;IADC,iBAAW;gEACU;AAUvB,MAAa,sBAAuB,SAAQ,yBAAyB;CAKpE;AALD,wDAKC;AAED,MAAa,6BAA6B;CAyBzC;AAzBD,sEAyBC;AAnBS;IADR,iBAAW;2EAC0B;AAU7B;IADR,iBAAW;yEACwB;AA8BrC,gCAAgC;AAChC,MAAa,uBAAw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AuED,MAAa,eAAgB,SAAQ,iBAAW;CAO/C;AAPD,0CAOC;AAED,MAAa,WAAY,SAAQ,iBAAW;CAO3C;AAPD,kCAOC;AADA;IADC,IAAA,cAAQ,EAAC,eAAe,CAAC;qDACU;AAGrC,MAAa,cAAe,SAAQ,iBAAW;CAO9C;AAPD,wCAOC;AAED,MAAa,iBAAkB,SAAQ,iBAAW;CAmBjD;AAnBD,8CAmBC;AALA;IADC,IAAA,cAAQ,EAAC,WAAW,CAAC;uDACM;AAE5B;IADC,IAAA,cAAQ,EAAC,cAAc,CAAC;0DACS;AAKnC,MAAa,wBAAyB,SAAQ,iBAAW;CAyBxD;AAzBD,4DAyBC;AADA;IADC,IAAA,cAAQ,EAAC,iBAAiB,CAAC;oEACY;AA4DzC,MAAM,QAAS,SAAQ,iBAAW;CAYjC;AATA;IADC,iBAAW;oCACD;AAWZ,8BAA8B;AAC9B,MAAa,mBAAoB,SAAQ,iBAAW;CAMnD;AAND,kDAMC;AADA;IADC,IAAA,cAAQ,EAAC,QAAQ,CAAC;kDACD;AAGnB,MAAa,mBAAmB;CAO/B;AAPD,kDAOC"}
@@ -6,13 +6,13 @@ import PCancelable from 'p-cancelable';
6
6
  import { Camunda8ClientConfiguration, LosslessDto } from '../../lib';
7
7
  import { IHeadersProvider } from '../../oauth';
8
8
  import { ActivateJobsRequest, BroadcastSignalReq, CompleteJobRequest, ErrorJobWithVariables, FailJobRequest, JSONDoc, PublishMessageRequest, TopologyResponse } from '../../zeebe/types';
9
- import { AssignUserTaskRequest, BroadcastSignalResponse, CamundaRestSearchElementInstancesResponse, CamundaRestSearchIncidentsResponse, CamundaRestSearchProcessDefinitionsResponse, CamundaRestSearchProcessInstanceResponse, CamundaRestSearchUserTasksResponse, CamundaRestSearchVariablesResponse, CamundaRestUserTaskVariablesResponse, CorrelateMessageResponse, CreateDocumentLinkRequest, CreateProcessInstanceReq, CreateProcessInstanceResponse, Ctor, DeployResourceResponse, DownloadDocumentRequest, ElementInstanceDetails, EvaluateDecisionRequest, EvaluateDecisionResponse, GetProcessDefinitionResponse, GetVariableResponse, JobUpdateChangeset, JobWithMethods, JsonApiEndpointRequest, MigrationRequest, ModifyProcessInstanceRequest, NewUserInfo, PatchAuthorizationRequest, PublishMessageResponse, RawApiEndpointRequest, SearchElementInstancesRequest, SearchIncidentsRequest, SearchProcessDefinitionsRequest, SearchProcessInstanceRequest, SearchTasksRequest, SearchUsersRequest, SearchUsersResponse, SearchVariablesRequest, TaskChangeSet, UnknownRequestBody, UpdateElementVariableRequest, UploadDocumentRequest, UploadDocumentResponse, UploadDocumentsResponse, UserTask, UserTaskVariablesRequest } from './C8Dto';
9
+ import { AssignUserTaskRequest, BroadcastSignalResponse, CamundaRestSearchDecisionInstancesRequest, CamundaRestSearchDecisionInstancesResponse, CamundaRestSearchElementInstancesResponse, CamundaRestSearchIncidentsResponse, CamundaRestSearchProcessDefinitionsResponse, CamundaRestSearchProcessInstanceResponse, CamundaRestSearchUserTasksResponse, CamundaRestSearchVariablesResponse, CamundaRestUserTaskVariablesResponse, CorrelateMessageResponse, CreateDocumentLinkRequest, CreateProcessInstanceReq, CreateProcessInstanceResponse, Ctor, DeployResourceResponse, DownloadDocumentRequest, ElementInstanceDetails, EvaluateDecisionRequest, EvaluateDecisionResponse, GetDecisionInstanceResponse, GetProcessDefinitionResponse, GetVariableResponse, JobUpdateChangeset, JobWithMethods, JsonApiEndpointRequest, MigrationRequest, ModifyProcessInstanceRequest, NewUserInfo, PatchAuthorizationRequest, PublishMessageResponse, RawApiEndpointRequest, SearchElementInstancesRequest, SearchIncidentsRequest, SearchProcessDefinitionsRequest, SearchProcessInstanceRequest, SearchTasksRequest, SearchUsersRequest, SearchUsersResponse, SearchVariablesRequest, TaskChangeSet, UnknownRequestBody, UpdateElementVariableRequest, UploadDocumentRequest, UploadDocumentResponse, UploadDocumentsResponse, UserTask, UserTaskVariablesRequest } from './C8Dto';
10
10
  import { Logger } from './C8Logger';
11
11
  import { CamundaJobWorker, CamundaJobWorkerConfig } from './CamundaJobWorker';
12
12
  /**
13
- * The client for the unified Camunda 8 REST API.
13
+ * The client for the unified Camunda 8 Orchestration Cluster REST API.
14
14
  *
15
- * Logging: to enable debug tracing during development, you can set `DEBUG=camunda:zeebe-rest`.
15
+ * Logging: to enable debug tracing during development, you can set `DEBUG=camunda:orchestration-rest`.
16
16
  *
17
17
  * For production, you can pass in an logger compatible with {@link Logger} to the constructor as `logger`.
18
18
  *
@@ -320,7 +320,7 @@ export declare class CamundaRestClient {
320
320
  *
321
321
  * @since 8.6.0
322
322
  */
323
- migrateProcessInstance(req: MigrationRequest): Promise<unknown>;
323
+ migrateProcessInstance(req: MigrationRequest): Promise<''>;
324
324
  /**
325
325
  * Query process instances
326
326
  *
@@ -534,7 +534,7 @@ export declare class CamundaRestClient {
534
534
  * Documentation https://docs.camunda.io/docs/apis-tools/camunda-api-rest/specifications/modify-process-instance/
535
535
  * @since 8.6.0
536
536
  */
537
- modifyProcessInstance(request: ModifyProcessInstanceRequest): Promise<void>;
537
+ modifyProcessInstance(request: ModifyProcessInstanceRequest): Promise<''>;
538
538
  /**
539
539
  * Evaluate decision
540
540
  *
@@ -583,6 +583,18 @@ export declare class CamundaRestClient {
583
583
  * @since 8.8.0
584
584
  */
585
585
  searchIncidents(request: SearchIncidentsRequest): Promise<CamundaRestSearchIncidentsResponse>;
586
+ /**
587
+ * @description Search for decision instances based on given criteria.
588
+ * Documentation: https://docs.camunda.io/docs/next/apis-tools/orchestration-cluster-api-rest/specifications/search-decision-instances/
589
+ * @since 8.8.0
590
+ */
591
+ searchDecisionInstances(request: CamundaRestSearchDecisionInstancesRequest): Promise<CamundaRestSearchDecisionInstancesResponse>;
592
+ /**
593
+ * Get a decision instance by key.
594
+ * @param decisionInstanceKey The key of the decision instance to get
595
+ * @returns Decision instance details
596
+ */
597
+ getDecisionInstance(decisionInstanceKey: string): Promise<GetDecisionInstanceResponse>;
586
598
  /**
587
599
  * This is a generic method to call an API endpoint. Use this method to call any REST API endpoint in the Camunda 8 cluster.
588
600
  * TODO: This does not currently support multipart form-data, but it will.