@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
@@ -1,9 +1,9 @@
1
1
  import { ZodError } from 'zod';
2
2
  import { ElementGenerationTarget, ElementShallowTransfer, EntityId, EntityType, EntityVersion, ILoop, ILoopGenerationTarget, ILoopReference, ILoopShallowTransfer, ILoopTransfer, LoopTypesUnion } from '../../../definitions';
3
- import { BaseCanvasDraggableState, BaseState, CallableEntityClass, ChildEntityState, EntityWithLogicScopeClass, IEditableEntityPersistanceRepository, IEntityJSONCloneOptions, IEntityPersistanceOptions, IEntityRecursionOptions, PassThroughCallableEntityClass, UserManagedEntityStateFunctionality } from '../base';
3
+ import { BaseCanvasDraggableState, BaseState, CallableEntityClass, ChildEntityState, EntityWithLogicScopeClass, IEditableEntityPersistanceRepository, IEntityJSONCloneOptions, IEntityPersistanceOptions, IEntityRecursionOptions, PassThroughCallableEntityClass, UserManagedEntityStateTemplate } from '../base';
4
4
  import { ActionInputMapState } from '../input-map';
5
5
  import { ActionOutputMapState } from '../output-map';
6
- import { CallableEntityState, CallerEntityState, CanvasEntityState, EntityState, EntityWithLogicScopeState, EntryPointEntityState, IChangeSet, PassThroughCallableEntityState } from '../types';
6
+ import { CallableEntityState, CallerEntityState, CanvasEntityState, EntityState, EntityWithLogicScopeState, EntryPointEntityState, PassThroughCallableEntityState, UserManagedEntityState } from '../types';
7
7
  import { ProjectState } from '../project/project';
8
8
  import { BreakStatementState } from '../break-statement';
9
9
  import { ContinueStatementState } from '../continue-statement';
@@ -16,8 +16,12 @@ import { ValueDescriptorState } from '../value-descriptor';
16
16
  import { ReturnDeclarationState } from '../return-declaration';
17
17
  import { ArgumentDeclarationState } from '../argument-declaration';
18
18
  import { VersionedState } from '../version';
19
+ import { ChangeSet, IChangeSet } from '../change-set';
19
20
 
