@elyx-code/project-logic-tree 0.0.6021 → 0.0.6023

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.
@@ -4,7 +4,7 @@ import { BaseState, ChildEntityState, UserManagedEntityStateFunctionality } from
4
4
  import { CustomEntityState } from '../custom-entity';
5
5
  import { PrimitiveEntityState } from '../primitive-entity';
6
6
  import { ProjectState } from '../project/project';
7
- import { EntityState } from '../types';
7
+ import { EntityState, IChangeSet } from '../types';
8
8
  import { PropertyState } from '../property';
9
9
  import { VariableDeclarationState } from '../variable-declaration';
10
10
  import { ArgumentDeclarationState } from '../argument-declaration';
@@ -103,6 +103,7 @@ export declare class DataTypeState implements IDataType, UserManagedEntityStateF
103
103
  getErrors(): EntityError[];
104
104
  getShallowErrors(): EntityError[];
105
105
  clone(parent?: PropertyState | VariableDeclarationState | ArgumentDeclarationState | ReturnDeclarationState | ActionDescriptorState | ValueDescriptorState | DataTypeState | null, newId?: string | null, subscribe?: boolean): DataTypeState;
106
+ merge(sourceDataType: DataTypeState): IChangeSet<DataTypeState>;
106
107
  addToAndGroup(child: DataTypeState): DataTypeState;
107
108
  addToOrGroup(child: DataTypeState): DataTypeState;
108
109
  getDefaultValue(): PrimitiveValueState | null;
@@ -107,7 +107,7 @@ export declare class InputMapState implements IInputMap, ValueReadingEntityClass
107
107
  getShallowErrors(): EntityError[];
108
108
  getDefaultValue(): PrimitiveValueState | null;
109
109
  setDefaultValue(value: PrimitiveValueState): InputMapState;
110
- clone(_?: PassThroughCallableEntityState): InputMapState;
110
+ clone(parent?: PassThroughCallableEntityState | null, newId?: string | null, subscribe?: boolean): InputMapState;
111
111
  getDataType(): DataTypeState | null;
112
112
  }
