@elyx-code/project-logic-tree 0.0.6113 → 0.0.6114

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/built-in-base-entities/conditions/index.d.ts +1 -0
  2. package/dist/definitions/built-in-base-entities/entities/execution/index.d.ts +1 -1
  3. package/dist/definitions/built-in-base-entities/entities/index.d.ts +3 -0
  4. package/dist/definitions/built-in-base-entities/global-events/index.d.ts +1 -0
  5. package/dist/definitions/built-in-base-entities/index.d.ts +2 -0
  6. package/dist/definitions/built-in-base-entities/loops/index.d.ts +3 -0
  7. package/dist/definitions/built-in-base-entities/operations/index.d.ts +1 -0
  8. package/dist/definitions/built-in-base-entities/primitive-entities.d.ts +1 -0
  9. package/dist/definitions/built-in-base-entities/value-descriptors/index.d.ts +3 -0
  10. package/dist/definitions/mock/default-mock/entities/alt-relational-database/properties.d.ts +2 -2
  11. package/dist/definitions/mock/default-mock/entities/default-relational-database/properties.d.ts +2 -2
  12. package/dist/definitions/mock/default-mock/entities/get-company-by-id-endpoint/properties.d.ts +3 -3
  13. package/dist/definitions/mock/default-mock/events/project-loaded/get-bitcoin-price/get-bitcoin-price-http-call.d.ts +2 -2
  14. package/dist/definitions/mock/default-mock/functions/concurrency-and-waits/wait.d.ts +2 -2
  15. package/dist/definitions/mock/default-mock/functions/manual-hello-world-loop/loop/break-statement.d.ts +1 -2
  16. package/dist/definitions/mock/default-mock/functions/manual-hello-world-loop/loop/loop.d.ts +2 -2
  17. package/dist/definitions/types/index.d.ts +4 -0
  18. package/dist/definitions/types/variable.d.ts +2 -2
  19. package/dist/index.js +25215 -21575
  20. package/dist/index.umd.cjs +253 -253
  21. package/dist/tree/state/action-descriptor/action-descriptor.d.ts +18 -14
  22. package/dist/tree/state/argument-declaration/argument-declaration.d.ts +16 -12
  23. package/dist/tree/state/argument-declaration/validation/validation-schema.d.ts +4 -4
  24. package/dist/tree/state/base.d.ts +34 -8
  25. package/dist/tree/state/break-statement/break-statement.d.ts +17 -14
  26. package/dist/tree/state/built-in-base-entity/built-in-base-entity.d.ts +10 -10
  27. package/dist/tree/state/built-in-base-entity/validation-schema.d.ts +10 -10
  28. package/dist/tree/state/condition/condition.d.ts +18 -13
  29. package/dist/tree/state/continue-statement/continue-statement.d.ts +17 -14
  30. package/dist/tree/state/custom-entity/custom-entity.d.ts +21 -13
  31. package/dist/tree/state/custom-entity/validation/validation-schema.d.ts +12 -12
  32. package/dist/tree/state/data-type/data-type.d.ts +16 -12
  33. package/dist/tree/state/function-call/function-call.d.ts +18 -13
  34. package/dist/tree/state/function-declaration/function-declaration.d.ts +17 -13
  35. package/dist/tree/state/function-declaration/validation/validation-schema.d.ts +4 -4
  36. package/dist/tree/state/global-event/global-event.d.ts +18 -13
  37. package/dist/tree/state/input-map/input-map.d.ts +19 -15
  38. package/dist/tree/state/installed-project/installed-project.d.ts +17 -13
  39. package/dist/tree/state/internal-call/internal-call.d.ts +22 -13
  40. package/dist/tree/state/literal-value/literal-value.d.ts +16 -12
  41. package/dist/tree/state/loop/loop.d.ts +18 -13
  42. package/dist/tree/state/operation/operation.d.ts +18 -13
  43. package/dist/tree/state/output-map/output-map.d.ts +20 -16
  44. package/dist/tree/state/primitive-entity/primitive-entity.d.ts +10 -10
  45. package/dist/tree/state/primitive-entity/validation/validation-schema.d.ts +10 -10
  46. package/dist/tree/state/project/project.d.ts +17 -12
  47. package/dist/tree/state/project/project.test.d.ts +1 -0
  48. package/dist/tree/state/property/property.d.ts +17 -12
  49. package/dist/tree/state/property/validation/validation-schema.d.ts +12 -12
  50. package/dist/tree/state/return-declaration/return-declaration.d.ts +16 -12
  51. package/dist/tree/state/return-statement/return-statement.d.ts +17 -14
  52. package/dist/tree/state/search/search.d.ts +17 -13
  53. package/dist/tree/state/store.d.ts +1 -0
  54. package/dist/tree/state/value-descriptor/value-descriptor.d.ts +17 -13
  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 +17 -13
  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 +17 -13
  59. package/dist/tree/utils/index.d.ts +96 -4
  60. package/dist/tree/utils/traverser.d.ts +17 -0
  61. package/dist/tree/utils/traverser.test.d.ts +1 -0
  62. package/dist/tree/utils/uuid.d.ts +2 -0
  63. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { ElementGenerationTarget, ElementShallowTransfer, EntityId, EntityType, EntityVersion, IInstalledProject, IInstalledProjectGenerationTarget, IInstalledProjectReference, IInstalledProjectShallowTransfer, IInstalledProjectTransfer, IProjectReference, InstalledProjectTypesUnion } from '../../../definitions';
2
2
  import { ZodError } from 'zod';
3
- import { BaseCanvasDraggableState, BaseState, ChildEntityState, UserManagedEntityStateFunctionality } from '../base';
3
+ import { BaseCanvasDraggableState, BaseState, ChildEntityState, IEditableEntityPersistanceRepository, IEntityJSONCloneOptions, IEntityPersistanceOptions, IEntityRecursionOptions, UserManagedEntityStateFunctionality } from '../base';
4
4
  import { FunctionDeclarationState } from '../function-declaration';
5
5
  import { GlobalEventState } from '../global-event';