20
- export declare class LoopState extends VersionedState implements ILoop, BaseState, UserManagedEntityStateFunctionality, BaseCanvasDraggableState, CallableEntityClass, ChildEntityState, EntityWithLogicScopeClass, PassThroughCallableEntityClass {
21
+ export declare enum LoopDependencyField {
22
+ Parent = "parent"
23
+ }
24
+ export declare class LoopState extends VersionedState implements ILoop, BaseState, UserManagedEntityStateTemplate, BaseCanvasDraggableState, CallableEntityClass, ChildEntityState, EntityWithLogicScopeClass, PassThroughCallableEntityClass {
21
25
  initialData: ILoop | ILoopTransfer;
22
26
  readonly id: EntityId;
23
27
  x: number;
@@ -30,8 +34,6 @@ export declare class LoopState extends VersionedState implements ILoop, BaseStat
30
34
  successCalls: CallableEntityState[];
31
35
  errorCalls: CallableEntityState[];
32
36
  error: ActionOutputMapState | null;
33
- breakStatements: BreakStatementState[];
34
- continueStatements: ContinueStatementState[];
35
37
  outputsDeclarations: ValueDescriptorState[];
36
38
  body: FunctionDeclarationState;
37
39
  calledBySuccess: PassThroughCallableEntityState[];
@@ -43,9 +45,14 @@ export declare class LoopState extends VersionedState implements ILoop, BaseStat
43
45
  currentValueArgumentDeclaration: ArgumentDeclarationState | null;
44
46
  errors: EntityError[];
45
47
  project: ProjectState;
48
+ detachedDependents: Record<EntityId, {
49
+ entity: UserManagedEntityState;
50
+ field: string;
51
+ }>;
46
52
  knownVersions: Map<string, EntityState> | null;
47
53
  activeVersion: boolean;
48
54
  initialized: boolean;
55
+ startedInitialization: boolean;
49
56
  constructor(initialData: ILoop | ILoopTransfer, parentProjectState: ProjectState);
50
57
  static repository: IEditableEntityPersistanceRepository;
51
58
  static type: EntityType.Loop;
@@ -77,16 +84,27 @@ export declare class LoopState extends VersionedState implements ILoop, BaseStat
77
84
  static fromLoopOutputDeclarationToReturnDeclarationName(outputDeclaration: ValueDescriptorState): string;
78
85
  static fromLoopOutputDeclarationToBodyArgumentDeclarationName(outputDeclaration: ValueDescriptorState): string;
79
86
  static fromBodyArgumentDeclarationToLoopOutputDeclarationName(argumentDeclaration: ArgumentDeclarationState): string;
87
+ get continueStatements(): ContinueStatementState[];
88
+ get breakStatements(): BreakStatementState[];
80
89
  validateGeneratedUpdate(data: Partial<ILoopGenerationTarget>): {
81
90
  errors: EntityGenerationError[];
82
91
  modifiedData: Partial<ILoopGenerationTarget>;
83
92
  };
93
+ subscribeDependents(dependencies: {
94
+ entity: UserManagedEntityState;
95
+ field: string;
96
+ }[]): UserManagedEntityState;
97
+ syncDependents(): IChangeSet<UserManagedEntityState>;
98
+ onDetachedDependencyRemoved(_dependency: UserManagedEntityState, field: string, changeSet: ChangeSet | null): IChangeSet<UserManagedEntityState>;
99
+ onDetachedDependencyRestored(_dependency: UserManagedEntityState, field: string, changeSet: ChangeSet | null): IChangeSet<UserManagedEntityState>;
100
+ subscribeToDependencies(): UserManagedEntityState;
101
+ increaseVersion(sharedTimestamp: null | string): UserManagedEntityState;
84
102
  captureVersion(): LoopState;
85
- recursiveCaptureUpstreamVersions(): IChangeSet<LoopState>;
103
+ recursiveCaptureUpstreamVersions(sharedTimestamp: null | string): IChangeSet<LoopState>;
86
104
  restoreVersion(versionId: EntityVersion): Promise<IChangeSet<LoopState>>;
87
105
  hydrateAncestors(): IChangeSet<LoopState>;
88
- afterAllChildrenInitialized(): IChangeSet<LoopState>;
89
- addSelfToProject(): IChangeSet<LoopState>;
106
+ afterAllChildrenInitialized(changeSet?: ChangeSet | null): IChangeSet<LoopState>;
107
+ addSelfToProject(changeSet?: ChangeSet | null): IChangeSet<LoopState>;
90
108
  get calledBy(): CallerEntityState[];
91
109
  removeInput(input: ActionInputMapState): LoopState;
92
110
  addInput(input: ActionInputMapState): LoopState;
@@ -95,40 +113,31 @@ export declare class LoopState extends VersionedState implements ILoop, BaseStat
95
113
  addOutput(output: ActionOutputMapState): LoopState;
96
114
  removeOutput(output: ActionOutputMapState): LoopState;
97
115
  setBody(body: FunctionDeclarationState): LoopState;
98
- addSuccessCaller(caller: PassThroughCallableEntityState): LoopState;
99
- addErrorCaller(caller: PassThroughCallableEntityState): LoopState;
100
- addEntryCaller(caller: EntryPointEntityState): LoopState;
116
+ addSuccessCaller(caller: PassThroughCallableEntityState, changeSet?: ChangeSet | null): LoopState;
117
+ addErrorCaller(caller: PassThroughCallableEntityState, changeSet?: ChangeSet | null): LoopState;
118
+ addEntryCaller(caller: EntryPointEntityState, changeSet?: ChangeSet | null): LoopState;
101
119
  addErrorCall(call: CallableEntityState): LoopState;
102
120
  addSuccessCall(call: CallableEntityState): LoopState;
103
121
  removeCall(call: CallableEntityState): LoopState;
104
- removeCaller(caller: CallerEntityState): LoopState;
122
+ removeCaller(caller: CallerEntityState, changeSet?: ChangeSet | null): LoopState;
105
123
  replaceDetachedChild(existingChild: CanvasEntityState, newChild: CanvasEntityState): LoopState;
106
124
  subscribeDetachedChild(child: CanvasEntityState): LoopState;
107
- setParent(parent: EntityWithLogicScopeState | ProjectState): LoopState;
125
+ setParent(parent: EntityWithLogicScopeState | ProjectState, changeSet?: ChangeSet | null): LoopState;
108
126
  setDeclaration(declaration: ActionDescriptorState): LoopState;
109
- initChildren(): LoopState;
127
+ initChildren(changeSet?: ChangeSet | null): LoopState;
110
128
  subscribe(): LoopState;
111
129
  unsubscribe(): LoopState;
112
- sync(data: Partial<ILoop | ILoopTransfer | ILoopShallowTransfer>): LoopState;
130
+ metaSync(data: Partial<ILoop | ILoopTransfer | ILoopShallowTransfer>, changeSet?: ChangeSet | null): LoopState;
113
131
  APILoad(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<LoopState>;
114
132
  APICreate(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<LoopState>;
115
133
  APIUpdate(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<LoopState>;
116
134
  APIDelete(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<LoopState>;
117
135
  APIClone(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<LoopState>;
118
136
  APILoadVersion(_: IEntityPersistanceOptions | undefined, versionIdOrBeforeEqualDate: EntityVersion | Date, ...otherArgs: any[]): Promise<ILoopShallowTransfer | null>;
119
- remove({ ignoreUpstream, seenEntities, }?: {
137
+ remove({ ignoreUpstream }?: {
120
138
  ignoreUpstream: boolean;
121
- seenEntities: Set<string>;
122
- }): {
123
- affected: EntityState[];
124
- removed: EntityState[];
125
- };
126
- restore({ seenEntities }?: {
127
- seenEntities: Set<string>;
128
- }): {
129
- affected: EntityState[];
130
- self: LoopState;
131
- };
139
+ }, changeSet?: ChangeSet | null): IChangeSet;
140
+ restore({}?: {}, changeSet?: ChangeSet | null): IChangeSet<LoopState>;
132
141
  toFlat(seenEntities?: Set<EntityId>): EntityState[];
133
142
  toFlatIds(seenEntities?: Set<EntityId>): EntityId[];
134
143
  toJSON(seenEntities?: Set<EntityId>): ILoopTransfer | ILoopReference;
@@ -155,19 +164,19 @@ export declare class LoopState extends VersionedState implements ILoop, BaseStat
155
164
  addContinueStatement(statement: ContinueStatementState): LoopState;
156
165
  removeContinueStatement(statement: ContinueStatementState): LoopState;
157
166
  getUniqueReturnDeclarations(): ReturnDeclarationState[];
158
- syncTerminationStatements(): IChangeSet<LoopState>;
159
- syncBodyInputIndexes(): IChangeSet<LoopState>;
160
- syncBodyArgumentsDeclarations(): IChangeSet<LoopState>;
161
- syncOutputsDeclarations(): IChangeSet<LoopState>;
162
- syncOutputMaps(): IChangeSet<LoopState>;
163
- createCurrentIterationNumberArgumentDeclaration(): IChangeSet<LoopState>;
164
- removeExtraBodyArgumentDeclarations(): IChangeSet<LoopState>;
165
- createCurrentValueInputBasedOnInputMap(): IChangeSet<LoopState>;
166
- syncFixedBodyArgumentDeclarations(): IChangeSet<LoopState>;
167
- syncInputMaps(): IChangeSet<LoopState>;
167
+ syncTerminationStatements(changeSet?: ChangeSet | null): IChangeSet<LoopState>;
168
+ syncBodyInputIndexes(changeSet?: ChangeSet | null): IChangeSet<LoopState>;
169
+ syncBodyArgumentsDeclarations(changeSet?: ChangeSet | null): IChangeSet<LoopState>;
170
+ syncOutputsDeclarations(changeSet?: ChangeSet | null): IChangeSet<LoopState>;
171
+ syncOutputMaps(changeSet?: ChangeSet | null): IChangeSet<LoopState>;
172
+ createCurrentIterationNumberArgumentDeclaration(changeSet?: ChangeSet | null): IChangeSet<LoopState>;
173
+ removeExtraBodyArgumentDeclarations(changeSet?: ChangeSet | null): IChangeSet<LoopState>;
174
+ createCurrentValueInputBasedOnInputMap(changeSet?: ChangeSet | null): IChangeSet<LoopState>;
175
+ syncFixedBodyArgumentDeclarations(changeSet?: ChangeSet | null): IChangeSet<LoopState>;
176
+ syncInputMaps(changeSet?: ChangeSet | null): IChangeSet<LoopState>;
168
177
  getCurrentValueBuiltInValueDescriptor(): ValueDescriptorState | null;
169
178
  getCurrentIterationNumberBuiltInValueDescriptor(): ValueDescriptorState;
170
- syncBody(): IChangeSet<LoopState>;
171
- syncChildren(): IChangeSet<LoopState>;
179
+ syncBody(changeSet?: ChangeSet | null): IChangeSet<LoopState>;
180
+ syncChildren(changeSet?: ChangeSet | null): IChangeSet<LoopState>;
172
181
  }
173
182
  export type LoopPayloadUnion = LoopState | LoopTypesUnion;
@@ -2158,8 +2158,6 @@ export declare function getLoopSchema(): z.ZodObject<z.objectUtil.extendShape<z.
2158
2158
  type: EntityType.OutputMap;
2159
2159
  };
2160
2160
  version: number;
2161
- x: number;
2162
- y: number;
2163
2161
  inputs: (Record<string, any> | {
2164
2162
  type: EntityType.InputMap;
2165
2163
  })[];
@@ -2278,6 +2276,8 @@ export declare function getLoopSchema(): z.ZodObject<z.objectUtil.extendShape<z.
2278
2276
  entityType: EntityType.ContinueStatement;
2279
2277
  entityId: string;
2280
2278
  })[];
2279
+ x: number;
2280
+ y: number;
2281
2281
  outputsDeclarations: ({
2282
2282
  type: EntityType.ValueDescriptor;
2283
2283
  } | Record<string, any>)[];
@@ -2414,8 +2414,6 @@ export declare function getLoopSchema(): z.ZodObject<z.objectUtil.extendShape<z.
2414
2414
  type: EntityType.OutputMap;
2415
2415
  };
2416
2416
  version: number;
2417
- x: number;
2418
- y: number;
2419
2417
  inputs: (Record<string, any> | {
2420
2418
  type: EntityType.InputMap;
2421
2419
  })[];
@@ -2534,6 +2532,8 @@ export declare function getLoopSchema(): z.ZodObject<z.objectUtil.extendShape<z.
2534
2532
  entityType: EntityType.ContinueStatement;
2535
2533
  entityId: string;
2536
2534
  })[];
