@camunda8/sdk 8.9.0-alpha.5 → 8.9.0-alpha.7

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 CHANGED
@@ -1,54 +1,142 @@
1
1
  # Agent Information for Camunda 8 JavaScript SDK
2
2
 
3
- This file contains information for AI agents working on the Camunda 8 JavaScript SDK repository.
3
+ This file is the **canonical** instruction document for AI agents (Copilot, Claude, etc.) working on the Camunda 8 JavaScript SDK repository. It supersedes the previous `.github/copilot-instructions.md`.
4
+
5
+ See also:
6
+ - [CONTRIBUTING.md](CONTRIBUTING.md) — contributor onboarding, branch model, release summary
7
+ - [MAINTAINER.md](MAINTAINER.md) — operational guide (CI workflows, semantic-release, npm publishing)
8
+
9
+ ---
4
10
 
5
11
  ## Project Overview
6
12
 
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.
13
+ The Camunda 8 JavaScript SDK is the official TypeScript/Node.js client library for Camunda Platform 8. It provides unified access to all Camunda 8 APIs including Zeebe, Operate, Optimize, Tasklist, Modeler, and Admin. It targets Node.js (not browser) and ships TypeScript typings.
14
+
15
+ ### Key Features
16
+
17
+ - Full-featured clients for all Camunda 8 services
18
+ - Support for both SaaS and Self-Managed deployments
19
+ - OAuth authentication with token management
20
+ - Specialized handling for int64 values through the `LosslessDto` system
21
+ - Comprehensive testing suite for unit and integration tests
22
+
23
+ ---
24
+
25
+ ## Commit Conventions (read this before committing)
26
+
27
+ The repo enforces [Conventional Commits](https://www.conventionalcommits.org/) via `commitlint` (see [commitlint.config.js](commitlint.config.js)). The CI job `lint-commits` will block PRs that violate these rules.
28
+
29
+ ### Allowed commit types
30
+
31
+ Only these `type:` values are accepted (any other type — including `deps:` — will fail `lint-commits`):
32
+
33
+ | Type | When to use | Release impact |
34
+ | -------------- | ---------------------------------------------------------------- | -------------- |
35
+ | `feat` | New SDK feature | patch |
36
+ | `fix` | Bug fix | patch |
37
+ | `perf` | Performance improvement | patch |
38
+ | `revert` | Revert a previous commit | patch |
39
+ | `release` | Force a patch release with no other eligible commits | patch |
40
+ | `server` | Bump to a new Camunda **minor** line (e.g. 8.8 → 8.9) | minor |
41
+ | `server-major` | Bump to a new Camunda **major** line (e.g. 8.x → 9.0) | major |
42
+ | `chore` | Maintenance, dependency bumps (`chore(deps): ...`), tooling | none |
43
+ | `build` | Build system / packaging changes | none |
44
+ | `ci` | CI workflow / GitHub Actions changes | none |
45
+ | `docs` | Documentation only | none |
46
+ | `refactor` | Code refactor with no behavior change | none |
47
+ | `style` | Whitespace / formatting only | none |
48
+ | `test` | Test-only changes | none |
49
+
50
+ Note the **mutated semver**: `feat`/`fix` produce **patch** bumps, not minor/major. The SDK's version tracks the Camunda 8 server line, not its own API surface. See [MAINTAINER.md](MAINTAINER.md) for the full release pipeline.
51
+
52
+ ### Scopes
53
+
54
+ `commitlint` does not enforce a scope-enum, so any scope is accepted. Use scopes when they clarify the change (e.g. `chore(deps): ...`, `fix(zeebe): ...`, `ci(release): ...`).
55
+
56
+ ### Format constraints
57
+
58
+ - Body lines: max **500** characters per line (`body-max-line-length`).
59
+ - Footer lines: max **1000** characters per line (`footer-max-line-length`).
60
+ - Header (first line): conventional-commits default — keep concise.
61
+
62
+ ### Common pitfalls
63
+
64
+ - **`deps:` is not valid.** Use `chore(deps): ...` for dependency pinning / bumps. (Dependabot itself uses `chore(deps):`.)
65
+ - The pre-commit Husky hook runs `npm run test`, which can fail on local-only files (e.g. nested worktrees). The release workflow bypasses this with `HUSKY=0`. For agent commits that are otherwise validated, prefix with `HUSKY=0` rather than `--no-verify`.
66
+
67
+ ---
8
68
 
9
69
  ## Essential Commands
10
70
 
11
71
  ### Build & Compilation
72
+
12
73
  ```bash
13
- npm run build # Clean, compile TypeScript, and copy proto files
74
+ npm run build # Clean, compile TypeScript, copy proto files
14
75
  npm run clean # Remove dist folder and build artifacts
15
76
  npm run compile # Compile TypeScript to JavaScript
16
77
  ```
17
78
 
18
79
  ### Testing
80
+
81
+ The repo uses **vitest** (not jest, despite older docs).
82
+
19
83
  ```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
84
+ npm test # Run unit tests only (CAMUNDA_UNIT_TEST=true)
85
+ npm run test:smoketest # Build + smoke test + tsd typings check
86
+ npm run test:8.8:sm # 8.8 self-managed integration
87
+ npm run test:8.8:saas # 8.8 SaaS integration
88
+ npm run test:8.7:sm # 8.7 self-managed integration
89
+ npm run test:8.7:mt # 8.7 multi-tenancy integration
90
+ npm run test:8.7:saas # 8.7 SaaS integration
91
+ npm run test:c8run # C8Run integration
92
+ ```
93
+
94
+ Run a single test file:
95
+
96
+ ```bash
97
+ # Unit test — source unit env first
98
+ . env/unit-test.env && CAMUNDA_UNIT_TEST=true npx vitest run --testTimeout=30000 ${testFile}
99
+
100
+ # Integration test — source the appropriate env file
101
+ . env/8.8-alpha.env && npx vitest run --testTimeout=30000 ${testFile}
25
102
  ```
26
103
 
27
104
  ### Code Quality
105
+
28
106
  ```bash
29
- npm run lint # Run ESLint on TypeScript files
30
- npm run format # Format code with Prettier
107
+ npm run lint # ESLint on src/**/*.ts
108
+ npm run format # Prettier --write on src/**/*.ts
109
+
110
+ # Single file:
111
+ npx prettier --write 'src/${filename}'
112
+ npx eslint 'src/${filename}'
31
113
  ```
32
114
 
33
115
  ### Development Environment
116
+
34
117
  ```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
118
+ npm run sm:start # Start Docker Compose (Self-Managed Camunda 8)
119
+ npm run sm:stop # Stop Docker Compose
120
+ npm run sm:start:8.8 # Start 8.8 stack
121
+ npm run sm:stop:8.8 # Stop 8.8 stack
122
+ npm run sm:start:8.9 # Start 8.9 stack
123
+ npm run sm:stop:8.9 # Stop 8.9 stack
39
124
  ```
40
125
 
41
126
  ### Documentation
127
+
42
128
  ```bash
43
- npm run docs # Generate TypeDoc documentation
44
- npm run docs:watch # Generate and watch docs for changes
129
+ npm run docs # Generate TypeDoc docs
130
+ npm run docs:watch # Generate + watch
45
131
  ```
46
132
 
133
+ ---
134
+
47
135
  ## Project Structure
48
136
 
49
137
  ```
50
138
  src/
51
- ├── index.ts # Main entry point
139
+ ├── index.ts # Main entry point and exports
52
140
  ├── lib/ # Common utilities and base classes
53
141
  ├── c8/ # Camunda 8 unified client and REST API
54
142
  │ ├── index.ts # Camunda8 main class
@@ -57,125 +145,353 @@ src/
57
145
  │ └── CamundaRestClient.ts # REST API client implementation
58
146
  ├── zeebe/ # Zeebe gRPC and REST clients
59
147
  ├── operate/ # Operate API client
60
- ├── optimize/ # Optimize API client
148
+ ├── optimize/ # Optimize API client
61
149
  ├── tasklist/ # Tasklist API client
62
150
  ├── modeler/ # Web Modeler API client
63
151
  ├── admin/ # Admin API client
64
152
  ├── oauth/ # OAuth authentication providers
65
- └── __tests__/ # Test files organized by component
153
+ └── __tests__/ # Test files organized by component and version
66
154
  ```
67
155
 
156
+ ### Important Files
157
+
158
+ - `src/c8/lib/C8Dto.ts` — Main DTO definitions for REST API
159
+ - `src/c8/lib/CamundaRestClient.ts` — Unified REST API client
160
+ - `src/lib/Configuration.ts` — Configuration management
161
+ - `src/lib/LosslessDto.ts` — Base class for DTOs with int64 support
162
+ - `package.json` — Scripts and dependencies
163
+ - `tsconfig.json` — TypeScript configuration
164
+ - `commitlint.config.js` — Allowed commit types
165
+ - `release.config.js` — semantic-release branch + dist-tag rules
166
+
167
+ ---
168
+
68
169
  ## Key Architecture Patterns
69
170
 
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
171
+ ### 1. Client Factory Pattern
74
172
 
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
173
+ - The main `Camunda8` class is the factory for all service clients.
174
+ - Configuration is centralized in the factory and passed to individual clients.
175
+ - Clients are created via methods like `getCamundaRestClient()`, `getZeebeGrpcApiClient()`, `getOperateClient()`, `getTasklistClient()`, etc.
176
+ - Clients support both SaaS and Self-Managed configurations.
80
177
 
81
- ### Authentication
82
- - OAuth2/OIDC support for SaaS
83
- - Basic auth and custom auth providers for Self-Managed
84
- - Token caching and automatic refresh
178
+ ### 2. DTO Pattern
85
179
 
86
- ### Pagination
87
- - **CamundaRestClient**: Uses `startCursor`/`endCursor` (string values)
88
- - **Other APIs**: Use `firstSortValues`/`lastSortValues` or `sortValues` (arrays)
180
+ - DTOs live in `*Dto.ts` files.
181
+ - Most DTOs extend `LosslessDto` for int64 handling.
182
+ - Use decorators like `@Int64String` for int64 fields.
183
+ - Always follow existing patterns when adding new DTOs.
184
+
185
+ ```typescript
186
+ export class SomeEntityDto extends LosslessDto {
187
+ @Int64String
188
+ entityKey!: string
189
+ name!: string
190
+ // Other fields...
191
+ }
192
+ ```
193
+
194
+ ### 3. Pagination
195
+
196
+ - **`CamundaRestClient`**: cursor-based — `startCursor` / `endCursor` (string values).
197
+ - **Other APIs (Operate, Tasklist, …)**: `firstSortValues` / `lastSortValues` or `sortValues` (arrays).
198
+
199
+ ### 4. Authentication
200
+
201
+ The SDK supports five authentication strategies (set via `CAMUNDA_AUTH_STRATEGY` or programmatically):
202
+
203
+ | Strategy | Use case |
204
+ | -------- | ------------------------------------------------- |
205
+ | `OAUTH` | Default for Camunda SaaS and Self-Managed |
206
+ | `BASIC` | Nginx reverse-proxy with basic auth |
207
+ | `COOKIE` | C8Run 8.7 |
208
+ | `BEARER` | Custom token management |
209
+ | `NONE` | Development or mTLS |
210
+
211
+ - Clients accept `IHeadersProvider` for custom auth.
212
+ - Use `constructOAuthProvider()` for standard OAuth flows.
213
+ - Token caching and automatic refresh are built in.
214
+
215
+ ### 5. Code formatting and linting
216
+
217
+ - Prettier formats code; ESLint lints it.
218
+ - Configs: `prettier.config.js`, `.eslintrc.json`.
219
+ - The Husky pre-commit hook runs `lint-staged` (Prettier on staged TS files) plus `npm run test`.
220
+
221
+ ---
222
+
223
+ ## REST API Endpoint Pattern
224
+
225
+ When implementing a new REST API endpoint:
226
+
227
+ 1. Review the REST API documentation to understand the endpoint.
228
+ 2. Create request/response DTOs in the appropriate `*Dto.ts` file.
229
+ 3. Add appropriate decorators like `@Int64String` for int64 fields.
230
+ 4. Add the method to the relevant client class.
231
+ 5. Use the `callApiEndpoint` pattern.
232
+ 6. Document parameters with JSDoc.
233
+ 7. Include proper error handling.
234
+ 8. Write comprehensive unit and integration tests.
235
+
236
+ ```typescript
237
+ /**
238
+ * Gets a specific decision instance by ID
239
+ * @param decisionInstanceId The ID of the decision instance to retrieve
240
+ * @returns A GetDecisionInstanceResponse object with the decision instance details
241
+ */
242
+ async getDecisionInstance(
243
+ decisionInstanceId: string
244
+ ): Promise<GetDecisionInstanceResponse> {
245
+ return this.callApiEndpoint({
246
+ method: 'get',
247
+ path: `decision-instances/${decisionInstanceId}`,
248
+ responseType: GetDecisionInstanceResponse,
249
+ })
250
+ }
251
+ ```
252
+
253
+ ### Full example: GET endpoint
254
+
255
+ ```typescript
256
+ // In C8Dto.ts
257
+ export class GetEntityRequest extends LosslessDto {
258
+ @Int64String
259
+ entityId!: string
260
+ }
261
+
262
+ export class EntityDetails extends LosslessDto {
263
+ @Int64String
264
+ entityKey!: string
265
+ name!: string
266
+ creationTime!: string
267
+ state!: string
268
+ }
269
+
270
+ // In CamundaRestClient.ts
271
+ /**
272
+ * Gets an entity by ID
273
+ * @param entityId The ID of the entity to retrieve
274
+ * @returns An EntityDetails object with entity information
275
+ */
276
+ async getEntity(entityId: string): Promise<EntityDetails> {
277
+ return this.callApiEndpoint<UnknownRequestBody, EntityDetails>({
278
+ method: 'get',
279
+ path: `entities/${entityId}`,
280
+ })
281
+ }
282
+ ```
283
+
284
+ ### Search endpoints
285
+
286
+ For implementing search endpoints:
287
+
288
+ 1. Define the filter interface (e.g. `SomeEntitySearchFilter`).
289
+ 2. Extend `BaseSearchRequest<TSortFields, TFilter>` or `BaseSearchRequestWithOptionalFilter<TSortFields, TFilter>`.
290
+ 3. Define a response interface extending `PaginatedCamundaRestSearchResponse<EntityDetails>`.
291
+ 4. Use cursor-based pagination with `startCursor` / `endCursor` for REST API endpoints.
292
+
293
+ ```typescript
294
+ // In C8Dto.ts
295
+ export interface EntitySearchFilter {
296
+ state?: string
297
+ name?: string
298
+ }
299
+
300
+ export type EntitySortFields = 'creationTime' | 'name'
301
+
302
+ export class SearchEntitiesRequest extends BaseSearchRequest<
303
+ EntitySortFields,
304
+ EntitySearchFilter
305
+ > {}
306
+
307
+ export class CamundaRestSearchEntitiesResponse extends PaginatedCamundaRestSearchResponse<EntityDetails> {}
308
+
309
+ // In CamundaRestClient.ts
310
+ /**
311
+ * Search for entities
312
+ * @param request The search request with filters and sorting options
313
+ * @returns A paginated response with entity details
314
+ */
315
+ async searchEntities(
316
+ request: SearchEntitiesRequest
317
+ ): Promise<CamundaRestSearchEntitiesResponse> {
318
+ return this.callApiEndpoint<SearchEntitiesRequest, CamundaRestSearchEntitiesResponse>({
319
+ method: 'post',
320
+ path: 'entities/search',
321
+ body: request,
322
+ })
323
+ }
324
+ ```
325
+
326
+ ### Handling int64 Values
327
+
328
+ - Always use the `@Int64String` decorator for int64 fields in DTOs.
329
+ - Extend `LosslessDto` for request and response DTOs.
330
+ - Follow existing patterns for handling large numbers.
331
+
332
+ ---
89
333
 
90
334
  ## Testing Patterns
91
335
 
92
336
  ### 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
337
+
338
+ - Unit tests: `*.unit.spec.ts` mock external dependencies.
339
+ - Integration tests: `*.integration.spec.ts` (and `*.rest.spec.ts`) test against real services.
340
+ - Local integration: `*local-integration.spec.ts` — local Docker setup.
341
+ - Tests are organized by component and version under `src/__tests__/`.
96
342
 
97
343
  ### 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
344
 
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"`
345
+ - `CAMUNDA_UNIT_TEST=true` — forces unit-test mode.
346
+ - `TEST_DEPLOYMENT`, `TEST_VERSION`, `TEST_TENANCY`, `TEST_SECURITY` gate which integration suites run.
347
+ - Various `ZEEBE_*`, `CAMUNDA_*` environment variables for service configuration.
348
+ - Integration tests source environment files from `env/` (e.g. `env/8.8-alpha.env`, `env/unit-test.env`).
349
+
350
+ ### Test Implementation Guidelines
351
+
352
+ **Unit tests:**
353
+ - Mock external dependencies and API calls.
354
+ - Test error handling paths.
355
+ - Validate proper parameter passing.
356
+ - Run a single unit test file:
357
+ ```bash
358
+ . env/unit-test.env && CAMUNDA_UNIT_TEST=true npx vitest run --testTimeout=30000 ${testFile}
359
+ ```
360
+
361
+ **Integration tests:**
362
+ - Deploy required resources (BPMN, DMN) before testing.
363
+ - Clean up resources after tests.
364
+ - Source environment variables from `env/`.
365
+ - Handle async operations with proper timeouts.
366
+ - Validate response DTOs with assertions.
367
+ - Run a single integration test file:
368
+ ```bash
369
+ . env/8.8-alpha.env && npx vitest run --testTimeout=30000 ${testFile}
370
+ ```
371
+
372
+ **BPMN / DMN test resources:**
373
+ - Place test models in `src/__tests__/<version>/resources/` (e.g. `src/__tests__/8.8/resources/`).
374
+ - For DMN decision tables, use the **`FIRST`** hit policy (not `UNIQUE`).
375
+ - Validate that resources are deployed before exercising them.
376
+
377
+ ### Example test structure
378
+
379
+ ```typescript
380
+ describe('SomeClient.someMethod', () => {
381
+ let client: SomeClient
382
+
383
+ beforeAll(async () => {
384
+ // Setup resources and client
385
+ })
386
+
387
+ it('should correctly handle the happy path', async () => {
388
+ // Test implementation
389
+ // Assert expected behavior
390
+ })
391
+
392
+ it('should handle error conditions', async () => {
393
+ // Test error paths
394
+ // Assert error handling
395
+ })
396
+ })
397
+ ```
398
+
399
+ ---
108
400
 
109
401
  ## Common Development Tasks
110
402
 
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
403
+ ### Adding a New REST API Endpoint
404
+
405
+ See [REST API Endpoint Pattern](#rest-api-endpoint-pattern) above. Summary:
406
+
407
+ 1. Review the REST API spec.
408
+ 2. Create request/response DTOs in `*Dto.ts` (with `@Int64String` decorators where needed).
409
+ 3. Add the client method using `callApiEndpoint`.
410
+ 4. Write unit + integration tests.
411
+
412
+ ### Adding a New Search Endpoint
413
+
414
+ See [Search endpoints](#search-endpoints) above. Summary:
415
+
416
+ 1. Define filter interface.
417
+ 2. Extend `BaseSearchRequest<TSortFields, TFilter>` or `BaseSearchRequestWithOptionalFilter<TSortFields, TFilter>`.
418
+ 3. Define details interface for response items.
419
+ 4. Define response interface extending `PaginatedCamundaRestSearchResponse<DetailsType>`.
420
+ 5. Add method to `CamundaRestClient` using `callApiEndpoint`.
421
+ 6. Write unit tests with mocked `callApiEndpoint`.
422
+ 7. Write integration tests sourcing env files.
423
+
424
+ ### Adding a New API Client
425
+
426
+ 1. Create the client class in an appropriate directory (e.g. `src/newservice/`).
427
+ 2. Define DTOs in a `*Dto.ts` file.
428
+ 3. Add a client factory method to the `Camunda8` class.
429
+ 4. Export the client from `src/index.ts`.
430
+
431
+ ---
432
+
433
+ ## Coding Guidelines
434
+
435
+ 1. Use TypeScript strict mode.
436
+ 2. Add detailed JSDoc comments to public methods.
437
+ 3. Follow existing naming conventions.
438
+ 4. Write comprehensive tests for all new functionality.
439
+ 5. Include both unit and integration tests.
440
+ 6. Maintain backward compatibility.
441
+ 7. Use meaningful variable and function names.
442
+ 8. Follow the existing error handling patterns.
443
+ 9. Use `LosslessDto` base class for API responses.
444
+ 10. Prefer composition over inheritance for client features.
445
+
446
+ ## Documentation Guidelines
447
+
448
+ - Include JSDoc comments for all public methods and classes.
449
+ - Document parameters, return types, and thrown exceptions.
450
+ - Include examples for complex functionality.
451
+ - Keep documentation up-to-date with code changes.
452
+
453
+ ---
139
454
 
140
455
  ## Common Issues & Solutions
141
456
 
142
457
  ### 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`
458
+ - Run `npm run clean` before building if encountering cache issues.
459
+ - Ensure all imports use correct relative paths.
460
+ - Check for TypeScript errors with `npm run compile`.
146
461
 
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
462
+ ### Test Issues
463
+ - Integration tests require Docker services: `npm run sm:start` (or one of the version-specific variants).
464
+ - Use `npm run test` for unit tests only.
465
+ - Verify test environment variables are set (source the right file from `env/`).
151
466
 
152
467
  ### 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
468
+ - Verify OAuth configuration for SaaS.
469
+ - Check basic-auth credentials for Self-Managed.
470
+ - Ensure certificates are properly configured for custom CA.
156
471
 
157
- ## Code Style Guidelines
472
+ ### Commit Rejected by `lint-commits`
473
+ - Confirm the type is in the [allowed commit types](#allowed-commit-types) table. `deps:` is the most common mistake — use `chore(deps):` instead.
158
474
 
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
475
+ ---
476
+
477
+ ## Dependencies
478
+
479
+ Key dependencies to be aware of:
480
+
481
+ - `@camunda8/orchestration-cluster-api` — generated REST client (pinned to 8.x; see [MAINTAINER.md](MAINTAINER.md))
482
+ - `@grpc/grpc-js` — gRPC client
483
+ - `lossless-json` — JSON parsing with int64 support
484
+ - `form-data` — Multipart form handling
485
+ - `vitest` — test framework
486
+ - `got` — HTTP client (legacy paths)
487
+
488
+ ---
164
489
 
165
490
  ## Recent Additions
166
491
 
167
492
  ### Search Decision Instances API
168
- - `searchDecisionInstances()` method in `CamundaRestClient`
493
+ - `searchDecisionInstances()` method on `CamundaRestClient`
169
494
  - `DecisionInstanceSearchFilter` and `SearchDecisionInstancesRequest` DTOs
170
495
  - `CamundaRestSearchDecisionInstancesResponse` with cursor-based pagination
171
496
  - Comprehensive unit and integration tests
172
497
  - 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,28 @@
1
+ # [8.9.0-alpha.7](https://github.com/camunda/camunda-8-js-sdk/compare/v8.9.0-alpha.6...v8.9.0-alpha.7) (2026-05-31)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * issue 784 ([4caab63](https://github.com/camunda/camunda-8-js-sdk/commit/4caab63c5964093e0d4987cf1789d1faa3522e4c))
7
+
8
+ # [8.9.0-alpha.6](https://github.com/camunda/camunda-8-js-sdk/compare/v8.9.0-alpha.5...v8.9.0-alpha.6) (2026-04-22)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * keep error.message static for error-monitoring grouping ([0c2df38](https://github.com/camunda/camunda-8-js-sdk/commit/0c2df387d7a228fa5b322179fb70991e9d69180f)), closes [#658](https://github.com/camunda/camunda-8-js-sdk/issues/658)
14
+ * **oauth:** improve OAuthProvider reliability ([b699342](https://github.com/camunda/camunda-8-js-sdk/commit/b699342eda39551b1cadccd6065460ac669ae22a))
15
+ * **oauth:** write disk-cached tokens with mode 0600 (current-user only) ([1444787](https://github.com/camunda/camunda-8-js-sdk/commit/1444787086f30f2eb7363220c52a440526cb29f6)), closes [#737](https://github.com/camunda/camunda-8-js-sdk/issues/737)
16
+ * remove logs ([4ab2178](https://github.com/camunda/camunda-8-js-sdk/commit/4ab21783387b08ee27580129231bcd0de6d82408))
17
+ * resolve conflict ([356eaf5](https://github.com/camunda/camunda-8-js-sdk/commit/356eaf58b07b3b4009763266f36caa4ecb2363a4))
18
+ * skip unstable tests ([cf38fdf](https://github.com/camunda/camunda-8-js-sdk/commit/cf38fdf67be3e4d8b4290c20faed0c194e1fbc08))
19
+ * **test:** use response.statusCode for 403 detection ([c976899](https://github.com/camunda/camunda-8-js-sdk/commit/c9768995b6cbdd049549d58d95e3f538b3c4ef32))
20
+
21
+
22
+ ### Features
23
+
24
+ * **admin:** implement all missing Admin API operations ([e5527ba](https://github.com/camunda/camunda-8-js-sdk/commit/e5527bac2b139790638c76b26b0f737986413850)), closes [#713](https://github.com/camunda/camunda-8-js-sdk/issues/713)
25
+
1
26
  # [8.9.0-alpha.5](https://github.com/camunda/camunda-8-js-sdk/compare/v8.9.0-alpha.4...v8.9.0-alpha.5) (2026-03-18)
2
27
 
3
28