@coast/core-types 0.0.56 → 0.0.58

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.
Files changed (76) hide show
  1. package/dist/automations/action/component-data/TCurrentWorkflowEntityComponent.d.ts +2 -1
  2. package/dist/automations/action/component-data/TDynamicComponentDataForType.d.ts +7 -0
  3. package/dist/automations/action/component-data/TDynamicComponentDataForType.js +3 -0
  4. package/dist/automations/action/component-data/TDynamicComponentDataForType.js.map +1 -0
  5. package/dist/automations/action/settings/TAutomationActionSettingsForType.d.ts +7 -0
  6. package/dist/automations/action/settings/TAutomationActionSettingsForType.js +3 -0
  7. package/dist/automations/action/settings/TAutomationActionSettingsForType.js.map +1 -0
  8. package/dist/automations/action/settings/TReferencedInAggregate.d.ts +2 -1
  9. package/dist/automations/action/settings/TSendEmailActionSettings.d.ts +3 -2
  10. package/dist/automations/action/settings/TSendNotificationActionSettings.d.ts +2 -1
  11. package/dist/automations/action/settings/TSendPushNotificationActionSettings.d.ts +2 -1
  12. package/dist/automations/action/settings/TSettingsWorkflowEntityField.d.ts +2 -1
  13. package/dist/automations/action/settings/TTriggerRelatedCardAutomationActionSettings.d.ts +2 -1
  14. package/dist/automations/action/settings/TUpdateRelatedCardQuantityActionSettings.d.ts +2 -1
  15. package/dist/automations/condition/operands/TComponentOperand.d.ts +2 -1
  16. package/dist/automations/condition/operands/TPreviousComponentOperand.d.ts +2 -1
  17. package/dist/automations/condition/operands/TWorkflowEntityRefComponentOperand.d.ts +3 -2
  18. package/dist/common/DuplicableEntityType.d.ts +2 -0
  19. package/dist/common/DuplicableEntityType.js +3 -0
  20. package/dist/common/DuplicableEntityType.js.map +1 -0
  21. package/dist/components/TComponent.d.ts +3 -2
  22. package/dist/components/button/TInputButtonComponent.d.ts +2 -1
  23. package/dist/components/date/TDateComponent.d.ts +2 -1
  24. package/dist/components/date-range/TDateRangeComponent.d.ts +3 -2
  25. package/dist/components/referenced-in/TReferencedInComponent.d.ts +2 -1
  26. package/dist/components/related-card-lookup/TRelatedCardLookupComponent.d.ts +3 -2
  27. package/dist/components/scheduled-automation/TScheduledAutomationComponent.d.ts +2 -1
  28. package/dist/components/tag/TCombinedTagsComponent.d.ts +2 -1
  29. package/dist/view-template/TComponentViewOptions.d.ts +2 -1
  30. package/dist/view-template/TViewTemplate.d.ts +4 -3
  31. package/dist/workflow-entity/filters/TContainsCurrentWorkflowTemplateComponentValue.d.ts +2 -1
  32. package/dist/workflow-entity/filters/TDynamicFilterByComponent.d.ts +2 -1
  33. package/dist/workflow-entity/filters/TFilterByComponent.d.ts +2 -1
  34. package/dist/workflow-entity/filters/TFilterOneOfByComponent.d.ts +2 -1
  35. package/dist/workflow-entity/recurring/TRecurringEntitiesAutoExtendDefault.d.ts +2 -1
  36. package/dist/workflow-entity/sort/TSortByComponent.d.ts +2 -1
  37. package/dist/workflow-template/TWorkflowTemplate.d.ts +2 -1
  38. package/dist/workflow-template/components/TEntityFields.d.ts +2 -1
  39. package/dist/workflow-template/components/server/ServerComponentId.d.ts +10 -9
  40. package/dist/workflow-template/components/server/ServerComponentId.js +10 -10
  41. package/dist/workflow-template/components/server/ServerComponentId.js.map +1 -1
  42. package/package.json +1 -1
  43. package/src/automations/action/component-data/TCurrentWorkflowEntityComponent.ts +2 -1
  44. package/src/automations/action/component-data/TDynamicComponentDataForType.ts +8 -0
  45. package/src/automations/action/settings/TAutomationActionSettingsForType.ts +8 -0
  46. package/src/automations/action/settings/TReferencedInAggregate.ts +2 -1
  47. package/src/automations/action/settings/TSendEmailActionSettings.ts +3 -2
  48. package/src/automations/action/settings/TSendNotificationActionSettings.ts +2 -1
  49. package/src/automations/action/settings/TSendPushNotificationActionSettings.ts +2 -1
  50. package/src/automations/action/settings/TSettingsWorkflowEntityField.ts +2 -1
  51. package/src/automations/action/settings/TTriggerRelatedCardAutomationActionSettings.ts +2 -1
  52. package/src/automations/action/settings/TUpdateRelatedCardQuantityActionSettings.ts +2 -1
  53. package/src/automations/condition/operands/TComponentOperand.ts +2 -1
  54. package/src/automations/condition/operands/TPreviousComponentOperand.ts +2 -1
  55. package/src/automations/condition/operands/TWorkflowEntityRefComponentOperand.ts +3 -2
  56. package/src/common/DuplicableEntityType.ts +12 -0
  57. package/src/components/TComponent.ts +3 -2
  58. package/src/components/button/TInputButtonComponent.ts +2 -1
  59. package/src/components/date/TDateComponent.ts +2 -1
  60. package/src/components/date-range/TDateRangeComponent.ts +3 -2
  61. package/src/components/referenced-in/TReferencedInComponent.ts +2 -1
  62. package/src/components/related-card-lookup/TRelatedCardLookupComponent.ts +3 -2
  63. package/src/components/scheduled-automation/TScheduledAutomationComponent.ts +2 -1
  64. package/src/components/tag/TCombinedTagsComponent.ts +2 -1
  65. package/src/view-template/TComponentViewOptions.ts +2 -1
  66. package/src/view-template/TViewTemplate.ts +4 -3
  67. package/src/workflow-entity/filters/TContainsCurrentWorkflowTemplateComponentValue.ts +2 -1
  68. package/src/workflow-entity/filters/TDynamicFilterByComponent.ts +2 -1
  69. package/src/workflow-entity/filters/TFilterByComponent.ts +2 -1
  70. package/src/workflow-entity/filters/TFilterOneOfByComponent.ts +2 -1
  71. package/src/workflow-entity/recurring/TRecurringEntitiesAutoExtendDefault.ts +2 -1
  72. package/src/workflow-entity/sort/TSortByComponent.ts +2 -1
  73. package/src/workflow-template/TWorkflowTemplate.ts +2 -1
  74. package/src/workflow-template/components/TEntityFields.ts +2 -1
  75. package/src/workflow-template/components/server/ServerComponentId.ts +11 -10
  76. package/tsconfig.tsbuildinfo +1 -1
