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

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 +25358 -21568
  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 { EntityId, EntityType, EntityVersion, IProject, ICustomEntity, IFunctionDeclaration, IGlobalEvent, Element, IProjectTransfer, IGenericReference, ElementTransfer, Reference, IProjectReference, IFunctionCallTransfer, ICustomEntityTransfer, IFunctionDeclarationTransfer, IInstalledProjectTransfer, IVariableDeclarationTransfer, IProjectShallowTransfer, ElementShallowTransfer, ElementGenerationTarget, IProjectGenerationTarget, IConditionTransfer, IOperationTransfer, ProjectTypesUnion } from '../../../definitions';
2
2
  import { ZodError } from 'zod';
3
- import { BaseState, UserManagedEntityStateFunctionality } from '../base';
3
+ import { BaseState, IEntityPersistanceOptions, IEditableEntityPersistanceRepository, UserManagedEntityStateFunctionality, IEntityJSONCloneOptions, IEntityRecursionOptions } from '../base';
4
4
  import { FunctionDeclarationState } from '../function-declaration';
5
5
  import { GlobalEventState } from '../global-event';
6
6
  import { CustomEntityState } from '../custom-entity';
@@ -62,9 +62,11 @@ export declare class ProjectState implements IProject, UserManagedEntityStateFun
62
62
  };
63
63
  errors: EntityError[];
64
64
  references: IGenericReference[];
65
+ initialized: boolean;
65
66
  constructor(initialProjectData: IProject | IProjectTransfer);
66
67
  static UUID: UUIDModule;
67
68
  static injectUUIDModule(module: UUIDModule): void;
69
+ static repository: IEditableEntityPersistanceRepository;
68
70
  static MUTABLE_BASE_PROPERTIES: string[];
69
71
  static INMUTABLE_BASE_PROPERTIES: string[];
70
72
  static BASE_PROPERTIES: string[];
@@ -87,6 +89,8 @@ export declare class ProjectState implements IProject, UserManagedEntityStateFun
87
89
  errors: EntityGenerationError[];
88
90
  modifiedData: Partial<IProjectGenerationTarget>;
89
91
  };
92
+ hydrateAncestors(): IChangeSet<ProjectState>;
93
+ afterAllChildrenInitialized(): IChangeSet<ProjectState>;
90
94
  addSelfToProject(): IChangeSet<ProjectState>;
91
95
  get instancesList(): EntityState[];
92
96
  isOperationDeclaration(entity: ActionDescriptorState): boolean;
@@ -110,10 +114,10 @@ export declare class ProjectState implements IProject, UserManagedEntityStateFun
110
114
  x: number;
111
115
  y: number;
112
116
  }>): ProjectState;
113
- load(): Promise<ProjectState>;
114
- create(): Promise<ProjectState>;
115
- update(_: Partial<ProjectTypesUnion>): Promise<ProjectState>;
116
- delete(): Promise<ProjectState>;
117
+ load(_?: IEntityPersistanceOptions): Promise<ProjectState>;
118
+ create(_?: IEntityPersistanceOptions): Promise<ProjectState>;
119
+ update(_?: IEntityPersistanceOptions): Promise<ProjectState>;
120
+ delete(_?: IEntityPersistanceOptions): Promise<ProjectState>;
117
121
  remove({ ignoreUpstream: _ }?: {
118
122
  ignoreUpstream: boolean;
119
123
  }): {
@@ -128,14 +132,15 @@ export declare class ProjectState implements IProject, UserManagedEntityStateFun
128
132
  };
129
133
  getAllBuiltInIds(): EntityId[];
130
134
  getAllBuiltIn(): EntityState[];
131
- toFlat(seenEntities?: Set<string>): EntityState[];
132
- toFlatIds(seenEntities?: Set<string>): EntityId[];
133
- toJSON(): IProjectTransfer;
134
- toReference(): IProjectReference;
135
- toShallowJSON(): IProjectShallowTransfer;
136
- toFlatJSON(seenEntities?: Set<string>): ElementShallowTransfer[];
135
+ toFlat(seenEntities?: Set<EntityId>): EntityState[];
136
+ toFlatIds(seenEntities?: Set<EntityId>): EntityId[];
137
+ toJSON(seenEntities?: Set<EntityId>): IProjectTransfer | IProjectReference;
138
+ toJSONClone(options?: IEntityJSONCloneOptions): IProjectTransfer;
139
+ toReference(options?: IEntityRecursionOptions): IProjectReference;
140
+ toShallowJSON(options?: IEntityRecursionOptions): IProjectShallowTransfer;
141
+ toFlatJSON(seenEntities?: Set<EntityId>): ElementShallowTransfer[];
137
142
  toGenerationTarget(): IProjectGenerationTarget;
138
- toFlatGenerationTarget(seenEntities?: Set<string>): ElementGenerationTarget[];
143
+ toFlatGenerationTarget(seenEntities?: Set<EntityId>): ElementGenerationTarget[];
139
144
  clearErrors(): ProjectState;