113
113
  export declare class VariableInputMapState extends InputMapState implements IVariableInputMap {
@@ -1,5 +1,5 @@
1
- import { ElementGenerationTarget, ElementShallowTransfer, EntityId, EntityType, EntityVersion, ILoop, ILoopGenerationTarget, ILoopReference, ILoopShallowTransfer, ILoopTransfer, LoopTypesUnion } from '../../../definitions';
2
1
  import { ZodError } from 'zod';
2
+ import { ElementGenerationTarget, ElementShallowTransfer, EntityId, EntityType, EntityVersion, ILoop, ILoopGenerationTarget, ILoopReference, ILoopShallowTransfer, ILoopTransfer, LoopTypesUnion } from '../../../definitions';
3
3
  import { BaseCanvasDraggableState, BaseState, CallableEntityClass, ChildEntityState, EntityWithLogicScopeClass, PassThroughCallableEntityClass, UserManagedEntityStateFunctionality } from '../base';
4
4
  import { ActionInputMapState } from '../input-map';
5
5
  import { ActionOutputMapState } from '../output-map';
@@ -12,6 +12,8 @@ import { VariableInstanceState } from '../variable-instance';
12
12
  import { EntityError, EntityGenerationError } from '../../state/error';
13
13
  import { ReturnStatementState } from '../return-statement';
14
14
  import { ActionDescriptorState } from '../action-descriptor';
15
+ import { ValueDescriptorState } from '../value-descriptor';
16
+ import { ReturnDeclarationState } from '../return-declaration';
15
17
 
16
18
  export declare class LoopState implements ILoop, BaseState, UserManagedEntityStateFunctionality, BaseCanvasDraggableState, CallableEntityClass, ChildEntityState, EntityWithLogicScopeClass, PassThroughCallableEntityClass {
17
19
  initialData: ILoop | ILoopTransfer;
@@ -29,6 +31,7 @@ export declare class LoopState implements ILoop, BaseState, UserManagedEntitySta
29
31
  error: ActionOutputMapState | null;
30
32
  breakStatements: BreakStatementState[];
31
33
  continueStatements: ContinueStatementState[];
34
+ outputsDeclarations: ValueDescriptorState[];
32
35
  body: FunctionDeclarationState;
33
36
  calledBySuccess: PassThroughCallableEntityState[];
34
37
  calledByError: PassThroughCallableEntityState[];
@@ -57,6 +60,8 @@ export declare class LoopState implements ILoop, BaseState, UserManagedEntitySta
57
60
  errors: EntityGenerationError[];
58
61
  modifiedData: ILoopGenerationTarget;
59
62
  };
63
+ static fromReturnDeclarationToBodyArgumentDeclarationName(returnDeclaration: ReturnDeclarationState): string;
64
+ static fromReturnDeclarationToLoopOutputDeclarationName(returnDeclaration: ReturnDeclarationState): string;
60
65
  validateGeneratedUpdate(data: Partial<ILoopGenerationTarget>): {
61
66
  errors: EntityGenerationError[];
62
67
  modifiedData: Partial<ILoopGenerationTarget>;
@@ -68,6 +73,8 @@ export declare class LoopState implements ILoop, BaseState, UserManagedEntitySta
68
73
  get calledBy(): CallerEntityState[];
69
74
  removeInput(input: ActionInputMapState): LoopState;
70
75
  addInput(input: ActionInputMapState): LoopState;
76
+ addOutputDeclaration(outputDeclaration: ValueDescriptorState): LoopState;
77
+ removeOutputDeclaration(outputDeclaration: ValueDescriptorState): LoopState;
71
78
  addOutput(output: ActionOutputMapState): LoopState;
72
79
  removeOutput(output: ActionOutputMapState): LoopState;
73
80
  setBody(body: FunctionDeclarationState): LoopState;
@@ -126,8 +133,12 @@ export declare class LoopState implements ILoop, BaseState, UserManagedEntitySta
126
133
  removeBreakStatement(statement: BreakStatementState): LoopState;
127
134
  addContinueStatement(statement: ContinueStatementState): LoopState;
128
135
  removeContinueStatement(statement: ContinueStatementState): LoopState;
136
+ getUniqueReturnDeclarations(): ReturnDeclarationState[];
129
137
  syncTerminationStatements(): IChangeSet<LoopState>;
138
+ syncBodyArgumentsDeclarations(): IChangeSet<LoopState>;
139
+ syncOutputsDeclarations(): IChangeSet<LoopState>;
140
+ syncOutputMaps(): IChangeSet<LoopState>;
141
+ syncInputs(): IChangeSet<LoopState>;
130
142
  syncChildren(): IChangeSet<LoopState>;
131
- inferAndPadAndSyncMissingChildren(): IChangeSet<LoopState>;
132
143
  }
133
144
  export type LoopPayloadUnion = LoopState | LoopTypesUnion;
@@ -373,6 +373,13 @@ export declare function getLoopNestedEntitiesSchema(): z.ZodObject<{
373
373
  }, {
374
374
  type: EntityType.OutputMap;
375
375
  }>, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
376
+ outputsDeclarations: z.ZodArray<z.ZodUnion<[z.ZodObject<{
377
+ type: z.ZodLiteral<EntityType.ValueDescriptor>;
378
+ }, "strip", z.ZodTypeAny, {
379
+ type: EntityType.ValueDescriptor;
380
+ }, {
381
+ type: EntityType.ValueDescriptor;
382
+ }>, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
376
383
  successCalls: z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
377
384
  id: z.ZodString;
378
385
  type: z.ZodLiteral<EntityType.GenericReference>;
@@ -1033,6 +1040,9 @@ export declare function getLoopNestedEntitiesSchema(): z.ZodObject<{
1033
1040
  entityType: EntityType.ContinueStatement;
1034
1041
  entityId: string;
1035
1042
  })[];
1043
+ outputsDeclarations: ({
1044
+ type: EntityType.ValueDescriptor;
1045
+ } | Record<string, any>)[];
1036
1046
  body: Record<string, any> | {
1037
1047
  type: EntityType.FunctionDeclaration;
1038
1048
  };
@@ -1281,6 +1291,9 @@ export declare function getLoopNestedEntitiesSchema(): z.ZodObject<{
1281
1291
  entityType: EntityType.ContinueStatement;
1282
1292
  entityId: string;
1283
1293
  })[];