2535
+ x: number;
2536
+ y: number;
2537
2537
  outputsDeclarations: ({
2538
2538
  type: EntityType.ValueDescriptor;
2539
2539
  } | Record<string, any>)[];
@@ -1,15 +1,19 @@
1
1
  import { ElementGenerationTarget, ElementShallowTransfer, EntityId, EntityType, IOperation, IOperationGenerationTarget, IOperationReference, IOperationShallowTransfer, IOperationTransfer, OperationTypesUnion, EntityVersion } from '../../../definitions';
2
2
  import { ZodError } from 'zod';
3
- import { BaseCanvasDraggableState, BaseState, CallableEntityClass, ChildEntityState, IEditableEntityPersistanceRepository, IEntityJSONCloneOptions, IEntityPersistanceOptions, IEntityRecursionOptions, PassThroughCallableEntityClass, UserManagedEntityStateFunctionality } from '../base';
3
+ import { BaseCanvasDraggableState, BaseState, CallableEntityClass, ChildEntityState, IEditableEntityPersistanceRepository, IEntityJSONCloneOptions, IEntityPersistanceOptions, IEntityRecursionOptions, PassThroughCallableEntityClass, UserManagedEntityStateTemplate } from '../base';
4
4
  import { ActionDescriptorState } from '../action-descriptor/action-descriptor';
5
5
  import { ActionInputMapState } from '../input-map';
6
6
  import { ActionOutputMapState } from '../output-map';
7
- import { CallableEntityState, CallerEntityState, EntityState, EntityWithLogicScopeState, EntryPointEntityState, IChangeSet, PassThroughCallableEntityState, ValueReadingEntityState } from '../types';
7
+ import { CallableEntityState, CallerEntityState, EntityState, EntityWithLogicScopeState, EntryPointEntityState, PassThroughCallableEntityState, UserManagedEntityState, ValueReadingEntityState } from '../types';
8
8
  import { ProjectState } from '../project/project';
9
9
  import { EntityError, EntityGenerationError } from '../../state/error';
10
10
  import { VersionedState } from '../version';
11
+ import { ChangeSet, IChangeSet } from '../change-set';
11
12
 