@@ -1,5 +1,6 @@
1
+ import { ComponentId } from '../../../workflow-template/components/ComponentId';
1
2
  import { DynamicComponentDataType } from './DynamicComponentDataType';
2
3
  import { TDynamicComponentData } from './TDynamicComponentData';
3
4
  export interface TCurrentWorkflowEntityComponent extends TDynamicComponentData<DynamicComponentDataType.CURRENT_WORKFLOW_ENTITY_COMPONENT> {
4
- componentId: string;
5
+ componentId: ComponentId;
5
6
  }
@@ -0,0 +1,7 @@
1
+ import { DynamicComponentDataType } from './DynamicComponentDataType';
2
+ import { TAnyDynamicComponentData } from './TAnyDynamicComponentData';
3
+ type TDynamicComponentDataMap = {
4
+ [D in TAnyDynamicComponentData as D['type']]: D;
5
+ };
6
+ export type TDynamicComponentDataForType<T extends DynamicComponentDataType> = TDynamicComponentDataMap[T];
7
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TDynamicComponentDataForType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TDynamicComponentDataForType.js","sourceRoot":"","sources":["../../../../src/automations/action/component-data/TDynamicComponentDataForType.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { AutomationActionType } from '../AutomationActionType';
2
+ import { TAnyAutomationActionSettings } from './TAnyAutomationActionSettings';
3
+ type TAutomationActionSettingsMap = {
4
+ [S in TAnyAutomationActionSettings as S['type']]: S;
5
+ };
6
+ export type TAutomationActionSettingsForType<T extends AutomationActionType> = TAutomationActionSettingsMap[T];
7
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TAutomationActionSettingsForType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TAutomationActionSettingsForType.js","sourceRoot":"","sources":["../../../../src/automations/action/settings/TAutomationActionSettingsForType.ts"],"names":[],"mappings":""}
@@ -1,7 +1,8 @@
1
1
  import { TFilterOneOfByComponent } from '../../../workflow-entity/filters/TFilterOneOfByComponent';
2
+ import { ComponentId } from '../../../workflow-template/components/ComponentId';
2
3
  import { WorkflowTemplateId } from '../../../workflow-template/WorkflowTemplateId';
3
4
  export interface TReferencedInAggregate {
4
- componentId?: string;
5
+ componentId?: ComponentId;
5
6
  inverted?: boolean;
6
7
  workflowTemplateId?: WorkflowTemplateId;
7
8
  filterByComponents?: TFilterOneOfByComponent[];
@@ -1,3 +1,4 @@
1
+ import { ComponentId } from '../../../workflow-template/components/ComponentId';
1
2
  import { WorkflowTemplateId } from '../../../workflow-template/WorkflowTemplateId';
2
3
  import { AutomationActionType } from '../AutomationActionType';
3
4
  import { TAutomationActionSettings } from './TAutomationActionSettings';
@@ -6,10 +7,10 @@ export interface TSendEmailActionSettings extends TAutomationActionSettings<Auto
6
7
  message: string;
7
8
  subject: string;
8
9
  recipientEmails?: string[];
9
- recipientsFromEmailComponentIds?: string[];
10
+ recipientsFromEmailComponentIds?: ComponentId[];
10
11
  recipientsFromRelatedCardEmail?: TRelatedCardEmail;
11
12
  replyTo?: string;
12
13
  replyToRelatedCardEmail?: TRelatedCardEmail;
13
- replyToCardComponentId?: string;
14
+ replyToCardComponentId?: ComponentId;
14
15
  workflowTemplateId?: WorkflowTemplateId;
15
16
  }
