@elyx-code/project-logic-tree 0.0.6161 → 0.0.6162

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 (63) hide show
  1. package/dist/definitions/mock/default-mock/installed-projects/mock-third-party-project.d.ts +0 -1
  2. package/dist/definitions/types/event.d.ts +1 -4
  3. package/dist/definitions/types/function.d.ts +1 -4
  4. package/dist/definitions/types/loop.d.ts +1 -7
  5. package/dist/definitions/types/primitives.d.ts +8 -4
  6. package/dist/index.js +38870 -32143
  7. package/dist/index.umd.cjs +262 -260
  8. package/dist/tree/built-in/operations/definition-entity/validate-data.d.ts +7 -7
  9. package/dist/tree/state/action-descriptor/action-descriptor.d.ts +30 -24
  10. package/dist/tree/state/argument-declaration/argument-declaration.d.ts +32 -22
  11. package/dist/tree/state/argument-declaration/validation/validation-schema.d.ts +4 -4
  12. package/dist/tree/state/base.d.ts +26 -15
  13. package/dist/tree/state/break-statement/break-statement.d.ts +34 -25
  14. package/dist/tree/state/break-statement/validation/validation-schema.d.ts +4 -4
  15. package/dist/tree/state/built-in-base-entity/built-in-base-entity.d.ts +2 -14
  16. package/dist/tree/state/change-set.d.ts +71 -0
  17. package/dist/tree/state/change-set.test.d.ts +1 -0
  18. package/dist/tree/state/condition/condition.d.ts +36 -27
  19. package/dist/tree/state/condition/validation/validation-schema.d.ts +4 -4
  20. package/dist/tree/state/continue-statement/continue-statement.d.ts +34 -25
  21. package/dist/tree/state/continue-statement/validation/validation-schema.d.ts +4 -4
  22. package/dist/tree/state/data-type/data-type.d.ts +31 -22
  23. package/dist/tree/state/data-type/validation/validation-schema.d.ts +2657 -237
  24. package/dist/tree/state/definition-entity/definition-entity.d.ts +35 -25
  25. package/dist/tree/state/definition-entity/validation/validation-schema.d.ts +8 -8
  26. package/dist/tree/state/function-call/function-call.d.ts +39 -29
  27. package/dist/tree/state/function-call/validation/validation-schema.d.ts +4 -4
  28. package/dist/tree/state/function-declaration/function-declaration.d.ts +33 -24
  29. package/dist/tree/state/function-declaration/validation/validation-schema.d.ts +6 -6
  30. package/dist/tree/state/global-event/global-event.d.ts +30 -24
  31. package/dist/tree/state/global-event/validation/validation-schema.d.ts +4 -4
  32. package/dist/tree/state/index.d.ts +1 -0
  33. package/dist/tree/state/input-map/input-map.d.ts +31 -21
  34. package/dist/tree/state/input-map/validation/validation-schema.d.ts +8825 -1565
  35. package/dist/tree/state/installed-project/installed-project.d.ts +27 -21
  36. package/dist/tree/state/installed-project/validation/validation-schema.d.ts +4 -4
  37. package/dist/tree/state/internal-call/internal-call.d.ts +38 -29
  38. package/dist/tree/state/literal-value/literal-value.d.ts +35 -23
  39. package/dist/tree/state/literal-value/validation/validation-schema.d.ts +1976 -182
  40. package/dist/tree/state/loop/loop.d.ts +48 -39
  41. package/dist/tree/state/loop/validation/validation-schema.d.ts +4 -4
  42. package/dist/tree/state/operation/operation.d.ts +38 -29
  43. package/dist/tree/state/operation/validation/validation-schema.d.ts +4 -4
  44. package/dist/tree/state/output-map/output-map.d.ts +31 -21
  45. package/dist/tree/state/primitive-entity/primitive-entity.d.ts +0 -13
  46. package/dist/tree/state/project/project.d.ts +39 -24
  47. package/dist/tree/state/property/property.d.ts +32 -22
  48. package/dist/tree/state/return-declaration/return-declaration.d.ts +32 -22
  49. package/dist/tree/state/return-statement/return-statement.d.ts +34 -25
  50. package/dist/tree/state/return-statement/validation/validation-schema.d.ts +4 -4
  51. package/dist/tree/state/search/search.d.ts +36 -27
  52. package/dist/tree/state/search/validation/validation-schema.d.ts +4 -4
  53. package/dist/tree/state/types/index.d.ts +0 -26
  54. package/dist/tree/state/value-descriptor/value-descriptor.d.ts +30 -21
  55. package/dist/tree/state/variable-declaration/validation/validation-schema.d.ts +4 -4
  56. package/dist/tree/state/variable-declaration/variable-declaration.d.ts +40 -32
  57. package/dist/tree/state/variable-instance/validation/validation-schema.d.ts +4 -4
  58. package/dist/tree/state/variable-instance/variable-instance.d.ts +39 -28
  59. package/dist/tree/state/version.d.ts +1 -1
  60. package/dist/tree/utils/data-type.d.ts +2 -2
  61. package/dist/tree/utils/index.d.ts +2 -1
  62. package/dist/tree/utils/shared-data-structure-entity.d.ts +7 -7
  63. package/package.json +1 -1