12
- export declare class OperationState extends VersionedState implements IOperation, BaseState, UserManagedEntityStateFunctionality, BaseCanvasDraggableState, CallableEntityClass, ChildEntityState, PassThroughCallableEntityClass {
13
+ export declare enum OperationDependencyField {
14
+ Parent = "parent"
15
+ }
16
+ export declare class OperationState extends VersionedState implements IOperation, BaseState, UserManagedEntityStateTemplate, BaseCanvasDraggableState, CallableEntityClass, ChildEntityState, PassThroughCallableEntityClass {
13
17
  initialData: IOperation | IOperationTransfer;
14
18
  readonly id: EntityId;
15
19
  x: number;
@@ -28,9 +32,14 @@ export declare class OperationState extends VersionedState implements IOperation
28
32
  parent: EntityWithLogicScopeState | ProjectState;
29
33
  errors: EntityError[];
30
34
  project: ProjectState;
35
+ detachedDependents: Record<EntityId, {
36
+ entity: UserManagedEntityState;
37
+ field: string;
38
+ }>;
31
39
  knownVersions: Map<string, EntityState> | null;
32
40
  activeVersion: boolean;
33
41
  initialized: boolean;
42
+ startedInitialization: boolean;
34
43
  constructor(initialData: IOperation | IOperationTransfer, parentProjectState: ProjectState);
35
44
  static repository: IEditableEntityPersistanceRepository;
36
45
  static type: EntityType.Operation;
@@ -58,12 +67,21 @@ export declare class OperationState extends VersionedState implements IOperation
58
67
  errors: EntityGenerationError[];
59
68
  modifiedData: Partial<IOperationGenerationTarget>;
60
69
  };
70
+ subscribeDependents(dependencies: {
71
+ entity: UserManagedEntityState;
72
+ field: string;
73
+ }[]): UserManagedEntityState;
74
+ syncDependents(): IChangeSet<UserManagedEntityState>;
75
+ onDetachedDependencyRemoved(_dependency: UserManagedEntityState, field: string, changeSet: ChangeSet | null): IChangeSet<UserManagedEntityState>;
76
+ onDetachedDependencyRestored(_dependency: UserManagedEntityState, field: string, changeSet: ChangeSet | null): IChangeSet<UserManagedEntityState>;
77
+ subscribeToDependencies(): UserManagedEntityState;
78
+ increaseVersion(sharedTimestamp: null | string): UserManagedEntityState;
61
79
  captureVersion(): OperationState;
62
- recursiveCaptureUpstreamVersions(): IChangeSet<OperationState>;
80
+ recursiveCaptureUpstreamVersions(sharedTimestamp: null | string): IChangeSet<OperationState>;
63
81
  restoreVersion(versionId: EntityVersion): Promise<IChangeSet<OperationState>>;
64
82
  hydrateAncestors(): IChangeSet<OperationState>;
65
- afterAllChildrenInitialized(): IChangeSet<OperationState>;
66
- addSelfToProject(): IChangeSet<OperationState>;
83
+ afterAllChildrenInitialized(changeSet?: ChangeSet | null): IChangeSet<OperationState>;
84
+ addSelfToProject(changeSet?: ChangeSet | null): IChangeSet<OperationState>;
67
85
  get calledBy(): CallerEntityState[];
68
86
  removeInput(input: ActionInputMapState): OperationState;
69
87
  addInput(input: ActionInputMapState): OperationState;
@@ -71,38 +89,29 @@ export declare class OperationState extends VersionedState implements IOperation
71
89
  removeOutput(output: ActionOutputMapState): OperationState;
72
90
  addValueReader(entity: ValueReadingEntityState): OperationState;
73
91
  removeValueReader(valueReader: ValueReadingEntityState): OperationState;
74
- addSuccessCaller(caller: PassThroughCallableEntityState): OperationState;
75
- addErrorCaller(caller: PassThroughCallableEntityState): OperationState;
76
- addEntryCaller(caller: EntryPointEntityState): OperationState;
92
+ addSuccessCaller(caller: PassThroughCallableEntityState, changeSet?: ChangeSet | null): OperationState;
93
+ addErrorCaller(caller: PassThroughCallableEntityState, changeSet?: ChangeSet | null): OperationState;
94
+ addEntryCaller(caller: EntryPointEntityState, changeSet?: ChangeSet | null): OperationState;
77
95
  addErrorCall(call: CallableEntityState): OperationState;
78
96
  addSuccessCall(call: CallableEntityState): OperationState;
79
97
  removeCall(call: CallableEntityState): OperationState;
80
- removeCaller(caller: CallerEntityState): OperationState;
81
- setParent(parent: EntityWithLogicScopeState | ProjectState): OperationState;
98
+ removeCaller(caller: CallerEntityState, changeSet?: ChangeSet | null): OperationState;
99
+ setParent(parent: EntityWithLogicScopeState | ProjectState, changeSet?: ChangeSet | null): OperationState;
82
100
  setDeclaration(declaration: ActionDescriptorState): OperationState;
83
- initChildren(): OperationState;
101
+ initChildren(changeSet?: ChangeSet | null): OperationState;
84
102
  subscribe(): OperationState;
85
103
  unsubscribe(): OperationState;
86
- sync(data: Partial<IOperation | IOperationTransfer | IOperationShallowTransfer>): OperationState;
104
+ metaSync(data: Partial<IOperation | IOperationTransfer | IOperationShallowTransfer>, changeSet?: ChangeSet | null): OperationState;
87
105
  APILoad(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<OperationState>;
88
106
  APICreate(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<OperationState>;
89
107
  APIUpdate(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<OperationState>;
90
108
  APIDelete(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<OperationState>;
91
109
  APIClone(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<OperationState>;
92
110
  APILoadVersion(_: IEntityPersistanceOptions | undefined, versionIdOrBeforeEqualDate: EntityVersion | Date, ...otherArgs: any[]): Promise<IOperationShallowTransfer | null>;
93
- remove({ ignoreUpstream, seenEntities, }?: {
111
+ remove({ ignoreUpstream }?: {
94
112
  ignoreUpstream: boolean;
95
- seenEntities: Set<string>;
96
- }): {
97
- affected: EntityState[];
98
- removed: EntityState[];
99
- };
100
- restore({ seenEntities }?: {
101
- seenEntities: Set<string>;
102
- }): {
103
- affected: EntityState[];
104
- self: EntityState;
105
- };
113
+ }, changeSet?: ChangeSet | null): IChangeSet;
114
+ restore({}?: {}, changeSet?: ChangeSet | null): IChangeSet<EntityState>;
106
115
  toFlat(seenEntities?: Set<EntityId>): EntityState[];
107
116
  toFlatIds(seenEntities?: Set<EntityId>): EntityId[];
108
117
  toJSON(seenEntities?: Set<EntityId>): IOperationTransfer | IOperationReference;
@@ -121,9 +130,9 @@ export declare class OperationState extends VersionedState implements IOperation
121
130
  getErrors(): EntityError[];
122
131
  getShallowErrors(): EntityError[];
123
132
  clone(parent?: EntryPointEntityState | ProjectState | null, newId?: string | null, subscribe?: boolean): OperationState;
124
- removeUnrecognizedInputs(): IChangeSet<OperationState>;
125
- removeUnrecognizedOutputs(): IChangeSet<OperationState>;
126
- syncMissingFixedInputs(): IChangeSet<OperationState>;
127
- syncMissingFixedOutputs(): IChangeSet<OperationState>;
133
+ removeUnrecognizedInputs(changeSet?: ChangeSet | null): IChangeSet<OperationState>;
134
+ removeUnrecognizedOutputs(changeSet?: ChangeSet | null): IChangeSet<OperationState>;
135
+ syncMissingFixedInputs(changeSet?: ChangeSet | null): IChangeSet<OperationState>;
136
+ syncMissingFixedOutputs(changeSet?: ChangeSet | null): IChangeSet<OperationState>;
128
137
  }
129
138
  export type OperationPayloadUnion = OperationState | OperationTypesUnion;
@@ -2142,8 +2142,6 @@ export declare function getOperationSchema(): z.ZodObject<z.objectUtil.extendSha
2142
2142
  type: EntityType.OutputMap;
2143
2143
  })[];
2144
2144
  version: number;
2145
- x: number;
2146
- y: number;
2147
2145
  inputs: (Record<string, any> | {
2148
2146
  type: EntityType.InputMap;
2149
2147
  })[];
@@ -2271,6 +2269,8 @@ export declare function getOperationSchema(): z.ZodObject<z.objectUtil.extendSha
2271
2269
  } | {
2272
2270
  type: EntityType.VariableInstance;
2273
2271
  })[];
2272
+ x: number;
2273
+ y: number;
2274
2274
  }, {
2275
2275
  id: string;
2276
2276
  type: EntityType.Operation;
@@ -2395,8 +2395,6 @@ export declare function getOperationSchema(): z.ZodObject<z.objectUtil.extendSha
2395
2395
  type: EntityType.OutputMap;
2396
2396
  })[];