6
6
  import { ProjectState } from '../project/project';
@@ -24,6 +24,7 @@ export declare class InstalledProjectState implements IInstalledProject, UserMan
24
24
  project: ProjectState;
25
25
  initialized: boolean;
26
26
  constructor(initialInstalledProjectData: IInstalledProject | IInstalledProjectTransfer, parentProjectState: ProjectState);
27
+ static repository: IEditableEntityPersistanceRepository;
27
28
  static MUTABLE_BASE_PROPERTIES: string[];
28
29
  static INMUTABLE_BASE_PROPERTIES: string[];
29
30
  static BASE_PROPERTIES: string[];
@@ -46,16 +47,18 @@ export declare class InstalledProjectState implements IInstalledProject, UserMan
46
47
  errors: EntityGenerationError[];
47
48
  modifiedData: Partial<IInstalledProjectGenerationTarget>;
48
49
  };
50
+ hydrateAncestors(): IChangeSet<InstalledProjectState>;
51
+ afterAllChildrenInitialized(): IChangeSet<InstalledProjectState>;
49
52
  addSelfToProject(): IChangeSet<InstalledProjectState>;
50
53
  setParent(parent: ProjectState): InstalledProjectState;
51
54
  initChildren(): InstalledProjectState;
52
55
  subscribe(): InstalledProjectState;
53
56
  unsubscribe(): InstalledProjectState;
54
57
  sync(data: Partial<IInstalledProject>): InstalledProjectState;
55
- load(): Promise<InstalledProjectState>;
56
- create(): Promise<InstalledProjectState>;
57
- update(_: Partial<InstalledProjectTypesUnion>): Promise<InstalledProjectState>;
58
- delete(): Promise<InstalledProjectState>;
58
+ load(_?: IEntityPersistanceOptions): Promise<InstalledProjectState>;
59
+ create(_?: IEntityPersistanceOptions): Promise<InstalledProjectState>;
60
+ update(_?: IEntityPersistanceOptions): Promise<InstalledProjectState>;
61
+ delete(_?: IEntityPersistanceOptions): Promise<InstalledProjectState>;
59
62
  remove({ ignoreUpstream: _, seenEntities, }?: {
60
63
  ignoreUpstream: boolean;
61
64
  seenEntities: Set<string>;
@@ -69,14 +72,15 @@ export declare class InstalledProjectState implements IInstalledProject, UserMan
69
72
  affected: EntityState[];
70
73
  self: InstalledProjectState;
71
74
  };
72
- toFlat(seenEntities?: Set<string>): EntityState[];
73
- toFlatIds(seenEntities?: Set<string>): EntityId[];
74
- toJSON(): IInstalledProjectTransfer;
75
- toReference(): IInstalledProjectReference;
76
- toShallowJSON(): IInstalledProjectShallowTransfer;
77
- toFlatJSON(seenEntities?: Set<string>): ElementShallowTransfer[];
75
+ toFlat(seenEntities?: Set<EntityId>): EntityState[];
76
+ toFlatIds(seenEntities?: Set<EntityId>): EntityId[];
77
+ toJSON(seenEntities?: Set<EntityId>): IInstalledProjectTransfer | IInstalledProjectReference;
78
+ toJSONClone(options?: IEntityJSONCloneOptions): IInstalledProjectTransfer | IInstalledProjectReference;
79
+ toReference(options?: IEntityRecursionOptions): IInstalledProjectReference;
80
+ toShallowJSON(options?: IEntityRecursionOptions): IInstalledProjectShallowTransfer;
81
+ toFlatJSON(seenEntities?: Set<EntityId>): ElementShallowTransfer[];
78
82
  toGenerationTarget(): IInstalledProjectGenerationTarget;
79
- toFlatGenerationTarget(seenEntities?: Set<string>): ElementGenerationTarget[];
83
+ toFlatGenerationTarget(seenEntities?: Set<EntityId>): ElementGenerationTarget[];
80
84
  clearErrors(): InstalledProjectState;
81
85
  validate(): {
82
86
  success: boolean;
@@ -85,6 +89,6 @@ export declare class InstalledProjectState implements IInstalledProject, UserMan
85
89
  };
86
90
  getErrors(): EntityError[];
87
91
  getShallowErrors(): EntityError[];
88
- clone(): InstalledProjectState;
92
+ clone(parent?: ProjectState | null, newId?: string | null, subscribe?: boolean): InstalledProjectState;
89
93
  }
90
94
  export type InstalledProjectPayloadUnion = InstalledProjectState | InstalledProjectTypesUnion;
@@ -1,6 +1,6 @@
1
1
  import { ElementGenerationTarget, ElementShallowTransfer, EntityId, EntityType, EntityVersion, IInternalCall, IInternalCallGenerationTarget, IInternalCallReference, IInternalCallShallowTransfer, IInternalCallTransfer, InternalCallTypesUnion } from '../../../definitions';
2
2
  import { ZodError } from 'zod';
3
- import { BaseState, CallableEntityClass, ChildEntityState, PassThroughCallableEntityClass, UserManagedEntityStateFunctionality } from '../base';
3
+ import { BaseState, CallableEntityClass, ChildEntityState, IEditableEntityPersistanceRepository, IEntityJSONCloneOptions, IEntityPersistanceOptions, IEntityRecursionOptions, PassThroughCallableEntityClass, UserManagedEntityStateFunctionality } from '../base';
4
4
  import { ActionInputMapState } from '../input-map';
5
5
  import { ActionOutputMapState } from '../output-map';
6
6
  import { CallableEntityState, CallerEntityState, EntityState, EntryPointEntityState, IChangeSet, PassThroughCallableEntityState, ValueReadingEntityState, VariableState } from '../types';
@@ -30,6 +30,7 @@ export declare class InternalCallState implements IInternalCall, UserManagedEnti
30
30
  initialized: boolean;
31
31
  suggestion: boolean;
32
32
  constructor(initialOperationData: IInternalCall | IInternalCallTransfer, parentProjectState: ProjectState);