@@ -2264,8 +2264,6 @@ export declare function getVariableDeclarationSchema(): z.ZodObject<z.objectUtil
2264
2264
  entityId: string;
2265
2265
  };
2266
2266
  version: number;
2267
- x: number;
2268
- y: number;
2269
2267
  dataType: Record<string, any> | {
2270
2268
  type: EntityType.DataType;
2271
2269
  } | null;
@@ -2396,6 +2394,8 @@ export declare function getVariableDeclarationSchema(): z.ZodObject<z.objectUtil
2396
2394
  } | {
2397
2395
  type: EntityType.VariableInstance;
2398
2396
  })[];
2397
+ x: number;
2398
+ y: number;
2399
2399
  readsValue: Record<string, any> | {
2400
2400
  type: EntityType.OutputMap;
2401
2401
  } | {
@@ -2534,8 +2534,6 @@ export declare function getVariableDeclarationSchema(): z.ZodObject<z.objectUtil
2534
2534
  entityId: string;
2535
2535
  };
2536
2536
  version: number;
2537
- x: number;
2538
- y: number;
2539
2537
  dataType: Record<string, any> | {
2540
2538
  type: EntityType.DataType;
2541
2539
  } | null;
@@ -2666,6 +2664,8 @@ export declare function getVariableDeclarationSchema(): z.ZodObject<z.objectUtil
2666
2664
  } | {
2667
2665
  type: EntityType.VariableInstance;
2668
2666
  })[];