140
145
  validate(): {
141
146
  success: boolean;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { ElementGenerationTarget, ElementShallowTransfer, EntityId, EntityType, EntityVersion, IProperty, IPropertyGenerationTarget, IPropertyReference, IPropertyShallowTransfer, IPropertyTransfer, PropertyTypesUnion } from '../../../definitions';
2
2
  import { ZodError } from 'zod';
3
- import { BaseState, ChildEntityState, EntityWithValueClass, UserManagedEntityStateFunctionality } from '../base';
3
+ import { BaseState, ChildEntityState, EntityWithValueClass, IEntityPersistanceOptions, IEditableEntityPersistanceRepository, UserManagedEntityStateFunctionality, IEntityJSONCloneOptions, IEntityRecursionOptions } from '../base';
4
4
  import { DataTypeState } from '../data-type';
5
5
  import { ProjectState } from '../project/project';
6
6
  import { PrimitiveEntityState } from '../primitive-entity';
@@ -32,6 +32,7 @@ export declare class PropertyState implements IProperty, UserManagedEntityStateF
32
32
  initialized: boolean;
33
33
  suggestion: boolean;
34
34
  constructor(initialPropertyData: IProperty | IPropertyTransfer, parentProjectState: ProjectState);
35
+ static repository: IEditableEntityPersistanceRepository;
35
36
  static MUTABLE_BASE_PROPERTIES: string[];
36
37
  static INMUTABLE_BASE_PROPERTIES: string[];
37
38
  static BASE_PROPERTIES: string[];
@@ -55,16 +56,19 @@ export declare class PropertyState implements IProperty, UserManagedEntityStateF
55
56
  errors: EntityGenerationError[];
56
57
  modifiedData: Partial<IPropertyGenerationTarget>;
57
58
  };
59
+ hydrateAncestors(): IChangeSet<PropertyState>;
60
+ afterAllChildrenInitialized(): IChangeSet<PropertyState>;
58
61
  addSelfToProject(): IChangeSet<PropertyState>;
59
62
  setParent(parent: CustomEntityState | PrimitiveEntityState | BuiltInBaseEntityState): PropertyState;
63
+ setImplements(implementsEntity: PropertyState): PropertyState;
60
64
  initChildren(): PropertyState;
61
65
  subscribe(): PropertyState;
62
66
  unsubscribe(): PropertyState;
63
67
  sync(data: Partial<IProperty>): PropertyState;