33
+ static repository: IEditableEntityPersistanceRepository;
33
34
  static MUTABLE_BASE_PROPERTIES: string[];
34
35
  static INMUTABLE_BASE_PROPERTIES: string[];
35
36
  static BASE_PROPERTIES: string[];
@@ -52,6 +53,8 @@ export declare class InternalCallState implements IInternalCall, UserManagedEnti
52
53
  errors: EntityGenerationError[];
53
54
  modifiedData: Partial<IInternalCallGenerationTarget>;
54
55
  };
56
+ hydrateAncestors(): IChangeSet<InternalCallState>;
57
+ afterAllChildrenInitialized(): IChangeSet<InternalCallState>;
55
58
  addSelfToProject(): IChangeSet<InternalCallState>;
56
59
  get calledBy(): CallerEntityState[];
57
60
  removeInput(input: ActionInputMapState): InternalCallState;
@@ -68,14 +71,15 @@ export declare class InternalCallState implements IInternalCall, UserManagedEnti
68
71
  removeCall(call: CallableEntityState): InternalCallState;
69
72
  removeCaller(caller: CallerEntityState): InternalCallState;
70
73
  setParent(parent: VariableState): InternalCallState;
74
+ setDeclaration(declaration: FunctionDeclarationState): InternalCallState;
71
75
  initChildren(): InternalCallState;
72
76
  subscribe(): InternalCallState;
73
77
  unsubscribe(): InternalCallState;
74
78
  sync(data: Partial<IInternalCall>): InternalCallState;
75
- load(): Promise<InternalCallState>;
76
- create(): Promise<InternalCallState>;
77
- update(_: Partial<InternalCallTypesUnion>): Promise<InternalCallState>;
78
- delete(): Promise<InternalCallState>;
79
+ load(_?: IEntityPersistanceOptions): Promise<InternalCallState>;
80
+ create(_?: IEntityPersistanceOptions): Promise<InternalCallState>;
81
+ update(_?: IEntityPersistanceOptions): Promise<InternalCallState>;
82
+ delete(_?: IEntityPersistanceOptions): Promise<InternalCallState>;
79
83
  remove({ ignoreUpstream, seenEntities, }?: {
80
84
  ignoreUpstream: boolean;
81
85
  seenEntities: Set<string>;
@@ -89,14 +93,15 @@ export declare class InternalCallState implements IInternalCall, UserManagedEnti
89
93
  affected: EntityState[];
90
94
  self: InternalCallState;
91
95
  };
92
- toFlat(seenEntities?: Set<string>): EntityState[];
93
- toFlatIds(seenEntities?: Set<string>): EntityId[];
94
- toJSON(): IInternalCallTransfer;
95
- toReference(): IInternalCallReference;
96
- toShallowJSON(): IInternalCallShallowTransfer;
97
- toFlatJSON(seenEntities?: Set<string>): ElementShallowTransfer[];
96
+ toFlat(seenEntities?: Set<EntityId>): EntityState[];
97
+ toFlatIds(seenEntities?: Set<EntityId>): EntityId[];
98
+ toJSON(seenEntities?: Set<EntityId>): IInternalCallTransfer | IInternalCallReference;
99
+ toJSONClone(options?: IEntityJSONCloneOptions): IInternalCallTransfer | IInternalCallReference;
100
+ toReference(options?: IEntityRecursionOptions): IInternalCallReference;
101
+ toShallowJSON(options?: IEntityRecursionOptions): IInternalCallShallowTransfer;
102
+ toFlatJSON(seenEntities?: Set<EntityId>): ElementShallowTransfer[];
98
103
  toGenerationTarget(): IInternalCallGenerationTarget;
99
- toFlatGenerationTarget(seenEntities?: Set<string>): ElementGenerationTarget[];
104
+ toFlatGenerationTarget(seenEntities?: Set<EntityId>): ElementGenerationTarget[];
100
105
  clearErrors(): InternalCallState;
101
106
  validate(): {
102
107
  success: boolean;
@@ -105,6 +110,10 @@ export declare class InternalCallState implements IInternalCall, UserManagedEnti
105
110
  };
106
111
  getErrors(): EntityError[];
107
112
  getShallowErrors(): EntityError[];
108
- clone(_?: EntryPointEntityState): InternalCallState;
113
+ clone(parent?: VariableState | null, newId?: string | null, subscribe?: boolean): InternalCallState;
114
+ removeUnrecognizedInputs(): IChangeSet<InternalCallState>;
115
+ removeUnrecognizedOutputs(): IChangeSet<InternalCallState>;
116
+ syncMissingFixedInputs(): IChangeSet<InternalCallState>;
117
+ syncMissingFixedOutputs(): IChangeSet<InternalCallState>;
109
118
  }
110
119
  export type InternalCallPayloadUnion = InternalCallState | InternalCallTypesUnion;
@@ -4,7 +4,7 @@ import { CustomEntityState } from '../custom-entity';
4
4
  import { DataTypeState } from '../data-type';
5
5
  import { InputMapState } from '../input-map';
6
6
  import { ZodError } from 'zod';
7
- import { BaseState, ChildEntityState, UserManagedEntityStateFunctionality } from '../base';
7
+ import { BaseState, ChildEntityState, IEditableEntityPersistanceRepository, IEntityJSONCloneOptions, IEntityPersistanceOptions, IEntityRecursionOptions, UserManagedEntityStateFunctionality } from '../base';
8
8
  import { FunctionDeclarationState } from '../function-declaration';
9
9
  import { EntityError, EntityGenerationError } from '../error';
10
10
  import { OperationState } from '../operation';
@@ -34,6 +34,7 @@ export declare class LiteralValueState implements BaseState, UserManagedEntitySt
34
34
  initialized: boolean;
35
35
  standalone: boolean;
36
36
  constructor(initialEntityData: ILiteralValue | ILiteralValueTransfer, parentProjectState: ProjectState);
37
+ static repository: IEditableEntityPersistanceRepository;
37
38
  static MUTABLE_BASE_PROPERTIES: string[];
38
39
  static INMUTABLE_BASE_PROPERTIES: string[];