2667
+ x: number;
2668
+ y: number;
2669
2669
  readsValue: Record<string, any> | {
2670
2670
  type: EntityType.OutputMap;
2671
2671
  } | {
@@ -1,8 +1,8 @@
1
1
  import { ElementGenerationTarget, ElementShallowTransfer, EntityId, EntityType, EntityVersion, IVariableDeclaration, IVariableDeclarationGenerationTarget, IVariableDeclarationReference, IVariableDeclarationShallowTransfer, IVariableDeclarationTransfer, IVariableInstanceTransfer, VariableDeclarationTypesUnion } from '../../../definitions';
2
2
  import { ZodError } from 'zod';
3
- import { BaseCanvasDraggableState, BaseState, CallableEntityClass, ChildEntityState, EntityWithValueClass, IEditableEntityPersistanceRepository, IEntityJSONCloneOptions, IEntityPersistanceOptions, IEntityRecursionOptions, PassThroughCallableEntityClass, UserManagedEntityStateFunctionality, ValueReadingEntityClass, ValueWritingEntityClass } from '../base';
3
+ import { BaseCanvasDraggableState, BaseState, CallableEntityClass, ChildEntityState, EntityWithValueClass, IEditableEntityPersistanceRepository, IEntityJSONCloneOptions, IEntityPersistanceOptions, IEntityRecursionOptions, PassThroughCallableEntityClass, UserManagedEntityStateTemplate, ValueReadingEntityClass, ValueWritingEntityClass } from '../base';
4
4
  import { DataTypeState } from '../data-type';
5
- import { CallableEntityState, CallerEntityState, EntityState, EntityWithLogicScopeState, EntryPointEntityState, IChangeSet, PassThroughCallableEntityState, ValueReadingEntityState, ValueWritingEntityState } from '../types';
5
+ import { CallableEntityState, CallerEntityState, EntityState, EntityWithLogicScopeState, EntryPointEntityState, PassThroughCallableEntityState, UserManagedEntityState, ValueReadingEntityState, ValueWritingEntityState } from '../types';
6
6
  import { ProjectState } from '../project/project';
7
7
  import { VariableOutputMapState } from '../output-map';
8
8
  import { InternalCallState } from '../internal-call';
@@ -11,8 +11,13 @@ import { EntityError, EntityGenerationError } from '../error';
11
11
  import { LiteralValueState } from '../literal-value';
12
12
  import { VariableInstanceState } from '../variable-instance';
13
13
  import { VersionedState } from '../version';
14
+ import { ChangeSet, IChangeSet } from '../change-set';
14
15
 
15
- export declare class VariableDeclarationState extends VersionedState implements IVariableDeclaration, BaseState, UserManagedEntityStateFunctionality, ValueWritingEntityClass, ValueReadingEntityClass, BaseCanvasDraggableState, ChildEntityState, EntityWithValueClass, PassThroughCallableEntityClass, CallableEntityClass {
16
+ export declare enum VariableDeclarationDependencyField {
17
+ Parent = "parent",
18
+ DataTypeEntity = "data-type-entity"
19
+ }
20
+ export declare class VariableDeclarationState extends VersionedState implements IVariableDeclaration, BaseState, UserManagedEntityStateTemplate, ValueWritingEntityClass, ValueReadingEntityClass, BaseCanvasDraggableState, ChildEntityState, EntityWithValueClass, PassThroughCallableEntityClass, CallableEntityClass {
16
21
  initialData: IVariableDeclaration | IVariableDeclarationTransfer;
17
22
  readonly id: EntityId;
18
23
  name: string;
@@ -35,12 +40,16 @@ export declare class VariableDeclarationState extends VersionedState implements
35
40
  errorCalls: CallableEntityState[];
36
41
  internalCalls: InternalCallState[];
37
42
  parent: EntityWithLogicScopeState | ProjectState;
38
- variableInstances: VariableInstanceState[];
39
43
  errors: EntityError[];
40
44
  project: ProjectState;
45
+ detachedDependents: Record<EntityId, {
46
+ entity: UserManagedEntityState;
47
+ field: string;
48
+ }>;
41
49
  knownVersions: Map<string, EntityState> | null;
42
50
  activeVersion: boolean;
43
51
  initialized: boolean;
52
+ startedInitialization: boolean;
44
53
  suggestion: boolean;
45
54
  constructor(initialData: IVariableDeclaration | IVariableDeclarationTransfer, parentProjectState: ProjectState);
46
55
  static repository: IEditableEntityPersistanceRepository;
@@ -65,16 +74,26 @@ export declare class VariableDeclarationState extends VersionedState implements
65
74
  errors: EntityGenerationError[];
66
75
  modifiedData: IVariableDeclarationGenerationTarget;
67
76
  };
77
+ get variableInstances(): VariableInstanceState[];
68
78
  validateGeneratedUpdate(data: Partial<IVariableDeclarationGenerationTarget>): {
69
79
  errors: EntityGenerationError[];
70
80
  modifiedData: Partial<IVariableDeclarationGenerationTarget>;
71
81
  };
82
+ subscribeDependents(dependencies: {
83
+ entity: UserManagedEntityState;
84
+ field: string;
85
+ }[]): UserManagedEntityState;
86
+ syncDependents(): IChangeSet<UserManagedEntityState>;
87
+ onDetachedDependencyRemoved(_dependency: UserManagedEntityState, field: string, changeSet: ChangeSet | null): IChangeSet<UserManagedEntityState>;
88
+ onDetachedDependencyRestored(_dependency: UserManagedEntityState, field: string, changeSet: ChangeSet | null): IChangeSet<UserManagedEntityState>;
89
+ subscribeToDependencies(): UserManagedEntityState;
90
+ increaseVersion(sharedTimestamp: null | string): UserManagedEntityState;
72
91
  captureVersion(): VariableDeclarationState;
73
- recursiveCaptureUpstreamVersions(): IChangeSet<VariableDeclarationState>;
92
+ recursiveCaptureUpstreamVersions(sharedTimestamp: null | string): IChangeSet<VariableDeclarationState>;
74
93
  restoreVersion(versionId: EntityVersion): Promise<IChangeSet<VariableDeclarationState>>;
75
94
  hydrateAncestors(): IChangeSet<VariableDeclarationState>;
76
- afterAllChildrenInitialized(): IChangeSet<VariableDeclarationState>;
77
- addSelfToProject(): IChangeSet<VariableDeclarationState>;
95
+ afterAllChildrenInitialized(changeSet?: ChangeSet | null): IChangeSet<VariableDeclarationState>;
96
+ addSelfToProject(changeSet?: ChangeSet | null): IChangeSet<VariableDeclarationState>;
78
97
  get calledBy(): CallerEntityState[];
79
98
  get usedInputs(): VariableInputMapState[];
80
99
  get unusedInputs(): VariableInputMapState[];
@@ -86,45 +105,34 @@ export declare class VariableDeclarationState extends VersionedState implements
86
105
  addInput(input: VariableInputMapState): VariableDeclarationState;
87
106
  addOutput(output: VariableOutputMapState): VariableDeclarationState;
88
107
  removeOutput(output: VariableOutputMapState): VariableDeclarationState;
89
- addSuccessCaller(caller: PassThroughCallableEntityState): VariableDeclarationState;
90
- addErrorCaller(caller: PassThroughCallableEntityState): VariableDeclarationState;
91
- addEntryCaller(caller: EntryPointEntityState): VariableDeclarationState;
108
+ addSuccessCaller(caller: PassThroughCallableEntityState, changeSet?: ChangeSet | null): VariableDeclarationState;
109
+ addErrorCaller(caller: PassThroughCallableEntityState, changeSet?: ChangeSet | null): VariableDeclarationState;
110
+ addEntryCaller(caller: EntryPointEntityState, changeSet?: ChangeSet | null): VariableDeclarationState;
92
111
  addErrorCall(call: CallableEntityState): VariableDeclarationState;
93
112
  addSuccessCall(call: CallableEntityState): VariableDeclarationState;
94
113
  removeCall(call: CallableEntityState): VariableDeclarationState;
95
- removeCaller(caller: CallerEntityState): VariableDeclarationState;
114
+ removeCaller(caller: CallerEntityState, changeSet?: ChangeSet | null): VariableDeclarationState;
96
115
  addValueReader(entity: ValueReadingEntityState): VariableDeclarationState;
97
116
  removeValueReader(valueReader: ValueReadingEntityState): VariableDeclarationState;
98
- setParent(parent: EntityWithLogicScopeState | ProjectState): VariableDeclarationState;
99
- initChildren(): VariableDeclarationState;
117
+ setParent(parent: EntityWithLogicScopeState | ProjectState, changeSet?: ChangeSet | null): VariableDeclarationState;
118
+ initChildren(changeSet?: ChangeSet | null): VariableDeclarationState;
100
119
  setValueWriter(valueWriter: ValueWritingEntityState): VariableDeclarationState;
101
120
  removeValueWriter(): VariableDeclarationState;
102
121
  subscribe(): VariableDeclarationState;
103
122
  unsubscribe(): VariableDeclarationState;
104
- subscribeInstance(instance: VariableInstanceState): VariableDeclarationState;
105
- removeInstance(instance: VariableInstanceState): VariableDeclarationState;
106
123
  getMasterInputWithValueWritterFromAllInstances(input: VariableInputMapState): VariableInputMapState;
107
- inferDataTypeAndSyncInstancesInputsAndOutputs(): VariableDeclarationState;
108
- sync(data: Partial<IVariableDeclaration | IVariableDeclarationTransfer | IVariableDeclarationShallowTransfer>): VariableDeclarationState;
124
+ inferDataTypeAndSyncInstancesInputsAndOutputs(changeSet?: ChangeSet | null): IChangeSet<VariableDeclarationState>;
125
+ metaSync(data: Partial<IVariableDeclaration | IVariableDeclarationTransfer | IVariableDeclarationShallowTransfer>, changeSet?: ChangeSet | null): VariableDeclarationState;
109
126
  APILoad(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<VariableDeclarationState>;
110
127
  APICreate(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<VariableDeclarationState>;
111
128
  APIUpdate(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<VariableDeclarationState>;
112
129
  APIDelete(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<VariableDeclarationState>;
113
130
  APIClone(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<VariableDeclarationState>;
114
131
  APILoadVersion(_: IEntityPersistanceOptions | undefined, versionIdOrBeforeEqualDate: EntityVersion | Date, ...otherArgs: any[]): Promise<IVariableDeclarationShallowTransfer | null>;
115
- remove({ ignoreUpstream, seenEntities, }?: {
132
+ remove({ ignoreUpstream }?: {
116
133
  ignoreUpstream: boolean;
117
- seenEntities: Set<string>;
118
- }): {
119
- affected: EntityState[];
120
- removed: EntityState[];
121
- };
122
- restore({ seenEntities }?: {
123
- seenEntities: Set<string>;
124
- }): {
125
- affected: EntityState[];
126
- self: VariableDeclarationState;
127
- };
134
+ }, changeSet?: ChangeSet | null): IChangeSet;
135
+ restore({}?: {}, changeSet?: ChangeSet | null): IChangeSet<VariableDeclarationState>;
128
136
  toFlat(seenEntities?: Set<EntityId>): EntityState[];
129
137
  toFlatIds(seenEntities?: Set<EntityId>): EntityId[];
130
138
  toJSON(seenEntities?: Set<EntityId>): IVariableDeclarationTransfer | IVariableDeclarationReference;
@@ -147,9 +155,9 @@ export declare class VariableDeclarationState extends VersionedState implements
147
155
  clone(parent?: EntryPointEntityState | ProjectState | null, newId?: string | null, subscribe?: boolean): VariableDeclarationState;
148
156
  addInternalCall(internalCall: InternalCallState): VariableDeclarationState;
149
157
  createInstance(parent?: EntityWithLogicScopeState | ProjectState, overrides?: Partial<IVariableInstanceTransfer>): VariableInstanceState;
150
- generateUnusedInputs(): VariableInputMapState[];
151
- generateUnusedOutputs(): VariableOutputMapState[];
152
- generateUnusedInternalCalls(): InternalCallState[];
158
+ generateUnusedInputs(changeSet?: ChangeSet | null): IChangeSet<VariableDeclarationState>;
159
+ generateUnusedOutputs(changeSet?: ChangeSet | null): IChangeSet<VariableDeclarationState>;
160
+ generateUnusedInternalCalls(changeSet?: ChangeSet | null): IChangeSet<VariableDeclarationState>;
153
161
  setDataType(dataType: DataTypeState): VariableDeclarationState;
154
162
  removeDataType(): VariableDeclarationState;
155
163
  getDataType(): DataTypeState | null;
@@ -2265,8 +2265,6 @@ export declare function getVariableInstanceSchema(): z.ZodObject<z.objectUtil.ex
2265
2265
  entityId: string;
2266
2266
  };
2267
2267
  version: number;
2268
- x: number;
2269
- y: number;
2270
2268
  dataType: Record<string, any> | {
2271
2269
  type: EntityType.DataType;
2272
2270
  } | null;
@@ -2397,6 +2395,8 @@ export declare function getVariableInstanceSchema(): z.ZodObject<z.objectUtil.ex
2397
2395
  } | {
2398
2396
  type: EntityType.VariableInstance;
2399
2397
  })[];
2398
+ x: number;
2399
+ y: number;
2400
2400
  readsValue: Record<string, any> | {
2401
2401
  type: EntityType.OutputMap;
2402
2402
  } | {
@@ -2536,8 +2536,6 @@ export declare function getVariableInstanceSchema(): z.ZodObject<z.objectUtil.ex
2536
2536
  entityId: string;
2537
2537
  };
2538
2538
  version: number;
2539
- x: number;
2540
- y: number;
2541
2539
  dataType: Record<string, any> | {
2542
2540
  type: EntityType.DataType;
2543
2541
  } | null;
@@ -2668,6 +2666,8 @@ export declare function getVariableInstanceSchema(): z.ZodObject<z.objectUtil.ex
2668
2666
  } | {
2669
2667
  type: EntityType.VariableInstance;
2670
2668
  })[];
2669
+ x: number;
2670
+ y: number;
2671
2671
  readsValue: Record<string, any> | {
2672
2672
  type: EntityType.OutputMap;
2673
2673
  } | {
@@ -1,7 +1,7 @@
1
1
  import { ElementGenerationTarget, ElementShallowTransfer, EntityId, EntityType, EntityVersion, IVariableInstance, IVariableInstanceGenerationTarget, IVariableInstanceReference, IVariableInstanceShallowTransfer, IVariableInstanceTransfer, VariableInstanceTypesUnion } from '../../../definitions';
2
2
  import { ZodError } from 'zod';
3
- import { BaseCanvasDraggableState, BaseState, CallableEntityClass, ChildEntityState, EntityWithValueClass, IEditableEntityPersistanceRepository, IEntityJSONCloneOptions, IEntityPersistanceOptions, IEntityRecursionOptions, PassThroughCallableEntityClass, UserManagedEntityStateFunctionality, ValueReadingEntityClass, ValueWritingEntityClass } from '../base';
4
- import { CallableEntityState, CallerEntityState, EntityState, EntityWithLogicScopeState, EntryPointEntityState, IChangeSet, PassThroughCallableEntityState, ValueReadingEntityState, ValueWritingEntityState } from '../types';
3
+ import { BaseCanvasDraggableState, BaseState, CallableEntityClass, ChildEntityState, EntityWithValueClass, IEditableEntityPersistanceRepository, IEntityJSONCloneOptions, IEntityPersistanceOptions, IEntityRecursionOptions, PassThroughCallableEntityClass, UserManagedEntityStateTemplate, ValueReadingEntityClass, ValueWritingEntityClass } from '../base';
4
+ import { CallableEntityState, CallerEntityState, EntityState, EntityWithLogicScopeState, EntryPointEntityState, PassThroughCallableEntityState, UserManagedEntityState, ValueReadingEntityState, ValueWritingEntityState } from '../types';
5
5
  import { ProjectState } from '../project';
6
6
  import { VariableInputMapState } from '../input-map';
7
7
  import { VariableOutputMapState } from '../output-map';
@@ -11,8 +11,14 @@ import { EntityError, EntityGenerationError } from '../error';
11
11
  import { LiteralValueState } from '../literal-value';
12
12
  import { DataTypeState } from '../data-type';
13
13
  import { VersionedState } from '../version';
14
+ import { ChangeSet, IChangeSet } from '../change-set';
14
15
 
15
- export declare class VariableInstanceState extends VersionedState implements IVariableInstance, BaseState, UserManagedEntityStateFunctionality, ValueWritingEntityClass, ValueReadingEntityClass, BaseCanvasDraggableState, ChildEntityState, EntityWithValueClass, PassThroughCallableEntityClass, CallableEntityClass {
16
+ export declare enum VariableInstanceDependencyField {
17
+ Parent = "parent",
18
+ DataTypeEntity = "data-type-entity",
19
+ VarDeclaration = "var-declaration"
20
+ }
21
+ export declare class VariableInstanceState extends VersionedState implements IVariableInstance, BaseState, UserManagedEntityStateTemplate, ValueWritingEntityClass, ValueReadingEntityClass, BaseCanvasDraggableState, ChildEntityState, EntityWithValueClass, PassThroughCallableEntityClass, CallableEntityClass {
16
22
  initialData: IVariableInstance | IVariableInstanceTransfer;
17
23
  readonly id: EntityId;
18
24
  x: number;
@@ -33,9 +39,14 @@ export declare class VariableInstanceState extends VersionedState implements IVa
33
39
  project: ProjectState;
34
40
  errors: EntityError[];
35
41
  parent: EntityWithLogicScopeState | ProjectState;
42
+ detachedDependents: Record<EntityId, {
43
+ entity: UserManagedEntityState;
44
+ field: string;
45
+ }>;
36
46
  knownVersions: Map<string, EntityState> | null;
37
47
  activeVersion: boolean;
38
48
  initialized: boolean;
49
+ startedInitialization: boolean;
39
50
  suggestion: boolean;
40
51
  constructor(initialData: IVariableInstance | IVariableInstanceTransfer, parentProjectState: ProjectState);
41
52
  static repository: IEditableEntityPersistanceRepository;
@@ -64,12 +75,21 @@ export declare class VariableInstanceState extends VersionedState implements IVa
64
75
  errors: EntityGenerationError[];
65
76
  modifiedData: Partial<IVariableInstanceGenerationTarget>;
66
77
  };
78
+ subscribeDependents(dependencies: {
79
+ entity: UserManagedEntityState;
80
+ field: string;
81
+ }[]): UserManagedEntityState;
82
+ syncDependents(): IChangeSet<UserManagedEntityState>;
83
+ onDetachedDependencyRemoved(_dependency: UserManagedEntityState, field: string, changeSet: ChangeSet | null): IChangeSet<UserManagedEntityState>;
84
+ onDetachedDependencyRestored(_dependency: UserManagedEntityState, field: string, changeSet: ChangeSet | null): IChangeSet<UserManagedEntityState>;
85
+ subscribeToDependencies(): UserManagedEntityState;
86
+ increaseVersion(sharedTimestamp: null | string): UserManagedEntityState;
67
87
  captureVersion(): VariableInstanceState;
68
- recursiveCaptureUpstreamVersions(): IChangeSet<VariableInstanceState>;
88
+ recursiveCaptureUpstreamVersions(sharedTimestamp: null | string): IChangeSet<VariableInstanceState>;
69
89
  restoreVersion(versionId: EntityVersion): Promise<IChangeSet<VariableInstanceState>>;
70
90
  hydrateAncestors(): IChangeSet<VariableInstanceState>;
71
- afterAllChildrenInitialized(): IChangeSet<VariableInstanceState>;
72
- addSelfToProject(): IChangeSet<VariableInstanceState>;
91
+ afterAllChildrenInitialized(changeSet?: ChangeSet | null): IChangeSet<VariableInstanceState>;
92
+ addSelfToProject(changeSet?: ChangeSet | null): IChangeSet<VariableInstanceState>;
73
93
  get calledBy(): CallerEntityState[];
74
94
  get usedInputs(): VariableInputMapState[];
75
95
  get unusedInputs(): VariableInputMapState[];
@@ -81,41 +101,32 @@ export declare class VariableInstanceState extends VersionedState implements IVa
81
101
  addInput(input: VariableInputMapState): VariableInstanceState;
82
102
  addOutput(output: VariableOutputMapState): VariableInstanceState;
83
103
  removeOutput(output: VariableOutputMapState): VariableInstanceState;
84
- addSuccessCaller(caller: PassThroughCallableEntityState): VariableInstanceState;
85
- addErrorCaller(caller: PassThroughCallableEntityState): VariableInstanceState;
86
- addEntryCaller(caller: EntryPointEntityState): VariableInstanceState;
104
+ addSuccessCaller(caller: PassThroughCallableEntityState, changeSet?: ChangeSet | null): VariableInstanceState;
105
+ addErrorCaller(caller: PassThroughCallableEntityState, changeSet?: ChangeSet | null): VariableInstanceState;
106
+ addEntryCaller(caller: EntryPointEntityState, changeSet?: ChangeSet | null): VariableInstanceState;
87
107
  addErrorCall(call: CallableEntityState): VariableInstanceState;
88
108
  addSuccessCall(call: CallableEntityState): VariableInstanceState;
89
109
  removeCall(call: CallableEntityState): VariableInstanceState;
90
- removeCaller(caller: CallerEntityState): VariableInstanceState;
110
+ removeCaller(caller: CallerEntityState, changeSet?: ChangeSet | null): VariableInstanceState;
91
111
  addValueReader(entity: ValueReadingEntityState): VariableInstanceState;
92
- setParent(parent: EntityWithLogicScopeState | ProjectState): VariableInstanceState;
93
- initChildren(): VariableInstanceState;
112
+ setParent(parent: EntityWithLogicScopeState | ProjectState, changeSet?: ChangeSet | null): VariableInstanceState;
113
+ initChildren(changeSet?: ChangeSet | null): VariableInstanceState;
94
114
  setValueWriter(valueWriter: ValueWritingEntityState): VariableInstanceState;
95
115
  removeValueWriter(): VariableInstanceState;
96
116
  removeValueReader(valueReader: ValueReadingEntityState): VariableInstanceState;
97
117
  subscribe(): VariableInstanceState;
98
118
  unsubscribe(): VariableInstanceState;
99
- sync(data: Partial<IVariableInstance | IVariableInstanceTransfer | IVariableInstanceShallowTransfer>): VariableInstanceState;
119
+ metaSync(data: Partial<IVariableInstance | IVariableInstanceTransfer | IVariableInstanceShallowTransfer>, changeSet?: ChangeSet | null): VariableInstanceState;
100
120
  APILoad(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<VariableInstanceState>;
101
121
  APICreate(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<VariableInstanceState>;
102
122
  APIUpdate(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<VariableInstanceState>;
103
123
  APIDelete(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<VariableInstanceState>;
104
124
  APIClone(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<VariableInstanceState>;
105
125
  APILoadVersion(_: IEntityPersistanceOptions | undefined, versionIdOrBeforeEqualDate: EntityVersion | Date, ...otherArgs: any[]): Promise<IVariableInstanceShallowTransfer | null>;
106
- remove({ ignoreUpstream, seenEntities, }?: {
126
+ remove({ ignoreUpstream }?: {
107
127
  ignoreUpstream: boolean;
108
- seenEntities: Set<string>;
109
- }): {
110
- affected: EntityState[];
111
- removed: EntityState[];
112
- };
113
- restore({ seenEntities }?: {
114
- seenEntities: Set<string>;
115
- }): {
116
- affected: EntityState[];
117
- self: VariableInstanceState;
118
- };
128
+ }, changeSet?: ChangeSet | null): IChangeSet;
129
+ restore({}?: {}, changeSet?: ChangeSet | null): IChangeSet<VariableInstanceState>;
119
130
  toFlat(seenEntities?: Set<EntityId>): EntityState[];
120
131
  toFlatIds(seenEntities?: Set<EntityId>): EntityId[];
121
132
  toJSON(seenEntities?: Set<EntityId>): IVariableInstanceTransfer | IVariableInstanceReference;
@@ -138,9 +149,9 @@ export declare class VariableInstanceState extends VersionedState implements IVa
138
149
  clone(parent?: EntryPointEntityState | ProjectState | null, newId?: string | null, subscribe?: boolean): VariableInstanceState;
139
150
  addInternalCall(internalCall: InternalCallState): VariableInstanceState;
140
151
  setDeclaration(declaration: VariableDeclarationState): VariableInstanceState;
141
- generateUnusedInputs(): VariableInputMapState[];
142
- generateUnusedOutputs(): VariableOutputMapState[];
143
- generateUnusedInternalCalls(): InternalCallState[];
152
+ generateUnusedInputs(changeSet?: ChangeSet | null): IChangeSet<VariableInstanceState>;
153
+ generateUnusedOutputs(changeSet?: ChangeSet | null): IChangeSet<VariableInstanceState>;
154
+ generateUnusedInternalCalls(changeSet?: ChangeSet | null): IChangeSet<VariableInstanceState>;
144
155
  getDataType(): DataTypeState | null;
145
156
  getUnusedInputs(): VariableInputMapState[];
146
157
  getUnusedOutputs(): VariableOutputMapState[];
@@ -7,5 +7,5 @@ export declare class VersionedState implements IVersionMetadata {
7
7
  deleted: boolean;
8
8
  author: string;
9
9
  constructor(data: IVersionMetadata);
10
- sync(data: Partial<IVersionMetadata>): void;
10
+ metaSync(data: Partial<IVersionMetadata>): void;
11
11
  }
@@ -1,4 +1,4 @@
1
- import { ArgumentDeclarationState, DefinitionEntityState, DataTypeState, EntityWithValueState, InputMapState, OutputMapState, PropertyState, ReturnDeclarationState, VariableDeclarationState, VariableInstanceState } from '../state';
1
+ import { ArgumentDeclarationState, DefinitionEntityState, DataTypeState, EntityWithValueState, InputMapState, OutputMapState, PropertyState, ReturnDeclarationState, VariableDeclarationState, VariableInstanceState, ChangeSet } from '../state';
2
2
  import { ValueDescriptorState } from '../state/value-descriptor';
3
3
 
4
4
  export declare function checkArePropertiesCompatibleAsDataType(sourceProperty: PropertyState, targetProperty: PropertyState): boolean;
@@ -40,7 +40,7 @@ export interface IDataTypeIncompatibile extends IDataTypeCompatibility {
40
40
  type: DataTypeCompatibilityTypes.AIsListBIsNot | DataTypeCompatibilityTypes.BIsListAIsNot | DataTypeCompatibilityTypes.AIsNullableBIsNot | DataTypeCompatibilityTypes.BIsNullableAIsNot | DataTypeCompatibilityTypes.AIsTemplateBIsNot | DataTypeCompatibilityTypes.BIsTemplateAIsNot | DataTypeCompatibilityTypes.TypeEntityMismatch | DataTypeCompatibilityTypes.IncompatibleDefinitionEntities | DataTypeCompatibilityTypes.IncompatiblePrimitiveEntities | DataTypeCompatibilityTypes.IncompatibleBuiltInBaseEntities | DataTypeCompatibilityTypes.CheckUnknown;
41
41
  }
42
42
  export declare function checkAreDataTypesCompatible(dataTypeA: DataTypeState | null, dataTypeB: DataTypeState | null): IDataTypeCompatible | IDataTypeIncompatibile;
43
- export declare function generateExecutionDataType(entity: PropertyState | ArgumentDeclarationState | ReturnDeclarationState | VariableDeclarationState | ValueDescriptorState | DataTypeState): DataTypeState;
43
+ export declare function generateExecutionDataType(entity: PropertyState | ArgumentDeclarationState | ReturnDeclarationState | VariableDeclarationState | ValueDescriptorState | DataTypeState, changeSet: ChangeSet | null): DataTypeState;
44
44
  export declare function inferArgumentDeclarationDataType(entity: ArgumentDeclarationState): DataTypeState | null;
45
45
  export declare function inferInputMapDataType(entity: InputMapState): DataTypeState | null;
46
46
  export declare function inferReturnDeclarationDataType(entity: ReturnDeclarationState): DataTypeState | null;
@@ -273,7 +273,7 @@ export declare function resolvePrimaryKeyProperty(entity: DefinitionEntityState)
273
273
  export declare function getColumnProperties(entity: DefinitionEntityState): PropertyState[];
274
274
  export declare function getDatabaseEntity(entity: DefinitionEntityState): DefinitionEntityState | null;
275
275
  export declare function resolveClonedEntityProject(newParent: EntityState | null, self: EntityState): ProjectState;
276
- export declare function getStateClassFromType(entityType: EntityType): typeof BuiltInBaseEntityState | typeof ProjectState | typeof InstalledProjectState | typeof DefinitionEntityState | typeof FunctionDeclarationState | typeof GlobalEventState | typeof VariableInstanceState | typeof VariableDeclarationState | typeof InputMapState | typeof OutputMapState | typeof ConditionState | typeof OperationState | typeof FunctionCallState | typeof ReturnDeclarationState | typeof ArgumentDeclarationState | typeof PrimitiveEntityState | typeof DataTypeState | typeof PropertyState | typeof ActionDescriptorState | typeof ReturnStatementState | typeof ContinueStatementState | typeof BreakStatementState | typeof LoopState | typeof SearchState | typeof ValueDescriptorState | typeof InternalCallState | typeof LiteralValueState | null;
276
+ export declare function getStateClassFromType(entityType: EntityType): typeof BuiltInBaseEntityState | typeof PrimitiveEntityState | typeof ProjectState | typeof InstalledProjectState | typeof DefinitionEntityState | typeof FunctionDeclarationState | typeof GlobalEventState | typeof VariableInstanceState | typeof VariableDeclarationState | typeof InputMapState | typeof OutputMapState | typeof ConditionState | typeof OperationState | typeof FunctionCallState | typeof ReturnDeclarationState | typeof ArgumentDeclarationState | typeof DataTypeState | typeof PropertyState | typeof ActionDescriptorState | typeof ReturnStatementState | typeof ContinueStatementState | typeof BreakStatementState | typeof LoopState | typeof SearchState | typeof ValueDescriptorState | typeof InternalCallState | typeof LiteralValueState | null;
277
277
  export declare function fromChangeSetToRecordChangeSet<TSelf extends {
278
278
  id: string;
279
279
  type: EntityType;
@@ -281,3 +281,4 @@ export declare function fromChangeSetToRecordChangeSet<TSelf extends {
281
281
  id: string;
282
282
  type: EntityType;
283
283
  } = EntityState>(changeSet: IChangeSet<TSelf, TGeneric>): IRecordChangeSet<TSelf, TGeneric>;
284
+ export declare function checkHasMetadataChanged(currentMetadata: EntityState, newMetadata: Partial<Element | ElementTransfer | ElementShallowTransfer>): boolean;
@@ -1,14 +1,14 @@
1
1
  import { DataTypeParentChildRelation, EntityId } from '../../definitions';
2
- import { BuiltInBaseEntityState, DefinitionEntityState, DataTypeState, EntityState, IChangeSet, ProjectState } from '../state';
2
+ import { BuiltInBaseEntityState, DefinitionEntityState, DataTypeState, EntityState, IChangeSet, ProjectState, ChangeSet } from '../state';
3
3
  import { EntityGenerationError } from '../state/error';
4
4
 
5
- export declare function handleBeforeEntityImplementationSideEffects(self: DefinitionEntityState | BuiltInBaseEntityState): {
5
+ export declare function handleBeforeEntityImplementationSideEffects(self: DefinitionEntityState | BuiltInBaseEntityState, changeSet: ChangeSet | null): {
6
6
  newEntities: EntityState[];
7
7
  };
8
- export declare function handleAfterEntityImplementationSideEffects(implemented: DefinitionEntityState): {
8
+ export declare function handleAfterEntityImplementationSideEffects(implemented: DefinitionEntityState, changeSet: ChangeSet | null): {
9
9
  newEntities: EntityState[];
10
10
  };
11
- export declare function implement(self: DefinitionEntityState | BuiltInBaseEntityState, newEntityName: string, newId?: string): {
11
+ export declare function implement(self: DefinitionEntityState | BuiltInBaseEntityState, newEntityName: string, changeSet: ChangeSet | null, newId?: string): {
12
12
  errors: [];
13
13
  implemented: DefinitionEntityState;
14
14
  entitiesChanges: {
@@ -26,14 +26,14 @@ export declare function implement(self: DefinitionEntityState | BuiltInBaseEntit
26
26
  };
27
27
  };
28
28
  export declare function findEntityFromKeys(keys: string[], project: ProjectState): DefinitionEntityState | null;
29
- export declare function createNestedDataTypeForEntity(entity: DefinitionEntityState, parentDataType: DataTypeState, parentRelationType?: DataTypeParentChildRelation): IChangeSet<DataTypeState>;
29
+ export declare function createNestedDataTypeForEntity(entity: DefinitionEntityState, parentDataType: DataTypeState, changeSet: ChangeSet | null, parentRelationType?: DataTypeParentChildRelation): IChangeSet<DataTypeState>;
30
30
  export declare function resolveDataTypeEntityOrNestedChildrenFromLiteralValue(value: any, parentDataType: DataTypeState, newDefinitionEntityMetadata: {
31
31
  id?: EntityId;
32
32
  name: string;
33
33
  description?: string;
34
34
  static?: boolean;
35
35
  abstract?: boolean;
36
- }, rootEntityCreated: DefinitionEntityState): IChangeSet<DataTypeState>;
36
+ }, changeSet: ChangeSet | null, rootEntityCreated: DefinitionEntityState): IChangeSet<DataTypeState>;
37
37
  export declare function createDefinitionEntityFromJSONObject(data: {
38
38
  [key: string]: any;
39
39
  }, project: ProjectState, definitionEntityMetadata: {
@@ -42,7 +42,7 @@ export declare function createDefinitionEntityFromJSONObject(data: {
42
42
  description?: string;
43
43
  static?: boolean;
44
44
  abstract?: boolean;
45
- }, rootEntityCreated?: DefinitionEntityState): {
45
+ }, changeSet: ChangeSet | null, rootEntityCreated?: DefinitionEntityState): {
46
46
  hasCreated: boolean;
47
47
  changeSet: IChangeSet<DefinitionEntityState>;
48
48
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elyx-code/project-logic-tree",
3
- "version": "0.0.6161",
3
+ "version": "0.0.6162",
4
4
  "author": "Sergio Herrero",
5
5
  "license": "UNLICENSED",
6
6
  "description": "An installable module which contains the type definitions and ephemeral state management for a projects' logic tree data structure",