@brandboostinggmbh/observable-workflows 0.16.0 → 0.16.1

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/dist/index.d.ts CHANGED
@@ -478,6 +478,8 @@ declare const createLogAccessor: (context: {
478
478
  workflowCount: number;
479
479
  workflowTotalWallTimeMilis: number;
480
480
  incompleteWorkflowCount: number;
481
+ successfulWorkflowCount: number;
482
+ failedWorkflowCount: number;
481
483
  }[]>;
482
484
  };
483
485
 
package/dist/index.js CHANGED
@@ -956,7 +956,21 @@ const createLogAccessor = (context) => {
956
956
  THEN 1
957
957
  ELSE 0
958
958
  END
959
- ) as incompleteWorkflowCount
959
+ ) as incompleteWorkflowCount,
960
+ SUM(
961
+ CASE
962
+ WHEN workflowStatus = 'completed'
963
+ THEN 1
964
+ ELSE 0
965
+ END
966
+ ) as successfulWorkflowCount,
967
+ SUM(
968
+ CASE
969
+ WHEN workflowStatus = 'failed'
970
+ THEN 1
971
+ ELSE 0
972
+ END
973
+ ) as failedWorkflowCount
960
974
  FROM WorkflowTable
961
975
  ${whereClause}
962
976
  GROUP BY workflowType
@@ -968,7 +982,9 @@ const createLogAccessor = (context) => {
968
982
  workflowType: row.workflowType,
969
983
  workflowCount: row.workflowCount,
970
984
  workflowTotalWallTimeMilis: row.workflowTotalWallTimeMilis || 0,
971
- incompleteWorkflowCount: row.incompleteWorkflowCount || 0
985
+ incompleteWorkflowCount: row.incompleteWorkflowCount || 0,
986
+ successfulWorkflowCount: row.successfulWorkflowCount || 0,
987
+ failedWorkflowCount: row.failedWorkflowCount || 0
972
988
  }));
973
989
  };
974
990
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brandboostinggmbh/observable-workflows",
3
- "version": "0.16.0",
3
+ "version": "0.16.1",
4
4
  "description": "My awesome typescript library",
5
5
  "type": "module",
6
6
  "license": "MIT",