@coast/core-api-types 1.2.106 → 1.2.108

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,4 +1,5 @@
1
1
  import { BusinessId } from '../business/BusinessId';
2
+ import { OriginUserId } from '../user/UserId';
2
3
  import { EntityFields } from '../workflow-template/entities/EntityFields';
3
4
  import { EntityRefs } from '../workflow-template/entities/refs/EntityRefs';
4
5
  import { WorkflowEntity } from '../workflow-template/entities/WorkflowEntity';
@@ -14,4 +15,5 @@ export interface AutomationContext {
14
15
  actionResults?: AutomationActionResult[];
15
16
  eventContext: AutomationEventContext;
16
17
  automationId: AutomationId;
18
+ originUserId: OriginUserId | undefined;
17
19
  }
@@ -1,4 +1,5 @@
1
1
  import { DynamicComponentData } from './DynamicComponentData';
2
- export interface ActionResultNumber extends DynamicComponentData {
2
+ import { DynamicComponentDataType } from './DynamicComponentDataType';
3
+ export interface ActionResultNumber extends DynamicComponentData<DynamicComponentDataType.ACTION_RESULT_NUMBER> {
3
4
  actionId: string;
4
5
  }
@@ -1,3 +1,4 @@
1
1
  import { DynamicComponentData } from './DynamicComponentData';
2
- export interface CurrentWorkflowEntity extends DynamicComponentData {
2
+ import { DynamicComponentDataType } from './DynamicComponentDataType';
3
+ export interface CurrentWorkflowEntity extends DynamicComponentData<DynamicComponentDataType.CURRENT_WORKFLOW_ENTITY> {
3
4
  }
@@ -1,4 +1,5 @@
1
1
  import { DynamicComponentData } from './DynamicComponentData';
2
- export interface CurrentWorkflowEntityComponent extends DynamicComponentData {
2
+ import { DynamicComponentDataType } from './DynamicComponentDataType';
3
+ export interface CurrentWorkflowEntityComponent extends DynamicComponentData<DynamicComponentDataType.CURRENT_WORKFLOW_ENTITY_COMPONENT> {
3
4
  componentId: string;
4
5
  }
@@ -1,4 +1,4 @@
1
1
  import { DynamicComponentDataType } from './DynamicComponentDataType';
2
- export interface DynamicComponentData {
3
- type: DynamicComponentDataType;
2
+ export interface DynamicComponentData<T extends DynamicComponentDataType = DynamicComponentDataType> {
3
+ type: T;
4
4
  }
@@ -1,12 +1,23 @@
1
+ import { CamelCase } from '../../../utils/CamelCase';
2
+ import { Optional } from '../../../utils/Optional';
1
3
  import { ActionResultNumber } from './ActionResultNumber';
2
4
  import { CurrentWorkflowEntity } from './CurrentWorkflowEntity';
3
5
  import { CurrentWorkflowEntityComponent } from './CurrentWorkflowEntityComponent';
6
+ import { DynamicComponentData } from './DynamicComponentData';
7
+ import { DynamicComponentDataType } from './DynamicComponentDataType';
8
+ import { OriginUser } from './OriginUser';
4
9
  import { RelatedWorkflowEntityComponent } from './RelatedWorkflowEntityComponent';
5
10
  import { TimeTrackerDataAction } from './TimeTrackerDataAction';
6
- export interface DynamicComponentDataOneOf {
7
- actionResultNumber?: ActionResultNumber;
8
- currentWorkflowEntity?: CurrentWorkflowEntity;
9
- currentWorkflowEntityComponent?: CurrentWorkflowEntityComponent;
10
- relatedWorkflowEntityComponent?: RelatedWorkflowEntityComponent;
11
- timeTrackerDataAction?: TimeTrackerDataAction;
11
+ type Fields = `${CamelCase<DynamicComponentDataType>}`;
12
+ type DynamicComponentDataOneOfs = {
13
+ [key in Fields]: Optional<DynamicComponentData>;
14
+ };
15
+ export interface DynamicComponentDataOneOf extends DynamicComponentDataOneOfs {
16
+ actionResultNumber: Optional<ActionResultNumber>;
17
+ currentWorkflowEntity: Optional<CurrentWorkflowEntity>;
18
+ currentWorkflowEntityComponent: Optional<CurrentWorkflowEntityComponent>;
19
+ relatedWorkflowEntityComponent: Optional<RelatedWorkflowEntityComponent>;
20
+ timeTrackerDataAction: Optional<TimeTrackerDataAction>;
21
+ originUser: Optional<OriginUser>;
12
22
  }
23
+ export {};
@@ -2,6 +2,7 @@ export declare enum DynamicComponentDataType {
2
2
  ACTION_RESULT_NUMBER = "ACTION_RESULT_NUMBER",
3
3
  CURRENT_WORKFLOW_ENTITY = "CURRENT_WORKFLOW_ENTITY",
4
4
  CURRENT_WORKFLOW_ENTITY_COMPONENT = "CURRENT_WORKFLOW_ENTITY_COMPONENT",
5
+ ORIGIN_USER = "ORIGIN_USER",
5
6
  RELATED_WORKFLOW_ENTITY_COMPONENT = "RELATED_WORKFLOW_ENTITY_COMPONENT",
6
7
  TIME_TRACKER_DATA_ACTION = "TIME_TRACKER_DATA_ACTION"
7
8
  }
@@ -6,6 +6,7 @@ var DynamicComponentDataType;
6
6
  DynamicComponentDataType["ACTION_RESULT_NUMBER"] = "ACTION_RESULT_NUMBER";
7
7
  DynamicComponentDataType["CURRENT_WORKFLOW_ENTITY"] = "CURRENT_WORKFLOW_ENTITY";
8
8
  DynamicComponentDataType["CURRENT_WORKFLOW_ENTITY_COMPONENT"] = "CURRENT_WORKFLOW_ENTITY_COMPONENT";
9
+ DynamicComponentDataType["ORIGIN_USER"] = "ORIGIN_USER";
9
10
  DynamicComponentDataType["RELATED_WORKFLOW_ENTITY_COMPONENT"] = "RELATED_WORKFLOW_ENTITY_COMPONENT";
10
11
  DynamicComponentDataType["TIME_TRACKER_DATA_ACTION"] = "TIME_TRACKER_DATA_ACTION";
11
12
  })(DynamicComponentDataType || (exports.DynamicComponentDataType = DynamicComponentDataType = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"DynamicComponentDataType.js","sourceRoot":"","sources":["../../../../../src/models/automations/action/component-data/DynamicComponentDataType.ts"],"names":[],"mappings":";;;AACA,IAAY,wBAMX;AAND,WAAY,wBAAwB;IAChC,yEAA6C,CAAA;IAC7C,+EAAmD,CAAA;IACnD,mGAAuE,CAAA;IACvE,mGAAuE,CAAA;IACvE,iFAAqD,CAAA;AACzD,CAAC,EANW,wBAAwB,wCAAxB,wBAAwB,QAMnC"}
1
+ {"version":3,"file":"DynamicComponentDataType.js","sourceRoot":"","sources":["../../../../../src/models/automations/action/component-data/DynamicComponentDataType.ts"],"names":[],"mappings":";;;AACA,IAAY,wBAOX;AAPD,WAAY,wBAAwB;IAChC,yEAA6C,CAAA;IAC7C,+EAAmD,CAAA;IACnD,mGAAuE,CAAA;IACvE,uDAA2B,CAAA;IAC3B,mGAAuE,CAAA;IACvE,iFAAqD,CAAA;AACzD,CAAC,EAPW,wBAAwB,wCAAxB,wBAAwB,QAOnC"}
@@ -0,0 +1,4 @@
1
+ import { DynamicComponentData } from './DynamicComponentData';
2
+ import { DynamicComponentDataType } from './DynamicComponentDataType';
3
+ export interface OriginUser extends DynamicComponentData<DynamicComponentDataType.ORIGIN_USER> {
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=OriginUser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OriginUser.js","sourceRoot":"","sources":["../../../../../src/models/automations/action/component-data/OriginUser.ts"],"names":[],"mappings":""}
@@ -1,6 +1,7 @@
1
1
  import { ComponentId } from '../../../workflow-template/components/ComponentId';
2
2
  import { DynamicComponentData } from './DynamicComponentData';
3
- export interface RelatedWorkflowEntityComponent extends DynamicComponentData {
3
+ import { DynamicComponentDataType } from './DynamicComponentDataType';
4
+ export interface RelatedWorkflowEntityComponent extends DynamicComponentData<DynamicComponentDataType.RELATED_WORKFLOW_ENTITY_COMPONENT> {
4
5
  relatedCardComponentId: ComponentId;
5
6
  targetComponentId: ComponentId;
6
7
  }
@@ -1,5 +1,6 @@
1
1
  import { TimeTrackerComponentDataAction } from '../../../workflow-template/components/time-tracker/TimeTrackerComponentDataAction';
2
2
  import { DynamicComponentData } from './DynamicComponentData';
3
- export interface TimeTrackerDataAction extends DynamicComponentData {
3
+ import { DynamicComponentDataType } from './DynamicComponentDataType';
4
+ export interface TimeTrackerDataAction extends DynamicComponentData<DynamicComponentDataType.TIME_TRACKER_DATA_ACTION> {
4
5
  dataAction: TimeTrackerComponentDataAction;
5
6
  }
@@ -1,6 +1,6 @@
1
1
  import { AutomationId } from '../automations/AutomationId';
2
- import { UserId } from '../user/UserId';
2
+ import { OriginUserId } from '../user/UserId';
3
3
  export interface ExecutionOrigin {
4
- userId?: UserId;
4
+ userId?: OriginUserId;
5
5
  sourceAutomationId?: AutomationId;
6
6
  }
@@ -1,2 +1,3 @@
1
- import { Brand } from '@paradoxical-io/types';
1
+ import { Brand, SubBrand } from '@paradoxical-io/types';
2
2
  export type UserId = Brand<number, 'UserId'>;
3
+ export type OriginUserId = SubBrand<UserId, 'OriginUserId'>;
@@ -41,6 +41,7 @@ const path = __importStar(require("path"));
41
41
  ignoreSourceDirectories: ['validation', 'access-management', 'test'],
42
42
  ignoreDestinationDirectoryFilePatterns: ['scripts', 'Intersection.ts', 'InputComponentTypes.ts'],
43
43
  tsConfigFilePath: path.resolve(__dirname, '../.././tsconfig.json'),
44
+ onlyProcessModifiedFilesBaseBranch: process.env.COAST_TYPE_GEN_CHANGED_ONLY === 'true' ? 'master' : undefined,
44
45
  autoGeneratedFileComment: 'This file was generated from the corresponding source file in core-models/src. Do NOT modify this file by hand.',
45
46
  });
46
47
  //# sourceMappingURL=generateTypes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generateTypes.js","sourceRoot":"","sources":["../../src/scripts/generateTypes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+EAA4E;AAC5E,2CAA6B;AAE7B,IAAA,6BAAa,EAAC;IACV,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,0BAA0B,CAAC;IAC9D,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,WAAW,CAAC;IAC7C,uBAAuB,EAAE,CAAC,YAAY,EAAE,mBAAmB,EAAE,MAAM,CAAC;IACpE,sCAAsC,EAAE,CAAC,SAAS,EAAE,iBAAiB,EAAE,wBAAwB,CAAC;IAChG,gBAAgB,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,uBAAuB,CAAC;IAClE,wBAAwB,EACpB,iHAAiH;CACxH,CAAC,CAAC"}
1
+ {"version":3,"file":"generateTypes.js","sourceRoot":"","sources":["../../src/scripts/generateTypes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+EAA4E;AAC5E,2CAA6B;AAE7B,IAAA,6BAAa,EAAC;IACV,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,0BAA0B,CAAC;IAC9D,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,WAAW,CAAC;IAC7C,uBAAuB,EAAE,CAAC,YAAY,EAAE,mBAAmB,EAAE,MAAM,CAAC;IACpE,sCAAsC,EAAE,CAAC,SAAS,EAAE,iBAAiB,EAAE,wBAAwB,CAAC;IAChG,gBAAgB,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,uBAAuB,CAAC;IAClE,kCAAkC,EAAE,OAAO,CAAC,GAAG,CAAC,2BAA2B,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;IAC7G,wBAAwB,EACpB,iHAAiH;CACxH,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coast/core-api-types",
3
- "version": "1.2.106",
3
+ "version": "1.2.108",
4
4
  "description": "Facilitates the generation of core-api-types npm package",
5
5
  "exports": {
6
6
  "./*": {