2397
2397
  version: number;
2398
- x: number;
2399
- y: number;
2400
2398
  inputs: (Record<string, any> | {
2401
2399
  type: EntityType.InputMap;
2402
2400
  })[];
@@ -2524,4 +2522,6 @@ export declare function getOperationSchema(): z.ZodObject<z.objectUtil.extendSha
2524
2522
  } | {
2525
2523
  type: EntityType.VariableInstance;
2526
2524
  })[];
2525
+ x: number;
2526
+ y: number;
2527
2527
  }>;
@@ -1,8 +1,8 @@
1
1
  import { ElementGenerationTarget, ElementShallowTransfer, EntityId, EntityType, EntityVersion, IActionOutputMap, IActionOutputMapTransfer, IOutputMap, IOutputMapGenerationTarget, IOutputMapReference, IOutputMapShallowTransfer, IOutputMapTransfer, IVariableOutputMap, IVariableOutputMapTransfer, OutputMapParentChildRelation, OutputMapTypesUnion } from '../../../definitions';
2
2
  import { ZodError } from 'zod';
3
- import { BaseState, ChildEntityState, EntityWithValueClass, IEditableEntityPersistanceRepository, IEntityJSONCloneOptions, IEntityPersistanceOptions, IEntityRecursionOptions, UserManagedEntityStateFunctionality, ValueWritingEntityClass } from '../base';
3
+ import { BaseState, ChildEntityState, EntityWithValueClass, IEditableEntityPersistanceRepository, IEntityJSONCloneOptions, IEntityPersistanceOptions, IEntityRecursionOptions, UserManagedEntityStateTemplate, ValueWritingEntityClass } from '../base';
4
4
  import { ReturnDeclarationState } from '../return-declaration';
5
- import { EntityState, IChangeSet, PassThroughCallableEntityWithOutputsState, ValueReadingEntityState } from '../types';
5
+ import { EntityState, PassThroughCallableEntityWithOutputsState, UserManagedEntityState, ValueReadingEntityState } from '../types';
6
6
  import { ProjectState } from '../project/project';
7
7
  import { VariableDeclarationState } from '../variable-declaration';
8
8
  import { VariableInstanceState } from '../variable-instance';
@@ -12,8 +12,13 @@ import { LiteralValueState } from '../literal-value';
12
12
  import { DataTypeState } from '../data-type';
13
13
  import { ValueDescriptorState } from '../value-descriptor';
14
14
  import { VersionedState } from '../version';
15
+ import { ChangeSet, IChangeSet } from '../change-set';
15
16
 