@@ -1,3 +1,4 @@
1
+ import { ComponentId } from '../../../workflow-template/components/ComponentId';
1
2
  import { WorkflowTemplateId } from '../../../workflow-template/WorkflowTemplateId';
2
3
  import { AutomationActionType } from '../AutomationActionType';
3
4
  import { TAutomationActionSettings } from './TAutomationActionSettings';
@@ -5,7 +6,7 @@ export interface TSendNotificationActionSettings extends TAutomationActionSettin
5
6
  message: string;
6
7
  subject: string;
7
8
  recipientEmails?: string[];
8
- recipientsFromEmailComponentIds?: string[];
9
+ recipientsFromEmailComponentIds?: ComponentId[];
9
10
  replyTo?: string;
10
11
  workflowTemplateId?: WorkflowTemplateId;
11
12
  }
@@ -1,11 +1,12 @@
1
1
  import { UserId } from '../../../user/UserId';
2
+ import { ComponentId } from '../../../workflow-template/components/ComponentId';
2
3
  import { WorkflowTemplateId } from '../../../workflow-template/WorkflowTemplateId';
3
4
  import { AutomationActionType } from '../AutomationActionType';
4
5
  import { TAutomationActionSettings } from './TAutomationActionSettings';
5
6
  export interface TSendPushNotificationActionSettings extends TAutomationActionSettings<AutomationActionType.SEND_PUSH_NOTIFICATION> {
6
7
  message: string;
7
8
  title: string;
8
- recipientsFromPersonComponentIds?: string[];
9
+ recipientsFromPersonComponentIds?: ComponentId[];
9
10
  recipientUserIds?: UserId[];
10
11
  workflowTemplateId?: WorkflowTemplateId;
11
12
  }
@@ -1,8 +1,9 @@
1
+ import { ComponentId } from '../../../workflow-template/components/ComponentId';
1
2
  import { TAnyComponentData } from '../../../workflow-template/components/TAnyComponentData';
2
3
  import { TAnyDynamicComponentData } from '../component-data/TAnyDynamicComponentData';
3
4
  import { ArrayValueOperation } from './ArrayValueOperation';