39
40
  static BASE_PROPERTIES: string[];
@@ -56,6 +57,8 @@ export declare class LiteralValueState implements BaseState, UserManagedEntitySt
56
57
  errors: EntityGenerationError[];
57
58
  modifiedData: Partial<ILiteralValueGenerationTarget>;
58
59
  };
60
+ hydrateAncestors(): IChangeSet<LiteralValueState>;
61
+ afterAllChildrenInitialized(): IChangeSet<LiteralValueState>;
59
62
  addSelfToProject(): IChangeSet<LiteralValueState>;
60
63
  setParent(parent: DataTypeState | InputMapState | PropertyState | ArgumentDeclarationState | ReturnDeclarationState | VariableDeclarationState | VariableInstanceState | ValueDescriptorState | OutputMapState): LiteralValueState;
61
64
  setStandaloneParent(parent: EntityWithValueState): LiteralValueState;
@@ -64,10 +67,10 @@ export declare class LiteralValueState implements BaseState, UserManagedEntitySt
64
67
  subscribe(): LiteralValueState;
65
68
  unsubscribe(): LiteralValueState;
66
69
  sync(data: Partial<ILiteralValue>): LiteralValueState;
67
- load(): Promise<LiteralValueState>;
68
- create(): Promise<LiteralValueState>;
69
- update(_: Partial<LiteralValueTypesUnion>): Promise<LiteralValueState>;
70
- delete(): Promise<LiteralValueState>;
70
+ load(_?: IEntityPersistanceOptions): Promise<LiteralValueState>;
71
+ create(_?: IEntityPersistanceOptions): Promise<LiteralValueState>;
72
+ update(_?: IEntityPersistanceOptions): Promise<LiteralValueState>;
73
+ delete(_?: IEntityPersistanceOptions): Promise<LiteralValueState>;
71
74
  remove({ ignoreUpstream: _, seenEntities, }?: {
72
75
  ignoreUpstream: boolean;
73
76
  seenEntities: Set<string>;
@@ -81,14 +84,15 @@ export declare class LiteralValueState implements BaseState, UserManagedEntitySt
81
84
  affected: EntityState[];
82
85
  self: LiteralValueState;
83
86
  };
84
- toFlat(seenEntities?: Set<string>): EntityState[];
85
- toFlatIds(seenEntities?: Set<string>): EntityId[];
86
- toJSON(): ILiteralValueTransfer;
87
- toReference(): ILiteralValueReference;
88
- toShallowJSON(): ILiteralValueShallowTransfer;
89
- toFlatJSON(seenEntities?: Set<string>): ElementShallowTransfer[];
87
+ toFlat(seenEntities?: Set<EntityId>): EntityState[];
88
+ toFlatIds(seenEntities?: Set<EntityId>): EntityId[];
89
+ toJSON(seenEntities?: Set<EntityId>): ILiteralValueTransfer | ILiteralValueReference;
90
+ toJSONClone(options?: IEntityJSONCloneOptions): ILiteralValueTransfer | ILiteralValueReference;
91
+ toReference(options?: IEntityRecursionOptions): ILiteralValueReference;
92
+ toShallowJSON(options?: IEntityRecursionOptions): ILiteralValueShallowTransfer;
93
+ toFlatJSON(seenEntities?: Set<EntityId>): ElementShallowTransfer[];
90
94
  toGenerationTarget(): ILiteralValueGenerationTarget;
91
- toFlatGenerationTarget(seenEntities?: Set<string>): ElementGenerationTarget[];
95
+ toFlatGenerationTarget(seenEntities?: Set<EntityId>): ElementGenerationTarget[];
92
96
  clearErrors(): LiteralValueState;
93
97
  validate(): {
94
98
  success: boolean;
@@ -1,6 +1,6 @@
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, PassThroughCallableEntityClass, UserManagedEntityStateFunctionality } from '../base';
3
+ import { BaseCanvasDraggableState, BaseState, CallableEntityClass, ChildEntityState, EntityWithLogicScopeClass, IEditableEntityPersistanceRepository, IEntityJSONCloneOptions, IEntityPersistanceOptions, IEntityRecursionOptions, PassThroughCallableEntityClass, UserManagedEntityStateFunctionality } from '../base';
4
4
  import { ActionInputMapState } from '../input-map';
5
5
  import { ActionOutputMapState } from '../output-map';
6
6
  import { CallableEntityState, CallerEntityState, CanvasEntityState, EntityState, EntityWithLogicScopeState, EntryPointEntityState, IChangeSet, PassThroughCallableEntityState } from '../types';
@@ -45,6 +45,7 @@ export declare class LoopState implements ILoop, BaseState, UserManagedEntitySta
45
45
  project: ProjectState;
46
46
  initialized: boolean;
47
47
  constructor(initialOperationData: ILoop | ILoopTransfer, parentProjectState: ProjectState);
48
+ static repository: IEditableEntityPersistanceRepository;
48
49
  static CURRENT_ITERATION_NUMBER_ARG_NAME: string;
49
50
  static CURRENT_VALUE_ARG_NAME: string;
50
51
  static MUTABLE_BASE_PROPERTIES: string[];
@@ -75,6 +76,8 @@ export declare class LoopState implements ILoop, BaseState, UserManagedEntitySta
75
76
  errors: EntityGenerationError[];
76
77
  modifiedData: Partial<ILoopGenerationTarget>;
77
78
  };
79
+ hydrateAncestors(): IChangeSet<LoopState>;
80
+ afterAllChildrenInitialized(): IChangeSet<LoopState>;
78
81
  addSelfToProject(): IChangeSet<LoopState>;
79
82
  get calledBy(): CallerEntityState[];
80
83
  removeInput(input: ActionInputMapState): LoopState;
@@ -94,14 +97,15 @@ export declare class LoopState implements ILoop, BaseState, UserManagedEntitySta
94
97
  replaceDetachedChild(existingChild: CanvasEntityState, newChild: CanvasEntityState): LoopState;
95
98
  subscribeDetachedChild(child: CanvasEntityState): LoopState;
