@5minds/processcube_engine_client
Advanced tools
Comparing version 6.0.0-feature-254d11-m7d7dgtl to 6.0.0-feature-3064c5-m7iz52jg
@@ -31,4 +31,4 @@ import { BpmnType, DataModels, DeleteProcessInstanceQuery, IProcessInstanceExtensionAdapter } from '@5minds/processcube_engine_sdk'; | ||
}): Promise<void>; | ||
deleteProcessInstances(processInstanceQuery: string[] | DeleteProcessInstanceQuery, deleteAllRelatedData?: boolean, identity?: IdentityLike): Promise<void>; | ||
deleteProcessInstances(processInstanceQuery: string | Array<string> | DeleteProcessInstanceQuery, deleteAllRelatedData?: boolean, identity?: IdentityLike): Promise<void>; | ||
private handleError; | ||
} |
@@ -85,2 +85,5 @@ "use strict"; | ||
async deleteProcessInstances(processInstanceQuery, deleteAllRelatedData = false, identity) { | ||
if (!processInstanceQuery) { | ||
return; | ||
} | ||
let url = this.buildUrl(index_1.restSettings.paths.deleteProcessInstances); | ||
@@ -91,4 +94,7 @@ if (Array.isArray(processInstanceQuery)) { | ||
} | ||
else if (typeof processInstanceQuery === 'string') { | ||
url = this.addParameterToUrl(url, 'process_instance_ids', processInstanceQuery); | ||
} | ||
else { | ||
if (processInstanceQuery.processInstanceId) { | ||
if (processInstanceQuery?.processInstanceId) { | ||
const serializedProcessInstanceIds = Array.isArray(processInstanceQuery.processInstanceId) | ||
@@ -99,9 +105,9 @@ ? processInstanceQuery.processInstanceId.join(';') | ||
} | ||
if (processInstanceQuery.processModelId) { | ||
if (processInstanceQuery?.processModelId) { | ||
url = this.addParameterToUrl(url, 'process_model_id', processInstanceQuery.processModelId); | ||
} | ||
if (processInstanceQuery.finishedBefore) { | ||
if (processInstanceQuery?.finishedBefore) { | ||
url = this.addParameterToUrl(url, 'finishedBefore', processInstanceQuery.finishedBefore); | ||
} | ||
if (processInstanceQuery.finishedAfter) { | ||
if (processInstanceQuery?.finishedAfter) { | ||
url = this.addParameterToUrl(url, 'finishedAfter', processInstanceQuery.finishedAfter); | ||
@@ -108,0 +114,0 @@ } |
@@ -7,3 +7,3 @@ { | ||
"name": "@5minds/processcube_engine_client", | ||
"version": "6.0.0-feature-254d11-m7d7dgtl", | ||
"version": "6.0.0-feature-3064c5-m7iz52jg", | ||
"description": "Contains a typescript based client for accessing the Engine.", | ||
@@ -10,0 +10,0 @@ "main": "dist/commonjs/index.js", |
Sorry, the diff of this file is not supported yet
367302
5196