From 419ae568327bc1451e6ea59ec3f0c340b80758f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=BCsna=20Uygur?= Date: Wed, 25 Sep 2024 14:26:12 +0200 Subject: [PATCH 1/2] fix(operate): use post request for decision definitions and decision instances endpoints --- src/operate/lib/OperateApiClient.ts | 24 ++++++++++++++---------- src/operate/lib/OperateDto.ts | 1 + 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/operate/lib/OperateApiClient.ts b/src/operate/lib/OperateApiClient.ts index 6329a87e..4833636c 100644 --- a/src/operate/lib/OperateApiClient.ts +++ b/src/operate/lib/OperateApiClient.ts @@ -231,11 +231,13 @@ export class OperateApiClient { const json = this.addTenantIdToFilter(query) const rest = await this.rest - return rest('decision-definitions/search', { - headers, - parseJson: (text) => parseSearchResults(text, DecisionDefinition), - json, - }).json() + return rest + .post('decision-definitions/search', { + headers, + parseJson: (text) => parseSearchResults(text, DecisionDefinition), + json, + }) + .json() } /** @@ -263,11 +265,13 @@ export class OperateApiClient { const json = this.addTenantIdToFilter(query) const rest = await this.rest - return rest('decision-instances/search', { - headers, - parseJson: (text) => parseSearchResults(text, DecisionInstance), - json, - }).json() + return rest + .post('decision-instances/search', { + headers, + parseJson: (text) => parseSearchResults(text, DecisionInstance), + json, + }) + .json() } /** diff --git a/src/operate/lib/OperateDto.ts b/src/operate/lib/OperateDto.ts index fe16649f..026f76c1 100644 --- a/src/operate/lib/OperateDto.ts +++ b/src/operate/lib/OperateDto.ts @@ -40,6 +40,7 @@ export class DecisionInstance extends LosslessDto { evaluationFailure!: string @Int64String processDefinitionKey!: string + processInstanceKey!: number decisionId!: string decisionDefinitionId!: string decisionName!: string From 3c35544c303b2a2727f1b272e5eaea6ad7c52099 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=BCsna=20Uygur?= Date: Thu, 26 Sep 2024 09:09:47 +0200 Subject: [PATCH 2/2] refactor: use string instead of number for processInstanceKey type --- src/operate/lib/OperateDto.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/operate/lib/OperateDto.ts b/src/operate/lib/OperateDto.ts index 026f76c1..7b3b5a26 100644 --- a/src/operate/lib/OperateDto.ts +++ b/src/operate/lib/OperateDto.ts @@ -40,7 +40,8 @@ export class DecisionInstance extends LosslessDto { evaluationFailure!: string @Int64String processDefinitionKey!: string - processInstanceKey!: number + @Int64String + processInstanceKey!: string decisionId!: string decisionDefinitionId!: string decisionName!: string