1294
+ outputsDeclarations: ({
1295
+ type: EntityType.ValueDescriptor;
1296
+ } | Record<string, any>)[];
1284
1297
  body: Record<string, any> | {
1285
1298
  type: EntityType.FunctionDeclaration;
1286
1299
  };
@@ -1593,6 +1606,13 @@ export declare function getLoopSchema(): z.ZodObject<z.objectUtil.extendShape<z.
1593
1606
  }, {
1594
1607
  type: EntityType.OutputMap;
1595
1608
  }>, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
1609
+ outputsDeclarations: z.ZodArray<z.ZodUnion<[z.ZodObject<{
1610
+ type: z.ZodLiteral<EntityType.ValueDescriptor>;
1611
+ }, "strip", z.ZodTypeAny, {
1612
+ type: EntityType.ValueDescriptor;
1613
+ }, {
1614
+ type: EntityType.ValueDescriptor;
1615
+ }>, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
1596
1616
  successCalls: z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
1597
1617
  id: z.ZodString;
1598
1618
  type: z.ZodLiteral<EntityType.GenericReference>;
@@ -2258,6 +2278,9 @@ export declare function getLoopSchema(): z.ZodObject<z.objectUtil.extendShape<z.
2258
2278
  entityType: EntityType.ContinueStatement;
2259
2279
  entityId: string;
2260
2280
  })[];
2281
+ outputsDeclarations: ({
2282
+ type: EntityType.ValueDescriptor;
2283
+ } | Record<string, any>)[];
2261
2284
  body: Record<string, any> | {
2262
2285
  type: EntityType.FunctionDeclaration;
2263
2286
  };
@@ -2511,6 +2534,9 @@ export declare function getLoopSchema(): z.ZodObject<z.objectUtil.extendShape<z.
2511
2534
  entityType: EntityType.ContinueStatement;
2512
2535
  entityId: string;
2513
2536
  })[];
2537
+ outputsDeclarations: ({
2538
+ type: EntityType.ValueDescriptor;
2539
+ } | Record<string, any>)[];
2514
2540
  body: Record<string, any> | {
2515
2541
  type: EntityType.FunctionDeclaration;
2516
2542
  };
@@ -56,6 +56,7 @@ export declare class OutputMapState implements IOutputMap, UserManagedEntityStat
56
56
  addValueReader(entity: ValueReadingEntityState): OutputMapState;
57
57
  removeValueReader(valueReader: ValueReadingEntityState): OutputMapState;
58
58
  setParent(parent: PassThroughCallableEntityWithOutputsState): OutputMapState;
59
+ setDeclaration(declaration: ReturnDeclarationState | PropertyState | ValueDescriptorState): OutputMapState;
59
60
  initChildren(): OutputMapState;
60
61
  subscribe(): OutputMapState;
61
62
  unsubscribe(): OutputMapState;
@@ -64,7 +65,7 @@ export declare class OutputMapState implements IOutputMap, UserManagedEntityStat
64
65
  create(): Promise<OutputMapState>;
65
66
  update(_: Partial<OutputMapTypesUnion>): Promise<OutputMapState>;
66
67
  delete(): Promise<OutputMapState>;
