@carbonbox/domain 0.7.4 → 0.7.5

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.
@@ -1,6 +1,6 @@
1
1
  import { AggregateRoot } from '../../../../shared/domain/entities/AggregateRoot';
2
- import { CalculationWorkflowPrimitives } from '../enums/CalculationWorkflowPrimitives';
3
- import { CalculationWorkflowProps } from '../enums/CalculationWorkflowProps';
2
+ import { CalculationWorkflowPrimitives } from '../types/CalculationWorkflowPrimitives';
3
+ import { CalculationWorkflowProps } from '../types/CalculationWorkflowProps';
4
4
  import { CalculationWorkflowAllowedExecutors } from '../value-objects/CalculationWorkflowAllowedExecutors';
5
5
  import { CalculationWorkflowCarbonClient } from '../value-objects/CalculationWorkflowCarbonClient';
6
6
  import { CalculationWorkflowCode } from '../value-objects/CalculationWorkflowCode';
@@ -1,15 +1,14 @@
1
1
  import { AggregateRootPrimitives } from '../../../../shared/domain/types/AggregateRootPrimitives';
2
2
  import { CarbonClientReferencePrimitives } from '../../../../shared/domain/types/CarbonClientReferencePrimitives';
3
- import { FacilityReferencePrimitives } from '../../../../shared/domain/types/FacilityReferencePrimitives';
4
3
  import { StakeholderReferencePrimitives } from '../../../../shared/domain/types/StakeholderReferencePrimitives';