4
5
  export interface TSettingsWorkflowEntityField {
5
- componentId: string;
6
+ componentId: ComponentId;
6
7
  arrayValueOperation?: ArrayValueOperation;
7
8
  dynamicData?: TAnyDynamicComponentData;
8
9
  staticData?: TAnyComponentData;
@@ -1,9 +1,10 @@
1
+ import { ComponentId } from '../../../workflow-template/components/ComponentId';
1
2
  import { WorkflowTemplateId } from '../../../workflow-template/WorkflowTemplateId';
2
3
  import { AutomationId } from '../../AutomationId';
3
4
  import { AutomationActionType } from '../AutomationActionType';
4
5
  import { TAutomationActionSettings } from './TAutomationActionSettings';
5
6
  export interface TTriggerRelatedCardAutomationActionSettings extends TAutomationActionSettings<AutomationActionType.TRIGGER_RELATED_CARD_AUTOMATION> {
6
- relatedCardComponentId: string;
7
+ relatedCardComponentId: ComponentId;
7
8
  automationId?: AutomationId;
8
9
  workflowTemplateId?: WorkflowTemplateId;
9
10
  }
@@ -1,10 +1,11 @@
1
+ import { ComponentId } from '../../../workflow-template/components/ComponentId';
1
2
  import { TAnyComponentData } from '../../../workflow-template/components/TAnyComponentData';
2
3
  import { WorkflowTemplateId } from '../../../workflow-template/WorkflowTemplateId';
3
4
  import { AutomationActionType } from '../AutomationActionType';
4
5
  import { TAnyDynamicNumberComponentData } from '../component-data/TAnyDynamicNumberComponentData';
5
6
  import { TAutomationActionSettings } from './TAutomationActionSettings';
6
7
  export interface TUpdateRelatedCardQuantityActionSettings extends TAutomationActionSettings<AutomationActionType.UPDATE_RELATED_CARD_QUANTITY> {
7
- relatedCardComponentId: string;
8
+ relatedCardComponentId: ComponentId;
8
9
  dynamicData?: TAnyDynamicNumberComponentData;
9
10
  staticData?: TAnyComponentData;
10
11
  workflowTemplateId?: WorkflowTemplateId;
@@ -1,7 +1,8 @@
1
+ import { ComponentId } from '../../../workflow-template/components/ComponentId';
1
2
  import { ScalarKey } from '../../../workflow-template/components/scalar/ScalarKey';
2
3
  import { OperandType } from './OperandType';
3
4
  import { TOperand } from './TOperand';
4
5
  export interface TComponentOperand extends TOperand<OperandType.COMPONENT> {
5
- componentId: string;
6
+ componentId: ComponentId;
6
7
  scalarKey?: ScalarKey;
7
8
  }
@@ -1,5 +1,6 @@
1
+ import { ComponentId } from '../../../workflow-template/components/ComponentId';
1
2
  import { OperandType } from './OperandType';
2
3
  import { TOperand } from './TOperand';
3
4
  export interface TPreviousComponentOperand extends TOperand<OperandType.PREVIOUS_COMPONENT> {
4
- componentId: string;
5
+ componentId: ComponentId;
5
6
  }
@@ -1,8 +1,9 @@
1
+ import { ComponentId } from '../../../workflow-template/components/ComponentId';
1
2
  import { WorkflowTemplateId } from '../../../workflow-template/WorkflowTemplateId';
2
3
  import { OperandType } from './OperandType';
3
4
  import { TOperand } from './TOperand';
4
5
  export interface TWorkflowEntityRefComponentOperand extends TOperand<OperandType.WORKFLOW_ENTITY_REF_COMPONENT> {
5
- componentId: string;
6
- refComponentId: string;
6
+ componentId: ComponentId;
7
+ refComponentId: ComponentId;
7
8
  refWorkflowTemplateId?: WorkflowTemplateId;
8
9
  }
@@ -0,0 +1,2 @@
1
+ import { EntityType } from './EntityType';
2
+ export type DuplicableEntityType = EntityType.AUTOMATION | EntityType.AUTOMATION_ACTION | EntityType.CHANNEL | EntityType.RECURRING_ENTITIES_SCHEDULE | EntityType.VIEW_TEMPLATE | EntityType.VIEW_TEMPLATE_LAYOUT | EntityType.VIEW_TEMPLATE_LAYOUT_ITEM | EntityType.WORKFLOW_ENTITY | EntityType.WORKFLOW_TEMPLATE;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=DuplicableEntityType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DuplicableEntityType.js","sourceRoot":"","sources":["../../src/common/DuplicableEntityType.ts"],"names":[],"mappings":""}
@@ -1,10 +1,11 @@
1
+ import { ComponentId } from '../workflow-template/components/ComponentId';
1
2
  import { ComponentType } from '../workflow-template/components/ComponentType';
2
3
  export interface TComponent<T extends ComponentType = ComponentType> {
3
- id: string;
4
+ id: ComponentId;
4
5
  type: T;
5
6
  archivedAt?: Date;
6
7
  isHidden?: boolean;
7
8
  isServerManaged?: boolean;
8
9
  locked?: boolean;
9
- managedByComponentId?: string;
10
+ managedByComponentId?: ComponentId;
10
11
  }
@@ -1,5 +1,6 @@
1
+ import { ComponentId } from '../../workflow-template/components/ComponentId';
1
2
  import { ComponentType } from '../../workflow-template/components/ComponentType';
2
3
  import { TButtonComponent } from './TButtonComponent';
3
4
  export interface TInputButtonComponent extends TButtonComponent<ComponentType.INPUT_BUTTON> {
4
- inputComponentId: string;
5
+ inputComponentId: ComponentId;
5
6
  }
@@ -1,10 +1,11 @@
1
1
  import { TRecurringEntitiesAutoExtendDefault } from '../../workflow-entity/recurring/TRecurringEntitiesAutoExtendDefault';
2
+ import { ComponentId } from '../../workflow-template/components/ComponentId';
2
3
  import { ComponentType } from '../../workflow-template/components/ComponentType';
3
4
  import { TInputComponent } from '../TInputComponent';
4
5
  import { TDateDefault } from './TDateDefault';
5
6
  export interface TDateComponent extends TInputComponent<ComponentType.DATE> {
6
7
  allowEntityBatchCreation?: boolean;
7
8
  autoExtendDefault?: TRecurringEntitiesAutoExtendDefault;
8
- autoExtendImpliedFilterComponentId?: string;
9
+ autoExtendImpliedFilterComponentId?: ComponentId;
9
10
  default?: TDateDefault;
10
11
  }
@@ -1,6 +1,7 @@
1
+ import { ComponentId } from '../../workflow-template/components/ComponentId';
1
2
  import { ComponentType } from '../../workflow-template/components/ComponentType';
2
3
  import { TPresentationComponent } from '../TPresentationComponent';
3
4
  export interface TDateRangeComponent extends TPresentationComponent<ComponentType.DATE_RANGE> {
4
- startDateComponentId: string;
5
- endDateComponentId: string;
5
+ startDateComponentId: ComponentId;
6
+ endDateComponentId: ComponentId;
6
7
  }
@@ -1,10 +1,11 @@
1
1
  import { ViewTemplateId } from '../../view-template/ViewTemplateId';
2
+ import { ComponentId } from '../../workflow-template/components/ComponentId';
2
3
  import { ComponentType } from '../../workflow-template/components/ComponentType';
3
4
  import { WorkflowTemplateId } from '../../workflow-template/WorkflowTemplateId';
4
5
  import { TComponent } from '../TComponent';
5
6
  export interface TReferencedInComponent extends TComponent<ComponentType.REFERENCED_IN> {
6
7
  referencedFromWorkflowTemplateId: WorkflowTemplateId;
7
- relatedCardComponentId: string;
8
+ relatedCardComponentId: ComponentId;
8
9
  label?: string;
9
10
  referencingViewTemplateId?: ViewTemplateId;
10
11
  }
@@ -1,11 +1,12 @@
1
1
  import type { Icon } from '@coast/schemas';
2
+ import { ComponentId } from '../../workflow-template/components/ComponentId';
2
3
  import { ComponentType } from '../../workflow-template/components/ComponentType';
3
4
  import { WorkflowTemplateId } from '../../workflow-template/WorkflowTemplateId';
4
5
  import { TComponent } from '../TComponent';
5
6
  export interface TRelatedCardLookupComponent extends TComponent<ComponentType.RELATED_CARD_LOOKUP> {
6
- lookupComponentId: string;
7
+ lookupComponentId: ComponentId;
7
8
  lookupWorkflowTemplateId: WorkflowTemplateId;
8
- relatedCardComponentId: string;
9
+ relatedCardComponentId: ComponentId;
9
10
  readonly?: boolean;
10
11
  icon?: Icon;
11
12
  isFilterable?: boolean;
@@ -1,9 +1,10 @@
1
1
  import { AutomationId } from '../../automations/AutomationId';
2
+ import { ComponentId } from '../../workflow-template/components/ComponentId';
2
3
  import { ComponentType } from '../../workflow-template/components/ComponentType';
3
4
  import { TInputComponent } from '../TInputComponent';
4
5
  import { TScheduledAutomationDefault } from './TScheduledAutomationDefault';
5
6
  export interface TScheduledAutomationComponent extends TInputComponent<ComponentType.SCHEDULED_AUTOMATION> {
6
- dateComponentId: string;
7
+ dateComponentId: ComponentId;
7
8
  automationId?: AutomationId;
8
9
  default?: TScheduledAutomationDefault;
9
10
  scheduleImmediatelyIfInPast?: boolean;
@@ -1,8 +1,9 @@
1
1
  import type { Icon } from '@coast/schemas';
2
+ import { ComponentId } from '../../workflow-template/components/ComponentId';
2
3
  import { ComponentType } from '../../workflow-template/components/ComponentType';
3
4
  import { TComponent } from '../TComponent';
4
5
  export interface TCombinedTagsComponent extends TComponent<ComponentType.COMBINED_TAGS> {
5
- componentIds: string[];
6
+ componentIds: ComponentId[];
6
7
  icon?: Icon;
7
8
  label?: string;
8
9
  }
@@ -1,6 +1,7 @@
1
1
  import { TAnyComponentOverride } from '../components/TAnyComponentOverride';
2
+ import { ComponentId } from '../workflow-template/components/ComponentId';
2
3
  export interface TComponentViewOptions {
3
- componentId: string;
4
+ componentId: ComponentId;
4
5
  isHidden?: boolean;
5
6
  overrides?: TAnyComponentOverride;
6
7
  }
@@ -1,4 +1,5 @@
1
1
  import { TAudit } from '../application/TAudit';
2
+ import { ComponentId } from '../workflow-template/components/ComponentId';
2
3
  import { WorkflowTemplateId } from '../workflow-template/WorkflowTemplateId';
3
4
  import { TCollectionCriteria } from './TCollectionCriteria';
4
5
  import { TComponentViewOptions } from './TComponentViewOptions';
@@ -15,7 +16,7 @@ export interface TViewTemplate extends TAudit {
15
16
  sortOrder?: number;
16
17
  isPublic?: boolean;
17
18
  deletedAt?: Date;
18
- calendarDateComponentId?: string;
19
+ calendarDateComponentId?: ComponentId;
19
20
  calendarHideWeekends?: boolean;
20
21
  collectionCriteria?: TCollectionCriteria;
21
22
  componentsViewOptions?: TComponentViewOptions[];
@@ -23,11 +24,11 @@ export interface TViewTemplate extends TAudit {
23
24
  defaultHiddenLabels?: boolean;
24
25
  defaultReadonlyComponents?: boolean;
25
26
  displayInCards?: boolean;
26
- checklistTagComponentId?: string;
27
+ checklistTagComponentId?: ComponentId;
27
28
  displayMessageThread?: boolean;
28
29
  summarizeReadonlyTags?: boolean;
29
30
  displayLegacyRecurrence?: boolean;
30
31
  displayLegacyReminders?: boolean;
31
32
  displayLegacyStatusButton?: boolean;
32
- groupByComponentId?: string;
33
+ groupByComponentId?: ComponentId;
33
34
  }
@@ -1,3 +1,4 @@
1
+ import { ComponentId } from '../../workflow-template/components/ComponentId';
1
2
  export interface TContainsCurrentWorkflowTemplateComponentValue {
2
- componentId: string;
3
+ componentId: ComponentId;
3
4
  }
@@ -1,5 +1,6 @@
1
+ import { ComponentId } from '../../workflow-template/components/ComponentId';
1
2
  import { TDynamicFilterOneOf } from './TDynamicFilterOneOf';
2
3
  export interface TDynamicFilterByComponent {
3
- componentId: string;
4
+ componentId: ComponentId;
4
5
  value: TDynamicFilterOneOf;
5
6
  }
@@ -1,5 +1,6 @@
1
+ import { ComponentId } from '../../workflow-template/components/ComponentId';
1
2
  import { TAnyFilter } from './TAnyFilter';
2
3
  export interface TFilterByComponent {
3
- componentId: string;
4
+ componentId: ComponentId;
4
5
  value: TAnyFilter;
5
6
  }
@@ -1,5 +1,6 @@
1
+ import { ComponentId } from '../../workflow-template/components/ComponentId';
1
2
  import { TFilterOneOf } from './TFilterOneOf';
2
3
  export interface TFilterOneOfByComponent {
3
- componentId: string;
4
+ componentId: ComponentId;
4
5
  value: TFilterOneOf;
5
6
  }
@@ -1,6 +1,7 @@
1
+ import { ComponentId } from '../../workflow-template/components/ComponentId';
1
2
  import { TFilterOneOfByComponent } from '../filters/TFilterOneOfByComponent';
2
3
  export interface TRecurringEntitiesAutoExtendDefault {
3
4
  minimumInSeries: number;
4
- impliedFilterComponentId?: string;
5
+ impliedFilterComponentId?: ComponentId;
5
6
  seriesFilter?: TFilterOneOfByComponent[];
6
7
  }
@@ -1,5 +1,6 @@
1
1
  import { SortDirection } from '../../common/SortDirection';
2
+ import { ComponentId } from '../../workflow-template/components/ComponentId';
2
3
  export interface TSortByComponent {
3
- componentId: string;
4
+ componentId: ComponentId;
4
5
  direction: SortDirection;
5
6
  }
@@ -5,6 +5,7 @@ import { UserId } from '../user/UserId';
5
5
  import { TViewTemplate } from '../view-template/TViewTemplate';
6
6
  import { TWorkflowTemplateBehavior } from './behaviors/TWorkflowTemplateBehavior';
7
7
  import { TChannelDefaultConfiguration } from './channel-default-configuration/TChannelDefaultConfiguration';
8
+ import { ComponentId } from './components/ComponentId';
8
9
  import { TViewTemplateDefaults } from './TViewTemplateDefaults';
9
10
  import { WorkflowTemplateId } from './WorkflowTemplateId';
10
11
  export interface TWorkflowTemplate extends TAudit {
@@ -17,7 +18,7 @@ export interface TWorkflowTemplate extends TAudit {
17
18
  isPublic?: boolean;
18
19
  originalId?: WorkflowTemplateId;
19
20
  parentId?: WorkflowTemplateId;
20
- defaultSortComponentId?: string;
21
+ defaultSortComponentId?: ComponentId;
21
22
  deletedAt?: Date;
22
23
  components: TAnyComponent[];
23
24
  archivedComponents?: TAnyComponent[];
@@ -1,2 +1,3 @@
1
+ import { ComponentId } from './ComponentId';
1
2
  import { TAnyComponentDataValue } from './TAnyComponentDataValue';
2
- export type TEntityFields = Record<string, TAnyComponentDataValue | null>;
3
+ export type TEntityFields = Record<ComponentId, TAnyComponentDataValue | null>;
@@ -1,9 +1,10 @@
1
- export declare enum ServerComponentId {
2
- cardLinkUrl = "cardLinkUrl",
3
- createdAt = "createdAt",
4
- deletedAt = "deletedAt",
5
- entityBatch = "entityBatch",
6
- sequenceNumber = "sequenceNumber",
7
- updatedAt = "updatedAt",
8
- userId = "userId"
9
- }
1
+ import { ComponentId } from '../ComponentId';
2
+ export declare const ServerComponentId: {
3
+ readonly cardLinkUrl: ComponentId;
4
+ readonly createdAt: ComponentId;
5
+ readonly deletedAt: ComponentId;
6
+ readonly entityBatch: ComponentId;
7
+ readonly sequenceNumber: ComponentId;
8
+ readonly updatedAt: ComponentId;
9
+ readonly userId: ComponentId;
10
+ };
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ServerComponentId = void 0;
4
- var ServerComponentId;
5
- (function (ServerComponentId) {
6
- ServerComponentId["cardLinkUrl"] = "cardLinkUrl";
7
- ServerComponentId["createdAt"] = "createdAt";
8
- ServerComponentId["deletedAt"] = "deletedAt";
9
- ServerComponentId["entityBatch"] = "entityBatch";
10
- ServerComponentId["sequenceNumber"] = "sequenceNumber";
11
- ServerComponentId["updatedAt"] = "updatedAt";
12
- ServerComponentId["userId"] = "userId";
13
- })(ServerComponentId || (exports.ServerComponentId = ServerComponentId = {}));
4
+ const ComponentId_1 = require("../ComponentId");
5
+ exports.ServerComponentId = {
6
+ cardLinkUrl: (0, ComponentId_1.ComponentId)('cardLinkUrl'),
7
+ createdAt: (0, ComponentId_1.ComponentId)('createdAt'),
8
+ deletedAt: (0, ComponentId_1.ComponentId)('deletedAt'),
9
+ entityBatch: (0, ComponentId_1.ComponentId)('entityBatch'),
10
+ sequenceNumber: (0, ComponentId_1.ComponentId)('sequenceNumber'),
11
+ updatedAt: (0, ComponentId_1.ComponentId)('updatedAt'),
12
+ userId: (0, ComponentId_1.ComponentId)('userId'),
13
+ };
14
14
  //# sourceMappingURL=ServerComponentId.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ServerComponentId.js","sourceRoot":"","sources":["../../../../src/workflow-template/components/server/ServerComponentId.ts"],"names":[],"mappings":";;;AACA,IAAY,iBAQX;AARD,WAAY,iBAAiB;IACzB,gDAA2B,CAAA;IAC3B,4CAAuB,CAAA;IACvB,4CAAuB,CAAA;IACvB,gDAA2B,CAAA;IAC3B,sDAAiC,CAAA;IACjC,4CAAuB,CAAA;IACvB,sCAAiB,CAAA;AACrB,CAAC,EARW,iBAAiB,aAAjB,iBAAiB,GAAjB,iBAAiB,QAQ5B"}
1
+ {"version":3,"file":"ServerComponentId.js","sourceRoot":"","sources":["../../../../src/workflow-template/components/server/ServerComponentId.ts"],"names":[],"mappings":";;;AAAA,gDAA6C;AAEhC,QAAA,iBAAiB,GAAG;IAC7B,WAAW,EAAE,IAAA,yBAAW,EAAC,aAAa,CAAC;IACvC,SAAS,EAAE,IAAA,yBAAW,EAAC,WAAW,CAAC;IACnC,SAAS,EAAE,IAAA,yBAAW,EAAC,WAAW,CAAC;IACnC,WAAW,EAAE,IAAA,yBAAW,EAAC,aAAa,CAAC;IACvC,cAAc,EAAE,IAAA,yBAAW,EAAC,gBAAgB,CAAC;IAC7C,SAAS,EAAE,IAAA,yBAAW,EAAC,WAAW,CAAC;IACnC,MAAM,EAAE,IAAA,yBAAW,EAAC,QAAQ,CAAC;CACvB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coast/core-types",
3
- "version": "0.0.56",
3
+ "version": "0.0.58",
4
4
  "author": "Coast Engineering",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -1,6 +1,7 @@
1
+ import { ComponentId } from '../../../workflow-template/components/ComponentId';
1
2
  import { DynamicComponentDataType } from './DynamicComponentDataType';
2
3
  import { TDynamicComponentData } from './TDynamicComponentData';
3
4
 
4
5
  export interface TCurrentWorkflowEntityComponent extends TDynamicComponentData<DynamicComponentDataType.CURRENT_WORKFLOW_ENTITY_COMPONENT> {
5
- componentId: string;
6
+ componentId: ComponentId;
6
7
  }
@@ -0,0 +1,8 @@
1
+ import { DynamicComponentDataType } from './DynamicComponentDataType';
2
+ import { TAnyDynamicComponentData } from './TAnyDynamicComponentData';
3
+
4
+ type TDynamicComponentDataMap = {
5
+ [D in TAnyDynamicComponentData as D['type']]: D;
6
+ };
7
+
8
+ export type TDynamicComponentDataForType<T extends DynamicComponentDataType> = TDynamicComponentDataMap[T];
@@ -0,0 +1,8 @@
1
+ import { AutomationActionType } from '../AutomationActionType';
2
+ import { TAnyAutomationActionSettings } from './TAnyAutomationActionSettings';
3
+
4
+ type TAutomationActionSettingsMap = {
5
+ [S in TAnyAutomationActionSettings as S['type']]: S;
6
+ };
7
+
8
+ export type TAutomationActionSettingsForType<T extends AutomationActionType> = TAutomationActionSettingsMap[T];
@@ -1,11 +1,12 @@
1
1
  import { TFilterOneOfByComponent } from '../../../workflow-entity/filters/TFilterOneOfByComponent';
2
+ import { ComponentId } from '../../../workflow-template/components/ComponentId';
2
3
  import { WorkflowTemplateId } from '../../../workflow-template/WorkflowTemplateId';
3
4
 
4
5
  export interface TReferencedInAggregate {
5
6
  /**
6
7
  * The Related Card Component on the workflowTemplateId that points to the Trigger Card.
7
8
  */
8
- componentId?: string;
9
+ componentId?: ComponentId;
9
10
  inverted?: boolean;
10
11
  /**
11
12
  * Workflow Template that has a Related Card Component pointing to the Trigger Card's
@@ -1,3 +1,4 @@
1
+ import { ComponentId } from '../../../workflow-template/components/ComponentId';
1
2
  import { WorkflowTemplateId } from '../../../workflow-template/WorkflowTemplateId';
2
3
  import { AutomationActionType } from '../AutomationActionType';
3
4
  import { TAutomationActionSettings } from './TAutomationActionSettings';
@@ -7,10 +8,10 @@ export interface TSendEmailActionSettings extends TAutomationActionSettings<Auto
7
8
  message: string;
8
9
  subject: string;
9
10
  recipientEmails?: string[];
10
- recipientsFromEmailComponentIds?: string[];
11
+ recipientsFromEmailComponentIds?: ComponentId[];
11
12
  recipientsFromRelatedCardEmail?: TRelatedCardEmail;
12
13
  replyTo?: string;
13
14
  replyToRelatedCardEmail?: TRelatedCardEmail;
14
- replyToCardComponentId?: string;
15
+ replyToCardComponentId?: ComponentId;
15
16
  workflowTemplateId?: WorkflowTemplateId;
16
17
  }
@@ -1,3 +1,4 @@
1
+ import { ComponentId } from '../../../workflow-template/components/ComponentId';
1
2
  import { WorkflowTemplateId } from '../../../workflow-template/WorkflowTemplateId';
2
3
  import { AutomationActionType } from '../AutomationActionType';
3
4
  import { TAutomationActionSettings } from './TAutomationActionSettings';
@@ -6,7 +7,7 @@ export interface TSendNotificationActionSettings extends TAutomationActionSettin
6
7
  message: string;
7
8
  subject: string;
8
9
  recipientEmails?: string[];
9
- recipientsFromEmailComponentIds?: string[];
10
+ recipientsFromEmailComponentIds?: ComponentId[];
10
11
  replyTo?: string;
11
12
  workflowTemplateId?: WorkflowTemplateId;
12
13
  }
@@ -1,4 +1,5 @@
1
1
  import { UserId } from '../../../user/UserId';
2
+ import { ComponentId } from '../../../workflow-template/components/ComponentId';
2
3
  import { WorkflowTemplateId } from '../../../workflow-template/WorkflowTemplateId';
3
4
  import { AutomationActionType } from '../AutomationActionType';
4
5
  import { TAutomationActionSettings } from './TAutomationActionSettings';
@@ -6,7 +7,7 @@ import { TAutomationActionSettings } from './TAutomationActionSettings';
6
7
  export interface TSendPushNotificationActionSettings extends TAutomationActionSettings<AutomationActionType.SEND_PUSH_NOTIFICATION> {
7
8
  message: string;
8
9
  title: string;
9
- recipientsFromPersonComponentIds?: string[];
10
+ recipientsFromPersonComponentIds?: ComponentId[];
10
11
  recipientUserIds?: UserId[];
11
12
  workflowTemplateId?: WorkflowTemplateId;
12
13
  }
@@ -1,9 +1,10 @@
1
+ import { ComponentId } from '../../../workflow-template/components/ComponentId';
1
2
  import { TAnyComponentData } from '../../../workflow-template/components/TAnyComponentData';
2
3
  import { TAnyDynamicComponentData } from '../component-data/TAnyDynamicComponentData';
3
4
  import { ArrayValueOperation } from './ArrayValueOperation';
4
5
 
5
6
  export interface TSettingsWorkflowEntityField {
6
- componentId: string;
7
+ componentId: ComponentId;
7
8
  arrayValueOperation?: ArrayValueOperation;
8
9
  dynamicData?: TAnyDynamicComponentData;
9
10
  staticData?: TAnyComponentData;
@@ -1,10 +1,11 @@
1
+ import { ComponentId } from '../../../workflow-template/components/ComponentId';
1
2
  import { WorkflowTemplateId } from '../../../workflow-template/WorkflowTemplateId';
2
3
  import { AutomationId } from '../../AutomationId';
3
4
  import { AutomationActionType } from '../AutomationActionType';
4
5
  import { TAutomationActionSettings } from './TAutomationActionSettings';
5
6
 
6
7
  export interface TTriggerRelatedCardAutomationActionSettings extends TAutomationActionSettings<AutomationActionType.TRIGGER_RELATED_CARD_AUTOMATION> {
7
- relatedCardComponentId: string;
8
+ relatedCardComponentId: ComponentId;
8
9
  automationId?: AutomationId;
9
10
  workflowTemplateId?: WorkflowTemplateId;
10
11
  }