@elyx-code/project-logic-tree 0.0.6121 → 0.0.6123
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.
- package/dist/definitions/built-in-base-entities/index.d.ts +1 -0
- package/dist/definitions/built-in-base-entities/operations/index.d.ts +1 -1
- package/dist/definitions/logic/definition-entity-to-zod-schema.d.ts +4 -0
- package/dist/definitions/logic/index.d.ts +1 -1
- package/dist/definitions/mock/default-mock/entities/alt-relational-database/entity.d.ts +2 -2
- package/dist/definitions/mock/default-mock/entities/alt-relational-database/properties.d.ts +2 -2
- package/dist/definitions/mock/default-mock/entities/animal.d.ts +4 -4
- package/dist/definitions/mock/default-mock/entities/back-account/account-owner-event.d.ts +2 -2
- package/dist/definitions/mock/default-mock/entities/back-account/change-owner-of-account.d.ts +2 -2
- package/dist/definitions/mock/default-mock/entities/back-account/entity.d.ts +2 -2
- package/dist/definitions/mock/default-mock/entities/back-account/properties.d.ts +3 -3
- package/dist/definitions/mock/default-mock/entities/base-table/entity.d.ts +2 -2
- package/dist/definitions/mock/default-mock/entities/base-table/properties.d.ts +5 -5
- package/dist/definitions/mock/default-mock/entities/bitcoin-api-response/bpi/currency/entity.d.ts +2 -2
- package/dist/definitions/mock/default-mock/entities/bitcoin-api-response/bpi/currency/properties.d.ts +6 -6
- package/dist/definitions/mock/default-mock/entities/bitcoin-api-response/bpi/entity.d.ts +2 -2
- package/dist/definitions/mock/default-mock/entities/bitcoin-api-response/bpi/properties.d.ts +4 -4
- package/dist/definitions/mock/default-mock/entities/bitcoin-api-response/entity.d.ts +2 -2
- package/dist/definitions/mock/default-mock/entities/bitcoin-api-response/properties.d.ts +5 -5
- package/dist/definitions/mock/default-mock/entities/company/change-owner-of-company.d.ts +2 -2
- package/dist/definitions/mock/default-mock/entities/company/company-changed-event/index.d.ts +2 -2
- package/dist/definitions/mock/default-mock/entities/company/entity.d.ts +2 -2
- package/dist/definitions/mock/default-mock/entities/company/properties.d.ts +6 -6
- package/dist/definitions/mock/default-mock/entities/cron-job/entity.d.ts +4 -4
- package/dist/definitions/mock/default-mock/entities/default-relational-database/entity.d.ts +2 -2
- package/dist/definitions/mock/default-mock/entities/default-relational-database/properties.d.ts +2 -2
- package/dist/definitions/mock/default-mock/entities/employee.d.ts +6 -6
- package/dist/definitions/mock/default-mock/entities/get-all-bank-accounts-endpoint/entity.d.ts +2 -2
- package/dist/definitions/mock/default-mock/entities/get-company-by-id-endpoint/entity.d.ts +2 -2
- package/dist/definitions/mock/default-mock/entities/get-company-by-id-endpoint/properties.d.ts +3 -3
- package/dist/definitions/mock/default-mock/entities/person.d.ts +4 -4
- package/dist/definitions/mock/default-mock/entities/plant.d.ts +4 -4
- package/dist/definitions/mock/default-mock/entities/product.d.ts +5 -5
- package/dist/definitions/mock/default-mock/entities/user.d.ts +4 -4
- package/dist/definitions/types/action-descriptor.d.ts +4 -4
- package/dist/definitions/types/base-entity.d.ts +7 -7
- package/dist/definitions/types/base.d.ts +11 -5
- package/dist/definitions/types/data-type.d.ts +5 -7
- package/dist/definitions/types/definition-entity.d.ts +31 -0
- package/dist/definitions/types/function.d.ts +9 -4
- package/dist/definitions/types/generic-reference.d.ts +2 -2
- package/dist/definitions/types/index.d.ts +19 -19
- package/dist/definitions/types/primitives.d.ts +4 -4
- package/dist/definitions/types/project.d.ts +4 -4
- package/dist/definitions/types/property.d.ts +7 -4
- package/dist/definitions/types/return.d.ts +4 -0
- package/dist/index.js +14011 -14157
- package/dist/index.umd.cjs +220 -220
- package/dist/tree/built-in/operations/{custom-entity → definition-entity}/validate-data.d.ts +2 -2
- package/dist/tree/state/action-descriptor/action-descriptor.d.ts +4 -4
- package/dist/tree/state/action-descriptor/validation/validation-schema.d.ts +10 -10
- package/dist/tree/state/argument-declaration/argument-declaration.d.ts +1 -0
- package/dist/tree/state/built-in-base-entity/built-in-base-entity.d.ts +2 -2
- package/dist/tree/state/data-type/data-type.d.ts +4 -6
- package/dist/tree/state/data-type/validation/validation-schema.d.ts +186 -186
- package/dist/tree/state/definition-entity/definition-entity.d.ts +146 -0
- package/dist/tree/state/definition-entity/index.d.ts +1 -0
- package/dist/tree/state/definition-entity/validation/logic-validation.d.ts +9 -0
- package/dist/tree/state/definition-entity/validation/references.d.ts +5 -0
- package/dist/tree/state/{custom-entity → definition-entity}/validation/validation-schema.d.ts +54 -54
- package/dist/tree/state/function-declaration/function-declaration.d.ts +4 -4
- package/dist/tree/state/function-declaration/validation/validation-schema.d.ts +10 -10
- package/dist/tree/state/global-event/validation/validation-schema.d.ts +14 -14
- package/dist/tree/state/index.d.ts +1 -1
- package/dist/tree/state/input-map/validation/validation-schema.d.ts +504 -504
- package/dist/tree/state/literal-value/literal-value.d.ts +2 -2
- package/dist/tree/state/literal-value/validation/validation-schema.d.ts +131 -131
- package/dist/tree/state/project/project.d.ts +7 -7
- package/dist/tree/state/project/validation/validation-schema.d.ts +10 -10
- package/dist/tree/state/property/property.d.ts +5 -4
- package/dist/tree/state/property/validation/validation-schema.d.ts +10 -10
- package/dist/tree/state/return-declaration/return-declaration.d.ts +1 -0
- package/dist/tree/state/types/state.d.ts +5 -5
- package/dist/tree/state/types/validation.d.ts +12 -12
- package/dist/tree/state/validate.d.ts +2 -2
- package/dist/tree/state/variable-declaration/variable-declaration.d.ts +2 -0
- package/dist/tree/utils/data-type.d.ts +7 -7
- package/dist/tree/utils/index.d.ts +22 -22
- package/dist/tree/utils/names.d.ts +4 -4
- package/dist/tree/utils/shared-data-structure-entity.d.ts +13 -13
- package/dist/tree/utils/traverser.d.ts +10 -8
- package/package.json +1 -1
- package/dist/definitions/logic/custom-entity-to-zod-schema.d.ts +0 -4
- package/dist/definitions/types/custom-entity.d.ts +0 -31
- package/dist/tree/state/custom-entity/custom-entity.d.ts +0 -146
- package/dist/tree/state/custom-entity/index.d.ts +0 -1
- package/dist/tree/state/custom-entity/validation/logic-validation.d.ts +0 -9
- package/dist/tree/state/custom-entity/validation/references.d.ts +0 -5
- /package/dist/definitions/built-in-base-entities/operations/{custom-entity → definition-entity}/create-new.d.ts +0 -0
- /package/dist/definitions/built-in-base-entities/operations/{custom-entity → definition-entity}/index.d.ts +0 -0
- /package/dist/definitions/built-in-base-entities/operations/{custom-entity → definition-entity}/validate-data.d.ts +0 -0
- /package/dist/tree/built-in/operations/{custom-entity → definition-entity}/create-new.d.ts +0 -0
- /package/dist/tree/built-in/operations/{custom-entity → definition-entity}/index.d.ts +0 -0
- /package/dist/tree/built-in/operations/{custom-entity → definition-entity}/validate-data.test.d.ts +0 -0
- /package/dist/tree/state/{custom-entity/custom-entity.test.d.ts → definition-entity/definition-entity.test.d.ts} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { EntityId, EntityType, EntityVersion, IProject,
|
|
1
|
+
import { EntityId, EntityType, EntityVersion, IProject, IDefinitionEntity, IFunctionDeclaration, IGlobalEvent, Element, IProjectTransfer, IGenericReference, ElementTransfer, Reference, IProjectReference, IFunctionCallTransfer, IDefinitionEntityTransfer, IFunctionDeclarationTransfer, IInstalledProjectTransfer, IVariableDeclarationTransfer, IProjectShallowTransfer, ElementShallowTransfer, ElementGenerationTarget, IProjectGenerationTarget, IConditionTransfer, IOperationTransfer, ProjectTypesUnion } from '../../../definitions';
|
|
2
2
|
import { ZodError } from 'zod';
|
|
3
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
|
-
import {
|
|
6
|
+
import { DefinitionEntityState } from '../definition-entity';
|
|
7
7
|
import { InstalledProjectState } from '../installed-project';
|
|
8
8
|
import { VariableDeclarationState } from '../variable-declaration';
|
|
9
9
|
import { ConditionState } from '../condition';
|
|
@@ -33,7 +33,7 @@ export declare class ProjectState implements IProject, UserManagedEntityStateFun
|
|
|
33
33
|
description: string | null;
|
|
34
34
|
x: number;
|
|
35
35
|
y: number;
|
|
36
|
-
entities:
|
|
36
|
+
entities: DefinitionEntityState[];
|
|
37
37
|
projects: InstalledProjectState[];
|
|
38
38
|
functions: FunctionDeclarationState[];
|
|
39
39
|
events: GlobalEventState[];
|
|
@@ -151,9 +151,9 @@ export declare class ProjectState implements IProject, UserManagedEntityStateFun
|
|
|
151
151
|
getErrors(): EntityError[];
|
|
152
152
|
getShallowErrors(): EntityError[];
|
|
153
153
|
clone(): ProjectState;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
getDefinitionEntity(id: EntityId): DefinitionEntityState | null;
|
|
155
|
+
addDefinitionEntityFromTransfer(entity: IDefinitionEntityTransfer): DefinitionEntityState;
|
|
156
|
+
addDefinitionEntity(entity: DefinitionEntityState): DefinitionEntityState;
|
|
157
157
|
addFunctionDeclarationFromTransfer(func: IFunctionDeclarationTransfer): FunctionDeclarationState;
|
|
158
158
|
addFunctionDeclaration(func: FunctionDeclarationState): FunctionDeclarationState;
|
|
159
159
|
addFunctionCallFromTransfer(func: IFunctionCallTransfer): FunctionCallState;
|
|
@@ -174,7 +174,7 @@ export declare class ProjectState implements IProject, UserManagedEntityStateFun
|
|
|
174
174
|
addLoop(loop: LoopState): ProjectState;
|
|
175
175
|
addSearchFromTransfer(search: IConditionTransfer): ProjectState;
|
|
176
176
|
addSearch(search: SearchState): ProjectState;
|
|
177
|
-
|
|
177
|
+
removeDefinitionEntity(entity: IDefinitionEntity): DefinitionEntityState | null;
|
|
178
178
|
removeFunctionDeclaration(func: IFunctionDeclaration): FunctionDeclarationState | null;
|
|
179
179
|
removeExternalProject(project: IProject): InstalledProjectState | null;
|
|
180
180
|
removeGlobalEvent(event: IGlobalEvent): GlobalEventState | null;
|
|
@@ -78,11 +78,11 @@ export declare function getProjectGenerationTargetSchema(): z.ZodObject<{
|
|
|
78
78
|
}>;
|
|
79
79
|
export declare function getProjectNestedEntitiesSchema(): z.ZodObject<{
|
|
80
80
|
entities: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
81
|
-
type: z.ZodLiteral<EntityType.
|
|
81
|
+
type: z.ZodLiteral<EntityType.DefinitionEntity>;
|
|
82
82
|
}, "strip", z.ZodTypeAny, {
|
|
83
|
-
type: EntityType.
|
|
83
|
+
type: EntityType.DefinitionEntity;
|
|
84
84
|
}, {
|
|
85
|
-
type: EntityType.
|
|
85
|
+
type: EntityType.DefinitionEntity;
|
|
86
86
|
}>, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
|
|
87
87
|
functions: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
88
88
|
type: z.ZodLiteral<EntityType.FunctionDeclaration>;
|
|
@@ -162,7 +162,7 @@ export declare function getProjectNestedEntitiesSchema(): z.ZodObject<{
|
|
|
162
162
|
type: EntityType.GlobalEvent;
|
|
163
163
|
})[];
|
|
164
164
|
entities: (Record<string, any> | {
|
|
165
|
-
type: EntityType.
|
|
165
|
+
type: EntityType.DefinitionEntity;
|
|
166
166
|
})[];
|
|
167
167
|
projects: (Record<string, any> | {
|
|
168
168
|
type: EntityType.InstalledProject;
|
|
@@ -196,7 +196,7 @@ export declare function getProjectNestedEntitiesSchema(): z.ZodObject<{
|
|
|
196
196
|
type: EntityType.GlobalEvent;
|
|
197
197
|
})[];
|
|
198
198
|
entities: (Record<string, any> | {
|
|
199
|
-
type: EntityType.
|
|
199
|
+
type: EntityType.DefinitionEntity;
|
|
200
200
|
})[];
|
|
201
201
|
projects: (Record<string, any> | {
|
|
202
202
|
type: EntityType.InstalledProject;
|
|
@@ -232,11 +232,11 @@ export declare function getProjectSchema(): z.ZodObject<z.objectUtil.extendShape
|
|
|
232
232
|
version: z.ZodNumber;
|
|
233
233
|
}>, {
|
|
234
234
|
entities: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
235
|
-
type: z.ZodLiteral<EntityType.
|
|
235
|
+
type: z.ZodLiteral<EntityType.DefinitionEntity>;
|
|
236
236
|
}, "strip", z.ZodTypeAny, {
|
|
237
|
-
type: EntityType.
|
|
237
|
+
type: EntityType.DefinitionEntity;
|
|
238
238
|
}, {
|
|
239
|
-
type: EntityType.
|
|
239
|
+
type: EntityType.DefinitionEntity;
|
|
240
240
|
}>, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
|
|
241
241
|
functions: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
242
242
|
type: z.ZodLiteral<EntityType.FunctionDeclaration>;
|
|
@@ -321,7 +321,7 @@ export declare function getProjectSchema(): z.ZodObject<z.objectUtil.extendShape
|
|
|
321
321
|
type: EntityType.GlobalEvent;
|
|
322
322
|
})[];
|
|
323
323
|
entities: (Record<string, any> | {
|
|
324
|
-
type: EntityType.
|
|
324
|
+
type: EntityType.DefinitionEntity;
|
|
325
325
|
})[];
|
|
326
326
|
projects: (Record<string, any> | {
|
|
327
327
|
type: EntityType.InstalledProject;
|
|
@@ -360,7 +360,7 @@ export declare function getProjectSchema(): z.ZodObject<z.objectUtil.extendShape
|
|
|
360
360
|
type: EntityType.GlobalEvent;
|
|
361
361
|
})[];
|
|
362
362
|
entities: (Record<string, any> | {
|
|
363
|
-
type: EntityType.
|
|
363
|
+
type: EntityType.DefinitionEntity;
|
|
364
364
|
})[];
|
|
365
365
|
projects: (Record<string, any> | {
|
|
366
366
|
type: EntityType.InstalledProject;
|
|
@@ -4,7 +4,7 @@ import { BaseState, ChildEntityState, EntityWithValueClass, IEntityPersistanceOp
|
|
|
4
4
|
import { DataTypeState } from '../data-type';
|
|
5
5
|
import { ProjectState } from '../project/project';
|
|
6
6
|
import { PrimitiveEntityState } from '../primitive-entity';
|
|
7
|
-
import {
|
|
7
|
+
import { DefinitionEntityState } from '../definition-entity';
|
|
8
8
|
import { BuiltInBaseEntityState } from '../built-in-base-entity';
|
|
9
9
|
import { EntityError, EntityGenerationError } from '../error';
|
|
10
10
|
import { LiteralValueState } from '../literal-value';
|
|
@@ -21,6 +21,7 @@ export declare class PropertyState implements IProperty, UserManagedEntityStateF
|
|
|
21
21
|
index: number;
|
|
22
22
|
static: boolean;
|
|
23
23
|
required: boolean;
|
|
24
|
+
constant: boolean;
|
|
24
25
|
readonly type: EntityType.Property;
|
|
25
26
|
hidden: boolean;
|
|
26
27
|
defaultValue: LiteralValueState | null;
|
|
@@ -28,7 +29,7 @@ export declare class PropertyState implements IProperty, UserManagedEntityStateF
|
|
|
28
29
|
implements: PropertyState | null;
|
|
29
30
|
project: ProjectState;
|
|
30
31
|
errors: EntityError[];
|
|
31
|
-
parent:
|
|
32
|
+
parent: DefinitionEntityState | PrimitiveEntityState | BuiltInBaseEntityState;
|
|
32
33
|
initialized: boolean;
|
|
33
34
|
suggestion: boolean;
|
|
34
35
|
constructor(initialPropertyData: IProperty | IPropertyTransfer, parentProjectState: ProjectState);
|
|
@@ -59,7 +60,7 @@ export declare class PropertyState implements IProperty, UserManagedEntityStateF
|
|
|
59
60
|
hydrateAncestors(): IChangeSet<PropertyState>;
|
|
60
61
|
afterAllChildrenInitialized(): IChangeSet<PropertyState>;
|
|
61
62
|
addSelfToProject(): IChangeSet<PropertyState>;
|
|
62
|
-
setParent(parent:
|
|
63
|
+
setParent(parent: DefinitionEntityState | PrimitiveEntityState | BuiltInBaseEntityState): PropertyState;
|
|
63
64
|
setImplements(implementsEntity: PropertyState): PropertyState;
|
|
64
65
|
initChildren(): PropertyState;
|
|
65
66
|
subscribe(): PropertyState;
|
|
@@ -99,7 +100,7 @@ export declare class PropertyState implements IProperty, UserManagedEntityStateF
|
|
|
99
100
|
};
|
|
100
101
|
getErrors(): EntityError[];
|
|
101
102
|
getShallowErrors(): EntityError[];
|
|
102
|
-
clone(parent?:
|
|
103
|
+
clone(parent?: DefinitionEntityState | null, newId?: string | null, subscribe?: boolean): PropertyState;
|
|
103
104
|
setDataType(dataType: DataTypeState): PropertyState;
|
|
104
105
|
removeDataType(): PropertyState;
|
|
105
106
|
getDataType(): DataTypeState | null;
|
|
@@ -134,16 +134,16 @@ export declare function getPropertyNestedEntitiesSchema(): z.ZodObject<{
|
|
|
134
134
|
id: z.ZodString;
|
|
135
135
|
type: z.ZodLiteral<EntityType.GenericReference>;
|
|
136
136
|
entityId: z.ZodString;
|
|
137
|
-
entityType: z.ZodLiteral<EntityType.
|
|
137
|
+
entityType: z.ZodLiteral<EntityType.DefinitionEntity>;
|
|
138
138
|
}, "strip", z.ZodTypeAny, {
|
|
139
139
|
id: string;
|
|
140
140
|
type: EntityType.GenericReference;
|
|
141
|
-
entityType: EntityType.
|
|
141
|
+
entityType: EntityType.DefinitionEntity;
|
|
142
142
|
entityId: string;
|
|
143
143
|
}, {
|
|
144
144
|
id: string;
|
|
145
145
|
type: EntityType.GenericReference;
|
|
146
|
-
entityType: EntityType.
|
|
146
|
+
entityType: EntityType.DefinitionEntity;
|
|
147
147
|
entityId: string;
|
|
148
148
|
}>, z.ZodObject<{
|
|
149
149
|
id: z.ZodString;
|
|
@@ -188,7 +188,7 @@ export declare function getPropertyNestedEntitiesSchema(): z.ZodObject<{
|
|
|
188
188
|
} | {
|
|
189
189
|
id: string;
|
|
190
190
|
type: EntityType.GenericReference;
|
|
191
|
-
entityType: EntityType.
|
|
191
|
+
entityType: EntityType.DefinitionEntity;
|
|
192
192
|
entityId: string;
|
|
193
193
|
} | {
|
|
194
194
|
id: string;
|
|
@@ -211,7 +211,7 @@ export declare function getPropertyNestedEntitiesSchema(): z.ZodObject<{
|
|
|
211
211
|
} | {
|
|
212
212
|
id: string;
|
|
213
213
|
type: EntityType.GenericReference;
|
|
214
|
-
entityType: EntityType.
|
|
214
|
+
entityType: EntityType.DefinitionEntity;
|
|
215
215
|
entityId: string;
|
|
216
216
|
} | {
|
|
217
217
|
id: string;
|
|
@@ -254,16 +254,16 @@ export declare function getPropertySchema(): z.ZodObject<z.objectUtil.extendShap
|
|
|
254
254
|
id: z.ZodString;
|
|
255
255
|
type: z.ZodLiteral<EntityType.GenericReference>;
|
|
256
256
|
entityId: z.ZodString;
|
|
257
|
-
entityType: z.ZodLiteral<EntityType.
|
|
257
|
+
entityType: z.ZodLiteral<EntityType.DefinitionEntity>;
|
|
258
258
|
}, "strip", z.ZodTypeAny, {
|
|
259
259
|
id: string;
|
|
260
260
|
type: EntityType.GenericReference;
|
|
261
|
-
entityType: EntityType.
|
|
261
|
+
entityType: EntityType.DefinitionEntity;
|
|
262
262
|
entityId: string;
|
|
263
263
|
}, {
|
|
264
264
|
id: string;
|
|
265
265
|
type: EntityType.GenericReference;
|
|
266
|
-
entityType: EntityType.
|
|
266
|
+
entityType: EntityType.DefinitionEntity;
|
|
267
267
|
entityId: string;
|
|
268
268
|
}>, z.ZodObject<{
|
|
269
269
|
id: z.ZodString;
|
|
@@ -314,7 +314,7 @@ export declare function getPropertySchema(): z.ZodObject<z.objectUtil.extendShap
|
|
|
314
314
|
} | {
|
|
315
315
|
id: string;
|
|
316
316
|
type: EntityType.GenericReference;
|
|
317
|
-
entityType: EntityType.
|
|
317
|
+
entityType: EntityType.DefinitionEntity;
|
|
318
318
|
entityId: string;
|
|
319
319
|
} | {
|
|
320
320
|
id: string;
|
|
@@ -347,7 +347,7 @@ export declare function getPropertySchema(): z.ZodObject<z.objectUtil.extendShap
|
|
|
347
347
|
} | {
|
|
348
348
|
id: string;
|
|
349
349
|
type: EntityType.GenericReference;
|
|
350
|
-
entityType: EntityType.
|
|
350
|
+
entityType: EntityType.DefinitionEntity;
|
|
351
351
|
entityId: string;
|
|
352
352
|
} | {
|
|
353
353
|
id: string;
|
|
@@ -19,6 +19,7 @@ export declare class ReturnDeclarationState implements IReturnDeclaration, UserM
|
|
|
19
19
|
description: string | null;
|
|
20
20
|
index: number;
|
|
21
21
|
required: boolean;
|
|
22
|
+
constant: true;
|
|
22
23
|
isError: boolean;
|
|
23
24
|
readonly type: EntityType.ReturnDeclaration;
|
|
24
25
|
defaultValue: LiteralValueState | null;
|
|
@@ -10,7 +10,7 @@ import { ConditionPayloadUnion, ConditionState } from '../condition';
|
|
|
10
10
|
import { ReturnStatementPayloadUnion, ReturnStatementState } from '../return-statement';
|
|
11
11
|
import { FunctionDeclarationPayloadUnion, FunctionDeclarationState } from '../function-declaration';
|
|
12
12
|
import { ProjectPayloadUnion, ProjectState } from '../project/project';
|
|
13
|
-
import {
|
|
13
|
+
import { DefinitionEntityPayloadUnion, DefinitionEntityState } from '../definition-entity';
|
|
14
14
|
import { PrimitiveEntityPayloadUnion, PrimitiveEntityState } from '../primitive-entity';
|
|
15
15
|
import { DataTypePayloadUnion, DataTypeState } from '../data-type';
|
|
16
16
|
import { PropertyPayloadUnion, PropertyState } from '../property';
|
|
@@ -45,8 +45,8 @@ export type EntityWithLogicScopeState = EntryPointEntityState | LoopState;
|
|
|
45
45
|
export type PlayableEntityState = PassThroughCallableEntityState | EntryPointEntityState;
|
|
46
46
|
export type DraggablePlayableEntityState = DraggablePassThroughCallableEntityState | EntryPointEntityState;
|
|
47
47
|
export type TerminationState = ReturnStatementState | BreakStatementState | ContinueStatementState;
|
|
48
|
-
export type EntityState = BuiltInBaseEntityState | ProjectState | InstalledProjectState |
|
|
49
|
-
export type CanvasEntityState = InstalledProjectState |
|
|
48
|
+
export type EntityState = BuiltInBaseEntityState | ProjectState | InstalledProjectState | DefinitionEntityState | FunctionDeclarationState | GlobalEventState | VariableState | InputMapState | OutputMapState | ConditionState | OperationState | FunctionCallState | ReturnDeclarationState | ArgumentDeclarationState | PrimitiveEntityState | DataTypeState | PropertyState | ActionDescriptorState | ReturnStatementState | ContinueStatementState | BreakStatementState | LoopState | SearchState | ValueDescriptorState | InternalCallState | LiteralValueState;
|
|
49
|
+
export type CanvasEntityState = InstalledProjectState | DefinitionEntityState | FunctionDeclarationState | GlobalEventState | VariableState | ConditionState | OperationState | FunctionCallState | ReturnStatementState | ContinueStatementState | BreakStatementState | LoopState | SearchState;
|
|
50
50
|
export type BuiltInSystemEntityState = PrimitiveEntityState | BuiltInBaseEntityState;
|
|
51
|
-
export type UserManagedEntityState = ProjectState | InstalledProjectState |
|
|
52
|
-
export type EntityPayloadUnion = BuiltInBaseEntityPayloadUnion | ProjectPayloadUnion | InstalledProjectPayloadUnion |
|
|
51
|
+
export type UserManagedEntityState = ProjectState | InstalledProjectState | DefinitionEntityState | FunctionDeclarationState | GlobalEventState | VariableState | InputMapState | OutputMapState | ConditionState | OperationState | FunctionCallState | ReturnDeclarationState | ArgumentDeclarationState | DataTypeState | PropertyState | ReturnStatementState | ContinueStatementState | BreakStatementState | LoopState | SearchState | ActionDescriptorState | ValueDescriptorState | InternalCallState | LiteralValueState;
|
|
52
|
+
export type EntityPayloadUnion = BuiltInBaseEntityPayloadUnion | ProjectPayloadUnion | InstalledProjectPayloadUnion | DefinitionEntityPayloadUnion | FunctionDeclarationPayloadUnion | GlobalEventPayloadUnion | VariableDeclarationPayloadUnion | VariableInstancePayloadUnion | InputMapPayloadUnion | OutputMapPayloadUnion | ConditionPayloadUnion | OperationPayloadUnion | FunctionCallPayloadUnion | ReturnDeclarationPayloadUnion | ArgumentDeclarationPayloadUnion | PrimitiveEntityPayloadUnion | DataTypePayloadUnion | PropertyPayloadUnion | ActionDescriptorPayloadUnion | ReturnStatementPayloadUnion | ContinueStatementPayloadUnion | BreakStatementPayloadUnion | LoopPayloadUnion | SearchPayloadUnion | ValueDescriptorPayloadUnion | InternalCallPayloadUnion | LiteralValuePayloadUnion;
|
|
@@ -2722,11 +2722,11 @@ export declare function getEntityTypeSchema(): z.ZodUnion<[z.ZodUnion<[z.ZodObje
|
|
|
2722
2722
|
}, {
|
|
2723
2723
|
type: import("../../..").EntityType.InstalledProject;
|
|
2724
2724
|
}>, z.ZodRecord<z.ZodString, z.ZodAny>]>, z.ZodUnion<[z.ZodObject<{
|
|
2725
|
-
type: z.ZodLiteral<import("../../..").EntityType.
|
|
2725
|
+
type: z.ZodLiteral<import("../../..").EntityType.DefinitionEntity>;
|
|
2726
2726
|
}, "strip", z.ZodTypeAny, {
|
|
2727
|
-
type: import("../../..").EntityType.
|
|
2727
|
+
type: import("../../..").EntityType.DefinitionEntity;
|
|
2728
2728
|
}, {
|
|
2729
|
-
type: import("../../..").EntityType.
|
|
2729
|
+
type: import("../../..").EntityType.DefinitionEntity;
|
|
2730
2730
|
}>, z.ZodRecord<z.ZodString, z.ZodAny>]>, z.ZodUnion<[z.ZodObject<{
|
|
2731
2731
|
type: z.ZodLiteral<import("../../..").EntityType.FunctionDeclaration>;
|
|
2732
2732
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -2921,16 +2921,16 @@ export declare function getEntityReferenceSchema(): z.ZodUnion<[z.ZodObject<{
|
|
|
2921
2921
|
id: z.ZodString;
|
|
2922
2922
|
type: z.ZodLiteral<import("../../..").EntityType.GenericReference>;
|
|
2923
2923
|
entityId: z.ZodString;
|
|
2924
|
-
entityType: z.ZodLiteral<import("../../..").EntityType.
|
|
2924
|
+
entityType: z.ZodLiteral<import("../../..").EntityType.DefinitionEntity>;
|
|
2925
2925
|
}, "strip", z.ZodTypeAny, {
|
|
2926
2926
|
id: string;
|
|
2927
2927
|
type: import("../../..").EntityType.GenericReference;
|
|
2928
|
-
entityType: import("../../..").EntityType.
|
|
2928
|
+
entityType: import("../../..").EntityType.DefinitionEntity;
|
|
2929
2929
|
entityId: string;
|
|
2930
2930
|
}, {
|
|
2931
2931
|
id: string;
|
|
2932
2932
|
type: import("../../..").EntityType.GenericReference;
|
|
2933
|
-
entityType: import("../../..").EntityType.
|
|
2933
|
+
entityType: import("../../..").EntityType.DefinitionEntity;
|
|
2934
2934
|
entityId: string;
|
|
2935
2935
|
}>, z.ZodObject<{
|
|
2936
2936
|
id: z.ZodString;
|
|
@@ -3300,11 +3300,11 @@ export declare function getCanvasEntityTypeSchema(): z.ZodUnion<[z.ZodUnion<[z.Z
|
|
|
3300
3300
|
}, {
|
|
3301
3301
|
type: import("../../..").EntityType.InstalledProject;
|
|
3302
3302
|
}>, z.ZodRecord<z.ZodString, z.ZodAny>]>, z.ZodUnion<[z.ZodObject<{
|
|
3303
|
-
type: z.ZodLiteral<import("../../..").EntityType.
|
|
3303
|
+
type: z.ZodLiteral<import("../../..").EntityType.DefinitionEntity>;
|
|
3304
3304
|
}, "strip", z.ZodTypeAny, {
|
|
3305
|
-
type: import("../../..").EntityType.
|
|
3305
|
+
type: import("../../..").EntityType.DefinitionEntity;
|
|
3306
3306
|
}, {
|
|
3307
|
-
type: import("../../..").EntityType.
|
|
3307
|
+
type: import("../../..").EntityType.DefinitionEntity;
|
|
3308
3308
|
}>, z.ZodRecord<z.ZodString, z.ZodAny>]>, z.ZodUnion<[z.ZodObject<{
|
|
3309
3309
|
type: z.ZodLiteral<import("../../..").EntityType.FunctionDeclaration>;
|
|
3310
3310
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -3397,16 +3397,16 @@ export declare function getCanvasEntityReferenceSchema(): z.ZodUnion<[z.ZodObjec
|
|
|
3397
3397
|
id: z.ZodString;
|
|
3398
3398
|
type: z.ZodLiteral<import("../../..").EntityType.GenericReference>;
|
|
3399
3399
|
entityId: z.ZodString;
|
|
3400
|
-
entityType: z.ZodLiteral<import("../../..").EntityType.
|
|
3400
|
+
entityType: z.ZodLiteral<import("../../..").EntityType.DefinitionEntity>;
|
|
3401
3401
|
}, "strip", z.ZodTypeAny, {
|
|
3402
3402
|
id: string;
|
|
3403
3403
|
type: import("../../..").EntityType.GenericReference;
|
|
3404
|
-
entityType: import("../../..").EntityType.
|
|
3404
|
+
entityType: import("../../..").EntityType.DefinitionEntity;
|
|
3405
3405
|
entityId: string;
|
|
3406
3406
|
}, {
|
|
3407
3407
|
id: string;
|
|
3408
3408
|
type: import("../../..").EntityType.GenericReference;
|
|
3409
|
-
entityType: import("../../..").EntityType.
|
|
3409
|
+
entityType: import("../../..").EntityType.DefinitionEntity;
|
|
3410
3410
|
entityId: string;
|
|
3411
3411
|
}>, z.ZodObject<{
|
|
3412
3412
|
id: z.ZodString;
|
|
@@ -70,11 +70,11 @@ export declare const CALLABLE_ENTITIES_EXPLANATION: string;
|
|
|
70
70
|
export declare const CALLS_UPDATE_EXPLANATION = "Caller to callee relationships can be updated with the 'add_caller' and 'remove_caller' generation action with the properties: 'callerEntityId', a 'calleeEntityId'. For adding a caller, you can optionally add a boolean property 'fromError' (if the caller calls when an error occured in its execution).\nEither of these two actions will only affect the one relationship between the given caller and callee and ignore any others present in either entity.";
|
|
71
71
|
export declare const BREAK_AND_CONTINUE_STATEMENTS_RETURN_DECLARATIONS_EXPLANATION = "Break and continue statements need to have exactly one 'return-declaration' entity each. It represents the result of the current iteration of the loop. It can have any name and have any 'data-type' but it needs to be identical among all statements in the same loop.\nMeaning, if the return declaration in one 'break-statement' is named 'result' and has a 'data-type' of 'number', all other 'break-statements' and 'continue-statements' in the same loop need to have a 'return-declaration' with the same name and 'data-type'.";
|
|
72
72
|
export declare const RETURN_STATEMENT_RETURN_DECLARATIONS_EXPLANATION = "Return statements need to be identical inside the same scope. For example if a 'return-statement' belongs to a function, with multiple branches of logic, leading to multiple 'return-statement' entities, all of them need to have the exact same amount of 'return-declaration' entities, sharing the same name and an equivalent 'data-type' entity.\nFurthermore, some 'function-declarations' and all 'global-events' might be implementing a base 'action-descriptor' entity, which defines exactly the shape and number of the return declarations.";
|
|
73
|
-
export declare const VARIABLE_DATA_TYPE_INFERRANCE_EXPLANATION = "A variable without a data type which reads an-untyped object value, or has object properties written into it as input-map writes, will infere its data-type. This means that a 'data-type' will be created, with an implicitly declared '
|
|
73
|
+
export declare const VARIABLE_DATA_TYPE_INFERRANCE_EXPLANATION = "A variable without a data type which reads an-untyped object value, or has object properties written into it as input-map writes, will infere its data-type. This means that a 'data-type' will be created, with an implicitly declared 'definition-entity' as its 'entity' property, defining the structure of the object.\nThis data type entity is what will define which properties are available to be read from the variable or any of its instances as 'output-map' entities.";
|
|
74
74
|
export declare const NON_INTERACTIVE_BASE_ENTITIES_EXPLANATION = "Entities of type 'built-in-base-entity' that have the 'interactive' property set to false cannot be used programmatically during runtime. They can't be used as data types or instanciated in variables. Their methods can't be called by the code, and are only called by the system in the background. Their properties' values are constant and set only once when declared. They also can't be extended with unrecognized properties or methods that aren't part of the base out-of-the-box entity.";
|
|
75
75
|
export declare const VALUE_READING_ENTITIES_EXPLANATION: string;
|
|
76
76
|
export declare const VALUE_WRITING_ENTITIES_EXPLANATION: string;
|
|
77
|
-
export declare const PROPERTY_NOT_VALUE_READER_WRITTER_EXPLANATION = "A property entity, is neither a value reading, or a value writting entity, but they are often confused with one.\nA 'property' can have a default value through its nested 'data-type' entity.\nThe 'property' entity only represents the data field in the declaration, and it can't write or read values.\nWhen a '
|
|
77
|
+
export declare const PROPERTY_NOT_VALUE_READER_WRITTER_EXPLANATION = "A property entity, is neither a value reading, or a value writting entity, but they are often confused with one.\nA 'property' can have a default value through its nested 'data-type' entity.\nThe 'property' entity only represents the data field in the declaration, and it can't write or read values.\nWhen a 'definition-entity' is instantiated as a variable, any writes or reads to its properties are done through 'input-map's and 'output-map's.";
|
|
78
78
|
export declare const ENTITIES_WITH_VALLUES_EXPLANATION: string;
|
|
79
79
|
export declare const AI_VALUE_CONNECTION_GENERATION_ACTION_EXPLANATION = "To establish a connection of a reader and writter value during the generation process you can use the 'connect_values' generation action, like so:\n```json\n{\n\t\"connect_values\": {\n\t\t\"writerEntityId\": \"writer-entity-id\"; // Id of the entity that will give the value\n \"readerEntityId\": \"reader-entity-id\"; // Id of the entity that will receive the value\n\t}\n}\n```\nYou can use the 'disconnect_values' generation action to remove the connection between two value holding entities in the same way.";
|
|
80
80
|
export declare const PARENT_AUTO_CALCULATION_FROM_CALLER_EXPLANATION = "If an explicit 'parent' isn't given for a callable entity, the scope will be auto-calculated to match the parent scope of the caller entity.\nIf the entity that should be the parent of a callable entity is unclear, you can always skip the 'parent' property and the system will automatically calculate the parent based on the caller entity.";
|
|
@@ -17,6 +17,8 @@ export declare class VariableDeclarationState implements IVariableDeclaration, B
|
|
|
17
17
|
version: EntityVersion;
|
|
18
18
|
name: string;
|
|
19
19
|
description: string | null;
|
|
20
|
+
required: boolean;
|
|
21
|
+
constant: boolean;
|
|
20
22
|
x: number;
|
|
21
23
|
y: number;
|
|
22
24
|
readonly type: EntityType.VariableDeclaration;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ArgumentDeclarationState,
|
|
1
|
+
import { ArgumentDeclarationState, DefinitionEntityState, DataTypeState, EntityWithValueState, InputMapState, OutputMapState, PropertyState, ReturnDeclarationState, VariableDeclarationState, VariableInstanceState } from '../state';
|
|
2
2
|
import { ValueDescriptorState } from '../state/value-descriptor';
|
|
3
3
|
|
|
4
4
|
export declare function checkArePropertiesCompatibleAsDataType(sourceProperty: PropertyState, targetProperty: PropertyState): boolean;
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function checkAreDefinitionEntitiesCompatibleAsDataType(sourceDefinitionEntity: DefinitionEntityState, targetDefinitionEntity: DefinitionEntityState): boolean;
|
|
6
6
|
export declare enum DataTypeCompatibilityTypes {
|
|
7
7
|
BothUnconstrained = "both-unconstrained",
|
|
8
8
|
AConstraintBUnconstrained = "a-constraint-b-unconstrained",
|
|
@@ -18,9 +18,9 @@ export declare enum DataTypeCompatibilityTypes {
|
|
|
18
18
|
AIsUntypedBIsNot = "a-is-untyped-b-is-not",
|
|
19
19
|
BIsUntypedAIsNot = "b-is-untyped-a-is-not",
|
|
20
20
|
TypeEntityMismatch = "type-entity-mismatch",
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
SameDefinitionEntities = "same-definition-entities",
|
|
22
|
+
CompatibleDefinitionEntities = "compatible-definition-entities",
|
|
23
|
+
IncompatibleDefinitionEntities = "incompatible-definition-entities",
|
|
24
24
|
SamePrimitiveEntities = "same-primitive-entities",
|
|
25
25
|
IncompatiblePrimitiveEntities = "incompatible-primitive-entities",
|
|
26
26
|
SameBuiltInBaseEntities = "same-built-in-base-entities",
|
|
@@ -33,11 +33,11 @@ export interface IDataTypeCompatibility {
|
|
|
33
33
|
}
|
|
34
34
|
export interface IDataTypeCompatible extends IDataTypeCompatibility {
|
|
35
35
|
compatible: true;
|
|
36
|
-
type: DataTypeCompatibilityTypes.BothUnconstrained | DataTypeCompatibilityTypes.AConstraintBUnconstrained | DataTypeCompatibilityTypes.BConstraintAUnconstrained | DataTypeCompatibilityTypes.Same | DataTypeCompatibilityTypes.BothUntyped | DataTypeCompatibilityTypes.AIsUntypedBIsNot | DataTypeCompatibilityTypes.BIsUntypedAIsNot | DataTypeCompatibilityTypes.
|
|
36
|
+
type: DataTypeCompatibilityTypes.BothUnconstrained | DataTypeCompatibilityTypes.AConstraintBUnconstrained | DataTypeCompatibilityTypes.BConstraintAUnconstrained | DataTypeCompatibilityTypes.Same | DataTypeCompatibilityTypes.BothUntyped | DataTypeCompatibilityTypes.AIsUntypedBIsNot | DataTypeCompatibilityTypes.BIsUntypedAIsNot | DataTypeCompatibilityTypes.SameDefinitionEntities | DataTypeCompatibilityTypes.CompatibleDefinitionEntities | DataTypeCompatibilityTypes.SamePrimitiveEntities | DataTypeCompatibilityTypes.SameBuiltInBaseEntities;
|
|
37
37
|
}
|
|
38
38
|
export interface IDataTypeIncompatibile extends IDataTypeCompatibility {
|
|
39
39
|
compatible: false;
|
|
40
|
-
type: DataTypeCompatibilityTypes.AIsListBIsNot | DataTypeCompatibilityTypes.BIsListAIsNot | DataTypeCompatibilityTypes.AIsNullableBIsNot | DataTypeCompatibilityTypes.BIsNullableAIsNot | DataTypeCompatibilityTypes.AIsTemplateBIsNot | DataTypeCompatibilityTypes.BIsTemplateAIsNot | DataTypeCompatibilityTypes.TypeEntityMismatch | DataTypeCompatibilityTypes.
|
|
40
|
+
type: DataTypeCompatibilityTypes.AIsListBIsNot | DataTypeCompatibilityTypes.BIsListAIsNot | DataTypeCompatibilityTypes.AIsNullableBIsNot | DataTypeCompatibilityTypes.BIsNullableAIsNot | DataTypeCompatibilityTypes.AIsTemplateBIsNot | DataTypeCompatibilityTypes.BIsTemplateAIsNot | DataTypeCompatibilityTypes.TypeEntityMismatch | DataTypeCompatibilityTypes.IncompatibleDefinitionEntities | DataTypeCompatibilityTypes.IncompatiblePrimitiveEntities | DataTypeCompatibilityTypes.IncompatibleBuiltInBaseEntities | DataTypeCompatibilityTypes.CheckUnknown;
|
|
41
41
|
}
|
|
42
42
|
export declare function checkAreDataTypesCompatible(dataTypeA: DataTypeState | null, dataTypeB: DataTypeState | null): IDataTypeCompatible | IDataTypeIncompatibile;
|
|
43
43
|
export declare function generateExecutionDataType(entity: PropertyState | ArgumentDeclarationState | ReturnDeclarationState | VariableDeclarationState | ValueDescriptorState | DataTypeState): DataTypeState;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseEntityNames, ElementGenerationTarget, ElementShallowTransfer, ElementTransfer, EntityType, Element, IGenericReference, EntityId, ValueReadingEntityTypesUnion, ValueReadingEntity, IActionDescriptor, IActionDescriptorTransfer, IArgumentDeclaration, IArgumentDeclarationTransfer, DraggableElement, Reference, IBreakStatement, IBreakStatementTransfer, IBuiltInBaseEntity, IBuiltInBaseEntityTransfer, ICondition, IConditionTransfer, IContinueStatement, IContinueStatementTransfer, CallableEntity, CallableEntityTransfer, CallerEntity, CallerEntityTransfer,
|
|
1
|
+
import { BaseEntityNames, ElementGenerationTarget, ElementShallowTransfer, ElementTransfer, EntityType, Element, IGenericReference, EntityId, ValueReadingEntityTypesUnion, ValueReadingEntity, IActionDescriptor, IActionDescriptorTransfer, IArgumentDeclaration, IArgumentDeclarationTransfer, DraggableElement, Reference, IBreakStatement, IBreakStatementTransfer, IBuiltInBaseEntity, IBuiltInBaseEntityTransfer, ICondition, IConditionTransfer, IContinueStatement, IContinueStatementTransfer, CallableEntity, CallableEntityTransfer, CallerEntity, CallerEntityTransfer, IDefinitionEntity, IDefinitionEntityTransfer, IDataType, IDataTypeTransfer, IFunctionCall, IFunctionCallTransfer, IFunctionDeclaration, IFunctionDeclarationTransfer, IGlobalEvent, IGlobalEventTransfer, IInputMap, IInputMapTransfer, IInstalledProject, IInstalledProjectTransfer, IInternalCall, IInternalCallTransfer, ILiteralValue, ILiteralValueTransfer, ILoop, ILoopTransfer, IOperation, IOperationTransfer, IOutputMap, IOutputMapTransfer, IPrimitiveEntity, IPrimitiveEntityTransfer, IProject, IProjectTransfer, IProperty, IPropertyTransfer, IReturnDeclaration, IReturnDeclarationTransfer, IReturnStatement, IReturnStatementTransfer, ISearch, ISearchTransfer, IValueDescriptor, IValueDescriptorTransfer, IVariableDeclarationTransfer, IVariableDeclaration, IVariableInstance, IVariableInstanceTransfer, DraggableElementTransfer, ValueReadingEntityTransfer } from '../../definitions';
|
|
2
2
|
import { DraggableCallableEntityState, CanvasEntityState, EntityState, EntityWithLogicScopeState, EntryPointEntityState, DraggableExecutableEntityState, DraggablePassThroughCallableEntityState, ValueReadingEntityState, ValueWritingEntityState, EntityWithValueState, VariableState, BuiltInBaseEntityState, TerminationState, InstalledProjectState, ExecutableEntityState, ValueDescriptorState, CallableEntityState, CallerEntityState, PassThroughCallableEntityState, PrimitiveEntityState, InternalCallState } from '../state';
|
|
3
3
|
import { FunctionCallState } from '../state/function-call';
|
|
4
4
|
import { InputMapState } from '../state/input-map';
|
|
@@ -12,7 +12,7 @@ import { FunctionDeclarationState } from '../state/function-declaration';
|
|
|
12
12
|
import { ProjectState } from '../state/project/project';
|
|
13
13
|
import { PropertyState } from '../state/property';
|
|
14
14
|
import { OperationState } from '../state/operation';
|
|
15
|
-
import {
|
|
15
|
+
import { DefinitionEntityState } from '../state/definition-entity';
|
|
16
16
|
import { VariableInstanceState } from '../state/variable-instance';
|
|
17
17
|
import { LoopState } from '../state/loop';
|
|
18
18
|
import { SearchState } from '../state/search';
|
|
@@ -87,7 +87,7 @@ export declare function flattenCondition(entity: ICondition | IConditionTransfer
|
|
|
87
87
|
export declare function flattenContinueStatement(entity: IContinueStatement | IContinueStatementTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
88
88
|
ignoreBuiltInBaseEntities?: boolean;
|
|
89
89
|
}): (Element | ElementTransfer)[];
|
|
90
|
-
export declare function
|
|
90
|
+
export declare function flattenDefinitionEntity(entity: IDefinitionEntity | IDefinitionEntityTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
91
91
|
ignoreBuiltInBaseEntities?: boolean;
|
|
92
92
|
}): (Element | ElementTransfer)[];
|
|
93
93
|
export declare function flattenDataType(entity: IDataType | IDataTypeTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
@@ -154,7 +154,7 @@ export declare function getAllBuiltInEntityIds(): EntityId[];
|
|
|
154
154
|
export declare function flattenEntity(entity: Element | ElementTransfer | Reference, seenEntities?: Set<EntityId>, options?: {
|
|
155
155
|
ignoreBuiltInBaseEntities?: boolean;
|
|
156
156
|
}): (Element | ElementTransfer)[];
|
|
157
|
-
export declare function
|
|
157
|
+
export declare function getUpstreamDependencyIds(element: ElementTransfer, allKnownEntities: Record<EntityId, ElementTransfer>): Set<EntityId>;
|
|
158
158
|
export declare function getEntityArgumentDeclarations(entity: ExecutableEntityState): (ArgumentDeclarationState | ValueDescriptorState)[];
|
|
159
159
|
export declare function getUsedArgFromDeclaration(argumentDeclaration: ArgumentDeclarationState, entity: ConditionState | FunctionCallState | OperationState): InputMapState | null;
|
|
160
160
|
export declare function getEntityInputMaps(entity: DraggablePassThroughCallableEntityState): InputMapState[];
|
|
@@ -169,17 +169,17 @@ export declare function filterOutDuplicateEntities(entities: (EntityState | Elem
|
|
|
169
169
|
export declare function getRelatedCanvasElementsOnTheRight(entity: CanvasEntityState | ProjectState | InternalCallState, respectCollapse?: boolean): CanvasEntityState[];
|
|
170
170
|
export declare function flattenRelatedCanvasElementsOnTheRight(entity: CanvasEntityState | ProjectState, respectCollapse?: boolean): CanvasEntityState[];
|
|
171
171
|
export declare function flattenRelatedCanvasElementsOnTheLeft(entity: CanvasEntityState): CanvasEntityState[];
|
|
172
|
-
export declare function
|
|
173
|
-
export declare function
|
|
174
|
-
export declare function
|
|
175
|
-
export declare function
|
|
176
|
-
export declare function
|
|
177
|
-
export declare function getLowestPersistedEntityImplementation(entity:
|
|
178
|
-
export declare function getExtendedBuiltInEntity(entity:
|
|
179
|
-
export declare function getImplementedBuiltInEntity(entity:
|
|
180
|
-
export declare function
|
|
181
|
-
export declare function getBaseBuiltInEntities(entity:
|
|
182
|
-
export declare function getIsInteractive(entity:
|
|
172
|
+
export declare function flattenDefinitionEntityImplementionTypes(entity: DefinitionEntityState): (BaseEntityNames | EntityType.DefinitionEntity)[];
|
|
173
|
+
export declare function flattenDefinitionEntityExtensionTypes(entity: DefinitionEntityState): (BaseEntityNames | EntityType.DefinitionEntity)[];
|
|
174
|
+
export declare function flattenDefinitionEntityExtensions(entity: DefinitionEntityState): (BuiltInBaseEntityState | DefinitionEntityState)[];
|
|
175
|
+
export declare function flattenDefinitionEntityImplementations(entity: DefinitionEntityState): (BuiltInBaseEntityState | DefinitionEntityState)[];
|
|
176
|
+
export declare function flattenDefinitionEntityExtensionAndImplementationTypes(entity: DefinitionEntityState): (BaseEntityNames | EntityType.DefinitionEntity)[];
|
|
177
|
+
export declare function getLowestPersistedEntityImplementation(entity: DefinitionEntityState): DefinitionEntityState | null;
|
|
178
|
+
export declare function getExtendedBuiltInEntity(entity: DefinitionEntityState): BuiltInBaseEntityState | null;
|
|
179
|
+
export declare function getImplementedBuiltInEntity(entity: DefinitionEntityState): BuiltInBaseEntityState | null;
|
|
180
|
+
export declare function getExtendedDefinitionEntity(entity: DefinitionEntityState): DefinitionEntityState | null;
|
|
181
|
+
export declare function getBaseBuiltInEntities(entity: DefinitionEntityState): BuiltInBaseEntityState[];
|
|
182
|
+
export declare function getIsInteractive(entity: DefinitionEntityState | BuiltInBaseEntityState | PrimitiveEntityState): boolean;
|
|
183
183
|
export declare function checkIsGlobalVariable(entity: VariableDeclarationState): boolean;
|
|
184
184
|
export declare function checkIsGloballyDeclared(entity: ConditionState | FunctionCallState | OperationState | VariableDeclarationState | VariableInstanceState | FunctionCallState | LoopState | SearchState): boolean;
|
|
185
185
|
export declare function checkIsDetachedBranch(entity: CanvasEntityState): boolean;
|
|
@@ -188,7 +188,7 @@ export declare function getHeadIfPartOfDetachedBranch(entity: CanvasEntityState,
|
|
|
188
188
|
export declare function flattenDetachedBranch(entity: CanvasEntityState): CanvasEntityState[];
|
|
189
189
|
export declare function checkIsMethod(entity: EntityState): boolean;
|
|
190
190
|
export declare function mergeListOfEntities(oldErrors: EntityState[], newErrors: EntityState[]): EntityState[];
|
|
191
|
-
export declare function getPrototypeByType(type: EntityType): typeof ProjectState | typeof InputMapState | typeof OutputMapState | typeof SearchState | typeof ReturnDeclarationState | typeof ConditionState | typeof OperationState | typeof InstalledProjectState | typeof
|
|
191
|
+
export declare function getPrototypeByType(type: EntityType): typeof ProjectState | typeof InputMapState | typeof OutputMapState | typeof SearchState | typeof ReturnDeclarationState | typeof ConditionState | typeof OperationState | typeof InstalledProjectState | typeof DefinitionEntityState | typeof PropertyState | typeof FunctionDeclarationState | typeof FunctionCallState | typeof VariableDeclarationState | typeof VariableInstanceState | typeof ArgumentDeclarationState | typeof LoopState | typeof ReturnStatementState | typeof BuiltInBaseEntityState | null;
|
|
192
192
|
export declare function getScopeOwner(entity: EntityState | Element | ElementTransfer | ElementGenerationTarget | ElementShallowTransfer, project: ProjectState): EntityWithLogicScopeState | ProjectState | null;
|
|
193
193
|
export declare function getRootEntryPointScopeOwner(entity: EntityState | Element | ElementTransfer | ElementGenerationTarget | ElementShallowTransfer, project: ProjectState): EntityWithLogicScopeState | null;
|
|
194
194
|
export declare function checkIsNestedScope(parent: EntityWithLogicScopeState | ProjectState, child: EntityWithLogicScopeState | ProjectState, project: ProjectState): boolean;
|
|
@@ -258,10 +258,10 @@ export declare function checkIsCallableEntityReachable(entity: CallableEntitySta
|
|
|
258
258
|
};
|
|
259
259
|
export declare function checkIsCanvasEntity(entity: EntityState): boolean;
|
|
260
260
|
export declare function mapActionDescriptorToTypeItRepresents(entity: EntityState): EntityType;
|
|
261
|
-
export declare function
|
|
262
|
-
export declare function getPeristedEntities(project: ProjectState):
|
|
263
|
-
export declare function getDatabaseEntities(project: ProjectState):
|
|
264
|
-
export declare function resolvePrimaryKeyProperty(entity:
|
|
265
|
-
export declare function getColumnProperties(entity:
|
|
266
|
-
export declare function getDatabaseEntity(entity:
|
|
261
|
+
export declare function getDefinitionEntityExtends(entity: DefinitionEntityState, baseEntityName: BaseEntityNames): boolean;
|
|
262
|
+
export declare function getPeristedEntities(project: ProjectState): DefinitionEntityState[];
|
|
263
|
+
export declare function getDatabaseEntities(project: ProjectState): DefinitionEntityState[];
|
|
264
|
+
export declare function resolvePrimaryKeyProperty(entity: DefinitionEntityState): PropertyState | null;
|
|
265
|
+
export declare function getColumnProperties(entity: DefinitionEntityState): PropertyState[];
|
|
266
|
+
export declare function getDatabaseEntity(entity: DefinitionEntityState): DefinitionEntityState | null;
|
|
267
267
|
export declare function resolveClonedEntityProject(newParent: EntityState | null, self: EntityState): ProjectState;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseEntityNames, ElementGenerationTarget, ElementShallowTransfer, ElementTransfer, IArgumentDeclarationGenerationTarget, IArgumentDeclarationShallowTransfer, IArgumentDeclarationTransfer,
|
|
2
|
-
import { ArgumentDeclarationState, BuiltInBaseEntityState, ConditionState,
|
|
1
|
+
import { BaseEntityNames, ElementGenerationTarget, ElementShallowTransfer, ElementTransfer, IArgumentDeclarationGenerationTarget, IArgumentDeclarationShallowTransfer, IArgumentDeclarationTransfer, IDefinitionEntityGenerationTarget, IDefinitionEntityShallowTransfer, IDefinitionEntityTransfer, IFunctionDeclarationGenerationTarget, IFunctionDeclarationShallowTransfer, IFunctionDeclarationTransfer, IPropertyGenerationTarget, IPropertyShallowTransfer, IPropertyTransfer, IReturnDeclarationGenerationTarget, IReturnDeclarationShallowTransfer, IReturnDeclarationTransfer, IVariableDeclarationGenerationTarget, IVariableDeclarationShallowTransfer, IVariableDeclarationTransfer, PrimitiveTypes } from '../../definitions';
|
|
2
|
+
import { ArgumentDeclarationState, BuiltInBaseEntityState, ConditionState, DefinitionEntityState, DataTypeState, EntityPayloadUnion, EntityWithValueState, FunctionDeclarationState, ActionDescriptorState, ProjectState, PropertyState, ReturnDeclarationState, SearchState, VariableDeclarationState, ValueDescriptorState } from '../state';
|
|
3
3
|
import { EntityGenerationError } from '../state/error';
|
|
4
4
|
|
|
5
5
|
export declare function toCamelCase(str: string): string;
|
|
@@ -11,7 +11,7 @@ export declare function resolveEntityDataTypeLabel(entity: PropertyState | Entit
|
|
|
11
11
|
export declare function resolveConditionOperatorLabel(condition: ConditionState): "and" | "or" | "is equal to" | "is not equal to" | "is greater than" | "is greater than or equal to" | "is less than" | "is less than or equal to" | "is empty" | "is not empty" | undefined;
|
|
12
12
|
export declare function resolveBaseEntityName(baseEntities: BaseEntityNames[]): string;
|
|
13
13
|
export declare function resolveBuiltInBaseEntityDataTypeLabel(entity: BuiltInBaseEntityState): string;
|
|
14
|
-
export declare function
|
|
14
|
+
export declare function resolveDefinitionEntityDataTypeLabel(entity: DefinitionEntityState): string;
|
|
15
15
|
export declare function resolveSearchName(search: SearchState): string;
|
|
16
16
|
export declare function resolvePrimitiveEntityName(primitiveEntity: {
|
|
17
17
|
name: PrimitiveTypes;
|
|
@@ -19,7 +19,7 @@ export declare function resolvePrimitiveEntityName(primitiveEntity: {
|
|
|
19
19
|
}): string;
|
|
20
20
|
export declare function resolveActionDescriptorName(actionDescriptor: ActionDescriptorState): string;
|
|
21
21
|
export declare function resolveEntityName(entity: EntityPayloadUnion, project: ProjectState): string;
|
|
22
|
-
export declare function
|
|
22
|
+
export declare function validateDefinitionEntityName(entity: DefinitionEntityState | IDefinitionEntityGenerationTarget | IDefinitionEntityShallowTransfer | IDefinitionEntityTransfer, project: ProjectState): EntityGenerationError[];
|
|
23
23
|
export declare function validateFunctionDeclarationName(entity: FunctionDeclarationState | IFunctionDeclarationGenerationTarget | IFunctionDeclarationShallowTransfer | IFunctionDeclarationTransfer, project: ProjectState): EntityGenerationError[];
|
|
24
24
|
export declare function validateVariableDeclarationName(entity: VariableDeclarationState | IVariableDeclarationGenerationTarget | IVariableDeclarationShallowTransfer | IVariableDeclarationTransfer, project: ProjectState): EntityGenerationError[];
|
|
25
25
|
export declare function validatePropertyName(entity: PropertyState | IPropertyGenerationTarget | IPropertyShallowTransfer | IPropertyTransfer, project: ProjectState): EntityGenerationError[];
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { DataTypeParentChildRelation, EntityId } from '../../definitions';
|
|
2
|
-
import { BuiltInBaseEntityState,
|
|
2
|
+
import { BuiltInBaseEntityState, DefinitionEntityState, DataTypeState, EntityState, IChangeSet, ProjectState } from '../state';
|
|
3
3
|
import { EntityGenerationError } from '../state/error';
|
|
4
4
|
|
|
5
|
-
export declare function handleBeforeEntityImplementationSideEffects(self:
|
|
5
|
+
export declare function handleBeforeEntityImplementationSideEffects(self: DefinitionEntityState | BuiltInBaseEntityState): {
|
|
6
6
|
newEntities: EntityState[];
|
|
7
7
|
};
|
|
8
|
-
export declare function handleAfterEntityImplementationSideEffects(implemented:
|
|
8
|
+
export declare function handleAfterEntityImplementationSideEffects(implemented: DefinitionEntityState): {
|
|
9
9
|
newEntities: EntityState[];
|
|
10
10
|
};
|
|
11
|
-
export declare function implement(self:
|
|
11
|
+
export declare function implement(self: DefinitionEntityState | BuiltInBaseEntityState, newEntityName: string, newId?: string): {
|
|
12
12
|
errors: [];
|
|
13
|
-
implemented:
|
|
13
|
+
implemented: DefinitionEntityState;
|
|
14
14
|
entitiesChanges: {
|
|
15
15
|
new: EntityState[];
|
|
16
16
|
updated: EntityState[];
|
|
@@ -25,24 +25,24 @@ export declare function implement(self: CustomEntityState | BuiltInBaseEntitySta
|
|
|
25
25
|
deleted: [];
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
-
export declare function findEntityFromKeys(keys: string[], project: ProjectState):
|
|
29
|
-
export declare function createNestedDataTypeForEntity(entity:
|
|
30
|
-
export declare function resolveDataTypeEntityOrNestedChildrenFromLiteralValue(value: any, parentDataType: DataTypeState,
|
|
28
|
+
export declare function findEntityFromKeys(keys: string[], project: ProjectState): DefinitionEntityState | null;
|
|
29
|
+
export declare function createNestedDataTypeForEntity(entity: DefinitionEntityState, parentDataType: DataTypeState, parentRelationType?: DataTypeParentChildRelation): IChangeSet<DataTypeState>;
|
|
30
|
+
export declare function resolveDataTypeEntityOrNestedChildrenFromLiteralValue(value: any, parentDataType: DataTypeState, newDefinitionEntityMetadata: {
|
|
31
31
|
id?: EntityId;
|
|
32
32
|
name: string;
|
|
33
33
|
description?: string;
|
|
34
34
|
static?: boolean;
|
|
35
35
|
abstract?: boolean;
|
|
36
|
-
}, rootEntityCreated:
|
|
37
|
-
export declare function
|
|
36
|
+
}, rootEntityCreated: DefinitionEntityState): IChangeSet<DataTypeState>;
|
|
37
|
+
export declare function createDefinitionEntityFromJSONObject(data: {
|
|
38
38
|
[key: string]: any;
|
|
39
|
-
}, project: ProjectState,
|
|
39
|
+
}, project: ProjectState, definitionEntityMetadata: {
|
|
40
40
|
id?: EntityId;
|
|
41
41
|
name: string;
|
|
42
42
|
description?: string;
|
|
43
43
|
static?: boolean;
|
|
44
44
|
abstract?: boolean;
|
|
45
|
-
}, rootEntityCreated?:
|
|
45
|
+
}, rootEntityCreated?: DefinitionEntityState): {
|
|
46
46
|
hasCreated: boolean;
|
|
47
|
-
changeSet: IChangeSet<
|
|
47
|
+
changeSet: IChangeSet<DefinitionEntityState>;
|
|
48
48
|
};
|