64
- load(): Promise<PropertyState>;
65
- create(): Promise<PropertyState>;
66
- update(_: Partial<PropertyTypesUnion>): Promise<PropertyState>;
67
- delete(): Promise<PropertyState>;
68
+ load(_?: IEntityPersistanceOptions): Promise<PropertyState>;
69
+ create(_?: IEntityPersistanceOptions): Promise<PropertyState>;
70
+ update(_?: IEntityPersistanceOptions): Promise<PropertyState>;
71
+ delete(_?: IEntityPersistanceOptions): Promise<PropertyState>;
68
72
  remove({ ignoreUpstream, seenEntities, }?: {
69
73
  ignoreUpstream: boolean;
70
74
  seenEntities: Set<string>;
@@ -78,14 +82,15 @@ export declare class PropertyState implements IProperty, UserManagedEntityStateF
78
82
  affected: EntityState[];
79
83
  self: PropertyState;
80
84
  };
81
- toFlat(seenEntities?: Set<string>): EntityState[];
82
- toFlatIds(seenEntities?: Set<string>): EntityId[];
83
- toJSON(): IPropertyTransfer;
84
- toReference(): IPropertyReference;
85
- toShallowJSON(): IPropertyShallowTransfer;
86
- toFlatJSON(seenEntities?: Set<string>): ElementShallowTransfer[];
85
+ toFlat(seenEntities?: Set<EntityId>): EntityState[];
86
+ toFlatIds(seenEntities?: Set<EntityId>): EntityId[];
87
+ toJSON(seenEntities?: Set<EntityId>): IPropertyTransfer | IPropertyReference;
88
+ toJSONClone(options?: IEntityJSONCloneOptions): IPropertyTransfer | IPropertyReference;
89
+ toReference(options?: IEntityRecursionOptions): IPropertyReference;
90
+ toShallowJSON(options?: IEntityRecursionOptions): IPropertyShallowTransfer;
91
+ toFlatJSON(seenEntities?: Set<EntityId>): ElementShallowTransfer[];
87
92
  toGenerationTarget(): IPropertyGenerationTarget;
88
- toFlatGenerationTarget(seenEntities?: Set<string>): ElementGenerationTarget[];
93
+ toFlatGenerationTarget(seenEntities?: Set<EntityId>): ElementGenerationTarget[];
89
94
  clearErrors(): PropertyState;
90
95
  validate(): {
91
96
  success: boolean;
@@ -40,8 +40,8 @@ export declare function getPropertyBaseSchema(): z.ZodObject<{
40
40
  description: string | null;
41
41
  required: boolean;
42
42
  private: boolean;
43
- abstract: boolean;
44
43
  static: boolean;
44
+ abstract: boolean;
45
45
  }, {
46
46
  id: string;
47
47
  type: EntityType.Property;
@@ -49,8 +49,8 @@ export declare function getPropertyBaseSchema(): z.ZodObject<{
49
49
  description: string | null;
50
50
  required: boolean;
51
51
  private: boolean;
52
- abstract: boolean;
53
52
  static: boolean;
53
+ abstract: boolean;
54
54
  }>;
55
55
  export declare function getPropertyMetaSchema(): z.ZodObject<z.objectUtil.extendShape<{
56
56
  id: z.ZodString;
@@ -72,9 +72,9 @@ export declare function getPropertyMetaSchema(): z.ZodObject<z.objectUtil.extend
72
72
  required: boolean;
73
73
  private: boolean;
74
74
  version: number;
75
- index: number;
76
- abstract: boolean;
77
75
  static: boolean;
76
+ abstract: boolean;
77
+ index: number;
78
78
  }, {
79
79
  id: string;
80
80
  type: EntityType.Property;
@@ -83,9 +83,9 @@ export declare function getPropertyMetaSchema(): z.ZodObject<z.objectUtil.extend
83
83
  required: boolean;
84
84
  private: boolean;
85
85
  version: number;
86
- index: number;
87
- abstract: boolean;
88
86
  static: boolean;
87
+ abstract: boolean;
88
+ index: number;
89
89
  }>;
90
90
  export declare function getPropertyGenerationTargetSchema(): z.ZodObject<z.objectUtil.extendShape<{
91
91
  id: z.ZodString;
@@ -103,8 +103,8 @@ export declare function getPropertyGenerationTargetSchema(): z.ZodObject<z.objec
103
103
  description: string | null;
104
104
  required: boolean;
105
105
  private: boolean;
106
- abstract: boolean;
107
106
  static: boolean;
107
+ abstract: boolean;
108
108
  }, {
109
109
  id: string;
110
110
  type: EntityType.Property;
@@ -112,8 +112,8 @@ export declare function getPropertyGenerationTargetSchema(): z.ZodObject<z.objec
112
112
  description: string | null;
113
113
  required: boolean;
114
114
  private: boolean;
115
- abstract: boolean;
116
115
  static: boolean;
116
+ abstract: boolean;
117
117
  }>;
118
118
  export declare function getPropertyNestedEntitiesSchema(): z.ZodObject<{
119
119
  dataType: z.ZodUnion<[z.ZodObject<{
@@ -323,12 +323,12 @@ export declare function getPropertySchema(): z.ZodObject<z.objectUtil.extendShap
323
323
  entityId: string;
324
324
  };
325
325
  version: number;
326
+ static: boolean;
327
+ abstract: boolean;
326
328
  dataType: Record<string, any> | {
327
329
  type: EntityType.DataType;
328
330
  };
329
331
  index: number;
330
- abstract: boolean;
331
- static: boolean;
332
332
  }, {
333
333
  id: string;
334
334
  type: EntityType.Property;
@@ -356,10 +356,10 @@ export declare function getPropertySchema(): z.ZodObject<z.objectUtil.extendShap
356
356
  entityId: string;
357
357
  };
358
358
  version: number;
359
+ static: boolean;
360
+ abstract: boolean;
359
361
  dataType: Record<string, any> | {
360
362
  type: EntityType.DataType;
361
363
  };
362
364
  index: number;
363
- abstract: boolean;
364
- static: boolean;
365
365
  }>;
@@ -1,6 +1,6 @@
1
1
  import { ElementGenerationTarget, ElementShallowTransfer, EntityId, EntityType, EntityVersion, IReturnDeclaration, IReturnDeclarationGenerationTarget, IReturnDeclarationReference, IReturnDeclarationShallowTransfer, IReturnDeclarationTransfer, ReturnDeclarationTypesUnion } from '../../../definitions';
2
2
  import { ZodError } from 'zod';
3
- import { BaseState, ChildEntityState, EntityWithValueClass, UserManagedEntityStateFunctionality, ValueReadingEntityClass } from '../base';
3
+ import { BaseState, ChildEntityState, EntityWithValueClass, IEditableEntityPersistanceRepository, IEntityJSONCloneOptions, IEntityPersistanceOptions, IEntityRecursionOptions, UserManagedEntityStateFunctionality, ValueReadingEntityClass } from '../base';
4
4
  import { DataTypeState } from '../data-type';
5
5
  import { EntityState, IChangeSet, ValueWritingEntityState } from '../types';
6
6
  import { ProjectState } from '../project/project';
@@ -31,6 +31,7 @@ export declare class ReturnDeclarationState implements IReturnDeclaration, UserM
31
31
  initialized: boolean;
32
32
  suggestion: boolean;
33
33
  constructor(initialReturnVariableMapData: IReturnDeclaration | IReturnDeclarationTransfer, parentProjectState: ProjectState);
34
+ static repository: IEditableEntityPersistanceRepository;
34
35
  static MUTABLE_BASE_PROPERTIES: string[];
35
36
  static INMUTABLE_BASE_PROPERTIES: string[];
36
37
  static BASE_PROPERTIES: string[];
@@ -53,6 +54,8 @@ export declare class ReturnDeclarationState implements IReturnDeclaration, UserM
53
54
  errors: EntityGenerationError[];
54
55
  modifiedData: Partial<IReturnDeclarationGenerationTarget>;
55
56
  };
57
+ hydrateAncestors(): IChangeSet<ReturnDeclarationState>;
58
+ afterAllChildrenInitialized(): IChangeSet<ReturnDeclarationState>;
56
59
  addSelfToProject(): IChangeSet<ReturnDeclarationState>;
57
60
  setParent(parent: ReturnStatementState | BreakStatementState | ContinueStatementState): ReturnDeclarationState;
58
61
  setImplements(implementsEntity: ValueDescriptorState): ReturnDeclarationState;
@@ -62,10 +65,10 @@ export declare class ReturnDeclarationState implements IReturnDeclaration, UserM
62
65
  subscribe(): ReturnDeclarationState;
63
66
  unsubscribe(): ReturnDeclarationState;
64
67
  sync(data: Partial<IReturnDeclaration>): ReturnDeclarationState;
65
- load(): Promise<ReturnDeclarationState>;
66
- create(): Promise<ReturnDeclarationState>;
67
- update(data: Partial<ReturnDeclarationTypesUnion>): Promise<ReturnDeclarationState>;
68
- delete(): Promise<ReturnDeclarationState>;
68
+ load(_?: IEntityPersistanceOptions): Promise<ReturnDeclarationState>;
69
+ create(_?: IEntityPersistanceOptions): Promise<ReturnDeclarationState>;
70
+ update(_?: IEntityPersistanceOptions): Promise<ReturnDeclarationState>;
71
+ delete(_?: IEntityPersistanceOptions): Promise<ReturnDeclarationState>;
69
72
  remove({ ignoreUpstream: _, seenEntities, }?: {
70
73
  ignoreUpstream: boolean;
71
74
  seenEntities: Set<string>;
@@ -79,14 +82,15 @@ export declare class ReturnDeclarationState implements IReturnDeclaration, UserM
79
82
  affected: EntityState[];
80
83
  self: EntityState;
81
84
  };
82
- toFlat(seenEntities?: Set<string>): EntityState[];
83
- toFlatIds(seenEntities?: Set<string>): EntityId[];
84
- toJSON(): IReturnDeclarationTransfer;
85
- toReference(): IReturnDeclarationReference;
86
- toShallowJSON(): IReturnDeclarationShallowTransfer;
87
- toFlatJSON(seenEntities?: Set<string>): ElementShallowTransfer[];
85
+ toFlat(seenEntities?: Set<EntityId>): EntityState[];
86
+ toFlatIds(seenEntities?: Set<EntityId>): EntityId[];
87
+ toJSON(seenEntities?: Set<EntityId>): IReturnDeclarationTransfer | IReturnDeclarationReference;
88
+ toJSONClone(options?: IEntityJSONCloneOptions): IReturnDeclarationTransfer | IReturnDeclarationReference;
89
+ toReference(options?: IEntityRecursionOptions): IReturnDeclarationReference;
90
+ toShallowJSON(options?: IEntityRecursionOptions): IReturnDeclarationShallowTransfer;
91
+ toFlatJSON(seenEntities?: Set<EntityId>): ElementShallowTransfer[];
88
92
  toGenerationTarget(): IReturnDeclarationGenerationTarget;
89
- toFlatGenerationTarget(seenEntities?: Set<string>): ElementGenerationTarget[];
93
+ toFlatGenerationTarget(seenEntities?: Set<EntityId>): ElementGenerationTarget[];
90
94
  clearErrors(): ReturnDeclarationState;
91
95
  validate(): {
92
96
  success: boolean;
@@ -1,7 +1,6 @@
1
1
  import { ElementGenerationTarget, ElementShallowTransfer, EntityId, EntityType, EntityVersion, IReturnStatement, IReturnStatementGenerationTarget, IReturnStatementReference, IReturnStatementShallowTransfer, IReturnStatementTransfer, ReturnStatementTypesUnion } from '../../../definitions';
2
2
  import { ZodError } from 'zod';
3
- import { BaseCanvasDraggableState, BaseState, CallableEntityClass, ChildEntityState, UserManagedEntityStateFunctionality } from '../base';
4
- import { FunctionDeclarationState } from '../function-declaration';
3
+ import { BaseCanvasDraggableState, BaseState, CallableEntityClass, ChildEntityState, IEditableEntityPersistanceRepository, IEntityJSONCloneOptions, IEntityPersistanceOptions, IEntityRecursionOptions, UserManagedEntityStateFunctionality } from '../base';
5
4
  import { ReturnDeclarationState } from '../return-declaration';
6
5
  import { CallerEntityState, EntityState, EntityWithLogicScopeState, EntryPointEntityState, IChangeSet, PassThroughCallableEntityState } from '../types';
7
6
  import { ProjectState } from '../project/project';
@@ -25,6 +24,7 @@ export declare class ReturnStatementState implements IReturnStatement, UserManag
25
24
  initialized: boolean;
26
25
  suggestion: boolean;
27
26
  constructor(initialReturnStatementData: IReturnStatement | IReturnStatementTransfer, parentProjectState: ProjectState);
27
+ static repository: IEditableEntityPersistanceRepository;
28
28
  static MUTABLE_BASE_PROPERTIES: string[];
29
29
  static INMUTABLE_BASE_PROPERTIES: string[];
30
30
  static BASE_PROPERTIES: string[];
@@ -47,6 +47,8 @@ export declare class ReturnStatementState implements IReturnStatement, UserManag
47
47
  errors: EntityGenerationError[];
48
48
  modifiedData: Partial<IReturnStatementGenerationTarget>;
49
49
  };
50
+ hydrateAncestors(): IChangeSet<ReturnStatementState>;
51
+ afterAllChildrenInitialized(): IChangeSet<ReturnStatementState>;
50
52
  addSelfToProject(): IChangeSet<ReturnStatementState>;
51
53
  get calledBy(): CallerEntityState[];
52
54
  addSuccessCaller(caller: PassThroughCallableEntityState): ReturnStatementState;
@@ -60,10 +62,10 @@ export declare class ReturnStatementState implements IReturnStatement, UserManag
60
62
  subscribe(): ReturnStatementState;
61
63
  unsubscribe(): ReturnStatementState;
62
64
  sync(data: Partial<IReturnStatement>): ReturnStatementState;
63
- load(): Promise<ReturnStatementState>;
64
- create(): Promise<ReturnStatementState>;
65
- update(_: Partial<ReturnStatementTypesUnion>): Promise<ReturnStatementState>;
66
- delete(): Promise<ReturnStatementState>;
65
+ load(_?: IEntityPersistanceOptions): Promise<ReturnStatementState>;
66
+ create(_?: IEntityPersistanceOptions): Promise<ReturnStatementState>;
67
+ update(_?: IEntityPersistanceOptions): Promise<ReturnStatementState>;
68
+ delete(_?: IEntityPersistanceOptions): Promise<ReturnStatementState>;
67
69
  remove({ ignoreUpstream, seenEntities, }?: {
68
70
  ignoreUpstream: boolean;
69
71
  seenEntities: Set<string>;
@@ -77,14 +79,15 @@ export declare class ReturnStatementState implements IReturnStatement, UserManag
77
79
  affected: EntityState[];
78
80
  self: EntityState;
79
81
  };
80
- toFlat(seenEntities?: Set<string>): EntityState[];
81
- toFlatIds(seenEntities?: Set<string>): EntityId[];
82
- toJSON(): IReturnStatementTransfer;
83
- toReference(): IReturnStatementReference;
84
- toShallowJSON(): IReturnStatementShallowTransfer;
85
- toFlatJSON(seenEntities?: Set<string>): ElementShallowTransfer[];
82
+ toFlat(seenEntities?: Set<EntityId>): EntityState[];
83
+ toFlatIds(seenEntities?: Set<EntityId>): EntityId[];
84
+ toJSON(seenEntities?: Set<EntityId>): IReturnStatementTransfer | IReturnStatementReference;
85
+ toJSONClone(options?: IEntityJSONCloneOptions): IReturnStatementTransfer | IReturnStatementReference;
86
+ toReference(options?: IEntityRecursionOptions): IReturnStatementReference;
87
+ toShallowJSON(options?: IEntityRecursionOptions): IReturnStatementShallowTransfer;
88
+ toFlatJSON(seenEntities?: Set<EntityId>): ElementShallowTransfer[];
86
89
  toGenerationTarget(): IReturnStatementGenerationTarget;
87
- toFlatGenerationTarget(seenEntities?: Set<string>): ElementGenerationTarget[];
90
+ toFlatGenerationTarget(seenEntities?: Set<EntityId>): ElementGenerationTarget[];
88
91
  clearErrors(): ReturnStatementState;
89
92
  validate(): {
90
93
  success: boolean;
@@ -93,6 +96,6 @@ export declare class ReturnStatementState implements IReturnStatement, UserManag
93
96
  };
94
97
  getErrors(): EntityError[];
95
98
  getShallowErrors(): EntityError[];
96
- clone(_?: FunctionDeclarationState): ReturnStatementState;
99
+ clone(parent?: EntityWithLogicScopeState | null, newId?: string | null, subscribe?: boolean): ReturnStatementState;
97
100
  }
98
101
  export type ReturnStatementPayloadUnion = ReturnStatementState | ReturnStatementTypesUnion;
@@ -1,6 +1,6 @@
1
1
  import { ElementGenerationTarget, ElementShallowTransfer, EntityId, EntityType, EntityVersion, ISearch, ISearchGenerationTarget, ISearchReference, ISearchShallowTransfer, ISearchTransfer, SearchTypesUnion } 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 { CallableEntityState, CallerEntityState, EntityState, EntityWithLogicScopeState, EntryPointEntityState, IChangeSet, PassThroughCallableEntityState } from '../types';
5
5
  import { ActionInputMapState } from '../input-map';
6
6
  import { ActionOutputMapState } from '../output-map';
@@ -33,6 +33,7 @@ export declare class SearchState implements ISearch, BaseState, UserManagedEntit
33
33
  project: ProjectState;
34
34
  initialized: boolean;
35
35
  constructor(initialFunctionCallData: ISearch | ISearchTransfer, parentProjectState: ProjectState);
36
+ static repository: IEditableEntityPersistanceRepository;
36
37
  static MUTABLE_BASE_PROPERTIES: string[];
37
38
  static INMUTABLE_BASE_PROPERTIES: string[];
38
39
  static BASE_PROPERTIES: string[];
@@ -56,6 +57,8 @@ export declare class SearchState implements ISearch, BaseState, UserManagedEntit
56
57
  errors: EntityGenerationError[];
57
58
  modifiedData: Partial<ISearchGenerationTarget>;
58
59
  };
60
+ hydrateAncestors(): IChangeSet<SearchState>;
61
+ afterAllChildrenInitialized(): IChangeSet<SearchState>;
59
62
  addSelfToProject(): IChangeSet<SearchState>;
60
63
  get calledBy(): CallerEntityState[];
61
64
  removeInput(input: ActionInputMapState): SearchState;
@@ -78,10 +81,10 @@ export declare class SearchState implements ISearch, BaseState, UserManagedEntit
78
81
  subscribe(): SearchState;
79
82
  unsubscribe(): SearchState;
80
83
  sync(data: Partial<ISearch>): SearchState;
81
- load(): Promise<SearchState>;
82
- create(): Promise<SearchState>;
83
- update(_: Partial<SearchTypesUnion>): Promise<SearchState>;
84
- delete(): Promise<SearchState>;
84
+ load(_?: IEntityPersistanceOptions): Promise<SearchState>;
85
+ create(_?: IEntityPersistanceOptions): Promise<SearchState>;
86
+ update(_?: IEntityPersistanceOptions): Promise<SearchState>;
87
+ delete(_?: IEntityPersistanceOptions): Promise<SearchState>;
85
88
  remove({ ignoreUpstream, seenEntities, }?: {
86
89
  ignoreUpstream: boolean;
87
90
  seenEntities: Set<string>;
@@ -95,14 +98,15 @@ export declare class SearchState implements ISearch, BaseState, UserManagedEntit
95
98
  affected: EntityState[];
96
99
  self: EntityState;
97
100
  };
98
- toFlat(seenEntities?: Set<string>): EntityState[];
99
- toFlatIds(seenEntities?: Set<string>): EntityId[];
100
- toJSON(): ISearchTransfer;
101
- toReference(): ISearchReference;
102
- toShallowJSON(): ISearchShallowTransfer;
103
- toFlatJSON(seenEntities?: Set<string>): ElementShallowTransfer[];
101
+ toFlat(seenEntities?: Set<EntityId>): EntityState[];
102
+ toFlatIds(seenEntities?: Set<EntityId>): EntityId[];
103
+ toJSON(seenEntities?: Set<EntityId>): ISearchTransfer | ISearchReference;
104
+ toJSONClone(options?: IEntityJSONCloneOptions): ISearchTransfer | ISearchReference;
105
+ toReference(options?: IEntityRecursionOptions): ISearchReference;
106
+ toShallowJSON(options?: IEntityRecursionOptions): ISearchShallowTransfer;
107
+ toFlatJSON(seenEntities?: Set<EntityId>): ElementShallowTransfer[];
104
108
  toGenerationTarget(): ISearchGenerationTarget;
105
- toFlatGenerationTarget(seenEntities?: Set<string>): ElementGenerationTarget[];
109
+ toFlatGenerationTarget(seenEntities?: Set<EntityId>): ElementGenerationTarget[];
106
110
  clearErrors(): SearchState;
107
111
  validate(): {
108
112
  success: boolean;
@@ -111,7 +115,7 @@ export declare class SearchState implements ISearch, BaseState, UserManagedEntit
111
115
  };
112
116
  getErrors(): EntityError[];
113
117
  getShallowErrors(): EntityError[];
114
- clone(_?: EntryPointEntityState): SearchState;
118
+ clone(parent?: EntryPointEntityState | ProjectState | null, newId?: string | null, subscribe?: boolean): SearchState;
115
119
  syncInputMaps(): IChangeSet<SearchState>;
116
120
  }
117
121
  export type SearchPayloadUnion = SearchState | SearchTypesUnion;
@@ -7,6 +7,7 @@ export declare const CACHED_PROJECTS_BY_ID: {
7
7
  export interface IGetProjectOptions {
8
8
  empty?: boolean;
9
9
  }
10
+ export declare function initBaseProjectEntity(data: IProjectTransfer): ProjectState;
10
11
  export declare function initProject(data: IProjectTransfer): ProjectState;
11
12
  export declare function getProject(where: {
12
13
  id: string;
@@ -1,6 +1,6 @@
1
1
  import { ElementGenerationTarget, ElementShallowTransfer, EntityId, EntityType, EntityVersion, ValueDescriptorParentChildRelation, IValueDescriptor, IValueDescriptorGenerationTarget, IValueDescriptorReference, IValueDescriptorShallowTransfer, IValueDescriptorTransfer, ValueDescriptorTypesUnion } from '../../../definitions';
2
2
  import { ZodError } from 'zod';
3
- import { BaseState, ChildEntityState, UserManagedEntityStateFunctionality } from '../base';
3
+ import { BaseState, ChildEntityState, IEditableEntityPersistanceRepository, IEntityJSONCloneOptions, IEntityPersistanceOptions, IEntityRecursionOptions, UserManagedEntityStateFunctionality } from '../base';
4
4
  import { DataTypeState } from '../data-type';
5
5
  import { ProjectState } from '../project/project';
6
6
  import { ActionDescriptorState } from '../action-descriptor';
@@ -27,6 +27,7 @@ export declare class ValueDescriptorState implements IValueDescriptor, UserManag
27
27
  parent: ActionDescriptorState | LoopState | SearchState | null;
28
28
  initialized: boolean;
29
29
  constructor(initialVariableDeclarationData: IValueDescriptor | IValueDescriptorTransfer, parentProjectState: ProjectState);
30
+ static repository: IEditableEntityPersistanceRepository;
30
31
  static MUTABLE_BASE_PROPERTIES: string[];
31
32
  static INMUTABLE_BASE_PROPERTIES: string[];
32
33
  static BASE_PROPERTIES: string[];
@@ -49,17 +50,19 @@ export declare class ValueDescriptorState implements IValueDescriptor, UserManag
49
50
  errors: EntityGenerationError[];
50
51
  modifiedData: Partial<IValueDescriptorGenerationTarget>;
51
52
  };
53
+ hydrateAncestors(): IChangeSet<ValueDescriptorState>;
54
+ afterAllChildrenInitialized(): IChangeSet<ValueDescriptorState>;
52
55
  addSelfToProject(): IChangeSet<ValueDescriptorState>;
53
56
  setParent(parent: ActionDescriptorState | LoopState | SearchState): ValueDescriptorState;
54
57
  initChildren(): ValueDescriptorState;
55
58
  subscribe(): ValueDescriptorState;
56
59
  unsubscribe(): ValueDescriptorState;
57
60
  sync(data: Partial<IValueDescriptor>): ValueDescriptorState;
58
- load(): Promise<ValueDescriptorState>;
59
- create(): Promise<ValueDescriptorState>;
60
- update(_: Partial<ValueDescriptorTypesUnion>): Promise<ValueDescriptorState>;
61
- delete(): Promise<ValueDescriptorState>;
62
- remove({ ignoreUpstream: _, seenEntities, }?: {
61
+ load(_?: IEntityPersistanceOptions): Promise<ValueDescriptorState>;
62
+ create(_?: IEntityPersistanceOptions): Promise<ValueDescriptorState>;
63
+ update(_?: IEntityPersistanceOptions): Promise<ValueDescriptorState>;
64
+ delete(_?: IEntityPersistanceOptions): Promise<ValueDescriptorState>;
65
+ remove({ ignoreUpstream, seenEntities, }?: {
63
66
  ignoreUpstream: boolean;
64
67
  seenEntities: Set<string>;
65
68
  }): {
@@ -72,14 +75,15 @@ export declare class ValueDescriptorState implements IValueDescriptor, UserManag
72
75
  affected: EntityState[];
73
76
  self: EntityState;
74
77
  };
75
- toFlat(seenEntities?: Set<string>): EntityState[];
76
- toFlatIds(seenEntities?: Set<string>): EntityId[];
77
- toJSON(): IValueDescriptorTransfer;
78
- toReference(): IValueDescriptorReference;
79
- toShallowJSON(): IValueDescriptorShallowTransfer;
80
- toFlatJSON(seenEntities?: Set<string>): ElementShallowTransfer[];
78
+ toFlat(seenEntities?: Set<EntityId>): EntityState[];
79
+ toFlatIds(seenEntities?: Set<EntityId>): EntityId[];
80
+ toJSON(seenEntities?: Set<EntityId>): IValueDescriptorTransfer | IValueDescriptorReference;
81
+ toJSONClone(options?: IEntityJSONCloneOptions): IValueDescriptorTransfer | IValueDescriptorReference;
82
+ toReference(options?: IEntityRecursionOptions): IValueDescriptorReference;
83
+ toShallowJSON(options?: IEntityRecursionOptions): IValueDescriptorShallowTransfer;
84
+ toFlatJSON(seenEntities?: Set<EntityId>): ElementShallowTransfer[];
81
85
  toGenerationTarget(): IValueDescriptorGenerationTarget;
82
- toFlatGenerationTarget(seenEntities?: Set<string>): ElementGenerationTarget[];
86
+ toFlatGenerationTarget(seenEntities?: Set<EntityId>): ElementGenerationTarget[];
83
87
  clearErrors(): ValueDescriptorState;
84
88
  validate(): {
85
89
  success: boolean;
@@ -2264,11 +2264,11 @@ export declare function getVariableDeclarationSchema(): z.ZodObject<z.objectUtil
2264
2264
  entityId: string;
2265
2265
  };
2266
2266
  version: number;
2267
+ x: number;
2268
+ y: number;
2267
2269
  dataType: Record<string, any> | {
2268
2270
  type: EntityType.DataType;
2269
2271
  } | null;
2270
- x: number;
2271
- y: number;
2272
2272
  inputs: (Record<string, any> | {
2273
2273
  type: EntityType.InputMap;
2274
2274
  })[];
@@ -2534,11 +2534,11 @@ export declare function getVariableDeclarationSchema(): z.ZodObject<z.objectUtil
2534
2534
  entityId: string;
2535
2535
  };
2536
2536
  version: number;
2537
+ x: number;
2538
+ y: number;
2537
2539
  dataType: Record<string, any> | {
2538
2540
  type: EntityType.DataType;
2539
2541
  } | null;
2540
- x: number;
2541
- y: number;
2542
2542
  inputs: (Record<string, any> | {
2543
2543
  type: EntityType.InputMap;
2544
2544
  })[];
@@ -1,6 +1,6 @@
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, PassThroughCallableEntityClass, UserManagedEntityStateFunctionality, ValueReadingEntityClass, ValueWritingEntityClass } from '../base';
3
+ import { BaseCanvasDraggableState, BaseState, CallableEntityClass, ChildEntityState, EntityWithValueClass, IEditableEntityPersistanceRepository, IEntityJSONCloneOptions, IEntityPersistanceOptions, IEntityRecursionOptions, PassThroughCallableEntityClass, UserManagedEntityStateFunctionality, ValueReadingEntityClass, ValueWritingEntityClass } from '../base';
4
4
  import { DataTypeState } from '../data-type';
5
5
  import { CallableEntityState, CallerEntityState, EntityState, EntityWithLogicScopeState, EntryPointEntityState, IChangeSet, PassThroughCallableEntityState, ValueReadingEntityState, ValueWritingEntityState } from '../types';
6
6
  import { ProjectState } from '../project/project';
@@ -39,6 +39,7 @@ export declare class VariableDeclarationState implements IVariableDeclaration, B
39
39
  initialized: boolean;
40
40
  suggestion: boolean;
41
41
  constructor(initialVariableDeclarationData: IVariableDeclaration | IVariableDeclarationTransfer, parentProjectState: ProjectState);
42
+ static repository: IEditableEntityPersistanceRepository;
42
43
  static MUTABLE_BASE_PROPERTIES: string[];
43
44
  static INMUTABLE_BASE_PROPERTIES: string[];
44
45
  static BASE_PROPERTIES: string[];
@@ -61,6 +62,8 @@ export declare class VariableDeclarationState implements IVariableDeclaration, B
61
62
  errors: EntityGenerationError[];
62
63
  modifiedData: Partial<IVariableDeclarationGenerationTarget>;
63
64
  };
65
+ hydrateAncestors(): IChangeSet<VariableDeclarationState>;
66
+ afterAllChildrenInitialized(): IChangeSet<VariableDeclarationState>;
64
67
  addSelfToProject(): IChangeSet<VariableDeclarationState>;
65
68
  get calledBy(): CallerEntityState[];
66
69
  get usedInputs(): VariableInputMapState[];
@@ -93,10 +96,10 @@ export declare class VariableDeclarationState implements IVariableDeclaration, B
93
96
  getMasterInputWithValueWritterFromAllInstances(input: VariableInputMapState): VariableInputMapState;
94
97
  inferDataTypeAndSyncInstancesInputsAndOutputs(): VariableDeclarationState;
95
98
  sync(data: Partial<IVariableDeclaration>): VariableDeclarationState;
96
- load(): Promise<VariableDeclarationState>;
97
- create(): Promise<VariableDeclarationState>;
98
- update(data: Partial<VariableDeclarationTypesUnion>): Promise<VariableDeclarationState>;
99
- delete(): Promise<VariableDeclarationState>;
99
+ load(_?: IEntityPersistanceOptions): Promise<VariableDeclarationState>;
100
+ create(_?: IEntityPersistanceOptions): Promise<VariableDeclarationState>;
101
+ update(_?: IEntityPersistanceOptions): Promise<VariableDeclarationState>;
102
+ delete(_?: IEntityPersistanceOptions): Promise<VariableDeclarationState>;
100
103
  remove({ ignoreUpstream, seenEntities, }?: {
101
104
  ignoreUpstream: boolean;
102
105
  seenEntities: Set<string>;
@@ -110,14 +113,15 @@ export declare class VariableDeclarationState implements IVariableDeclaration, B
110
113
  affected: EntityState[];
111
114
  self: VariableDeclarationState;
112
115
  };
113
- toFlat(seenEntities?: Set<string>): EntityState[];
114
- toFlatIds(seenEntities?: Set<string>): EntityId[];
115
- toJSON(): IVariableDeclarationTransfer;
116
- toReference(): IVariableDeclarationReference;
117
- toShallowJSON(): IVariableDeclarationShallowTransfer;
118
- toFlatJSON(seenEntities?: Set<string>): ElementShallowTransfer[];
116
+ toFlat(seenEntities?: Set<EntityId>): EntityState[];
117
+ toFlatIds(seenEntities?: Set<EntityId>): EntityId[];
118
+ toJSON(seenEntities?: Set<EntityId>): IVariableDeclarationTransfer | IVariableDeclarationReference;
119
+ toJSONClone(options?: IEntityJSONCloneOptions): IVariableDeclarationTransfer | IVariableDeclarationReference;
120
+ toReference(options?: IEntityRecursionOptions): IVariableDeclarationReference;
121
+ toShallowJSON(options?: IEntityRecursionOptions): IVariableDeclarationShallowTransfer;
122
+ toFlatJSON(seenEntities?: Set<EntityId>): ElementShallowTransfer[];
119
123
  toGenerationTarget(): IVariableDeclarationGenerationTarget;
120
- toFlatGenerationTarget(seenEntities?: Set<string>): ElementGenerationTarget[];
124
+ toFlatGenerationTarget(seenEntities?: Set<EntityId>): ElementGenerationTarget[];
121
125
  clearErrors(): VariableDeclarationState;
122
126
  validate(): {
123
127
  success: boolean;
@@ -128,7 +132,7 @@ export declare class VariableDeclarationState implements IVariableDeclaration, B
128
132
  getShallowErrors(): EntityError[];
129
133
  getDefaultValue(): LiteralValueState | null;
130
134
  setDefaultValue(defaultValue: LiteralValueState): VariableDeclarationState;
131
- clone(_?: EntryPointEntityState): VariableDeclarationState;
135
+ clone(parent?: EntryPointEntityState | ProjectState | null, newId?: string | null, subscribe?: boolean): VariableDeclarationState;
132
136
  addInternalCall(internalCall: InternalCallState): VariableDeclarationState;
133
137
  createInstance(parent?: EntityWithLogicScopeState | ProjectState, overrides?: Partial<IVariableInstanceTransfer>): VariableInstanceState;
134
138
  generateUnusedInputs(): VariableInputMapState[];
@@ -2265,11 +2265,11 @@ 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;
2268
2270
  dataType: Record<string, any> | {
2269
2271
  type: EntityType.DataType;
2270
2272
  } | null;
2271
- x: number;
2272
- y: number;
2273
2273
  inputs: (Record<string, any> | {
2274
2274
  type: EntityType.InputMap;
2275
2275
  })[];
@@ -2536,11 +2536,11 @@ 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;
2539
2541
  dataType: Record<string, any> | {
2540
2542
  type: EntityType.DataType;
2541
2543
  } | null;
2542
- x: number;
2543
- y: number;
2544
2544
  inputs: (Record<string, any> | {
2545
2545
  type: EntityType.InputMap;
2546
2546
  })[];