96
99
  setParent(parent: EntityWithLogicScopeState | ProjectState): LoopState;
100
+ setDeclaration(declaration: ActionDescriptorState): LoopState;
97
101
  initChildren(): LoopState;
98
102
  subscribe(): LoopState;
99
103
  unsubscribe(): LoopState;
100
104
  sync(data: Partial<ILoop>): LoopState;
101
- load(): Promise<LoopState>;
102
- create(): Promise<LoopState>;
103
- update(_: Partial<LoopTypesUnion>): Promise<LoopState>;
104
- delete(): Promise<LoopState>;
105
+ load(_?: IEntityPersistanceOptions): Promise<LoopState>;
106
+ create(_?: IEntityPersistanceOptions): Promise<LoopState>;
107
+ update(_?: IEntityPersistanceOptions): Promise<LoopState>;
108
+ delete(_?: IEntityPersistanceOptions): Promise<LoopState>;
105
109
  remove({ ignoreUpstream, seenEntities, }?: {
106
110
  ignoreUpstream: boolean;
107
111
  seenEntities: Set<string>;
@@ -115,14 +119,15 @@ export declare class LoopState implements ILoop, BaseState, UserManagedEntitySta
115
119
  affected: EntityState[];
116
120
  self: LoopState;
117
121
  };
118
- toFlat(seenEntities?: Set<string>): EntityState[];
119
- toFlatIds(seenEntities?: Set<string>): EntityId[];
120
- toJSON(): ILoopTransfer;
121
- toReference(): ILoopReference;
122
- toShallowJSON(): ILoopShallowTransfer;
123
- toFlatJSON(seenEntities?: Set<string>): ElementShallowTransfer[];
122
+ toFlat(seenEntities?: Set<EntityId>): EntityState[];
123
+ toFlatIds(seenEntities?: Set<EntityId>): EntityId[];
124
+ toJSON(seenEntities?: Set<EntityId>): ILoopTransfer | ILoopReference;
125
+ toJSONClone(options?: IEntityJSONCloneOptions): ILoopTransfer | ILoopReference;
126
+ toReference(options?: IEntityRecursionOptions): ILoopReference;
127
+ toShallowJSON(options?: IEntityRecursionOptions): ILoopShallowTransfer;
128
+ toFlatJSON(seenEntities?: Set<EntityId>): ElementShallowTransfer[];
124
129
  toGenerationTarget(): ILoopGenerationTarget;
125
- toFlatGenerationTarget(seenEntities?: Set<string>): ElementGenerationTarget[];
130
+ toFlatGenerationTarget(seenEntities?: Set<EntityId>): ElementGenerationTarget[];
126
131
  clearErrors(): LoopState;
127
132
  validate(): {
128
133
  success: boolean;
@@ -131,7 +136,7 @@ export declare class LoopState implements ILoop, BaseState, UserManagedEntitySta
131
136
  };
132
137
  getErrors(): EntityError[];
133
138
  getShallowErrors(): EntityError[];
134
- clone(_?: EntryPointEntityState): LoopState;
139
+ clone(parent?: EntryPointEntityState | ProjectState | null, newId?: string | null, subscribe?: boolean): LoopState;
135
140
  getVariableInstances(): VariableInstanceState[];
136
141
  addReturnStatement(statement: ReturnStatementState): LoopState;
137
142
  removeReturnStatement(statement: ReturnStatementState): LoopState;
@@ -1,6 +1,6 @@
1
1
  import { ElementGenerationTarget, ElementShallowTransfer, EntityId, EntityType, EntityVersion, IOperation, IOperationGenerationTarget, IOperationReference, IOperationShallowTransfer, IOperationTransfer, OperationTypesUnion } from '../../../definitions';
2
2
  import { ZodError } from 'zod';
3
- import { BaseCanvasDraggableState, BaseState, CallableEntityClass, ChildEntityState, PassThroughCallableEntityClass, UserManagedEntityStateFunctionality } from '../base';
3
+ import { BaseCanvasDraggableState, BaseState, CallableEntityClass, ChildEntityState, IEditableEntityPersistanceRepository, IEntityJSONCloneOptions, IEntityPersistanceOptions, IEntityRecursionOptions, PassThroughCallableEntityClass, UserManagedEntityStateFunctionality } 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';
@@ -30,6 +30,7 @@ export declare class OperationState implements IOperation, BaseState, UserManage
30
30
  project: ProjectState;
31
31
  initialized: boolean;
32
32
  constructor(initialOperationData: IOperation | IOperationTransfer, parentProjectState: ProjectState);
33
+ static repository: IEditableEntityPersistanceRepository;
33
34
  static MUTABLE_BASE_PROPERTIES: string[];
34
35
  static INMUTABLE_BASE_PROPERTIES: string[];
35
36
  static BASE_PROPERTIES: string[];
@@ -52,6 +53,8 @@ export declare class OperationState implements IOperation, BaseState, UserManage
52
53
  errors: EntityGenerationError[];
53
54
  modifiedData: Partial<IOperationGenerationTarget>;
54
55
  };
56
+ hydrateAncestors(): IChangeSet<OperationState>;
57
+ afterAllChildrenInitialized(): IChangeSet<OperationState>;
55
58
  addSelfToProject(): IChangeSet<OperationState>;
56
59
  get calledBy(): CallerEntityState[];
57
60
  removeInput(input: ActionInputMapState): OperationState;
@@ -68,14 +71,15 @@ export declare class OperationState implements IOperation, BaseState, UserManage
68
71
  removeCall(call: CallableEntityState): OperationState;
69
72
  removeCaller(caller: CallerEntityState): OperationState;
70
73
  setParent(parent: EntityWithLogicScopeState | ProjectState): OperationState;
74
+ setDeclaration(declaration: ActionDescriptorState): OperationState;
71
75
  initChildren(): OperationState;
72
76
  subscribe(): OperationState;
73
77
  unsubscribe(): OperationState;
74
78
  sync(data: Partial<IOperation>): OperationState;