16
- export declare class OutputMapState extends VersionedState implements IOutputMap, UserManagedEntityStateFunctionality, ValueWritingEntityClass, BaseState, ChildEntityState, EntityWithValueClass {
17
+ export declare enum OutputMapDependencyField {
18
+ Declaration = "declaration",
19
+ DataTypeEntity = "data-type-entity"
20
+ }
21
+ export declare class OutputMapState extends VersionedState implements IOutputMap, UserManagedEntityStateTemplate, ValueWritingEntityClass, BaseState, ChildEntityState, EntityWithValueClass {
17
22
  initialData: IOutputMap | IOutputMapTransfer;
18
23
  readonly id: EntityId;
19
24
  index: number;
@@ -26,9 +31,14 @@ export declare class OutputMapState extends VersionedState implements IOutputMap
26
31
  project: ProjectState;
27
32
  errors: EntityError[];
28
33
  parent: PassThroughCallableEntityWithOutputsState;
34
+ detachedDependents: Record<EntityId, {
35
+ entity: UserManagedEntityState;
36
+ field: string;
37
+ }>;
29
38
  knownVersions: Map<string, EntityState> | null;
30
39
  activeVersion: boolean;
31
40
  initialized: boolean;
41
+ startedInitialization: boolean;
32
42
  suggestion: boolean;
33
43
  constructor(initialData: IOutputMap | IOutputMapTransfer, parentProjectState: ProjectState);
34
44
  static repository: IEditableEntityPersistanceRepository;
@@ -57,41 +67,41 @@ export declare class OutputMapState extends VersionedState implements IOutputMap
57
67
  errors: EntityGenerationError[];
58
68
  modifiedData: Partial<IOutputMapGenerationTarget>;
59
69
  };
70
+ subscribeDependents(dependencies: {
71
+ entity: UserManagedEntityState;
72
+ field: string;
73
+ }[]): UserManagedEntityState;
74
+ syncDependents(): IChangeSet<UserManagedEntityState>;
75
+ onDetachedDependencyRemoved(_dependency: UserManagedEntityState, field: string, changeSet: ChangeSet | null): IChangeSet<UserManagedEntityState>;
76
+ onDetachedDependencyRestored(_dependency: UserManagedEntityState, field: string, changeSet: ChangeSet | null): IChangeSet<UserManagedEntityState>;
77
+ subscribeToDependencies(): UserManagedEntityState;
78
+ increaseVersion(sharedTimestamp: null | string): UserManagedEntityState;
60
79
  captureVersion(): OutputMapState;
61
- recursiveCaptureUpstreamVersions(): IChangeSet<OutputMapState>;
80
+ recursiveCaptureUpstreamVersions(sharedTimestamp: null | string): IChangeSet<OutputMapState>;
62
81
  restoreVersion(versionId: EntityVersion): Promise<IChangeSet<OutputMapState>>;
63
82
  hydrateAncestors(): IChangeSet<OutputMapState>;
64
- afterAllChildrenInitialized(): IChangeSet<OutputMapState>;
65
- addSelfToProject(): IChangeSet<OutputMapState>;
83
+ afterAllChildrenInitialized(changeSet?: ChangeSet | null): IChangeSet<OutputMapState>;
84
+ addSelfToProject(changeSet?: ChangeSet | null): IChangeSet<OutputMapState>;
66
85
  addValueReader(entity: ValueReadingEntityState): OutputMapState;
67
86
  removeValueReader(valueReader: ValueReadingEntityState): OutputMapState;
68
- setParent(parent: PassThroughCallableEntityWithOutputsState): OutputMapState;
87
+ setParent(parent: PassThroughCallableEntityWithOutputsState, changeSet?: ChangeSet | null): OutputMapState;
69
88
  setDataType(dataType: DataTypeState): OutputMapState;
70
89
  removeDataType(): OutputMapState;
71
90
  setDeclaration(declaration: ReturnDeclarationState | PropertyState | ValueDescriptorState): OutputMapState;
72
- initChildren(): OutputMapState;
91
+ initChildren(changeSet?: ChangeSet | null): OutputMapState;
73
92
  subscribe(): OutputMapState;
74
93
  unsubscribe(): OutputMapState;
75
- sync(data: Partial<IOutputMap | IOutputMapTransfer | IOutputMapShallowTransfer>): OutputMapState;
94
+ metaSync(data: Partial<IOutputMap | IOutputMapTransfer | IOutputMapShallowTransfer>, changeSet?: ChangeSet | null): OutputMapState;
76
95
  APILoad(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<OutputMapState>;
77
96
  APICreate(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<OutputMapState>;
78
97
  APIUpdate(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<OutputMapState>;
79
98
  APIDelete(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<OutputMapState>;
80
99
  APIClone(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<OutputMapState>;
81
100
  APILoadVersion(_: IEntityPersistanceOptions | undefined, versionIdOrBeforeEqualDate: EntityVersion | Date, ...otherArgs: any[]): Promise<IOutputMapShallowTransfer | null>;
82
- remove({ ignoreUpstream, seenEntities, }?: {
101
+ remove({ ignoreUpstream }?: {
83
102
  ignoreUpstream: boolean;
84
- seenEntities: Set<string>;
85
- }): {
86
- affected: EntityState[];
87
- removed: EntityState[];
88
- };
89
- restore({ seenEntities }?: {
90
- seenEntities: Set<string>;
91
- }): {
92
- affected: EntityState[];
93
- self: OutputMapState;
94
- };
103
+ }, changeSet?: ChangeSet | null): IChangeSet;
104
+ restore({}?: {}, changeSet?: ChangeSet | null): IChangeSet<OutputMapState>;
95
105
  toFlat(seenEntities?: Set<EntityId>): EntityState[];
96
106
  toFlatIds(seenEntities?: Set<EntityId>): EntityId[];
97
107
  toJSON(seenEntities?: Set<EntityId>): IOutputMapTransfer | IOutputMapReference;
@@ -34,19 +34,6 @@ export declare class PrimitiveEntityState extends VersionedState implements Base
34
34
  subscribe(): PrimitiveEntityState;
35
35
  unsubscribe(): PrimitiveEntityState;
36
36
  APILoad(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<PrimitiveEntityState>;
37
- remove({ ignoreUpstream: _, seenEntities: _1, }?: {
38
- ignoreUpstream: boolean;
39
- seenEntities: Set<string>;
40
- }): {
41
- affected: EntityState[];
42
- removed: EntityState[];
43
- };
44
- restore({ seenEntities: _ }?: {
45
- seenEntities: Set<string>;
46
- }): {
47
- affected: EntityState[];
48
- self: PrimitiveEntityState;
49
- };
50
37
  toFlat(seenEntities?: Set<EntityId>): EntityState[];
51
38
  toFlatIds(seenEntities?: Set<EntityId>): EntityId[];
52
39
  toJSON(seenEntities?: Set<EntityId>): IPrimitiveEntityTransfer | IPrimitiveEntityReference;
@@ -1,6 +1,6 @@
1
1
  import { EntityId, EntityType, IProject, IDefinitionEntity, IFunctionDeclaration, IGlobalEvent, Element, IProjectTransfer, IGenericReference, ElementTransfer, Reference, IProjectReference, IFunctionCallTransfer, IDefinitionEntityTransfer, IFunctionDeclarationTransfer, IInstalledProjectTransfer, IVariableDeclarationTransfer, IProjectShallowTransfer, ElementShallowTransfer, ElementGenerationTarget, IProjectGenerationTarget, IConditionTransfer, IOperationTransfer, ProjectTypesUnion, EntityVersion } from '../../../definitions';
2
2
  import { ZodError } from 'zod';
3
- import { BaseState, IEntityPersistanceOptions, IEditableEntityPersistanceRepository, UserManagedEntityStateFunctionality, IEntityJSONCloneOptions, IEntityRecursionOptions } from '../base';
3
+ import { BaseState, IEntityPersistanceOptions, IEditableEntityPersistanceRepository, UserManagedEntityStateTemplate, IEntityJSONCloneOptions, IEntityRecursionOptions } from '../base';
4
4
  import { FunctionDeclarationState } from '../function-declaration';
5
5
  import { GlobalEventState } from '../global-event';
6
6
  import { DefinitionEntityState } from '../definition-entity';
@@ -9,7 +9,7 @@ import { VariableDeclarationState } from '../variable-declaration';
9
9
  import { ConditionState } from '../condition';
10
10
  import { FunctionCallState } from '../function-call';
11
11
  import { OperationState } from '../operation';
12
- import { DataTypeState, EntityState, EntryPointEntityState, PrimitiveEntityState, VariableState } from '..';
12
+ import { ChangeSet, DataTypeState, EntityState, EntryPointEntityState, IChangeSet, PrimitiveEntityState, VariableState } from '..';
13
13
  import { LoopState } from '../loop';
14
14
  import { SearchState } from '../search';
15
15
  import { VariableInstanceState } from '../variable-instance';
@@ -17,7 +17,7 @@ import { BuiltInBaseEntityState } from '../built-in-base-entity';
17
17
  import { EntityError, EntityGenerationError } from '../error';
18
18
  import { ActionDescriptorState } from '../action-descriptor';
19
19
  import { ValueDescriptorState } from '../value-descriptor';
20
- import { IChangeSet, IModuleInjection } from '../types';
20
+ import { IModuleInjection, UserManagedEntityState } from '../types';
21
21
  import { VersionedState } from '../version';
22
22
 
23
23
  export interface UUIDModule {
@@ -25,7 +25,7 @@ export interface UUIDModule {
25
25
  uuid: () => string;
26
26
  fromUUID: (uuid: string) => string;
27
27
  }
28
- export declare class ProjectState extends VersionedState implements IProject, UserManagedEntityStateFunctionality, BaseState {
28
+ export declare class ProjectState extends VersionedState implements IProject, UserManagedEntityStateTemplate, BaseState {
29
29
  initialData: IProject | IProjectTransfer;
30
30
  readonly id: EntityId;
31
31
  type: EntityType.Project;
@@ -55,17 +55,26 @@ export declare class ProjectState extends VersionedState implements IProject, Us
55
55
  dataTypes: DataTypeState[];
56
56
  project: ProjectState;
57
57
  instances: {
58
- [id: string]: EntityState;
58
+ [id: EntityId]: EntityState;
59
59
  };
60
60
  builtInInstances: {
61
- [id: string]: EntityState;
61
+ [id: EntityId]: EntityState;
62
+ };
63
+ deletedInstances: {
64
+ [id: EntityId]: EntityState;
62
65
  };
63
66
  errors: EntityError[];
64
67
  references: IGenericReference[];
65
- history: Record<EntityId, EntityVersion>;
68
+ history: ChangeSet[];
69
+ detachedDependents: Record<EntityId, {
70
+ entity: UserManagedEntityState;
71
+ field: string;
72
+ }>;
66
73
  knownVersions: Map<string, EntityState> | null;
67
74
  activeVersion: boolean;
68
75
  initialized: boolean;
76
+ startedInitialization: boolean;
77
+ onCloseChangeSetCallback: ((changeSet: ChangeSet | null) => void) | null;
69
78
  constructor(initialData: IProject | IProjectTransfer);
70
79
  static UUID: UUIDModule;
71
80
  static injectUUIDModule(module: UUIDModule): void;
@@ -90,6 +99,10 @@ export declare class ProjectState extends VersionedState implements IProject, Us
90
99
  errors: EntityGenerationError[];
91
100
  modifiedData: IProjectGenerationTarget;
92
101
  };
102
+ onCloseChangeSet(callback: (changeSet: ChangeSet | null) => void): void;
103
+ closeChangeSet(changeSet: ChangeSet | null): void;
104
+ addChangeSet(changeSet: ChangeSet): ChangeSet;
105
+ discardChangeSet(changeSet: ChangeSet | null): ProjectState;
93
106
  undo(): IChangeSet<ProjectState>;
94
107
  redo(): IChangeSet<ProjectState>;
95
108
  inject(...injectedModules: IModuleInjection[]): Promise<ProjectState>;
@@ -97,31 +110,41 @@ export declare class ProjectState extends VersionedState implements IProject, Us
97
110
  errors: EntityGenerationError[];
98
111
  modifiedData: Partial<IProjectGenerationTarget>;
99
112
  };
113
+ subscribeDependents(dependencies: {
114
+ entity: UserManagedEntityState;
115
+ field: string;
116
+ }[]): UserManagedEntityState;
117
+ syncDependents(): IChangeSet<UserManagedEntityState>;
118
+ onDetachedDependencyRemoved(_dependency: UserManagedEntityState, _field: string, _changeSet: ChangeSet | null): IChangeSet<UserManagedEntityState>;
119
+ onDetachedDependencyRestored(_dependency: UserManagedEntityState, _field: string, _changeSet: ChangeSet | null): IChangeSet<UserManagedEntityState>;
120
+ subscribeToDependencies(): UserManagedEntityState;
121
+ increaseVersion(sharedTimestamp: null | string): UserManagedEntityState;
100
122
  captureVersion(): ProjectState;
101
- recursiveCaptureUpstreamVersions(): IChangeSet<ProjectState>;
123
+ recursiveCaptureUpstreamVersions(_sharedTimestamp: null | string): IChangeSet<ProjectState>;
102
124
  restoreVersion(versionId: EntityVersion): Promise<IChangeSet<ProjectState>>;
103
125
  hydrateAncestors(): IChangeSet<ProjectState>;
104
- afterAllChildrenInitialized(): IChangeSet<ProjectState>;
105
- addSelfToProject(): IChangeSet<ProjectState>;
126
+ afterAllChildrenInitialized(_changeSet?: ChangeSet | null): IChangeSet<ProjectState>;
127
+ addSelfToProject(_changeSet: ChangeSet | null): IChangeSet<ProjectState>;
106
128
  get instancesList(): EntityState[];
107
129
  isOperationDeclaration(entity: ActionDescriptorState): boolean;
108
130
  isGlobalEventActionDescriptor(entity: ActionDescriptorState): boolean;
109
131
  isLoopDeclaration(entity: ActionDescriptorState): boolean;
110
132
  isConditionDeclaration(entity: ActionDescriptorState): boolean;
111
- initChildren(): ProjectState;
133
+ initChildren(changeSet?: ChangeSet | null): ProjectState;
112
134
  subscribeInstance(instance: EntityState): ProjectState;
135
+ subscribeDeletedInstance(instance: EntityState): ProjectState;
113
136
  subscribeBuiltInInstance(instance: EntityState): ProjectState;
114
137
  subscribe(): ProjectState;
115
138
  unsubscribe(): ProjectState;
116
139
  unsubscribeInstance(entity: EntityState): ProjectState;
117
- findSubscribedInstance(entity: Element | ElementTransfer): EntityState | null;
140
+ unsubscribeDeletedInstance(entity: EntityState): ProjectState;
118
141
  findSubscribedBuiltInInstance(entity: Element | ElementTransfer): EntityState | null;
119
142
  get(entityId: EntityId): EntityState | null;
120
143
  getManaged(entityId: EntityId): EntityState | null;
121
144
  getBuiltIn(entityId: EntityId): EntityState | null;
122
145
  findSubscribedInstanceFromReference(entity: Reference): EntityState | null;
123
146
  findSubscribedBuiltInInstanceFromReference(entity: Reference): EntityState | null;
124
- sync(data: Partial<(IProject & {
147
+ metaSync(data: Partial<(IProject & {
125
148
  x: number;
126
149
  y: number;
127
150
  }) | (IProjectTransfer & {
@@ -130,7 +153,7 @@ export declare class ProjectState extends VersionedState implements IProject, Us
130
153
  }) | (IProjectShallowTransfer & {
131
154
  x: number;
132
155
  y: number;
133
- })>): ProjectState;
156
+ })>, changeSet?: ChangeSet | null): ProjectState;
134
157
  APILoad(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<ProjectState>;
135
158
  APICreate(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<ProjectState>;
136
159
  APIUpdate(_?: IEntityPersistanceOptions, ...otherArgs: any[]): Promise<ProjectState>;
@@ -139,16 +162,8 @@ export declare class ProjectState extends VersionedState implements IProject, Us
139
162
  APILoadVersion(_: IEntityPersistanceOptions | undefined, versionIdOrBeforeEqualDate: EntityVersion | Date, ...otherArgs: any[]): Promise<IProjectShallowTransfer | null>;
140
163
  remove({ ignoreUpstream: _ }?: {
141
164
  ignoreUpstream: boolean;
142
- }): {
143
- affected: EntityState[];
144
- removed: EntityState[];
145
- };
146
- restore({ seenEntities: _ }?: {
147
- seenEntities: Set<string>;
148
- }): {
149
- affected: EntityState[];
150
- self: EntityState;
151
- };
165
+ }, _changeSet?: ChangeSet | null): IChangeSet;
166
+ restore({}?: {}, _changeSet?: ChangeSet | null): IChangeSet<ProjectState>;
152
167
  getAllBuiltInIds(): EntityId[];
153
168
  getAllBuiltIn(): EntityState[];
154
169
  toFlat(seenEntities?: Set<EntityId>): EntityState[];