67
- remove({ ignoreUpstream: _, seenEntities, }?: {
68
+ remove({ ignoreUpstream, seenEntities, }?: {
68
69
  ignoreUpstream: boolean;
69
70
  seenEntities: Set<string>;
70
71
  }): {
@@ -5,7 +5,6 @@ import { DataTypeState } from '../data-type';
5
5
  import { EntityState, ValueWritingEntityState } from '../types';
6
6
  import { ProjectState } from '../project/project';
7
7
  import { ReturnStatementState } from '../return-statement';
8
- import { SearchState } from '../search';
9
8
  import { BreakStatementState } from '../break-statement';
10
9
  import { ContinueStatementState } from '../continue-statement';
11
10
  import { EntityError, EntityGenerationError } from '../../state/error';
@@ -25,7 +24,7 @@ export declare class ReturnDeclarationState implements IReturnDeclaration, UserM
25
24
  readsValue: ValueWritingEntityState | null;
26
25
  project: ProjectState;
27
26
  errors: EntityError[];
28
- parent: ReturnStatementState | SearchState | BreakStatementState | ContinueStatementState;
27
+ parent: ReturnStatementState | BreakStatementState | ContinueStatementState;
29
28
  initialized: boolean;
30
29
  suggestion: boolean;
31
30
  constructor(initialReturnVariableMapData: IReturnDeclaration | IReturnDeclarationTransfer, parentProjectState: ProjectState);
@@ -55,7 +54,7 @@ export declare class ReturnDeclarationState implements IReturnDeclaration, UserM
55
54
  affected: EntityState[];
56
55
  self: ReturnDeclarationState;
57
56
  };
58
- setParent(parent: ReturnStatementState | SearchState | BreakStatementState | ContinueStatementState): ReturnDeclarationState;
57
+ setParent(parent: ReturnStatementState | BreakStatementState | ContinueStatementState): ReturnDeclarationState;
59
58
  initChildren(): ReturnDeclarationState;
60
59
  setValueWriter(valueWriter: ValueWritingEntityState): ReturnDeclarationState;
61
60
  removeValueWriter(): ReturnDeclarationState;
@@ -96,7 +95,7 @@ export declare class ReturnDeclarationState implements IReturnDeclaration, UserM
96
95
  getErrors(): EntityError[];
97
96
  getShallowErrors(): EntityError[];
98
97
  getDefaultValue(): PrimitiveValueState | null;
99
- clone(_?: ReturnStatementState | SearchState | BreakStatementState | ContinueStatementState): ReturnDeclarationState;
98
+ clone(parent?: ReturnStatementState | BreakStatementState | ContinueStatementState | null, newId?: string | null, subscribe?: boolean): ReturnDeclarationState;
100
99
  setDataType(dataType: DataTypeState): ReturnDeclarationState;
101
100
  removeDataType(): ReturnDeclarationState;
102
101
  inferDataType(): ReturnDeclarationState;
@@ -169,36 +169,6 @@ export declare function getReturnDeclarationNestedEntitiesSchema(): z.ZodObject<
169
169
  type: EntityType.GenericReference;
170
170
  entityType: EntityType.ActionDescriptor;
171
171
  entityId: string;
172
- }>, z.ZodObject<{
173
- id: z.ZodString;
174
- type: z.ZodLiteral<EntityType.GenericReference>;
175
- entityId: z.ZodString;
176
- entityType: z.ZodLiteral<EntityType.ActionDescriptor>;
177
- }, "strip", z.ZodTypeAny, {
178
- id: string;
179
- type: EntityType.GenericReference;
180
- entityType: EntityType.ActionDescriptor;
181
- entityId: string;
182
- }, {
183
- id: string;
184
- type: EntityType.GenericReference;
185
- entityType: EntityType.ActionDescriptor;
186
- entityId: string;
187
- }>, z.ZodObject<{
188
- id: z.ZodString;
189
- type: z.ZodLiteral<EntityType.GenericReference>;
190
- entityId: z.ZodString;
191
- entityType: z.ZodLiteral<EntityType.Search>;
192
- }, "strip", z.ZodTypeAny, {
193
- id: string;
194
- type: EntityType.GenericReference;
195
- entityType: EntityType.Search;
196
- entityId: string;
197
- }, {
198
- id: string;
199
- type: EntityType.GenericReference;
200
- entityType: EntityType.Search;
201
- entityId: string;
202
172
  }>, z.ZodObject<{
203
173
  id: z.ZodString;
204
174
  type: z.ZodLiteral<EntityType.GenericReference>;
@@ -236,11 +206,6 @@ export declare function getReturnDeclarationNestedEntitiesSchema(): z.ZodObject<
236
206
  type: EntityType.GenericReference;
237
207
  entityType: EntityType.ActionDescriptor;
238
208
  entityId: string;
239
- } | {
240
- id: string;
241
- type: EntityType.GenericReference;
242
- entityType: EntityType.Search;
243
- entityId: string;
244
209
  } | {
245
210
  id: string;
246
211
  type: EntityType.GenericReference;
@@ -281,11 +246,6 @@ export declare function getReturnDeclarationNestedEntitiesSchema(): z.ZodObject<
281
246
  type: EntityType.GenericReference;
282
247
  entityType: EntityType.ActionDescriptor;
283
248
  entityId: string;
284
- } | {
285
- id: string;
286
- type: EntityType.GenericReference;
287
- entityType: EntityType.Search;
288
- entityId: string;
289
249
  } | {
290
250
  id: string;
291
251
  type: EntityType.GenericReference;
@@ -411,36 +371,6 @@ export declare function getReturnDeclarationSchema(): z.ZodObject<z.objectUtil.e
411
371
  type: EntityType.GenericReference;
412
372
  entityType: EntityType.ActionDescriptor;
413
373
  entityId: string;
414
- }>, z.ZodObject<{
415
- id: z.ZodString;
416
- type: z.ZodLiteral<EntityType.GenericReference>;
417
- entityId: z.ZodString;
418
- entityType: z.ZodLiteral<EntityType.ActionDescriptor>;
419
- }, "strip", z.ZodTypeAny, {
420
- id: string;
421
- type: EntityType.GenericReference;
422
- entityType: EntityType.ActionDescriptor;
423
- entityId: string;
424
- }, {
425
- id: string;
426
- type: EntityType.GenericReference;
427
- entityType: EntityType.ActionDescriptor;
428
- entityId: string;
429
- }>, z.ZodObject<{
430
- id: z.ZodString;
431
- type: z.ZodLiteral<EntityType.GenericReference>;
432
- entityId: z.ZodString;
433
- entityType: z.ZodLiteral<EntityType.Search>;
434
- }, "strip", z.ZodTypeAny, {
435
- id: string;
436
- type: EntityType.GenericReference;
437
- entityType: EntityType.Search;
438
- entityId: string;
439
- }, {
440
- id: string;
441
- type: EntityType.GenericReference;
442
- entityType: EntityType.Search;
443
- entityId: string;
444
374
  }>, z.ZodObject<{
445
375
  id: z.ZodString;
446
376
  type: z.ZodLiteral<EntityType.GenericReference>;
@@ -482,11 +412,6 @@ export declare function getReturnDeclarationSchema(): z.ZodObject<z.objectUtil.e
482
412
  type: EntityType.GenericReference;
483
413
  entityType: EntityType.ActionDescriptor;
484
414
  entityId: string;
485
- } | {
486
- id: string;
487
- type: EntityType.GenericReference;
488
- entityType: EntityType.Search;
489
- entityId: string;
490
415
  } | {
491
416
  id: string;
492
417
  type: EntityType.GenericReference;
@@ -534,11 +459,6 @@ export declare function getReturnDeclarationSchema(): z.ZodObject<z.objectUtil.e
534
459
  type: EntityType.GenericReference;
535
460
  entityType: EntityType.ActionDescriptor;
536
461
  entityId: string;
537
- } | {
538
- id: string;
539
- type: EntityType.GenericReference;
540
- entityType: EntityType.Search;
541
- entityId: string;
542
462
  } | {
543
463
  id: string;
544
464
  type: EntityType.GenericReference;
@@ -6,8 +6,8 @@ import { ActionInputMapState } from '../input-map';
6
6
  import { ActionOutputMapState } from '../output-map';
7
7
  import { ProjectState } from '../project/project';
8
8
  import { ArgumentDeclarationState } from '../argument-declaration';
9
- import { ReturnDeclarationState } from '../return-declaration';
10
9
  import { EntityError, EntityGenerationError } from '../../state/error';
10
+ import { ValueDescriptorState } from '../value-descriptor';
11
11
 
12
12
  export declare class SearchState implements ISearch, BaseState, UserManagedEntityStateFunctionality, BaseCanvasDraggableState, CallableEntityClass, ChildEntityState, PassThroughCallableEntityClass {
13
13
  initialData: ISearch | ISearchTransfer;
@@ -23,7 +23,7 @@ export declare class SearchState implements ISearch, BaseState, UserManagedEntit
23
23
  errorCalls: CallableEntityState[];
24
24
  inputsDeclarations: ArgumentDeclarationState[];
25
25
  inputs: ActionInputMapState[];
26
- outputsDeclarations: ReturnDeclarationState[];
26
+ outputsDeclarations: ValueDescriptorState[];
27
27
  outputs: ActionOutputMapState[];
28
28
  calledBySuccess: PassThroughCallableEntityState[];
29
29
  calledByError: PassThroughCallableEntityState[];
@@ -65,8 +65,8 @@ export declare class SearchState implements ISearch, BaseState, UserManagedEntit
65
65
  addInput(input: ActionInputMapState): SearchState;
66
66
  addInputDeclaration(inputDeclaration: ArgumentDeclarationState): SearchState;
67
67
  removeInputDeclaration(inputDeclaration: ArgumentDeclarationState): SearchState;
68
- addOutputDeclaration(outputDeclaration: ReturnDeclarationState): SearchState;
69
- removeOutputDeclaration(outputDeclaration: ReturnDeclarationState): SearchState;
68
+ addOutputDeclaration(outputDeclaration: ValueDescriptorState): SearchState;
69
+ removeOutputDeclaration(outputDeclaration: ValueDescriptorState): SearchState;
70
70
  addOutput(output: ActionOutputMapState): SearchState;
71
71
  removeOutput(output: ActionOutputMapState): SearchState;
72
72
  addSuccessCaller(caller: PassThroughCallableEntityState): SearchState;
@@ -712,11 +712,11 @@ export declare function getSearchNestedEntitiesSchema(): z.ZodObject<{
712
712
  type: EntityType.InputMap;
713
713
  }>, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
714
714
  outputsDeclarations: z.ZodArray<z.ZodUnion<[z.ZodObject<{
715
- type: z.ZodLiteral<EntityType.ReturnDeclaration>;
715
+ type: z.ZodLiteral<EntityType.ValueDescriptor>;
716
716
  }, "strip", z.ZodTypeAny, {
717
- type: EntityType.ReturnDeclaration;
717
+ type: EntityType.ValueDescriptor;
718
718
  }, {
719
- type: EntityType.ReturnDeclaration;
719
+ type: EntityType.ValueDescriptor;
720
720
  }>, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
721
721
  outputs: z.ZodArray<z.ZodUnion<[z.ZodObject<{
722
722
  type: z.ZodLiteral<EntityType.OutputMap>;
@@ -1029,12 +1029,12 @@ export declare function getSearchNestedEntitiesSchema(): z.ZodObject<{
1029
1029
  entityType: EntityType.ContinueStatement;
1030
1030
  entityId: string;
1031
1031
  })[];
1032
+ outputsDeclarations: ({
1033
+ type: EntityType.ValueDescriptor;
1034
+ } | Record<string, any>)[];
1032
1035
  inputsDeclarations: (Record<string, any> | {
1033
1036
  type: EntityType.ArgumentDeclaration;
1034
1037
  })[];
1035
- outputsDeclarations: (Record<string, any> | {
1036
- type: EntityType.ReturnDeclaration;
1037
- })[];
1038
1038
  }, {
1039
1039
  calledBySuccess: ({
1040
1040
  id: string;
@@ -1271,12 +1271,12 @@ export declare function getSearchNestedEntitiesSchema(): z.ZodObject<{
1271
1271
  entityType: EntityType.ContinueStatement;
1272
1272
  entityId: string;
1273
1273
  })[];
1274
+ outputsDeclarations: ({
1275
+ type: EntityType.ValueDescriptor;
1276
+ } | Record<string, any>)[];
1274
1277
  inputsDeclarations: (Record<string, any> | {
1275
1278
  type: EntityType.ArgumentDeclaration;
1276
1279
  })[];
1277
- outputsDeclarations: (Record<string, any> | {
1278
- type: EntityType.ReturnDeclaration;
1279
- })[];
1280
1280
  }>;
1281
1281
  export declare function getSearchSchema(): z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
1282
1282
  id: z.ZodString;
@@ -1909,11 +1909,11 @@ export declare function getSearchSchema(): z.ZodObject<z.objectUtil.extendShape<
1909
1909
  type: EntityType.InputMap;
1910
1910
  }>, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
1911
1911
  outputsDeclarations: z.ZodArray<z.ZodUnion<[z.ZodObject<{
1912
- type: z.ZodLiteral<EntityType.ReturnDeclaration>;
1912
+ type: z.ZodLiteral<EntityType.ValueDescriptor>;
1913
1913
  }, "strip", z.ZodTypeAny, {
1914
- type: EntityType.ReturnDeclaration;
1914
+ type: EntityType.ValueDescriptor;
1915
1915
  }, {
1916
- type: EntityType.ReturnDeclaration;
1916
+ type: EntityType.ValueDescriptor;
1917
1917
  }>, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
1918
1918
  outputs: z.ZodArray<z.ZodUnion<[z.ZodObject<{
1919
1919
  type: z.ZodLiteral<EntityType.OutputMap>;
@@ -2233,12 +2233,12 @@ export declare function getSearchSchema(): z.ZodObject<z.objectUtil.extendShape<
2233
2233
  entityType: EntityType.ContinueStatement;
2234
2234
  entityId: string;
2235
2235
  })[];
2236
+ outputsDeclarations: ({
2237
+ type: EntityType.ValueDescriptor;
2238
+ } | Record<string, any>)[];
2236
2239
  inputsDeclarations: (Record<string, any> | {
2237
2240
  type: EntityType.ArgumentDeclaration;
2238
2241
  })[];
2239
- outputsDeclarations: (Record<string, any> | {
2240
- type: EntityType.ReturnDeclaration;
2241
- })[];
2242
2242
  query?: any;
2243
2243
  }, {
2244
2244
  id: string;
@@ -2483,11 +2483,11 @@ export declare function getSearchSchema(): z.ZodObject<z.objectUtil.extendShape<
2483
2483
  entityType: EntityType.ContinueStatement;
2484
2484
  entityId: string;
2485
2485
  })[];
2486
+ outputsDeclarations: ({
2487
+ type: EntityType.ValueDescriptor;
2488
+ } | Record<string, any>)[];
2486
2489
  inputsDeclarations: (Record<string, any> | {
2487
2490
  type: EntityType.ArgumentDeclaration;
2488
2491
  })[];
2489
- outputsDeclarations: (Record<string, any> | {
2490
- type: EntityType.ReturnDeclaration;
2491
- })[];
2492
2492
  query?: any;
2493
2493
  }>;
@@ -7,6 +7,8 @@ import { ActionDescriptorState } from '../action-descriptor';
7
7
  import { EntityError, EntityGenerationError } from '../error';
8
8
  import { EntityState } from '../types';
9
9
  import { PrimitiveValueState } from '../primitive-value';
10
+ import { LoopState } from '../loop';
11
+ import { SearchState } from '../search';
10
12
 
11
13
  export declare class ValueDescriptorState implements IValueDescriptor, UserManagedEntityStateFunctionality, BaseState, ChildEntityState {
12
14
  initialData: IValueDescriptor | IValueDescriptorTransfer;
@@ -21,7 +23,7 @@ export declare class ValueDescriptorState implements IValueDescriptor, UserManag
21
23
  dataType: DataTypeState | null;
22
24
  project: ProjectState;
23
25
  errors: EntityError[];
24
- parent: ActionDescriptorState | null;
26
+ parent: ActionDescriptorState | LoopState | SearchState | null;
25
27
  initialized: boolean;
26
28
  constructor(initialVariableDeclarationData: IValueDescriptor | IValueDescriptorTransfer, parentProjectState: ProjectState);
27
29
  static MUTABLE_BASE_PROPERTIES: string[];
@@ -50,7 +52,7 @@ export declare class ValueDescriptorState implements IValueDescriptor, UserManag
50
52
  affected: EntityState[];
51
53
  self: ValueDescriptorState;
52
54
  };
53
- setParent(parent: ActionDescriptorState): ValueDescriptorState;
55
+ setParent(parent: ActionDescriptorState | LoopState | SearchState): ValueDescriptorState;
54
56
  initChildren(): ValueDescriptorState;
55
57
  subscribe(): ValueDescriptorState;
56
58
  unsubscribe(): ValueDescriptorState;
@@ -88,7 +90,7 @@ export declare class ValueDescriptorState implements IValueDescriptor, UserManag
88
90
  };
89
91
  getErrors(): EntityError[];
90
92
  getShallowErrors(): EntityError[];
91
- clone(parent?: ActionDescriptorState | null, newId?: string | null, subscribe?: boolean): ValueDescriptorState;
93
+ clone(parent?: ActionDescriptorState | LoopState | SearchState | null, newId?: string | null, subscribe?: boolean): ValueDescriptorState;
92
94
  getDataType(): DataTypeState | null;
93
95
  setDataType(dataType: DataTypeState): ValueDescriptorState;
94
96
  getDefaultValue(): PrimitiveValueState | null;
@@ -94,7 +94,7 @@ export declare function getHeadIfPartOfDetachedBranch(entity: CanvasEntityState,
94
94
  export declare function flattenDetachedBranch(entity: CanvasEntityState): CanvasEntityState[];
95
95
  export declare function checkIsMethod(entity: EntityState): boolean;
96
96
  export declare function mergeListOfEntities(oldErrors: EntityState[], newErrors: EntityState[]): EntityState[];
97
- export declare function getPrototypeByType(type: EntityType): typeof InputMapState | typeof OutputMapState | typeof ProjectState | typeof ConditionState | typeof OperationState | typeof InstalledProjectState | typeof SearchState | typeof ReturnDeclarationState | typeof CustomEntityState | typeof PropertyState | typeof FunctionDeclarationState | typeof FunctionCallState | typeof VariableDeclarationState | typeof VariableInstanceState | typeof ArgumentDeclarationState | typeof LoopState | typeof ReturnStatementState | typeof BuiltInBaseEntityState | null;
97
+ export declare function getPrototypeByType(type: EntityType): typeof InputMapState | typeof OutputMapState | typeof ProjectState | typeof SearchState | typeof ReturnDeclarationState | typeof ConditionState | typeof OperationState | typeof InstalledProjectState | typeof CustomEntityState | typeof PropertyState | typeof FunctionDeclarationState | typeof FunctionCallState | typeof VariableDeclarationState | typeof VariableInstanceState | typeof ArgumentDeclarationState | typeof LoopState | typeof ReturnStatementState | typeof BuiltInBaseEntityState | null;
98
98
  export declare function getScopeOwner(entity: EntityState | Element | ElementTransfer | ElementGenerationTarget | ElementShallowTransfer, project: ProjectState): EntityWithLogicScopeState | ProjectState | null;
99
99
  export declare function getRootEntryPointScopeOwner(entity: EntityState | Element | ElementTransfer | ElementGenerationTarget | ElementShallowTransfer, project: ProjectState): EntityWithLogicScopeState | null;
100
100
  export declare function checkIsNestedScope(parent: EntityWithLogicScopeState | ProjectState, child: EntityWithLogicScopeState | ProjectState, project: ProjectState): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elyx-code/project-logic-tree",
3
- "version": "0.0.6021",
3
+ "version": "0.0.6023",
4
4
  "author": "Sergio Herrero",
5
5
  "license": "UNLICENSED",
6
6
  "description": "An installable module which contains the type definitions and ephemeral state management for a projects' logic tree data structure",
@@ -26,6 +26,7 @@
26
26
  "dependencies": {
27
27
  "@elyx-code/definitions": "^0.0.7956",
28
28
  "axios": "^1.6.5",
29
+ "pluralize": "^8.0.0",
29
30
  "short-uuid": "^5.2.0",
30
31
  "underscore": "^1.13.7",
31
32
  "zod": "^3.22.4",
@@ -34,6 +35,7 @@
34
35
  "devDependencies": {
35
36
  "@types/jest": "^27.4.1",
36
37
  "@types/node": "^20.5.0",
38
+ "@types/pluralize": "^0.0.33",
37
39
  "@types/underscore": "^1.11.15",
38
40
  "jest": "^27.5.1",
39
41
  "ts-jest": "^27.1.4",
@@ -52,7 +54,10 @@
52
54
  "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
53
55
  "@src/(.*)": "<rootDir>/src/$1"
54
56
  },
55
- "moduleDirectories": ["node_modules", "src"]
57
+ "moduleDirectories": [
58
+ "node_modules",
59
+ "src"
60
+ ]
56
61
  },
57
62
  "repository": {
58
63
  "type": "git",