75
- load(): Promise<OperationState>;
76
- create(): Promise<OperationState>;
77
- update(_: Partial<OperationTypesUnion>): Promise<OperationState>;
78
- delete(): Promise<OperationState>;
79
+ load(_?: IEntityPersistanceOptions): Promise<OperationState>;
80
+ create(_?: IEntityPersistanceOptions): Promise<OperationState>;
81
+ update(_?: IEntityPersistanceOptions): Promise<OperationState>;
82
+ delete(_?: IEntityPersistanceOptions): Promise<OperationState>;
79
83
  remove({ ignoreUpstream, seenEntities, }?: {
80
84
  ignoreUpstream: boolean;
81
85
  seenEntities: Set<string>;
@@ -89,14 +93,15 @@ export declare class OperationState implements IOperation, BaseState, UserManage
89
93
  affected: EntityState[];
90
94
  self: EntityState;
91
95
  };
92
- toFlat(seenEntities?: Set<string>): EntityState[];
93
- toFlatIds(seenEntities?: Set<string>): EntityId[];
94
- toJSON(): IOperationTransfer;
95
- toReference(): IOperationReference;
96
- toShallowJSON(): IOperationShallowTransfer;
97
- toFlatJSON(seenEntities?: Set<string>): ElementShallowTransfer[];
96
+ toFlat(seenEntities?: Set<EntityId>): EntityState[];
97
+ toFlatIds(seenEntities?: Set<EntityId>): EntityId[];
98
+ toJSON(seenEntities?: Set<EntityId>): IOperationTransfer | IOperationReference;
99
+ toJSONClone(options?: IEntityJSONCloneOptions): IOperationTransfer | IOperationReference;
100
+ toReference(options?: IEntityRecursionOptions): IOperationReference;
101
+ toShallowJSON(options?: IEntityRecursionOptions): IOperationShallowTransfer;
102
+ toFlatJSON(seenEntities?: Set<EntityId>): ElementShallowTransfer[];
98
103
  toGenerationTarget(): IOperationGenerationTarget;
99
- toFlatGenerationTarget(seenEntities?: Set<string>): ElementGenerationTarget[];
104
+ toFlatGenerationTarget(seenEntities?: Set<EntityId>): ElementGenerationTarget[];
100
105
  clearErrors(): OperationState;
101
106
  validate(): {
102
107
  success: boolean;
@@ -105,7 +110,7 @@ export declare class OperationState implements IOperation, BaseState, UserManage
105
110
  };
106
111
  getErrors(): EntityError[];
107
112
  getShallowErrors(): EntityError[];
108
- clone(_?: EntryPointEntityState): OperationState;
113
+ clone(parent?: EntryPointEntityState | ProjectState | null, newId?: string | null, subscribe?: boolean): OperationState;
109
114
  removeUnrecognizedInputs(): IChangeSet<OperationState>;
110
115
  removeUnrecognizedOutputs(): IChangeSet<OperationState>;
111
116
  syncMissingFixedInputs(): IChangeSet<OperationState>;
@@ -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, UserManagedEntityStateFunctionality, ValueWritingEntityClass } from '../base';
3
+ import { BaseState, ChildEntityState, EntityWithValueClass, IEditableEntityPersistanceRepository, IEntityJSONCloneOptions, IEntityPersistanceOptions, IEntityRecursionOptions, UserManagedEntityStateFunctionality, ValueWritingEntityClass } from '../base';
4
4
  import { ReturnDeclarationState } from '../return-declaration';
5
- import { EntityState, IChangeSet, PassThroughCallableEntityState, PassThroughCallableEntityWithOutputsState, ValueReadingEntityState } from '../types';
5
+ import { EntityState, IChangeSet, PassThroughCallableEntityWithOutputsState, ValueReadingEntityState } from '../types';
6
6
  import { ProjectState } from '../project/project';
7
7
  import { VariableDeclarationState } from '../variable-declaration';
8
8
  import { VariableInstanceState } from '../variable-instance';
@@ -29,6 +29,7 @@ export declare class OutputMapState implements IOutputMap, UserManagedEntityStat
29
29
  initialized: boolean;
30
30
  suggestion: boolean;
31
31
  constructor(initialReturnVariableMapData: IOutputMap | IOutputMapTransfer, parentProjectState: ProjectState);
32
+ static repository: IEditableEntityPersistanceRepository;
32
33
  static MUTABLE_BASE_PROPERTIES: string[];
33
34
  static INMUTABLE_BASE_PROPERTIES: string[];
34
35
  static BASE_PROPERTIES: string[];
@@ -51,6 +52,8 @@ export declare class OutputMapState implements IOutputMap, UserManagedEntityStat
51
52
  errors: EntityGenerationError[];
52
53
  modifiedData: Partial<IOutputMapGenerationTarget>;
53
54
  };
55
+ hydrateAncestors(): IChangeSet<OutputMapState>;
56
+ afterAllChildrenInitialized(): IChangeSet<OutputMapState>;
54
57
  addSelfToProject(): IChangeSet<OutputMapState>;
55
58
  addValueReader(entity: ValueReadingEntityState): OutputMapState;
56
59
  removeValueReader(valueReader: ValueReadingEntityState): OutputMapState;
@@ -62,10 +65,10 @@ export declare class OutputMapState implements IOutputMap, UserManagedEntityStat
62
65
  subscribe(): OutputMapState;
63
66
  unsubscribe(): OutputMapState;
64
67
  sync(data: Partial<IOutputMap>): OutputMapState;