4
+ import { WorkflowStatus } from '../enums/WorkflowStatus';
5
+ import { WorkflowTrigger } from '../enums/WorkflowTrigger';
5
6
  export type CalculationWorkflowPrimitives = AggregateRootPrimitives & {
6
- workflowCode: string;
7
- workflowName: string;
8
- workflowDescription: string;
7
+ code: string;
8
+ name: string;
9
+ description: string;
9
10
  carbonClient: CarbonClientReferencePrimitives;
10
- facility: FacilityReferencePrimitives | null;
11
- footprintType: string;
12
- triggerType: string;
11
+ triggerType: WorkflowTrigger;
13
12
  triggerSchedule: string | null;
14
13
  isAutomatic: boolean;
15
14
  jobSequence: string[];
@@ -18,14 +17,14 @@ export type CalculationWorkflowPrimitives = AggregateRootPrimitives & {
18
17
  maxConcurrentProcesses: number;
19
18
  timeoutMinutes: number;
20
19
  retryFailedJobs: boolean;
21
- status: string;
20
+ status: WorkflowStatus;
22
21
  lastExecutedAt: string | null;
23
22
  nextScheduledAt: string | null;
24
23
  totalExecutions: number;
25
24
  successfulExecutions: number;
26
25
  failedExecutions: number;
27
26
  createdByStakeholder: StakeholderReferencePrimitives;
28
- allowedExecutors: StakeholderReferencePrimitives[];
27
+ allowedExecutors: string[];
29
28
  emailNotifications: boolean;
30
29
  notificationRecipients: string[];
31
30
  workflowNotes: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"CalculationWorkflowPrimitives.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-process/calculation-workflows/domain/types/CalculationWorkflowPrimitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC;AAClG,OAAO,EAAE,+BAA+B,EAAE,MAAM,iEAAiE,CAAC;AAClH,OAAO,EAAE,2BAA2B,EAAE,MAAM,6DAA6D,CAAC;AAC1G,OAAO,EAAE,8BAA8B,EAAE,MAAM,gEAAgE,CAAC;AAEhH,MAAM,MAAM,6BAA6B,GAAG,uBAAuB,GAAG;IACpE,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,MAAM,CAAC;IAG5B,YAAY,EAAE,+BAA+B,CAAC;IAC9C,QAAQ,EAAE,2BAA2B,GAAG,IAAI,CAAC;IAC7C,aAAa,EAAE,MAAM,CAAC;IAGtB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,EAAE,OAAO,CAAC;IAGrB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC;IACzB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAG3B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IAGzB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IAGzB,oBAAoB,EAAE,8BAA8B,CAAC;IACrD,gBAAgB,EAAE,8BAA8B,EAAE,CAAC;IAGnD,kBAAkB,EAAE,OAAO,CAAC;IAC5B,sBAAsB,EAAE,MAAM,EAAE,CAAC;IACjC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAC"}
1
+ {"version":3,"file":"CalculationWorkflowPrimitives.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-process/calculation-workflows/domain/types/CalculationWorkflowPrimitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC;AAClG,OAAO,EAAE,+BAA+B,EAAE,MAAM,iEAAiE,CAAC;AAClH,OAAO,EAAE,8BAA8B,EAAE,MAAM,gEAAgE,CAAC;AAChH,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,MAAM,MAAM,6BAA6B,GAAG,uBAAuB,GAAG;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IAGpB,YAAY,EAAE,+BAA+B,CAAC;IAG9C,WAAW,EAAE,eAAe,CAAC;IAC7B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,EAAE,OAAO,CAAC;IAGrB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC;IACzB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAG3B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IAGzB,MAAM,EAAE,cAAc,CAAC;IACvB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IAGzB,oBAAoB,EAAE,8BAA8B,CAAC;IACrD,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAG3B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,sBAAsB,EAAE,MAAM,EAAE,CAAC;IACjC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAC"}
@@ -1,16 +1,13 @@
1
1
  import { CarbonClientReference } from '../../../../shared/domain/types/CarbonClientReference';
2
- import { FacilityReference } from '../../../../shared/domain/types/FacilityReference';
3
2
  import { StakeholderReference } from '../../../../shared/domain/types/StakeholderReference';
4
- import { CarbonFootprint } from '../../../../carbon-footprint-configurations/shared/domain/enums/CarbonFootprint';
3
+ import { AggregateRootProps } from '../../../../shared/domain/types/AggregateRootProps';
5
4
  import { WorkflowStatus } from '../enums/WorkflowStatus';
6
5
  import { WorkflowTrigger } from '../enums/WorkflowTrigger';
7
- export interface CalculationWorkflowProps {
8
- workflowCode: string;
9
- workflowName: string;
10
- workflowDescription: string;
6
+ export type CalculationWorkflowProps = AggregateRootProps & {
7
+ code: string;
8
+ name: string;
9
+ description: string;
11
10
  carbonClient: CarbonClientReference;
12
- facility: FacilityReference | null;
13
- footprintType: CarbonFootprint;
14
11
  triggerType: WorkflowTrigger;
15
12
  triggerSchedule: string | null;
16
13
  isAutomatic: boolean;
@@ -21,15 +18,15 @@ export interface CalculationWorkflowProps {
21
18
  timeoutMinutes: number;
22
19
  retryFailedJobs: boolean;
23
20
  status: WorkflowStatus;
24
- lastExecutedAt: Date | null;
25
- nextScheduledAt: Date | null;
21
+ lastExecutedAt: string | null;
22
+ nextScheduledAt: string | null;
26
23
  totalExecutions: number;
27
24
  successfulExecutions: number;
28
25
  failedExecutions: number;
29
26
  createdByStakeholder: StakeholderReference;
30
- allowedExecutors: StakeholderReference[];
27
+ allowedExecutors: string[];
31
28
  emailNotifications: boolean;
32
29
  notificationRecipients: string[];
33
30
  workflowNotes: string | null;
34
- }
31
+ };
35
32
  //# sourceMappingURL=CalculationWorkflowProps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CalculationWorkflowProps.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-process/calculation-workflows/domain/types/CalculationWorkflowProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,MAAM,mDAAmD,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sDAAsD,CAAC;AAC5F,OAAO,EAAE,eAAe,EAAE,MAAM,iFAAiF,CAAC;AAClH,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,MAAM,WAAW,wBAAwB;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,MAAM,CAAC;IAG5B,YAAY,EAAE,qBAAqB,CAAC;IACpC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACnC,aAAa,EAAE,eAAe,CAAC;IAG/B,WAAW,EAAE,eAAe,CAAC;IAC7B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,EAAE,OAAO,CAAC;IAGrB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC;IACzB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAG3B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IAGzB,MAAM,EAAE,cAAc,CAAC;IACvB,cAAc,EAAE,IAAI,GAAG,IAAI,CAAC;IAC5B,eAAe,EAAE,IAAI,GAAG,IAAI,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IAGzB,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,gBAAgB,EAAE,oBAAoB,EAAE,CAAC;IAGzC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,sBAAsB,EAAE,MAAM,EAAE,CAAC;IACjC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B"}
1
+ {"version":3,"file":"CalculationWorkflowProps.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-process/calculation-workflows/domain/types/CalculationWorkflowProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,MAAM,sDAAsD,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,GAAG;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IAGpB,YAAY,EAAE,qBAAqB,CAAC;IAGpC,WAAW,EAAE,eAAe,CAAC;IAC7B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,EAAE,OAAO,CAAC;IAGrB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC;IACzB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAG3B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IAGzB,MAAM,EAAE,cAAc,CAAC;IACvB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IAGzB,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAG3B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,sBAAsB,EAAE,MAAM,EAAE,CAAC;IACjC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAC"}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "browser": false
4
4
  },
5
5
  "name": "@carbonbox/domain",
6
- "version": "0.7.4",
6
+ "version": "0.7.5",
7
7
  "description": "Domain package for CarbonBox Project",
8
8
  "main": "build/main/index.js",
9
9
  "types": "build/types/main/index.d.ts",