@camunda8/sdk 8.7.23 → 8.7.25

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/CHANGELOG.md CHANGED
@@ -1,3 +1,22 @@
1
+ ## [8.7.25](https://github.com/camunda/camunda-8-js-sdk/compare/v8.7.24...v8.7.25) (2025-07-29)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * export SearchUsersRequest type ([5c44ffe](https://github.com/camunda/camunda-8-js-sdk/commit/5c44ffe8074e3899df847710ec95a64477d9d61b))
7
+
8
+
9
+ ### Features
10
+
11
+ * export Camunda Rest Types. fixes [#564](https://github.com/camunda/camunda-8-js-sdk/issues/564) ([b4b0d53](https://github.com/camunda/camunda-8-js-sdk/commit/b4b0d53522513622f0db1f96de62906d2bbaff80))
12
+
13
+ ## [8.7.24](https://github.com/camunda/camunda-8-js-sdk/compare/v8.7.23...v8.7.24) (2025-07-25)
14
+
15
+
16
+ ### Features
17
+
18
+ * support ZEEBE_GRPC_ADDRESS. fixes [#557](https://github.com/camunda/camunda-8-js-sdk/issues/557) ([2422581](https://github.com/camunda/camunda-8-js-sdk/commit/2422581c2a15f905b2ae7cac5f1dbad819b10108))
19
+
1
20
  ## [8.7.23](https://github.com/camunda/camunda-8-js-sdk/compare/v8.7.22...v8.7.23) (2025-07-22)
2
21
 
3
22
 
package/README.md CHANGED
@@ -4,11 +4,11 @@
4
4
 
5
5
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
6
6
 
7
- Full API Docs are [here](https://camunda.github.io/camunda-8-js-sdk/).
7
+ [Full API Docs](https://camunda.github.io/camunda-8-js-sdk/).
8
8
 
9
9
  This is the official Camunda 8 JavaScript SDK. It is written in TypeScript and runs on Node.js. See why [this does not run in a web browser](https://github.com/camunda/camunda-8-js-sdk/issues/79).
10
10
 
11
- See the QUICKSTART.md file in [the repository](https://github.com/camunda/camunda-8-js-sdk) for a quick start.
11
+ See the [Getting Started Example](https://docs.camunda.io/docs/next/guides/getting-started-example/) in the Camunda Docs for a quick start.
12
12
 
13
13
  ## What does "supported" mean?
14
14
 
@@ -32,15 +32,23 @@ npm i @camunda8/sdk
32
32
 
33
33
  ## Usage
34
34
 
35
- In this release, the functionality of Camunda 8 is exposed via dedicated clients for the component APIs.
35
+ The functionality of Camunda 8 is exposed via dedicated clients for the component APIs. The recommended API client for Camunda 8.8 is the Orchestration Cluster API, using the `CamundaRestClient`.
36
36
 
37
37
  ```typescript
38
38
  import { Camunda8 } from '@camunda8/sdk'
39
39
 
40
+ // Optional: Import types for CamundaRestClient requests and responses
41
+ import type { CamundaRestTypes} from '@camunda8/sdk'
42
+
40
43
  const c8 = new Camunda8()
41
- const restClient = c8.getCamundaRestClient() // New REST API
44
+
45
+ // Camunda 8 Orchestration API - recommended API from 8.8.0
46
+ const restClient = c8.getCamundaRestClient()
47
+
48
+ // Zeebe gRPC client - not recommended for new users
42
49
  const zeebe = c8.getZeebeGrpcApiClient()
43
- const zeebeRest = c8.getZeebeRestClient() // Deprecated
50
+
51
+ // Camunda v1 REST API clients
44
52
  const operate = c8.getOperateApiClient()
45
53
  const optimize = c8.getOptimizeApiClient()
46
54
  const tasklist = c8.getTasklistApiClient()
@@ -58,9 +66,9 @@ Any configuration passed in to the `Camunda8` constructor is merged over any con
58
66
 
59
67
  ## A note on how int64 is handled in the JavaScript SDK
60
68
 
61
- Entity keys in Camunda 8 are stored and represented as `int64` numbers. The range of `int64` extends to numbers that cannot be represented by the JavaScript `number` type. To deal with this, `int64` keys are serialised by the SDK to the JavaScript `string` type. See [this issue](https://github.com/camunda/camunda-8-js-sdk/issues/78) for more details.
69
+ Entity keys in Camunda 8.6 and earlier are stored and represented as `int64` numbers. The range of `int64` extends to numbers that cannot be represented by the JavaScript `number` type. To deal with this, `int64` keys are serialised by the SDK to the JavaScript `string` type. See [this issue](https://github.com/camunda/camunda-8-js-sdk/issues/78) for more details.
62
70
 
63
- For `int64` values whose type is not known ahead of time, such as job variables, you can pass an annotated data transfer object (DTO) to decode them reliably. If no DTO is specified, the default behavior of the SDK is to serialise all numbers to JavaScript `number`, and to throw an exception if a number value is detected at a runtime that cannot be accurately represented as the JavaScript `number` type (that is, a value greater than 2^53-1).
71
+ For `int64` values whose type is not known ahead of time, such as job variables, you can pass an annotated data transfer object (DTO) to decode them reliably. See the section on [Process Variable Typing](#process-variable-typing). If no DTO is specified, the default behavior of the SDK is to serialise all numbers to JavaScript `number`, and to throw an exception if a number value is detected at a runtime that cannot be accurately represented as the JavaScript `number` type (that is, a value greater than 2^53-1).
64
72
 
65
73
  ## Authorization
66
74
 
@@ -85,7 +93,8 @@ If your platform is secured with OAuth token exchange (Camunda SaaS or Self-Mana
85
93
 
86
94
  ```bash
87
95
  CAMUNDA_AUTH_STRATEGY=OAUTH
88
- ZEEBE_ADDRESS=...
96
+ ZEEBE_GRPC_ADDRESS=...
97
+ ZEEBE_REST_ADDRESS=...
89
98
  ZEEBE_CLIENT_ID=...
90
99
  ZEEBE_CLIENT_SECRET=...
91
100
  CAMUNDA_OAUTH_URL=...
@@ -205,13 +214,23 @@ CAMUNDA_CUSTOM_PRIVATE_KEY_PATH # path to mTLS (client-side) key
205
214
 
206
215
  ## Connection configuration examples
207
216
 
217
+ ### Camunda 8 Run 8.8
218
+
219
+ This is the configuration for [Camunda 8 Run](https://developers.camunda.com/install-camunda-8/) - a local Camunda 8 instance that is the best way to get started.
220
+
221
+ ```bash
222
+ export ZEEBE_REST_ADDRESS='http://localhost:8080'
223
+ export ZEEBE_GRPC_ADDRESS='grpc://localhost:26500'
224
+ export CAMUNDA_AUTH_STRATEGY=NONE
225
+ ```
226
+
208
227
  ### Self-Managed
209
228
 
210
229
  This is the complete environment configuration needed to run against the Dockerised Self-Managed stack in the `docker` subdirectory:
211
230
 
212
231
  ```bash
213
232
  # Self-Managed
214
- export ZEEBE_ADDRESS='localhost:26500'
233
+ export ZEEBE_GRPC_ADDRESS='grpc://localhost:26500'
215
234
  export ZEEBE_REST_ADDRESS='http://localhost:8080'
216
235
  export ZEEBE_CLIENT_ID='zeebe'
217
236
  export ZEEBE_CLIENT_SECRET='zecret'
@@ -225,9 +244,6 @@ export CAMUNDA_MODELER_BASE_URL='http://localhost:8070/api'
225
244
  # Turn off the tenant ID, which may have been set by multi-tenant tests
226
245
  # You can set this in a constructor config, or in the environment if running multi-tenant
227
246
  export CAMUNDA_TENANT_ID=''
228
-
229
- # TLS for gRPC is on by default. If the Zeebe broker is not secured by TLS, turn it off
230
- export CAMUNDA_SECURE_CONNECTION=false
231
247
  ```
232
248
 
233
249
  If you are using an OIDC that requires a `scope` parameter to be passed with the token request, set the following variable:
@@ -242,7 +258,7 @@ Here is an example of doing this via the constructor, rather than via the enviro
242
258
  import { Camunda8 } from '@camunda8/sdk'
243
259
 
244
260
  const c8 = new Camunda8({
245
- ZEEBE_ADDRESS: 'localhost:26500',
261
+ ZEEBE_GRPC_ADDRESS: 'grpc://localhost:26500',
246
262
  ZEEBE_REST_ADDRESS: 'http://localhost:8080',
247
263
  ZEEBE_CLIENT_ID: 'zeebe',
248
264
  ZEEBE_CLIENT_SECRET: 'zecret',
@@ -263,20 +279,17 @@ const c8 = new Camunda8({
263
279
  Here is a complete configuration example for connection to Camunda SaaS:
264
280
 
265
281
  ```bash
266
- export ZEEBE_ADDRESS='5c34c0a7-7f29-4424-8414-125615f7a9b9.syd-1.zeebe.camunda.io:443'
282
+ export ZEEBE_GRPC_ADDRESS='grpcs://5c34c0a7-7f29-4424-8414-125615f7a9b9.syd-1.zeebe.camunda.io:443'
267
283
  export ZEEBE_REST_ADDRESS='https://syd-1.zeebe.camunda.io/5c34c0a7-7f29-4424-8414-125615f7a9b9'
268
284
  export ZEEBE_CLIENT_ID='yvvURO9TmBnP3zx4Xd8Ho6apgeiZTjn6'
269
285
  export ZEEBE_CLIENT_SECRET='iJJu-SHgUtuJTTAMnMLdcb8WGF8s2mHfXhXutEwe8eSbLXn98vUpoxtuLk5uG0en'
270
- # export CAMUNDA_CREDENTIALS_SCOPES='Zeebe,Tasklist,Operate,Optimize' # What APIs these client creds are authorised for
286
+
271
287
  export CAMUNDA_TASKLIST_BASE_URL='https://syd-1.tasklist.camunda.io/5c34c0a7-7f29-4424-8414-125615f7a9b9'
272
288
  export CAMUNDA_OPTIMIZE_BASE_URL='https://syd-1.optimize.camunda.io/5c34c0a7-7f29-4424-8414-125615f7a9b9'
273
289
  export CAMUNDA_OPERATE_BASE_URL='https://syd-1.operate.camunda.io/5c34c0a7-7f29-4424-8414-125615f7a9b9'
274
290
  export CAMUNDA_OAUTH_URL='https://login.cloud.camunda.io/oauth/token'
275
291
  export CAMUNDA_AUTH_STRATEGY='OAUTH'
276
292
 
277
- # This is on by default, but we include it in case it got turned off for local tests
278
- export CAMUNDA_SECURE_CONNECTION=true
279
-
280
293
  # Admin Console and Modeler API Client
281
294
  export CAMUNDA_CONSOLE_CLIENT_ID='e-JdgKfJy9hHSXzi'
282
295
  export CAMUNDA_CONSOLE_CLIENT_SECRET='DT8Pe-ANC6e3Je_ptLyzZvBNS0aFwaIV'
@@ -297,7 +310,7 @@ You can supply a custom logger via the constructor. For example, to use the [Pin
297
310
  ```typescript
298
311
  import pino from 'pino'
299
312
 
300
- import { Camunda8 } from '../../c8/index'
313
+ import { Camunda8 } from '@camunda8/sdk'
301
314
 
302
315
  const level = process.env.CAMUNDA_LOG_LEVEL ?? 'trace'
303
316
  const logger = pino({ level }) // Logging level controlled via the logging library
@@ -1,9 +1,9 @@
1
1
  /// <reference types="node" />
2
- /// <reference types="node" />
3
2
  import { ReadStream } from 'fs';
4
3
  import { LosslessNumber } from 'lossless-json';
5
4
  import { LosslessDto } from '../../lib';
6
5
  import { ICustomHeaders, IInputVariables, IProcessVariables, JobCompletionInterfaceRest, JSONDoc } from '../../zeebe/types';
6
+ import { DeployResourceResponseDto, SearchSortRequest } from './C8DtoInternal';
7
7
  export declare class RestApiJob<Variables = LosslessDto, CustomHeaders = LosslessDto> extends LosslessDto {
8
8
  jobKey: string;
9
9
  type: string;
@@ -41,10 +41,11 @@ export interface NewUserInfo {
41
41
  name: string;
42
42
  email: string;
43
43
  }
44
- export type Ctor<T> = new (obj: any) => T;
45
44
  export declare class ProcessDeployment extends LosslessDto {
45
+ /** This is the ID of the process definition. It is a human-readable string defined in the process model */
46
46
  processDefinitionId: string;
47
47
  processDefinitionVersion: number;
48
+ /** This is the key of the process definition. It is a unique identifier for the process definition, assigned by the server on deployment. */
48
49
  processDefinitionKey: string;
49
50
  resourceName: string;
50
51
  tenantId: string;
@@ -74,19 +75,6 @@ export declare class FormDeployment {
74
75
  resourceName: string;
75
76
  tenantId: string;
76
77
  }
77
- export declare class DeployResourceResponseDto extends LosslessDto {
78
- deploymentKey: string;
79
- deployments: ({
80
- processDefinition: ProcessDeployment;
81
- } | {
82
- decisionDefinition: DecisionDeployment;
83
- } | {
84
- decisionRequirements: DecisionRequirementsDeployment;
85
- } | {
86
- form: FormDeployment;
87
- })[];
88
- tenantId: string;
89
- }
90
78
  export declare class DeployResourceResponse extends DeployResourceResponseDto {
91
79
  processes: ProcessDeployment[];
92
80
  decisions: DecisionDeployment[];
@@ -117,6 +105,8 @@ export declare class CreateProcessInstanceResponse<T = Record<string, never>> {
117
105
  */
118
106
  readonly variables: T;
119
107
  }
108
+ export declare class CreateProcessInstanceWithResultResponse<T> extends CreateProcessInstanceResponse<T> {
109
+ }
120
110
  export interface MigrationMappingInstruction {
121
111
  /** The element ID to migrate from. */
122
112
  sourceElementId: string;
@@ -177,7 +167,7 @@ export declare class PublishMessageResponse extends LosslessDto {
177
167
  /** the tenantId of the message */
178
168
  tenantId: string;
179
169
  }
180
- export interface CreateProcessBaseRequest<V extends JSONDoc | LosslessDto> {
170
+ interface CreateProcessBaseRequest<V extends JSONDoc | LosslessDto> {
181
171
  /**
182
172
  * the version of the process; if not specified it will use the latest version
183
173
  */
@@ -215,19 +205,19 @@ export interface ProcessInstanceCreationStartInstruction {
215
205
  */
216
206
  elementId: string;
217
207
  }
218
- export interface CreateProcessInstanceFromProcessDefinitionId<V extends JSONDoc | LosslessDto> extends CreateProcessBaseRequest<V> {
208
+ interface CreateProcessInstanceFromProcessDefinitionId<V extends JSONDoc | LosslessDto> extends CreateProcessBaseRequest<V> {
219
209
  /**
220
210
  * the BPMN process ID of the process definition
221
211
  */
222
212
  processDefinitionId: string;
223
213
  }
224
- export interface CreateProcessInstanceFromProcessDefinition<V extends JSONDoc | LosslessDto> extends CreateProcessBaseRequest<V> {
214
+ interface CreateProcessInstanceFromProcessDefinition<V extends JSONDoc | LosslessDto> extends CreateProcessBaseRequest<V> {
225
215
  /**
226
216
  * the key of the process definition
227
217
  */
228
218
  processDefinitionKey: string;
229
219
  }
230
- export type CreateProcessInstanceReq<T extends JSONDoc | LosslessDto> = CreateProcessInstanceFromProcessDefinitionId<T> | CreateProcessInstanceFromProcessDefinition<T>;
220
+ export type CreateProcessInstanceRequest<T extends JSONDoc | LosslessDto> = CreateProcessInstanceFromProcessDefinitionId<T> | CreateProcessInstanceFromProcessDefinition<T>;
231
221
  export interface PatchAuthorizationRequest {
232
222
  /** The key of the owner of the authorization. */
233
223
  ownerKey: string;
@@ -282,7 +272,7 @@ export interface RestJob<Variables = IInputVariables, CustomHeaderShape = ICusto
282
272
  */
283
273
  readonly tenantId: string;
284
274
  }
285
- export type JobWithMethods<VariablesDto, CustomHeadersDto> = RestJob<VariablesDto, CustomHeadersDto> & JobCompletionInterfaceRest<IProcessVariables>;
275
+ export type ActivatedJob<VariablesDto, CustomHeadersDto> = RestJob<VariablesDto, CustomHeadersDto> & JobCompletionInterfaceRest<IProcessVariables>;
286
276
  interface SearchPageRequestSearchAfter {
287
277
  /** The index of items to start searching from. */
288
278
  from: number;
@@ -299,7 +289,7 @@ interface SearchPageRequestSearchBefore {
299
289
  }
300
290
  export type SearchPageRequest = SearchPageRequestSearchAfter | SearchPageRequestSearchBefore;
301
291
  /** Generic search request interface that can be used for most search operations */
302
- export interface BaseSearchRequest<TSortFields extends string, TFilter> {
292
+ interface BaseSearchRequest<TSortFields extends string, TFilter> {
303
293
  /** Pagination criteria. */
304
294
  page?: SearchPageRequest;
305
295
  /** Sort field criteria. */
@@ -346,7 +336,7 @@ export interface AdvancedNumberFilter {
346
336
  /** Checks if the property is less than or equal to the provided value. */
347
337
  $lte?: number;
348
338
  }
349
- export interface VariableSearchFilterRequest {
339
+ export interface VariableSearchRequestFilter {
350
340
  /** The key for this variable. */
351
341
  variableKey?: string | AdvancedStringFilter;
352
342
  /** Name of the variable. */
@@ -362,13 +352,7 @@ export interface VariableSearchFilterRequest {
362
352
  /** Whether the value is truncated or not. */
363
353
  isTruncated?: boolean;
364
354
  }
365
- export type SearchSortRequest<T = string> = Array<{
366
- /** The field to sort by. */
367
- field: T;
368
- /** The order in which to sort the related field. Default value: ASC */
369
- order?: 'ASC' | 'DESC';
370
- }>;
371
- export interface CamundaRestSearchResponsePagination {
355
+ interface SearchResponsePagination {
372
356
  /** Total items matching the criteria. */
373
357
  totalItems: number;
374
358
  /** The cursor for the first item in the result set. Use this in the searchBefore field of an ensuing request. */
@@ -376,13 +360,13 @@ export interface CamundaRestSearchResponsePagination {
376
360
  /** The cursor for the last item in the result set. Use this in the searchAfter field of an ensuing request. */
377
361
  endCursor: string;
378
362
  }
379
- interface PaginatedCamundaRestSearchResponse<T> {
363
+ interface PaginatedSearchResponse<T> {
380
364
  /** Pagination information about the search results. */
381
- page: CamundaRestSearchResponsePagination;
365
+ page: SearchResponsePagination;
382
366
  /** The matching items. */
383
367
  items: T[];
384
368
  }
385
- interface VariableDetails {
369
+ export interface VariableDetails {
386
370
  /** The key for this variable. */
387
371
  variableKey: string;
388
372
  /** The key of the scope of this variable. */
@@ -398,9 +382,9 @@ interface VariableDetails {
398
382
  /** Whether the value is truncated or not. */
399
383
  isTruncated: boolean;
400
384
  }
401
- export interface SearchVariablesRequest extends BaseSearchRequest<'value' | 'name' | 'tenantId' | 'variableKey' | 'scopeKey' | 'processInstanceKey', VariableSearchFilterRequest> {
385
+ export interface SearchVariablesRequest extends BaseSearchRequest<'value' | 'name' | 'tenantId' | 'variableKey' | 'scopeKey' | 'processInstanceKey', VariableSearchRequestFilter> {
402
386
  }
403
- export interface CamundaRestSearchVariablesResponse extends PaginatedCamundaRestSearchResponse<VariableDetails> {
387
+ export interface SearchVariablesResponse extends PaginatedSearchResponse<VariableDetails> {
404
388
  }
405
389
  export type SearchUserTasksSortRequest = SearchSortRequest<'creationDate' | 'completionDate' | 'dueDate' | 'followUpDate' | 'priority'>;
406
390
  export interface AdvancedDateTimeFilter {
@@ -422,7 +406,7 @@ export interface AdvancedDateTimeFilter {
422
406
  $in: string[];
423
407
  }
424
408
  /** User task filter request. */
425
- export interface SearchUserTasksFilter {
409
+ export interface SearchUserTasksRequestFilter {
426
410
  /** The key for this user task. */
427
411
  userTaskKey?: string;
428
412
  /** The state of the user task. */
@@ -470,9 +454,9 @@ export interface SearchUserTasksFilter {
470
454
  value: string;
471
455
  }>;
472
456
  }
473
- export interface SearchTasksRequest extends BaseSearchRequestWithOptionalFilter<'creationDate' | 'completionDate' | 'dueDate' | 'followUpDate' | 'priority', SearchUserTasksFilter> {
457
+ export interface SearchTasksRequest extends BaseSearchRequestWithOptionalFilter<'creationDate' | 'completionDate' | 'dueDate' | 'followUpDate' | 'priority', SearchUserTasksRequestFilter> {
474
458
  }
475
- interface UserTaskDetails {
459
+ export interface UserTaskDetails {
476
460
  /** The key of the user task. */
477
461
  userTaskKey: string;
478
462
  /** The key of the element instance. */
@@ -484,7 +468,7 @@ interface UserTaskDetails {
484
468
  /** The key of the form. */
485
469
  formKey: string;
486
470
  }
487
- export interface CamundaRestSearchUserTasksResponse extends PaginatedCamundaRestSearchResponse<UserTaskDetails> {
471
+ export interface SearchUserTasksResponse extends PaginatedSearchResponse<UserTaskDetails> {
488
472
  }
489
473
  export interface UserTask {
490
474
  /** The name for this user task. */
@@ -543,14 +527,14 @@ export interface AssignUserTaskRequest {
543
527
  /** A custom action value that will be accessible from user task events resulting from this endpoint invocation. If not provided, it will default to "assign". */
544
528
  action?: string;
545
529
  }
546
- export interface UserTaskVariablesRequest extends BaseSearchRequestWithOptionalFilter<'value' | 'name' | 'tenantId' | 'variableKey' | 'scopeKey' | 'processInstanceKey', {
530
+ export interface SearchUserTaskVariablesRequest extends BaseSearchRequestWithOptionalFilter<'value' | 'name' | 'tenantId' | 'variableKey' | 'scopeKey' | 'processInstanceKey', {
547
531
  /** Name of the variable. */
548
532
  name: string;
549
533
  }> {
550
534
  userTaskKey: string;
551
535
  }
552
536
  /** The user task variables search response for CamundaRestClient. */
553
- export interface CamundaRestUserTaskVariablesResponse extends PaginatedCamundaRestSearchResponse<{
537
+ export interface SearchUserTaskVariablesResponse extends PaginatedSearchResponse<{
554
538
  /** The key for this variable. */
555
539
  variableKey: string;
556
540
  /** The key of the scope of this variable. */
@@ -575,7 +559,7 @@ export interface AdvancedProcessInstanceStateFilter {
575
559
  /** Checks if the property matches the provided like value. Supported wildcard characters depend on the configured search client. */
576
560
  $like: string;
577
561
  }
578
- export interface ProcessInstanceSearchFilter {
562
+ export interface SearchProcessInstanceRequestFilter {
579
563
  /** The key of this process instance. */
580
564
  processInstanceKey?: string | AdvancedStringFilter;
581
565
  /** The process definition ID. */
@@ -609,7 +593,7 @@ export interface ProcessInstanceSearchFilter {
609
593
  }>;
610
594
  }
611
595
  /** This is the 8.8 API. */
612
- export interface SearchProcessInstanceRequest extends BaseSearchRequest<'processInstanceKey' | 'processDefinitionId' | 'processDefinitionName' | 'processDefinitionVersion' | 'processDefinitionVersionTag' | 'processDefinitionKey' | 'parentProcessInstanceKey' | 'parentFlowNodeInstanceKey' | 'state' | 'startDate' | 'endDate' | 'tenantId' | 'hasIncident', ProcessInstanceSearchFilter> {
596
+ export interface SearchProcessInstanceRequest extends BaseSearchRequest<'processInstanceKey' | 'processDefinitionId' | 'processDefinitionName' | 'processDefinitionVersion' | 'processDefinitionVersionTag' | 'processDefinitionKey' | 'parentProcessInstanceKey' | 'parentFlowNodeInstanceKey' | 'state' | 'startDate' | 'endDate' | 'tenantId' | 'hasIncident', SearchProcessInstanceRequestFilter> {
613
597
  }
614
598
  export interface ProcessInstanceDetails {
615
599
  /** The key of the process instance. */
@@ -637,7 +621,7 @@ export interface ProcessInstanceDetails {
637
621
  /** Has an incident. */
638
622
  hasIncident: boolean;
639
623
  }
640
- export interface CamundaRestSearchProcessInstanceResponse extends PaginatedCamundaRestSearchResponse<ProcessInstanceDetails> {
624
+ export interface SearchProcessInstanceResponse extends PaginatedSearchResponse<ProcessInstanceDetails> {
641
625
  }
642
626
  export interface DownloadDocumentRequest {
643
627
  /** The ID of the document to download. */
@@ -658,9 +642,9 @@ export interface UploadDocumentRequest {
658
642
  documentId?: string;
659
643
  /** A file ReadStream created with fs.createReadStream() */
660
644
  file: ReadStream;
661
- metadata?: UploadDocumentMetadata;
645
+ metadata?: DocumentMetadata;
662
646
  }
663
- export interface UploadDocumentMetadata {
647
+ export interface DocumentMetadata {
664
648
  /** The content type of the document. */
665
649
  contentType?: string;
666
650
  /** The name of the file. */
@@ -687,7 +671,7 @@ export declare class UploadDocumentResponse extends LosslessDto {
687
671
  documentId: string;
688
672
  /** The hash of the document. */
689
673
  contentHash: string;
690
- metadata: UploadDocumentMetadata;
674
+ metadata: DocumentMetadata;
691
675
  }
692
676
  export declare class UploadDocumentsResponse {
693
677
  /** Documents that were successfully created. */
@@ -827,35 +811,18 @@ export declare class EvaluateDecisionResponse extends LosslessDto {
827
811
  decisionInstanceKey: string;
828
812
  evaluatedDecisions: EvaluatedDecision[];
829
813
  }
830
- export type UnknownRequestBody = Record<string, any>;
831
- export interface BaseApiEndpointRequest<T extends UnknownRequestBody = UnknownRequestBody> {
832
- method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
833
- /** The URL path of the API endpoint. */
834
- urlPath: string;
835
- /** The request body. */
836
- body?: T;
837
- /** TODO: multi-part form support needs to be implemented */
838
- formData?: FormData;
839
- /** The query parameters. */
840
- queryParams?: {
841
- [key: string]: string | number | boolean | undefined;
842
- };
843
- /** The headers. */
844
- headers?: {
845
- [key: string]: string | number | boolean;
846
- };
847
- /** A custom JSON parsing function */
848
- parseJson?: typeof JSON.parse;
849
- }
850
- export interface JsonApiEndpointRequest<T extends UnknownRequestBody = UnknownRequestBody> extends BaseApiEndpointRequest<T> {
851
- /** JSON-parse response? Default: true */
852
- json?: true | undefined;
853
- }
854
- export interface RawApiEndpointRequest<T extends UnknownRequestBody = UnknownRequestBody> extends BaseApiEndpointRequest<T> {
855
- /** JSON-parse response? */
856
- json: false;
814
+ declare class UserItem extends LosslessDto {
815
+ /** The ID of the user. */
816
+ id: string;
817
+ /** The key of the user. */
818
+ key: string;
819
+ /** The username of the user. */
820
+ username: string;
821
+ /** The name of the user. */
822
+ name: string;
823
+ /** The email of the user. */
824
+ email: string;
857
825
  }
858
- export type ApiEndpointRequest<T extends UnknownRequestBody = UnknownRequestBody> = JsonApiEndpointRequest<T> | RawApiEndpointRequest<T>;
859
826
  export interface SearchUsersRequest {
860
827
  /** Pagination criteria. */
861
828
  page: SearchPageRequest;
@@ -871,22 +838,10 @@ export interface SearchUsersRequest {
871
838
  email?: string;
872
839
  };
873
840
  }
874
- declare class UserItem extends LosslessDto {
875
- /** The ID of the user. */
876
- id: string;
877
- /** The key of the user. */
878
- key: string;
879
- /** The username of the user. */
880
- username: string;
881
- /** The name of the user. */
882
- name: string;
883
- /** The email of the user. */
884
- email: string;
885
- }
886
841
  /** The user search result. */
887
842
  export declare class SearchUsersResponse extends LosslessDto {
888
843
  /** Pagination information about the search results. */
889
- page: CamundaRestSearchResponsePagination;
844
+ page: SearchResponsePagination;
890
845
  /** The matching users. */
891
846
  items: UserItem[];
892
847
  }
@@ -914,7 +869,7 @@ export interface GetProcessDefinitionResponse {
914
869
  /** The key for this process definition. */
915
870
  processDefinitionKey: string;
916
871
  }
917
- export interface ProcessDefinitionSearchFilter {
872
+ export interface ProcessDefinitionSearchRequestFilter {
918
873
  /** Name of this process definition. */
919
874
  name?: string;
920
875
  /** Resource name of this process definition. */
@@ -930,9 +885,9 @@ export interface ProcessDefinitionSearchFilter {
930
885
  /** The key for this process definition. */
931
886
  processDefinitionKey?: string;
932
887
  }
933
- export interface SearchProcessDefinitionsRequest extends BaseSearchRequest<'processDefinitionKey' | 'name' | 'resourceName' | 'version' | 'versionTag' | 'processDefinitionId' | 'tenantId', ProcessDefinitionSearchFilter> {
888
+ export interface SearchProcessDefinitionsRequest extends BaseSearchRequest<'processDefinitionKey' | 'name' | 'resourceName' | 'version' | 'versionTag' | 'processDefinitionId' | 'tenantId', ProcessDefinitionSearchRequestFilter> {
934
889
  }
935
- interface DefinitionDetails {
890
+ export interface ProcessDefinitionDetails {
936
891
  /** Name of this process definition. */
937
892
  name: string;
938
893
  /** Resource name for this process definition. */
@@ -948,9 +903,9 @@ interface DefinitionDetails {
948
903
  /** The key for this process definition. */
949
904
  processDefinitionKey: string;
950
905
  }
951
- export interface CamundaRestSearchProcessDefinitionsResponse extends PaginatedCamundaRestSearchResponse<DefinitionDetails> {
906
+ export interface SearchProcessDefinitionsResponse extends PaginatedSearchResponse<ProcessDefinitionDetails> {
952
907
  }
953
- export interface ElementInstanceSearchFilter {
908
+ export interface ElementInstanceSearchRequestFilter {
954
909
  processDefinitionId?: string;
955
910
  state?: 'ACTIVE' | 'COMPLETED' | 'TERMINATED';
956
911
  type?: 'UNSPECIFIED' | 'PROCESS' | 'SUB_PROCESS' | 'EVENT_SUB_PROCESS' | 'AD_HOC_SUB_PROCESS' | 'START_EVENT' | 'INTERMEDIATE_CATCH_EVENT' | 'INTERMEDIATE_THROW_EVENT' | 'BOUNDARY_EVENT' | 'END_EVENT' | 'SERVICE_TASK' | 'RECEIVE_TASK' | 'USER_TASK' | 'MANUAL_TASK' | 'TASK' | 'EXCLUSIVE_GATEWAY' | 'INCLUSIVE_GATEWAY' | 'PARALLEL_GATEWAY' | 'EVENT_BASED_GATEWAY' | 'SEQUENCE_FLOW' | 'MULTI_INSTANCE_BODY' | 'CALL_ACTIVITY' | 'BUSINESS_RULE_TASK' | 'SCRIPT_TASK' | 'SEND_TASK' | 'UNKNOWN';
@@ -963,7 +918,7 @@ export interface ElementInstanceSearchFilter {
963
918
  processDefinitionKey?: string;
964
919
  incidentKey?: string;
965
920
  }
966
- export interface SearchElementInstancesRequest extends BaseSearchRequest<'elementInstanceKey' | 'processInstanceKey' | 'processDefinitionKey' | 'processDefinitionId' | 'startDate' | 'endDate' | 'elementId' | 'type' | 'state' | 'incidentKey' | 'tenantId', ElementInstanceSearchFilter> {
921
+ export interface SearchElementInstancesRequest extends BaseSearchRequest<'elementInstanceKey' | 'processInstanceKey' | 'processDefinitionKey' | 'processDefinitionId' | 'startDate' | 'endDate' | 'elementId' | 'type' | 'state' | 'incidentKey' | 'tenantId', ElementInstanceSearchRequestFilter> {
967
922
  }
968
923
  export interface ElementInstanceDetails {
969
924
  /** The process definition ID associated to this element instance. */
@@ -993,13 +948,9 @@ export interface ElementInstanceDetails {
993
948
  /** Incident key associated with this element instance. */
994
949
  incidentKey?: string;
995
950
  }
996
- export interface SearchElementInstancesResponse {
997
- page: CamundaRestSearchResponsePagination;
998
- items: Array<ElementInstanceDetails>;
999
- }
1000
- export interface CamundaRestSearchElementInstancesResponse extends PaginatedCamundaRestSearchResponse<ElementInstanceDetails> {
951
+ export interface SearchElementInstancesResponse extends PaginatedSearchResponse<ElementInstanceDetails> {
1001
952
  }
1002
- export interface IncidentSearchFilter {
953
+ export interface IncidentSearchRequestFilter {
1003
954
  /** The process definition ID associated to this incident. */
1004
955
  processDefinitionId?: string;
1005
956
  /** Incident error type with a defined set of values. */
@@ -1025,7 +976,7 @@ export interface IncidentSearchFilter {
1025
976
  /** The job key, if exists, associated with this incident. */
1026
977
  jobKey?: string;
1027
978
  }
1028
- export interface SearchIncidentsRequest extends BaseSearchRequest<'incidentKey' | 'processInstanceKey' | 'processDefinitionKey' | 'processDefinitionId' | 'errorType' | 'errorMessage' | 'elementId' | 'elementInstanceKey' | 'creationTime' | 'state' | 'jobKey' | 'tenantId', IncidentSearchFilter> {
979
+ export interface SearchIncidentsRequest extends BaseSearchRequest<'incidentKey' | 'processInstanceKey' | 'processDefinitionKey' | 'processDefinitionId' | 'errorType' | 'errorMessage' | 'elementId' | 'elementInstanceKey' | 'creationTime' | 'state' | 'jobKey' | 'tenantId', IncidentSearchRequestFilter> {
1029
980
  }
1030
981
  interface IncidentDetails {
1031
982
  processDefinitionId: string;
@@ -1041,7 +992,7 @@ interface IncidentDetails {
1041
992
  elementInstanceKey: string;
1042
993
  jobKey: string;
1043
994
  }
1044
- export interface CamundaRestSearchIncidentsResponse extends PaginatedCamundaRestSearchResponse<IncidentDetails> {
995
+ export interface SearchIncidentsResponse extends PaginatedSearchResponse<IncidentDetails> {
1045
996
  }
1046
997
  export interface DecisionInstanceSearchFilter {
1047
998
  /** The decision instance key. */
@@ -1067,7 +1018,7 @@ export interface DecisionInstanceSearchFilter {
1067
1018
  /** The decision type. */
1068
1019
  decisionType?: 'DECISION_TABLE' | 'LITERAL_EXPRESSION' | 'UNSPECIFIED' | 'UNKNOWN';
1069
1020
  }
1070
- export interface CamundaRestSearchDecisionInstancesRequest extends BaseSearchRequest<'decisionInstanceKey' | 'decisionDefinitionId' | 'decisionDefinitionKey' | 'decisionDefinitionName' | 'decisionDefinitionVersion' | 'processDefinitionKey' | 'processInstanceKey' | 'state' | 'evaluationDate' | 'tenantId' | 'decisionType', DecisionInstanceSearchFilter> {
1021
+ export interface SearchDecisionInstancesRequest extends BaseSearchRequest<'decisionInstanceKey' | 'decisionDefinitionId' | 'decisionDefinitionKey' | 'decisionDefinitionName' | 'decisionDefinitionVersion' | 'processDefinitionKey' | 'processInstanceKey' | 'state' | 'evaluationDate' | 'tenantId' | 'decisionType', DecisionInstanceSearchFilter> {
1071
1022
  }
1072
1023
  interface DecisionInstanceDetails {
1073
1024
  /** The decision instance key. */
@@ -1099,7 +1050,7 @@ interface DecisionInstanceDetails {
1099
1050
  /** The ID of the decision instance. */
1100
1051
  decisionInstanceId: string;
1101
1052
  }
1102
- export interface CamundaRestSearchDecisionInstancesResponse extends PaginatedCamundaRestSearchResponse<DecisionInstanceDetails> {
1053
+ export interface SearchDecisionInstancesResponse extends PaginatedSearchResponse<DecisionInstanceDetails> {
1103
1054
  }
1104
1055
  /**
1105
1056
  * Response from getting a single decision instance by its key.
@@ -6,8 +6,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
7
  };
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.GetVariableResponse = exports.SearchUsersResponse = exports.EvaluateDecisionResponse = exports.EvaluatedDecision = exports.EvaluatedInput = exports.MatchedRule = exports.EvaluatedOutput = exports.UploadDocumentsResponse = exports.UploadDocumentResponse = exports.PublishMessageResponse = exports.CorrelateMessageResponse = exports.BroadcastSignalResponse = exports.CreateProcessInstanceResponse = exports.DeployResourceResponse = exports.DeployResourceResponseDto = exports.FormDeployment = exports.DecisionRequirementsDeployment = exports.DecisionDeployment = exports.ProcessDeployment = exports.RestApiJob = void 0;
9
+ exports.GetVariableResponse = exports.SearchUsersResponse = exports.EvaluateDecisionResponse = exports.EvaluatedDecision = exports.EvaluatedInput = exports.MatchedRule = exports.EvaluatedOutput = exports.UploadDocumentsResponse = exports.UploadDocumentResponse = exports.PublishMessageResponse = exports.CorrelateMessageResponse = exports.BroadcastSignalResponse = exports.CreateProcessInstanceWithResultResponse = exports.CreateProcessInstanceResponse = exports.DeployResourceResponse = exports.FormDeployment = exports.DecisionRequirementsDeployment = exports.DecisionDeployment = exports.ProcessDeployment = exports.RestApiJob = void 0;
10
10
  const lib_1 = require("../../lib");
11
+ const C8DtoInternal_1 = require("./C8DtoInternal");
11
12
  class RestApiJob extends lib_1.LosslessDto {
12
13
  }
13
14
  exports.RestApiJob = RestApiJob;
@@ -53,13 +54,7 @@ exports.FormDeployment = FormDeployment;
53
54
  __decorate([
54
55
  lib_1.Int64String
55
56
  ], FormDeployment.prototype, "formKey", void 0);
56
- class DeployResourceResponseDto extends lib_1.LosslessDto {
57
- }
58
- exports.DeployResourceResponseDto = DeployResourceResponseDto;
59
- __decorate([
60
- lib_1.Int64String
61
- ], DeployResourceResponseDto.prototype, "deploymentKey", void 0);
62
- class DeployResourceResponse extends DeployResourceResponseDto {
57
+ class DeployResourceResponse extends C8DtoInternal_1.DeployResourceResponseDto {
63
58
  }
64
59
  exports.DeployResourceResponse = DeployResourceResponse;
65
60
  class CreateProcessInstanceResponse {
@@ -71,6 +66,9 @@ __decorate([
71
66
  __decorate([
72
67
  lib_1.Int64String
73
68
  ], CreateProcessInstanceResponse.prototype, "processInstanceKey", void 0);
69
+ class CreateProcessInstanceWithResultResponse extends CreateProcessInstanceResponse {
70
+ }
71
+ exports.CreateProcessInstanceWithResultResponse = CreateProcessInstanceWithResultResponse;
74
72
  /** The signal was broadcast. */
75
73
  class BroadcastSignalResponse extends lib_1.LosslessDto {
76
74
  }
@@ -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;CAWlD;AAXD,gDAWC;AAPA;IADC,iBAAW;uDACQ;AAKpB;IADC,iBAAW;mEACoB;AAIjC,MAAa,8BAA+B,SAAQ,iBAAW;CAQ9D;AARD,wEAQC;AAFA;IADC,iBAAW;+EACoB;AAGjC,MAAa,cAAc;CAO1B;AAPD,wCAOC;AAHA;IADC,iBAAW;+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