65
- load(): Promise<OutputMapState>;
66
- create(): Promise<OutputMapState>;
67
- update(_: Partial<OutputMapTypesUnion>): Promise<OutputMapState>;
68
- delete(): Promise<OutputMapState>;
68
+ load(_?: IEntityPersistanceOptions): Promise<OutputMapState>;
69
+ create(_?: IEntityPersistanceOptions): Promise<OutputMapState>;
70
+ update(_?: IEntityPersistanceOptions): Promise<OutputMapState>;
71
+ delete(_?: IEntityPersistanceOptions): Promise<OutputMapState>;
69
72
  remove({ ignoreUpstream, seenEntities, }?: {
70
73
  ignoreUpstream: boolean;
71
74
  seenEntities: Set<string>;
@@ -79,14 +82,15 @@ export declare class OutputMapState implements IOutputMap, UserManagedEntityStat
79
82
  affected: EntityState[];
80
83
  self: OutputMapState;
81
84
  };
82
- toFlat(seenEntities?: Set<string>): EntityState[];
83
- toFlatIds(seenEntities?: Set<string>): EntityId[];
84
- toJSON(): IOutputMapTransfer;
85
- toReference(): IOutputMapReference;
86
- toShallowJSON(): IOutputMapShallowTransfer;
87
- toFlatJSON(seenEntities?: Set<string>): ElementShallowTransfer[];
85
+ toFlat(seenEntities?: Set<EntityId>): EntityState[];
86
+ toFlatIds(seenEntities?: Set<EntityId>): EntityId[];
87
+ toJSON(seenEntities?: Set<EntityId>): IOutputMapTransfer | IOutputMapReference;
88
+ toJSONClone(options?: IEntityJSONCloneOptions): IOutputMapTransfer | IOutputMapReference;
89
+ toReference(options?: IEntityRecursionOptions): IOutputMapReference;
90
+ toShallowJSON(options?: IEntityRecursionOptions): IOutputMapShallowTransfer;
91
+ toFlatJSON(seenEntities?: Set<EntityId>): ElementShallowTransfer[];
88
92
  toGenerationTarget(): IOutputMapGenerationTarget;
89
- toFlatGenerationTarget(seenEntities?: Set<string>): ElementGenerationTarget[];
93
+ toFlatGenerationTarget(seenEntities?: Set<EntityId>): ElementGenerationTarget[];
90
94
  clearErrors(): OutputMapState;
91
95
  validate(): {
92
96
  success: boolean;
@@ -97,7 +101,7 @@ export declare class OutputMapState implements IOutputMap, UserManagedEntityStat
97
101
  getShallowErrors(): EntityError[];
98
102
  getDefaultValue(): LiteralValueState | null;
99
103
  setDefaultValue(defaultValue: LiteralValueState): OutputMapState;
100
- clone(_?: PassThroughCallableEntityState): OutputMapState;
104
+ clone(parent?: PassThroughCallableEntityWithOutputsState | null, newId?: string | null, subscribe?: boolean): OutputMapState;
101
105
  getDataType(): DataTypeState | null;
102
106
  }
103
107
  export declare class VariableOutputMapState extends OutputMapState implements IVariableOutputMap {
@@ -105,13 +109,13 @@ export declare class VariableOutputMapState extends OutputMapState implements IV
105
109
  parent: VariableInstanceState | VariableDeclarationState;
106
110
  errors: EntityError[];
107
111
  constructor(initialVariableInputMapData: IVariableOutputMap | IVariableOutputMapTransfer, parentProjectState: ProjectState);
108
- toJSON(): IVariableOutputMap;
112
+ toJSON(seenEntities?: Set<EntityId>): IVariableOutputMap | IOutputMapReference;
109
113
  }
110
114
  export declare class ActionOutputMapState extends OutputMapState implements IActionOutputMap {
111
115
  declaration: ReturnDeclarationState | ValueDescriptorState;
112
116
  parent: PassThroughCallableEntityWithOutputsState;
113
117
  errors: EntityError[];
114
118
  constructor(initialActionOutputMapData: IActionOutputMap | IActionOutputMapTransfer, parentProjectState: ProjectState);
115
- toJSON(): IActionOutputMap;
119
+ toJSON(seenEntities?: Set<EntityId>): IActionOutputMap | IOutputMapReference;
116
120
  }
117
121
  export type OutputMapPayloadUnion = OutputMapState | OutputMapTypesUnion;
@@ -1,6 +1,6 @@
1
1
  import { EntityId, EntityType, EntityVersion, IPrimitiveEntity, PrimitiveTypes, IPrimitiveEntityTransfer, IPrimitiveEntityReference, IPrimitiveEntityShallowTransfer, ElementShallowTransfer, IPrimitiveEntityGenerationTarget, ElementGenerationTarget, PrimitiveEntityTypesUnion } from '../../../definitions';
2
2
  import { ZodError } from 'zod';
3
- import { BaseState } from '../base';
3
+ import { BaseState, IEntityPersistanceOptions, IEntityRecursionOptions, IReadOnlyEntityPersistanceRepository } from '../base';
4
4
  import { PropertyState } from '../property';
5
5
  import { ProjectState } from '../project/project';
6
6
  import { BuiltInBaseEntityState } from '../built-in-base-entity';
@@ -25,6 +25,7 @@ export declare class PrimitiveEntityState implements BaseState, IPrimitiveEntity
25
25
  errors: EntityError[];
26
26
  project: ProjectState;
27
27
  constructor(initialEntityData: IPrimitiveEntity | IPrimitiveEntityTransfer, parentProjectState: ProjectState);
28
+ static repository: IReadOnlyEntityPersistanceRepository;
28
29
  get allBasePropertiesFromExtendedAndImplementedEntities(): PropertyState[];
29
30
  get extendedPropertiesFromOriginalParents(): PropertyState[];
30
31
  get implementedPropertiesFromOriginalParents(): PropertyState[];
@@ -32,7 +33,7 @@ export declare class PrimitiveEntityState implements BaseState, IPrimitiveEntity
32
33
  get ownDeclaredProperties(): PropertyState[];
33
34
  subscribe(): PrimitiveEntityState;
34
35
  unsubscribe(): PrimitiveEntityState;
35
- load(): Promise<PrimitiveEntityState>;
36
+ load(_?: IEntityPersistanceOptions): Promise<PrimitiveEntityState>;
36
37
  remove({ ignoreUpstream: _, seenEntities: _1, }?: {
37
38
  ignoreUpstream: boolean;
38
39
  seenEntities: Set<string>;
@@ -46,14 +47,14 @@ export declare class PrimitiveEntityState implements BaseState, IPrimitiveEntity
46
47
  affected: EntityState[];
47
48
  self: PrimitiveEntityState;
48
49
  };
49
- toFlat(seenEntities?: Set<string>): EntityState[];
50
- toFlatIds(seenEntities?: Set<string>): EntityId[];
51
- toJSON(): IPrimitiveEntityTransfer;
52
- toReference(): IPrimitiveEntityReference;
53
- toShallowJSON(): IPrimitiveEntityShallowTransfer;
54
- toFlatJSON(seenEntities?: Set<string>): ElementShallowTransfer[];
50
+ toFlat(seenEntities?: Set<EntityId>): EntityState[];
51
+ toFlatIds(seenEntities?: Set<EntityId>): EntityId[];
52
+ toJSON(seenEntities?: Set<EntityId>): IPrimitiveEntityTransfer | IPrimitiveEntityReference;
53
+ toReference(_?: IEntityRecursionOptions): IPrimitiveEntityReference;
54
+ toShallowJSON(_?: IEntityRecursionOptions): IPrimitiveEntityShallowTransfer;
55
+ toFlatJSON(seenEntities?: Set<EntityId>): ElementShallowTransfer[];
55
56
  toGenerationTarget(): IPrimitiveEntityGenerationTarget;
56
- toFlatGenerationTarget(seenEntities?: Set<string>): ElementGenerationTarget[];
57
+ toFlatGenerationTarget(seenEntities?: Set<EntityId>): ElementGenerationTarget[];
57
58
  clearErrors(): PrimitiveEntityState;
58
59
  validate(): {
59
60
  success: boolean;
@@ -62,7 +63,6 @@ export declare class PrimitiveEntityState implements BaseState, IPrimitiveEntity
62
63
  };
63
64
  getErrors(): EntityError[];
64
65
  getShallowErrors(): EntityError[];
65
- clone(): PrimitiveEntityState;
66
66
  getAllInteractiveMethods(): FunctionDeclarationState[];
67
67
  }
68
68
  export type PrimitiveEntityPayloadUnion = PrimitiveEntityState | PrimitiveEntityTypesUnion;
@@ -36,15 +36,15 @@ export declare function getPrimitiveEntityBaseSchema(): z.ZodObject<{
36
36
  type: EntityType.PrimitiveEntity;
37
37
  name: string;
38
38
  description: string | null;
39
- abstract: boolean;
40
39
  static: boolean;
40
+ abstract: boolean;
41
41
  }, {
42
42
  id: string;
43
43
  type: EntityType.PrimitiveEntity;
44
44
  name: string;
45
45
  description: string | null;
46
- abstract: boolean;
47
46
  static: boolean;
47
+ abstract: boolean;
48
48
  }>;
49
49
  export declare function getPrimitiveEntityMetaSchema(): z.ZodObject<z.objectUtil.extendShape<{
50
50
  id: z.ZodString;
@@ -61,16 +61,16 @@ export declare function getPrimitiveEntityMetaSchema(): z.ZodObject<z.objectUtil
61
61
  name: string;
62
62
  description: string | null;
63
63
  version: number;
64
- abstract: boolean;
65
64
  static: boolean;
65
+ abstract: boolean;
66
66
  }, {
67
67
  id: string;
68
68
  type: EntityType.PrimitiveEntity;
69
69
  name: string;
70
70
  description: string | null;
71
71
  version: number;
72
- abstract: boolean;
73
72
  static: boolean;
73
+ abstract: boolean;
74
74
  }>;
75
75
  export declare function getPrimitiveEntityGenericGenerationTargetSchema(): z.ZodObject<z.objectUtil.extendShape<{
76
76
  id: z.ZodString;
@@ -84,15 +84,15 @@ export declare function getPrimitiveEntityGenericGenerationTargetSchema(): z.Zod
84
84
  type: EntityType.PrimitiveEntity;
85
85
  name: string;
86
86
  description: string | null;
87
- abstract: boolean;
88
87
  static: boolean;
88
+ abstract: boolean;
89
89
  }, {
90
90
  id: string;
91
91
  type: EntityType.PrimitiveEntity;
92
92
  name: string;
93
93
  description: string | null;
94
- abstract: boolean;
95
94
  static: boolean;
95
+ abstract: boolean;
96
96
  }>;
97
97
  export declare function getPrimitiveEntityNestedEntitiesSchema(): z.ZodObject<{
98
98
  properties: z.ZodArray<z.ZodUnion<[z.ZodObject<{
@@ -215,8 +215,6 @@ export declare function getPrimitiveEntitySchema(): z.ZodObject<z.objectUtil.ext
215
215
  type: EntityType.BuiltInBaseEntity;
216
216
  })[];
217
217
  version: number;
218
- abstract: boolean;
219
- static: boolean;
220
218
  methods: (Record<string, any> | {
221
219
  type: EntityType.FunctionDeclaration;
222
220
  })[];
@@ -226,6 +224,8 @@ export declare function getPrimitiveEntitySchema(): z.ZodObject<z.objectUtil.ext
226
224
  abstractMethods: (Record<string, any> | {
227
225
  type: EntityType.ActionDescriptor;
228
226
  })[];
227
+ static: boolean;
228
+ abstract: boolean;
229
229
  }, {
230
230
  id: string;
231
231
  type: EntityType.PrimitiveEntity;
@@ -237,8 +237,6 @@ export declare function getPrimitiveEntitySchema(): z.ZodObject<z.objectUtil.ext
237
237
  type: EntityType.BuiltInBaseEntity;
238
238
  })[];
239
239
  version: number;
240
- abstract: boolean;
241
- static: boolean;
242
240
  methods: (Record<string, any> | {
243
241
  type: EntityType.FunctionDeclaration;
244
242
  })[];
@@ -248,4 +246,6 @@ export declare function getPrimitiveEntitySchema(): z.ZodObject<z.objectUtil.ext
248
246
  abstractMethods: (Record<string, any> | {
249
247
  type: EntityType.ActionDescriptor;
250
248
  })[];
249
+ static: boolean;
250
+ abstract: boolean;
251
251
  }>;