diff --git a/packages/miroir-core/src/0_interfaces/1_core/bootstrapJzodSchemas/getMiroirFundamentalJzodSchema.ts b/packages/miroir-core/src/0_interfaces/1_core/bootstrapJzodSchemas/getMiroirFundamentalJzodSchema.ts index 2a9d22b1..955421a9 100644 --- a/packages/miroir-core/src/0_interfaces/1_core/bootstrapJzodSchemas/getMiroirFundamentalJzodSchema.ts +++ b/packages/miroir-core/src/0_interfaces/1_core/bootstrapJzodSchemas/getMiroirFundamentalJzodSchema.ts @@ -961,6 +961,18 @@ export function getMiroirFundamentalJzodSchema( }, }, }, + domainElementAny: { + type: "object", + definition: { + elementType: { + type: "literal", + definition: "any", + }, + elementValue: { + type: "any", + }, + }, + }, domainElementFailed: { type: "object", definition: { @@ -1160,6 +1172,7 @@ export function getMiroirFundamentalJzodSchema( domainElementType: { type: "enum", definition: [ + "any", "object", "instanceUuidIndex", "entityInstanceCollection", @@ -1179,6 +1192,13 @@ export function getMiroirFundamentalJzodSchema( relativePath: "domainElementVoid", }, }, + { + type: "schemaReference", + definition: { + absolutePath: "fe9b7d99-f216-44de-bb6e-60e1a1ebb739", + relativePath: "domainElementAny", + }, + }, { type: "schemaReference", definition: { @@ -2151,6 +2171,7 @@ export function getMiroirFundamentalJzodSchema( // }, // ], domainElementVoid: (miroirFundamentalJzodSchema as any).definition.context.domainElementVoid, + domainElementAny: (miroirFundamentalJzodSchema as any).definition.context.domainElementAny, domainElementFailed: (miroirFundamentalJzodSchema as any).definition.context.domainElementFailed, domainElementObject: (miroirFundamentalJzodSchema as any).definition.context.domainElementObject, domainElementObjectOrFailed: (miroirFundamentalJzodSchema as any).definition.context diff --git a/packages/miroir-core/src/0_interfaces/1_core/preprocessor-generated/miroirFundamentalJzodSchema.ts b/packages/miroir-core/src/0_interfaces/1_core/preprocessor-generated/miroirFundamentalJzodSchema.ts index 25e3c11d..1d5758c6 100644 --- a/packages/miroir-core/src/0_interfaces/1_core/preprocessor-generated/miroirFundamentalJzodSchema.ts +++ b/packages/miroir-core/src/0_interfaces/1_core/preprocessor-generated/miroirFundamentalJzodSchema.ts @@ -4538,6 +4538,34 @@ export const miroirFundamentalJzodSchema = { "type": "union", "discriminator": "queryType", "definition": [ + { + "type": "schemaReference", + "definition": { + "relativePath": "querySelectExtractor", + "absolutePath": "fe9b7d99-f216-44de-bb6e-60e1a1ebb739" + }, + "context": {} + }, + { + "type": "object", + "definition": { + "queryType": { + "type": "literal", + "definition": "extractorTransformer" + }, + "referencedQuery": { + "type": "schemaReference", + "definition": { + "relativePath": "queryTemplateContextReference", + "absolutePath": "fe9b7d99-f216-44de-bb6e-60e1a1ebb739" + }, + "context": {} + }, + "attribute": { + "type": "string" + } + } + }, { "type": "object", "definition": { @@ -4578,14 +4606,6 @@ export const miroirFundamentalJzodSchema = { } } }, - { - "type": "schemaReference", - "definition": { - "relativePath": "querySelectExtractor", - "absolutePath": "fe9b7d99-f216-44de-bb6e-60e1a1ebb739" - }, - "context": {} - }, { "type": "schemaReference", "definition": { @@ -4594,14 +4614,6 @@ export const miroirFundamentalJzodSchema = { }, "context": {} }, - { - "type": "schemaReference", - "definition": { - "relativePath": "extractObjectListByEntity", - "absolutePath": "fe9b7d99-f216-44de-bb6e-60e1a1ebb739" - }, - "context": {} - }, { "type": "schemaReference", "definition": { @@ -4676,6 +4688,18 @@ export const miroirFundamentalJzodSchema = { } } }, + "domainElementAny": { + "type": "object", + "definition": { + "elementType": { + "type": "literal", + "definition": "any" + }, + "elementValue": { + "type": "any" + } + } + }, "domainElementFailed": { "type": "object", "definition": { @@ -4875,6 +4899,7 @@ export const miroirFundamentalJzodSchema = { "domainElementType": { "type": "enum", "definition": [ + "any", "object", "instanceUuidIndex", "entityInstanceCollection", @@ -4894,6 +4919,13 @@ export const miroirFundamentalJzodSchema = { "relativePath": "domainElementVoid" } }, + { + "type": "schemaReference", + "definition": { + "absolutePath": "fe9b7d99-f216-44de-bb6e-60e1a1ebb739", + "relativePath": "domainElementAny" + } + }, { "type": "schemaReference", "definition": { @@ -13680,6 +13712,51 @@ export const miroirFundamentalJzodSchema = { } ] }, + "carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementAny": { + "type": "union", + "definition": [ + { + "type": "schemaReference", + "definition": { + "relativePath": "carryOnObject" + } + }, + { + "type": "object", + "definition": { + "elementType": { + "type": "union", + "definition": [ + { + "type": "literal", + "definition": "any" + }, + { + "type": "schemaReference", + "definition": { + "relativePath": "carryOnObject" + } + } + ] + }, + "elementValue": { + "type": "union", + "definition": [ + { + "type": "any" + }, + { + "type": "schemaReference", + "definition": { + "relativePath": "carryOnObject" + } + } + ] + } + } + } + ] + }, "carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementFailed": { "type": "union", "definition": [ @@ -14258,6 +14335,24 @@ export const miroirFundamentalJzodSchema = { } ] }, + { + "type": "union", + "definition": [ + { + "type": "schemaReference", + "definition": { + "relativePath": "carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementAny" + }, + "context": {} + }, + { + "type": "schemaReference", + "definition": { + "relativePath": "carryOnObject" + } + } + ] + }, { "type": "union", "definition": [ @@ -24652,6 +24747,76 @@ export const miroirFundamentalJzodSchema = { "type": "union", "discriminator": "queryType", "definition": [ + { + "type": "union", + "definition": [ + { + "type": "schemaReference", + "definition": { + "relativePath": "carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectExtractor" + }, + "context": {} + }, + { + "type": "schemaReference", + "definition": { + "relativePath": "carryOnObject" + } + } + ] + }, + { + "type": "object", + "definition": { + "queryType": { + "type": "union", + "definition": [ + { + "type": "literal", + "definition": "extractorTransformer" + }, + { + "type": "schemaReference", + "definition": { + "relativePath": "carryOnObject" + } + } + ] + }, + "referencedQuery": { + "type": "union", + "definition": [ + { + "type": "schemaReference", + "definition": { + "relativePath": "carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_queryTemplateContextReference" + }, + "context": {} + }, + { + "type": "schemaReference", + "definition": { + "relativePath": "carryOnObject" + } + } + ] + }, + "attribute": { + "type": "union", + "definition": [ + { + "type": "string" + }, + { + "type": "schemaReference", + "definition": { + "relativePath": "carryOnObject" + } + } + ] + } + } + }, { "type": "object", "definition": { @@ -24756,24 +24921,6 @@ export const miroirFundamentalJzodSchema = { } } }, - { - "type": "union", - "definition": [ - { - "type": "schemaReference", - "definition": { - "relativePath": "carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectExtractor" - }, - "context": {} - }, - { - "type": "schemaReference", - "definition": { - "relativePath": "carryOnObject" - } - } - ] - }, { "type": "union", "definition": [ @@ -24792,24 +24939,6 @@ export const miroirFundamentalJzodSchema = { } ] }, - { - "type": "union", - "definition": [ - { - "type": "schemaReference", - "definition": { - "relativePath": "carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_extractObjectListByEntity" - }, - "context": {} - }, - { - "type": "schemaReference", - "definition": { - "relativePath": "carryOnObject" - } - } - ] - }, { "type": "union", "definition": [ diff --git a/packages/miroir-core/src/0_interfaces/1_core/preprocessor-generated/miroirFundamentalType.ts b/packages/miroir-core/src/0_interfaces/1_core/preprocessor-generated/miroirFundamentalType.ts index f01836ca..f70d6bf7 100644 --- a/packages/miroir-core/src/0_interfaces/1_core/preprocessor-generated/miroirFundamentalType.ts +++ b/packages/miroir-core/src/0_interfaces/1_core/preprocessor-generated/miroirFundamentalType.ts @@ -917,7 +917,11 @@ export type QuerySelectExtractorList = ExtractObjectListByEntity | { definition: QuerySelectExtractorList[]; }; export type QuerySelectExtractor = QuerySelectExtractorObject | QuerySelectExtractorList; -export type QuerySelect = { +export type QuerySelect = QuerySelectExtractor | { + queryType: "extractorTransformer"; + referencedQuery: QueryTemplateContextReference; + attribute: string; +} | { queryType: "wrapperReturningObject"; definition: { [x: string]: QuerySelect; @@ -925,7 +929,7 @@ export type QuerySelect = { } | { queryType: "wrapperReturningList"; definition: QuerySelect[]; -} | QuerySelectExtractor | QuerySelectObjectByRelation | ExtractObjectListByEntity | QuerySelectObjectListByRelation | QuerySelectObjectListByManyToManyRelation | QuerySelectByQueryCombiner | { +} | QuerySelectObjectByRelation | QuerySelectObjectListByRelation | QuerySelectObjectListByManyToManyRelation | QuerySelectByQueryCombiner | { queryType: "literal"; definition: string; } | { @@ -939,6 +943,10 @@ export type DomainElementVoid = { elementType: "void"; elementValue?: void | undefined; }; +export type DomainElementAny = { + elementType: "any"; + elementValue?: any; +}; export type DomainElementFailed = { elementType: "failure"; elementValue: QueryFailed; @@ -970,8 +978,8 @@ export type DomainElementInstanceArray = { elementValue: EntityInstance[]; }; export type DomainElementInstanceArrayOrFailed = DomainElementInstanceArray | DomainElementFailed; -export type DomainElementType = "object" | "instanceUuidIndex" | "entityInstanceCollection" | "instanceArray" | "instance" | "instanceUuid" | "instanceUuidIndexUuidIndex"; -export type DomainElement = DomainElementVoid | DomainElementFailed | DomainElementObjectOrFailed | DomainElementInstanceUuidIndexOrFailed | DomainElementEntityInstanceCollectionOrFailed | DomainElementInstanceArrayOrFailed | DomainElementEntityInstanceOrFailed | { +export type DomainElementType = "any" | "object" | "instanceUuidIndex" | "entityInstanceCollection" | "instanceArray" | "instance" | "instanceUuid" | "instanceUuidIndexUuidIndex"; +export type DomainElement = DomainElementVoid | DomainElementAny | DomainElementFailed | DomainElementObjectOrFailed | DomainElementInstanceUuidIndexOrFailed | DomainElementEntityInstanceCollectionOrFailed | DomainElementInstanceArrayOrFailed | DomainElementEntityInstanceOrFailed | { elementType: "instanceUuid"; elementValue: EntityInstanceUuid; } | { @@ -2076,6 +2084,10 @@ export type CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementVoid = Car elementType: "void" | CarryOnObject; elementValue?: (void | undefined) | CarryOnObject; }; +export type CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementAny = CarryOnObject | { + elementType: "any" | CarryOnObject; + elementValue?: any | CarryOnObject; +}; export type CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementFailed = CarryOnObject | { elementType: "failure" | CarryOnObject; elementValue: CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_queryFailed | CarryOnObject; @@ -2107,7 +2119,7 @@ export type CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementEntityInst elementValue: CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_entityInstance | CarryOnObject; }; export type CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementEntityInstanceOrFailed = (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementEntityInstance | CarryOnObject) | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementFailed | CarryOnObject) | CarryOnObject; -export type CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElement = (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementVoid | CarryOnObject) | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementFailed | CarryOnObject) | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementObjectOrFailed | CarryOnObject) | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementInstanceUuidIndexOrFailed | CarryOnObject) | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementEntityInstanceCollectionOrFailed | CarryOnObject) | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementInstanceArrayOrFailed | CarryOnObject) | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementEntityInstanceOrFailed | CarryOnObject) | { +export type CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElement = (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementVoid | CarryOnObject) | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementAny | CarryOnObject) | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementFailed | CarryOnObject) | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementObjectOrFailed | CarryOnObject) | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementInstanceUuidIndexOrFailed | CarryOnObject) | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementEntityInstanceCollectionOrFailed | CarryOnObject) | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementInstanceArrayOrFailed | CarryOnObject) | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementEntityInstanceOrFailed | CarryOnObject) | { elementType: "instanceUuid" | CarryOnObject; elementValue: CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_entityInstanceUuid | CarryOnObject; } | { @@ -2657,7 +2669,11 @@ export type CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectByQueryCombi rootQueryObjectTransformer: CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_recordOfTransformers | CarryOnObject; }; }; -export type CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelect = { +export type CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelect = (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectExtractor | CarryOnObject) | { + queryType: "extractorTransformer" | CarryOnObject; + referencedQuery: CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_queryTemplateContextReference | CarryOnObject; + attribute: string | CarryOnObject; +} | { queryType: "wrapperReturningObject" | CarryOnObject; definition: { [x: string]: CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelect | CarryOnObject; @@ -2665,7 +2681,7 @@ export type CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelect = { } | { queryType: "wrapperReturningList" | CarryOnObject; definition: (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelect | CarryOnObject)[] | CarryOnObject; -} | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectExtractor | CarryOnObject) | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectObjectByRelation | CarryOnObject) | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_extractObjectListByEntity | CarryOnObject) | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectObjectListByRelation | CarryOnObject) | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectObjectListByManyToManyRelation | CarryOnObject) | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectByQueryCombiner | CarryOnObject) | { +} | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectObjectByRelation | CarryOnObject) | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectObjectListByRelation | CarryOnObject) | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectObjectListByManyToManyRelation | CarryOnObject) | (CarryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectByQueryCombiner | CarryOnObject) | { queryType: "literal" | CarryOnObject; definition: string | CarryOnObject; } | { @@ -2820,9 +2836,10 @@ export const querySelectByQueryCombiner: z.ZodType = export const querySelectExtractorObject: z.ZodType = z.union([z.lazy(() =>extractObjectByDirectReference), z.object({queryType:z.literal("extractorWrapperReturningObject"), definition:z.record(z.string(),z.lazy(() =>querySelectExtractorObject))}).strict()]); export const querySelectExtractorList: z.ZodType = z.union([z.lazy(() =>extractObjectListByEntity), z.object({queryType:z.literal("extractorWrapperReturningList"), definition:z.array(z.lazy(() =>querySelectExtractorList))}).strict()]); export const querySelectExtractor: z.ZodType = z.union([z.lazy(() =>querySelectExtractorObject), z.lazy(() =>querySelectExtractorList)]); -export const querySelect: z.ZodType = z.union([z.object({queryType:z.literal("wrapperReturningObject"), definition:z.record(z.string(),z.lazy(() =>querySelect))}).strict(), z.object({queryType:z.literal("wrapperReturningList"), definition:z.array(z.lazy(() =>querySelect))}).strict(), z.lazy(() =>querySelectExtractor), z.lazy(() =>querySelectObjectByRelation), z.lazy(() =>extractObjectListByEntity), z.lazy(() =>querySelectObjectListByRelation), z.lazy(() =>querySelectObjectListByManyToManyRelation), z.lazy(() =>querySelectByQueryCombiner), z.object({queryType:z.literal("literal"), definition:z.string()}).strict(), z.object({queryType:z.literal("queryContextReference"), queryReference:z.string()}).strict()]); +export const querySelect: z.ZodType = z.union([z.lazy(() =>querySelectExtractor), z.object({queryType:z.literal("extractorTransformer"), referencedQuery:z.lazy(() =>queryTemplateContextReference), attribute:z.string()}).strict(), z.object({queryType:z.literal("wrapperReturningObject"), definition:z.record(z.string(),z.lazy(() =>querySelect))}).strict(), z.object({queryType:z.literal("wrapperReturningList"), definition:z.array(z.lazy(() =>querySelect))}).strict(), z.lazy(() =>querySelectObjectByRelation), z.lazy(() =>querySelectObjectListByRelation), z.lazy(() =>querySelectObjectListByManyToManyRelation), z.lazy(() =>querySelectByQueryCombiner), z.object({queryType:z.literal("literal"), definition:z.string()}).strict(), z.object({queryType:z.literal("queryContextReference"), queryReference:z.string()}).strict()]); export const miroirSelectQueriesRecord: z.ZodType = z.record(z.string(),z.lazy(() =>querySelect)); export const domainElementVoid: z.ZodType = z.object({elementType:z.literal("void"), elementValue:z.void()}).strict(); +export const domainElementAny: z.ZodType = z.object({elementType:z.literal("any"), elementValue:z.any()}).strict(); export const domainElementFailed: z.ZodType = z.object({elementType:z.literal("failure"), elementValue:z.lazy(() =>queryFailed)}).strict(); export const domainElementObject: z.ZodType = z.object({elementType:z.literal("object"), elementValue:z.record(z.string(),z.lazy(() =>domainElement))}).strict(); export const domainElementObjectOrFailed: z.ZodType = z.union([z.lazy(() =>domainElementObject), z.lazy(() =>domainElementFailed)]); @@ -2834,8 +2851,8 @@ export const domainElementEntityInstanceCollection: z.ZodType = z.union([z.lazy(() =>domainElementEntityInstanceCollection), z.lazy(() =>domainElementFailed)]); export const domainElementInstanceArray: z.ZodType = z.object({elementType:z.literal("instanceArray"), elementValue:z.array(z.lazy(() =>entityInstance))}).strict(); export const domainElementInstanceArrayOrFailed: z.ZodType = z.union([z.lazy(() =>domainElementInstanceArray), z.lazy(() =>domainElementFailed)]); -export const domainElementType: z.ZodType = z.enum(["object","instanceUuidIndex","entityInstanceCollection","instanceArray","instance","instanceUuid","instanceUuidIndexUuidIndex"]); -export const domainElement: z.ZodType = z.union([z.lazy(() =>domainElementVoid), z.lazy(() =>domainElementFailed), z.lazy(() =>domainElementObjectOrFailed), z.lazy(() =>domainElementInstanceUuidIndexOrFailed), z.lazy(() =>domainElementEntityInstanceCollectionOrFailed), z.lazy(() =>domainElementInstanceArrayOrFailed), z.lazy(() =>domainElementEntityInstanceOrFailed), z.object({elementType:z.literal("instanceUuid"), elementValue:z.lazy(() =>entityInstanceUuid)}).strict(), z.object({elementType:z.literal("instanceUuidIndexUuidIndex"), elementValue:z.lazy(() =>entityInstancesUuidIndex)}).strict(), z.object({elementType:z.literal("string"), elementValue:z.string()}).strict(), z.object({elementType:z.literal("array"), elementValue:z.array(z.lazy(() =>domainElement))}).strict()]); +export const domainElementType: z.ZodType = z.enum(["any","object","instanceUuidIndex","entityInstanceCollection","instanceArray","instance","instanceUuid","instanceUuidIndexUuidIndex"]); +export const domainElement: z.ZodType = z.union([z.lazy(() =>domainElementVoid), z.lazy(() =>domainElementAny), z.lazy(() =>domainElementFailed), z.lazy(() =>domainElementObjectOrFailed), z.lazy(() =>domainElementInstanceUuidIndexOrFailed), z.lazy(() =>domainElementEntityInstanceCollectionOrFailed), z.lazy(() =>domainElementInstanceArrayOrFailed), z.lazy(() =>domainElementEntityInstanceOrFailed), z.object({elementType:z.literal("instanceUuid"), elementValue:z.lazy(() =>entityInstanceUuid)}).strict(), z.object({elementType:z.literal("instanceUuidIndexUuidIndex"), elementValue:z.lazy(() =>entityInstancesUuidIndex)}).strict(), z.object({elementType:z.literal("string"), elementValue:z.string()}).strict(), z.object({elementType:z.literal("array"), elementValue:z.array(z.lazy(() =>domainElement))}).strict()]); export const recordOfTransformers: z.ZodType = z.object({transformerType:z.literal("recordOfTransformers"), definition:z.record(z.string(),z.lazy(() =>transformer))}).strict(); export const transformer: z.ZodType = z.union([z.object({transformerType:z.literal("objectTransformer"), attributeName:z.string()}).strict(), z.lazy(() =>recordOfTransformers)]); export const localCacheExtractor: z.ZodType = z.object({queryType:z.literal("localCacheEntityInstancesExtractor"), definition:z.object({deploymentUuid:z.string().uuid().optional(), applicationSection:z.lazy(() =>applicationSection).optional(), entityUuid:z.string().uuid().optional(), instanceUuid:z.string().uuid().optional()}).strict()}).strict(); @@ -2929,6 +2946,7 @@ export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_entityInstanceUuid: z. export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_entityInstancesUuidIndex: z.ZodType = z.union([z.record(z.string(),z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_entityInstance), z.lazy(() =>carryOnObject)])), z.lazy(() =>carryOnObject)]); export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_deployment: z.ZodType = z.union([z.lazy(() =>carryOnObject), z.object({uuid:z.union([z.string().uuid(), z.lazy(() =>carryOnObject)]), parentName:z.union([z.string().optional(), z.lazy(() =>carryOnObject)]).optional(), parentUuid:z.union([z.string().uuid(), z.lazy(() =>carryOnObject)]), parentDefinitionVersionUuid:z.union([z.string().uuid().optional(), z.lazy(() =>carryOnObject)]).optional(), name:z.union([z.string(), z.lazy(() =>carryOnObject)]), defaultLabel:z.union([z.string(), z.lazy(() =>carryOnObject)]), description:z.union([z.string().optional(), z.lazy(() =>carryOnObject)]).optional(), application:z.union([z.string().uuid(), z.lazy(() =>carryOnObject)]), bundle:z.union([z.string().uuid(), z.lazy(() =>carryOnObject)]), configuration:z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_storeUnitConfiguration).optional(), z.lazy(() =>carryOnObject)]).optional(), model:z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_jzodObject).optional(), z.lazy(() =>carryOnObject)]).optional(), data:z.union([z.lazy(() =>jzodObject).optional(), z.lazy(() =>carryOnObject)]).optional()}).strict()]); export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementVoid: z.ZodType = z.union([z.lazy(() =>carryOnObject), z.object({elementType:z.union([z.literal("void"), z.lazy(() =>carryOnObject)]), elementValue:z.union([z.void(), z.lazy(() =>carryOnObject)])}).strict()]); +export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementAny: z.ZodType = z.union([z.lazy(() =>carryOnObject), z.object({elementType:z.union([z.literal("any"), z.lazy(() =>carryOnObject)]), elementValue:z.union([z.any(), z.lazy(() =>carryOnObject)])}).strict()]); export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementFailed: z.ZodType = z.union([z.lazy(() =>carryOnObject), z.object({elementType:z.union([z.literal("failure"), z.lazy(() =>carryOnObject)]), elementValue:z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_queryFailed), z.lazy(() =>carryOnObject)])}).strict()]); export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementObject: z.ZodType = z.union([z.lazy(() =>carryOnObject), z.object({elementType:z.union([z.literal("object"), z.lazy(() =>carryOnObject)]), elementValue:z.union([z.record(z.string(),z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElement), z.lazy(() =>carryOnObject)])), z.lazy(() =>carryOnObject)])}).strict()]); export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementObjectOrFailed: z.ZodType = z.union([z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementObject), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementFailed), z.lazy(() =>carryOnObject)]), z.lazy(() =>carryOnObject)]); @@ -2940,7 +2958,7 @@ export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementInstanceA export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementInstanceArrayOrFailed: z.ZodType = z.union([z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementInstanceArray), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementFailed), z.lazy(() =>carryOnObject)]), z.lazy(() =>carryOnObject)]); export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementEntityInstance: z.ZodType = z.union([z.lazy(() =>carryOnObject), z.object({elementType:z.union([z.literal("instance"), z.lazy(() =>carryOnObject)]), elementValue:z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_entityInstance), z.lazy(() =>carryOnObject)])}).strict()]); export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementEntityInstanceOrFailed: z.ZodType = z.union([z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementEntityInstance), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementFailed), z.lazy(() =>carryOnObject)]), z.lazy(() =>carryOnObject)]); -export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElement: z.ZodType = z.union([z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementVoid), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementFailed), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementObjectOrFailed), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementInstanceUuidIndexOrFailed), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementEntityInstanceCollectionOrFailed), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementInstanceArrayOrFailed), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementEntityInstanceOrFailed), z.lazy(() =>carryOnObject)]), z.object({elementType:z.union([z.literal("instanceUuid"), z.lazy(() =>carryOnObject)]), elementValue:z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_entityInstanceUuid), z.lazy(() =>carryOnObject)])}).strict(), z.object({elementType:z.union([z.literal("instanceUuidIndexUuidIndex"), z.lazy(() =>carryOnObject)]), elementValue:z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_entityInstancesUuidIndex), z.lazy(() =>carryOnObject)])}).strict(), z.object({elementType:z.union([z.literal("string"), z.lazy(() =>carryOnObject)]), elementValue:z.union([z.string(), z.lazy(() =>carryOnObject)])}).strict(), z.object({elementType:z.union([z.literal("array"), z.lazy(() =>carryOnObject)]), elementValue:z.union([z.array(z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElement), z.lazy(() =>carryOnObject)])), z.lazy(() =>carryOnObject)])}).strict(), z.lazy(() =>carryOnObject)]); +export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElement: z.ZodType = z.union([z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementVoid), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementAny), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementFailed), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementObjectOrFailed), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementInstanceUuidIndexOrFailed), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementEntityInstanceCollectionOrFailed), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementInstanceArrayOrFailed), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementEntityInstanceOrFailed), z.lazy(() =>carryOnObject)]), z.object({elementType:z.union([z.literal("instanceUuid"), z.lazy(() =>carryOnObject)]), elementValue:z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_entityInstanceUuid), z.lazy(() =>carryOnObject)])}).strict(), z.object({elementType:z.union([z.literal("instanceUuidIndexUuidIndex"), z.lazy(() =>carryOnObject)]), elementValue:z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_entityInstancesUuidIndex), z.lazy(() =>carryOnObject)])}).strict(), z.object({elementType:z.union([z.literal("string"), z.lazy(() =>carryOnObject)]), elementValue:z.union([z.string(), z.lazy(() =>carryOnObject)])}).strict(), z.object({elementType:z.union([z.literal("array"), z.lazy(() =>carryOnObject)]), elementValue:z.union([z.array(z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElement), z.lazy(() =>carryOnObject)])), z.lazy(() =>carryOnObject)])}).strict(), z.lazy(() =>carryOnObject)]); export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_entityInstanceCollection: z.ZodType = z.union([z.lazy(() =>carryOnObject), z.object({parentName:z.union([z.string().optional(), z.lazy(() =>carryOnObject)]).optional(), parentUuid:z.union([z.string(), z.lazy(() =>carryOnObject)]), applicationSection:z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_applicationSection), z.lazy(() =>carryOnObject)]), instances:z.union([z.array(z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_entityInstance), z.lazy(() =>carryOnObject)])), z.lazy(() =>carryOnObject)])}).strict()]); export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_jzodSchema: z.ZodType = z.union([z.lazy(() =>carryOnObject), z.object({uuid:z.union([z.string().uuid(), z.lazy(() =>carryOnObject)]), parentName:z.union([z.string(), z.lazy(() =>carryOnObject)]), parentUuid:z.union([z.string().uuid(), z.lazy(() =>carryOnObject)]), parentDefinitionVersionUuid:z.union([z.string().uuid().optional(), z.lazy(() =>carryOnObject)]).optional(), name:z.union([z.string(), z.lazy(() =>carryOnObject)]), conceptLevel:z.union([z.enum(["MetaModel","Model","Data"]).optional(), z.lazy(() =>carryOnObject)]).optional(), defaultLabel:z.union([z.string().optional(), z.lazy(() =>carryOnObject)]).optional(), description:z.union([z.string().optional(), z.lazy(() =>carryOnObject)]).optional(), definition:z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_jzodObjectOrReference).optional(), z.lazy(() =>carryOnObject)]).optional()}).strict()]); export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_miroirMenuItem: z.ZodType = z.union([z.lazy(() =>carryOnObject), z.object({label:z.union([z.string(), z.lazy(() =>carryOnObject)]), section:z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_applicationSection), z.lazy(() =>carryOnObject)]), application:z.union([z.string(), z.lazy(() =>carryOnObject)]), reportUuid:z.union([z.string(), z.lazy(() =>carryOnObject)]), instanceUuid:z.union([z.string().optional(), z.lazy(() =>carryOnObject)]).optional(), icon:z.union([z.string(), z.lazy(() =>carryOnObject)])}).strict()]); @@ -2995,7 +3013,7 @@ export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectExtractorLi export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectExtractor: z.ZodType = z.union([z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectExtractorObject), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectExtractorList), z.lazy(() =>carryOnObject)]), z.lazy(() =>carryOnObject)]); export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectObject: z.ZodType = z.union([z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectObjectByRelation), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_extractObjectByDirectReference), z.lazy(() =>carryOnObject)]), z.lazy(() =>carryOnObject)]); export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectByQueryCombiner: z.ZodType = z.union([z.lazy(() =>carryOnObject), z.object({queryType:z.union([z.literal("queryCombiner"), z.lazy(() =>carryOnObject)]), rootQuery:z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelect), z.lazy(() =>carryOnObject)]), subQuery:z.union([z.lazy(() =>carryOnObject), z.object({query:z.union([z.lazy(() =>querySelect), z.lazy(() =>carryOnObject)]), rootQueryObjectTransformer:z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_recordOfTransformers), z.lazy(() =>carryOnObject)])}).strict()])}).strict()]); -export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelect: z.ZodType = z.union([z.object({queryType:z.union([z.literal("wrapperReturningObject"), z.lazy(() =>carryOnObject)]), definition:z.union([z.record(z.string(),z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelect), z.lazy(() =>carryOnObject)])), z.lazy(() =>carryOnObject)])}).strict(), z.object({queryType:z.union([z.literal("wrapperReturningList"), z.lazy(() =>carryOnObject)]), definition:z.union([z.array(z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelect), z.lazy(() =>carryOnObject)])), z.lazy(() =>carryOnObject)])}).strict(), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectExtractor), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectObjectByRelation), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_extractObjectListByEntity), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectObjectListByRelation), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectObjectListByManyToManyRelation), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectByQueryCombiner), z.lazy(() =>carryOnObject)]), z.object({queryType:z.union([z.literal("literal"), z.lazy(() =>carryOnObject)]), definition:z.union([z.string(), z.lazy(() =>carryOnObject)])}).strict(), z.object({queryType:z.union([z.literal("queryContextReference"), z.lazy(() =>carryOnObject)]), queryReference:z.union([z.string(), z.lazy(() =>carryOnObject)])}).strict(), z.lazy(() =>carryOnObject)]); +export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelect: z.ZodType = z.union([z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectExtractor), z.lazy(() =>carryOnObject)]), z.object({queryType:z.union([z.literal("extractorTransformer"), z.lazy(() =>carryOnObject)]), referencedQuery:z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_queryTemplateContextReference), z.lazy(() =>carryOnObject)]), attribute:z.union([z.string(), z.lazy(() =>carryOnObject)])}).strict(), z.object({queryType:z.union([z.literal("wrapperReturningObject"), z.lazy(() =>carryOnObject)]), definition:z.union([z.record(z.string(),z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelect), z.lazy(() =>carryOnObject)])), z.lazy(() =>carryOnObject)])}).strict(), z.object({queryType:z.union([z.literal("wrapperReturningList"), z.lazy(() =>carryOnObject)]), definition:z.union([z.array(z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelect), z.lazy(() =>carryOnObject)])), z.lazy(() =>carryOnObject)])}).strict(), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectObjectByRelation), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectObjectListByRelation), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectObjectListByManyToManyRelation), z.lazy(() =>carryOnObject)]), z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectByQueryCombiner), z.lazy(() =>carryOnObject)]), z.object({queryType:z.union([z.literal("literal"), z.lazy(() =>carryOnObject)]), definition:z.union([z.string(), z.lazy(() =>carryOnObject)])}).strict(), z.object({queryType:z.union([z.literal("queryContextReference"), z.lazy(() =>carryOnObject)]), queryReference:z.union([z.string(), z.lazy(() =>carryOnObject)])}).strict(), z.lazy(() =>carryOnObject)]); export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_miroirSelectQueriesRecord: z.ZodType = z.union([z.record(z.string(),z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelect), z.lazy(() =>carryOnObject)])), z.lazy(() =>carryOnObject)]); export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_extractorForRecordOfExtractors: z.ZodType = z.union([z.lazy(() =>carryOnObject), z.object({deploymentUuid:z.union([z.string().uuid(), z.lazy(() =>carryOnObject)]), pageParams:z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_domainElementObject), z.lazy(() =>carryOnObject)]), queryParams:z.union([z.lazy(() =>domainElementObject), z.lazy(() =>carryOnObject)]), contextResults:z.union([z.lazy(() =>domainElementObject), z.lazy(() =>carryOnObject)])}).strict().extend({queryType:z.union([z.literal("extractorForRecordOfExtractors"), z.lazy(() =>carryOnObject)]), extractors:z.union([z.record(z.string(),z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_querySelectExtractor), z.lazy(() =>carryOnObject)])).optional(), z.lazy(() =>carryOnObject)]).optional(), fetchQuery:z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_miroirSelectQueriesRecord).optional(), z.lazy(() =>carryOnObject)]).optional()}).strict()]); export const carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_queryAction: z.ZodType = z.union([z.lazy(() =>carryOnObject), z.object({actionType:z.union([z.literal("queryAction"), z.lazy(() =>carryOnObject)]), actionName:z.union([z.literal("runQuery"), z.lazy(() =>carryOnObject)]), endpoint:z.union([z.literal("9e404b3c-368c-40cb-be8b-e3c28550c25e"), z.lazy(() =>carryOnObject)]), deploymentUuid:z.union([z.string().uuid(), z.lazy(() =>carryOnObject)]), query:z.union([z.lazy(() =>carryOn_fe9b7d99$f216$44de$bb6e$60e1a1ebb739_extractorForRecordOfExtractors), z.lazy(() =>carryOnObject)])}).strict()]); diff --git a/packages/miroir-core/src/2_domain/QuerySelectors.ts b/packages/miroir-core/src/2_domain/QuerySelectors.ts index e966a5e5..48e8c28e 100644 --- a/packages/miroir-core/src/2_domain/QuerySelectors.ts +++ b/packages/miroir-core/src/2_domain/QuerySelectors.ts @@ -480,6 +480,32 @@ export function innerSelectElementFromQuery( } break; } + case "extractorTransformer": { + const resolvedReference = resolveContextReference( + query.referencedQuery, + queryParams, + newFetchedData + ); + + log.info("innerSelectElementFromQuery extractorTransformer resolvedReference", resolvedReference); + const result = new Set(); + if (resolvedReference.elementType == "instanceUuidIndex") { + for (const entry of Object.entries(resolvedReference.elementValue)) { + result.add((entry[1] as any)[query.attribute]); + } + return { elementType: "any", elementValue: [...result] }; + } + + // // Object.entries(resolvedReference.elementValue).map( + // // (entry: [string, DomainElement]) => { + // // } + // // ); + // ) + log.info("innerSelectElementFromQuery extractorTransformer resolvedReference", resolvedReference); + + return { elementType: "failure", elementValue: { queryFailure: "QueryNotExecutable" } }; + break; + } case "queryContextReference": { return newFetchedData && newFetchedData.elementType == "object" && newFetchedData.elementValue[query.queryReference] ? newFetchedData.elementValue[query.queryReference] @@ -667,6 +693,7 @@ export const extractzodSchemaForSingleSelectQuery = ( if ( selectorParams.query.select.queryType=="literal" || selectorParams.query.select.queryType=="queryContextReference" || + selectorParams.query.select.queryType=="extractorTransformer" || selectorParams.query.select.queryType=="extractorWrapperReturningObject" || selectorParams.query.select.queryType=="wrapperReturningObject" || selectorParams.query.select.queryType=="extractorWrapperReturningList" || diff --git a/packages/miroir-core/src/assets/miroir_model/54b9c72f-d4f3-4db9-9e0e-0dc840b530bd/359f1f9b-7260-4d76-a864-72c839b9711b.json b/packages/miroir-core/src/assets/miroir_model/54b9c72f-d4f3-4db9-9e0e-0dc840b530bd/359f1f9b-7260-4d76-a864-72c839b9711b.json index a0addb62..9c56d4cd 100644 --- a/packages/miroir-core/src/assets/miroir_model/54b9c72f-d4f3-4db9-9e0e-0dc840b530bd/359f1f9b-7260-4d76-a864-72c839b9711b.json +++ b/packages/miroir-core/src/assets/miroir_model/54b9c72f-d4f3-4db9-9e0e-0dc840b530bd/359f1f9b-7260-4d76-a864-72c839b9711b.json @@ -546,6 +546,30 @@ "type": "union", "discriminator": "queryType", "definition": [ + { + "type": "schemaReference", + "definition": { + "relativePath": "querySelectExtractor" + } + }, + { + "type": "object", + "definition": { + "queryType": { + "type": "literal", + "definition": "extractorTransformer" + }, + "referencedQuery": { + "type": "schemaReference", + "definition": { + "relativePath": "queryTemplateContextReference" + } + }, + "attribute": { + "type": "string" + } + } + }, { "type": "object", "definition": { @@ -582,24 +606,12 @@ } } }, - { - "type": "schemaReference", - "definition": { - "relativePath": "querySelectExtractor" - } - }, { "type": "schemaReference", "definition": { "relativePath": "querySelectObjectByRelation" } }, - { - "type": "schemaReference", - "definition": { - "relativePath": "extractObjectListByEntity" - } - }, { "type": "schemaReference", "definition": { diff --git a/packages/miroir-core/src/tests/2_domain/domainSelector.unit.test.ts b/packages/miroir-core/src/tests/2_domain/domainSelector.unit.test.ts index 1341b0d6..e5e0da39 100644 --- a/packages/miroir-core/src/tests/2_domain/domainSelector.unit.test.ts +++ b/packages/miroir-core/src/tests/2_domain/domainSelector.unit.test.ts @@ -17,504 +17,672 @@ import domainStateImport from "./domainState.json"; const domainState: DomainState = domainStateImport as DomainState; describe("domainSelector", () => { - // ########################################################################################### - it('error on non-existing Entity: EntityNotFound', - () => { - const queryParam: ExtractorForRecordOfExtractors = { - queryType: "extractorForRecordOfExtractors", - deploymentUuid: adminConfigurationDeploymentLibrary.uuid, - contextResults: { elementType: "object", elementValue: {} }, - pageParams: { elementType: "object", elementValue: {} }, - queryParams: { elementType: "object", elementValue: {} }, - fetchQuery: { - book: { - queryType: "selectObjectByDirectReference", - parentName: "Book", - parentUuid: { - queryTemplateType: "constantUuid", - constantUuidValue: "XXXXXX" - }, - instanceUuid: { - queryTemplateType: "constantUuid", - constantUuidValue: "caef8a59-39eb-48b5-ad59-a7642d3a1e8f" - } - }, - }, - }; - // const result = extractWithManyExtractorsFromDomainState(domainState, getSelectorParams(queryParam)); - const result = extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam)); - console.info("result", result); - expect(result).toEqual({ - elementType: "object", - elementValue: { - book: { - elementType: "failure", - elementValue: { - applicationSection: "data", - deploymentUuid: "f714bb2f-a12d-4e71-a03b-74dcedea6eb4", - entityUuid: "XXXXXX", - queryFailure: "EntityNotFound", - }, - }, - }, - }); - } - ) - - // ########################################################################################### - it('error on non-existing Entity: EntityNotFound', - () => { - const queryParam: ExtractorForRecordOfExtractors = { - queryType: "extractorForRecordOfExtractors", - deploymentUuid: adminConfigurationDeploymentLibrary.uuid, - contextResults: { elementType: "object", elementValue: {} }, - pageParams: { elementType: "object", elementValue: {} }, - queryParams: { elementType: "object", elementValue: {} }, - fetchQuery: { - book: { - queryType: "selectObjectByDirectReference", - parentName: "Book", - parentUuid: { - "queryTemplateType": "constantUuid", - "constantUuidValue": "XXXXXX" - }, - instanceUuid: { - queryTemplateType: "constantUuid", - constantUuidValue: "caef8a59-39eb-48b5-ad59-a7642d3a1e8f" - } - }, - }, - }; - // const result = extractWithManyExtractorsFromDomainState(domainState, getSelectorParams(queryParam)); - const result = extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam)); - console.info("result", result); - expect(result).toEqual({ - elementType: "object", - elementValue: { - book: { - elementType: "failure", - elementValue: { - applicationSection: "data", - deploymentUuid: "f714bb2f-a12d-4e71-a03b-74dcedea6eb4", - entityUuid: "XXXXXX", - queryFailure: "EntityNotFound", - }, - }, - }, - }); - } - ) - - // ########################################################################################### - it('error on non-existing object uuid: InstanceNotFound', - () => { - - const queryParam: ExtractorForRecordOfExtractors = { - queryType: "extractorForRecordOfExtractors", - "deploymentUuid": adminConfigurationDeploymentLibrary.uuid, - "contextResults": { elementType: "object", elementValue: {} }, - pageParams: { elementType: "object", elementValue: {} }, - queryParams: { elementType: "object", elementValue: {} }, - "fetchQuery": { - "book": { - queryType: "selectObjectByDirectReference", - parentName: "Book", - parentUuid: { - queryTemplateType: "constantUuid", - constantUuidValue: "e8ba151b-d68e-4cc3-9a83-3459d309ccf5" - }, - instanceUuid: { - queryTemplateType: "constantUuid", - constantUuidValue: "XXXXXXXXX" - } - } - } - }; - - expect( - // extractWithManyExtractorsFromDomainState(domainState, getSelectorParams(queryParam))) - extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam))) - .toEqual({ - elementType: "object", - elementValue: { - book: { - elementType: "failure", - elementValue: { - applicationSection: "data", - deploymentUuid: "f714bb2f-a12d-4e71-a03b-74dcedea6eb4", - entityUuid: "e8ba151b-d68e-4cc3-9a83-3459d309ccf5", - instanceUuid: "XXXXXXXXX", - queryFailure: "InstanceNotFound", - }, - }, - }, - }); - } - ) - - // ########################################################################################### - it('select 1 object from Domain State', - () => { - - const queryParam: ExtractorForRecordOfExtractors = { - queryType: "extractorForRecordOfExtractors", - deploymentUuid: adminConfigurationDeploymentLibrary.uuid, - contextResults: { elementType: "object", elementValue: {} }, - pageParams: { elementType: "object", elementValue: {} }, - queryParams: { elementType: "object", elementValue: {} }, - extractors: { - book: { - queryType: "selectObjectByDirectReference", - parentName: "Book", - parentUuid: { - queryTemplateType: "constantUuid", - constantUuidValue: "e8ba151b-d68e-4cc3-9a83-3459d309ccf5", - }, - instanceUuid: { - queryTemplateType: "constantUuid", - constantUuidValue: "caef8a59-39eb-48b5-ad59-a7642d3a1e8f", - }, - }, - }, - }; - - const queryResult:any = extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam)); - - expect(queryResult.elementValue.book.elementValue).toBe(domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["caef8a59-39eb-48b5-ad59-a7642d3a1e8f"]) - } - ) - - - // ########################################################################################### - it('select 1 object from Domain State using context reference', - () => { - - const queryParam: ExtractorForRecordOfExtractors = { - queryType: "extractorForRecordOfExtractors", - deploymentUuid: adminConfigurationDeploymentLibrary.uuid, - contextResults: { elementType: "object", elementValue: {} }, - pageParams: { elementType: "object", elementValue: {} }, - queryParams: { elementType: "object", elementValue: {} }, - extractors: { - book: { - queryType: "selectObjectByDirectReference", - parentName: "Book", - parentUuid: { - queryTemplateType: "constantUuid", - constantUuidValue: "e8ba151b-d68e-4cc3-9a83-3459d309ccf5", - }, - instanceUuid: { - queryTemplateType: "constantUuid", - constantUuidValue: "caef8a59-39eb-48b5-ad59-a7642d3a1e8f", - }, - }, - }, - fetchQuery: { - book2: { - queryType: "queryContextReference", - queryReference: "book", - }, - }, - }; - - const queryResult:any = extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam)); - - expect(queryResult.elementValue.book2.elementValue).toBe(domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["caef8a59-39eb-48b5-ad59-a7642d3a1e8f"]) - } - ) - - // ########################################################################################### - it('select 1 object from Domain State using direct query parameter reference', - () => { + // // ########################################################################################### + // it('error on non-existing Entity: EntityNotFound', + // () => { + // const queryParam: ExtractorForRecordOfExtractors = { + // queryType: "extractorForRecordOfExtractors", + // deploymentUuid: adminConfigurationDeploymentLibrary.uuid, + // contextResults: { elementType: "object", elementValue: {} }, + // pageParams: { elementType: "object", elementValue: {} }, + // queryParams: { elementType: "object", elementValue: {} }, + // fetchQuery: { + // book: { + // queryType: "selectObjectByDirectReference", + // parentName: "Book", + // parentUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "XXXXXX" + // }, + // instanceUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "caef8a59-39eb-48b5-ad59-a7642d3a1e8f" + // } + // }, + // }, + // }; + // // const result = extractWithManyExtractorsFromDomainState(domainState, getSelectorParams(queryParam)); + // const result = extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam)); + // console.info("result", result); + // expect(result).toEqual({ + // elementType: "object", + // elementValue: { + // book: { + // elementType: "failure", + // elementValue: { + // applicationSection: "data", + // deploymentUuid: "f714bb2f-a12d-4e71-a03b-74dcedea6eb4", + // entityUuid: "XXXXXX", + // queryFailure: "EntityNotFound", + // }, + // }, + // }, + // }); + // } + // ) - const queryParam: ExtractorForRecordOfExtractors = { - queryType: "extractorForRecordOfExtractors", - deploymentUuid: adminConfigurationDeploymentLibrary.uuid, - contextResults: { elementType: "object", elementValue: {} }, - pageParams: { elementType: "object", elementValue: {} }, - queryParams: { elementType: "object", elementValue: { wantedBookUuid: { elementType: "instanceUuid", elementValue:"caef8a59-39eb-48b5-ad59-a7642d3a1e8f" } } }, - extractors: { - book: { - queryType: "selectObjectByDirectReference", - parentName: "Book", - parentUuid: { - queryTemplateType: "constantUuid", - constantUuidValue: "e8ba151b-d68e-4cc3-9a83-3459d309ccf5", - }, - instanceUuid: { - queryTemplateType: "queryParameterReference", - referenceName: "wantedBookUuid", - }, - }, - }, - fetchQuery: { - }, - }; + // // ########################################################################################### + // it('error on non-existing Entity: EntityNotFound', + // () => { + // const queryParam: ExtractorForRecordOfExtractors = { + // queryType: "extractorForRecordOfExtractors", + // deploymentUuid: adminConfigurationDeploymentLibrary.uuid, + // contextResults: { elementType: "object", elementValue: {} }, + // pageParams: { elementType: "object", elementValue: {} }, + // queryParams: { elementType: "object", elementValue: {} }, + // fetchQuery: { + // book: { + // queryType: "selectObjectByDirectReference", + // parentName: "Book", + // parentUuid: { + // "queryTemplateType": "constantUuid", + // "constantUuidValue": "XXXXXX" + // }, + // instanceUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "caef8a59-39eb-48b5-ad59-a7642d3a1e8f" + // } + // }, + // }, + // }; + // // const result = extractWithManyExtractorsFromDomainState(domainState, getSelectorParams(queryParam)); + // const result = extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam)); + // console.info("result", result); + // expect(result).toEqual({ + // elementType: "object", + // elementValue: { + // book: { + // elementType: "failure", + // elementValue: { + // applicationSection: "data", + // deploymentUuid: "f714bb2f-a12d-4e71-a03b-74dcedea6eb4", + // entityUuid: "XXXXXX", + // queryFailure: "EntityNotFound", + // }, + // }, + // }, + // }); + // } + // ) - const queryResult:any = extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam)); - console.log("queryResult", JSON.stringify(queryResult, circularReplacer(), 2)); + // // ########################################################################################### + // it('error on non-existing object uuid: InstanceNotFound', + // () => { + + // const queryParam: ExtractorForRecordOfExtractors = { + // queryType: "extractorForRecordOfExtractors", + // "deploymentUuid": adminConfigurationDeploymentLibrary.uuid, + // "contextResults": { elementType: "object", elementValue: {} }, + // pageParams: { elementType: "object", elementValue: {} }, + // queryParams: { elementType: "object", elementValue: {} }, + // "fetchQuery": { + // "book": { + // queryType: "selectObjectByDirectReference", + // parentName: "Book", + // parentUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "e8ba151b-d68e-4cc3-9a83-3459d309ccf5" + // }, + // instanceUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "XXXXXXXXX" + // } + // } + // } + // }; + + // expect( + // // extractWithManyExtractorsFromDomainState(domainState, getSelectorParams(queryParam))) + // extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam))) + // .toEqual({ + // elementType: "object", + // elementValue: { + // book: { + // elementType: "failure", + // elementValue: { + // applicationSection: "data", + // deploymentUuid: "f714bb2f-a12d-4e71-a03b-74dcedea6eb4", + // entityUuid: "e8ba151b-d68e-4cc3-9a83-3459d309ccf5", + // instanceUuid: "XXXXXXXXX", + // queryFailure: "InstanceNotFound", + // }, + // }, + // }, + // }); + // } + // ) - expect(queryResult.elementValue.book.elementValue).toBe(domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["caef8a59-39eb-48b5-ad59-a7642d3a1e8f"]) - } - ) + // // ########################################################################################### + // it('select 1 object from Domain State', + // () => { + + // const queryParam: ExtractorForRecordOfExtractors = { + // queryType: "extractorForRecordOfExtractors", + // deploymentUuid: adminConfigurationDeploymentLibrary.uuid, + // contextResults: { elementType: "object", elementValue: {} }, + // pageParams: { elementType: "object", elementValue: {} }, + // queryParams: { elementType: "object", elementValue: {} }, + // extractors: { + // book: { + // queryType: "selectObjectByDirectReference", + // parentName: "Book", + // parentUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "e8ba151b-d68e-4cc3-9a83-3459d309ccf5", + // }, + // instanceUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "caef8a59-39eb-48b5-ad59-a7642d3a1e8f", + // }, + // }, + // }, + // }; + + // const queryResult:any = extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam)); + + // expect(queryResult.elementValue.book.elementValue).toBe(domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["caef8a59-39eb-48b5-ad59-a7642d3a1e8f"]) + // } + // ) - // ########################################################################################### - it('select 1 object from the uuid found in an attribute of another object from Domain State', - () => { - const queryParam: ExtractorForRecordOfExtractors = { - queryType: "extractorForRecordOfExtractors", - deploymentUuid: adminConfigurationDeploymentLibrary.uuid, - contextResults: { elementType: "object", elementValue: {} }, - pageParams: { elementType: "object", elementValue: {} }, - queryParams: { elementType: "object", elementValue: {} }, - extractors: { - book: { - queryType: "selectObjectByDirectReference", - parentName: "Book", - parentUuid: { - queryTemplateType: "constantUuid", - constantUuidValue: "e8ba151b-d68e-4cc3-9a83-3459d309ccf5", - }, - instanceUuid: { - queryTemplateType: "constantUuid", - constantUuidValue: "caef8a59-39eb-48b5-ad59-a7642d3a1e8f", - }, - }, - }, - fetchQuery: { - publisher: { - queryType: "selectObjectByRelation", - parentName: "Publisher", - parentUuid: { - queryTemplateType: "constantUuid", - constantUuidValue: "a027c379-8468-43a5-ba4d-bf618be25cab", - }, - objectReference: { - queryTemplateType: "queryContextReference", - referenceName: "book", - }, - AttributeOfObjectToCompareToReferenceUuid: "publisher", - }, - }, - }; + // // ########################################################################################### + // it('select 1 object from Domain State using context reference', + // () => { + + // const queryParam: ExtractorForRecordOfExtractors = { + // queryType: "extractorForRecordOfExtractors", + // deploymentUuid: adminConfigurationDeploymentLibrary.uuid, + // contextResults: { elementType: "object", elementValue: {} }, + // pageParams: { elementType: "object", elementValue: {} }, + // queryParams: { elementType: "object", elementValue: {} }, + // extractors: { + // book: { + // queryType: "selectObjectByDirectReference", + // parentName: "Book", + // parentUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "e8ba151b-d68e-4cc3-9a83-3459d309ccf5", + // }, + // instanceUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "caef8a59-39eb-48b5-ad59-a7642d3a1e8f", + // }, + // }, + // }, + // fetchQuery: { + // book2: { + // queryType: "queryContextReference", + // queryReference: "book", + // }, + // }, + // }; + + // const queryResult:any = extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam)); + + // expect(queryResult.elementValue.book2.elementValue).toBe(domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["caef8a59-39eb-48b5-ad59-a7642d3a1e8f"]) + // } + // ) - const queryResult:any = extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam)); + // // ########################################################################################### + // it('select 1 object from Domain State using direct query parameter reference', + // () => { + + // const queryParam: ExtractorForRecordOfExtractors = { + // queryType: "extractorForRecordOfExtractors", + // deploymentUuid: adminConfigurationDeploymentLibrary.uuid, + // contextResults: { elementType: "object", elementValue: {} }, + // pageParams: { elementType: "object", elementValue: {} }, + // queryParams: { elementType: "object", elementValue: { wantedBookUuid: { elementType: "instanceUuid", elementValue:"caef8a59-39eb-48b5-ad59-a7642d3a1e8f" } } }, + // extractors: { + // book: { + // queryType: "selectObjectByDirectReference", + // parentName: "Book", + // parentUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "e8ba151b-d68e-4cc3-9a83-3459d309ccf5", + // }, + // instanceUuid: { + // queryTemplateType: "queryParameterReference", + // referenceName: "wantedBookUuid", + // }, + // }, + // }, + // fetchQuery: { + // }, + // }; + + // const queryResult:any = extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam)); + // console.log("queryResult", JSON.stringify(queryResult, circularReplacer(), 2)); + + // expect(queryResult.elementValue.book.elementValue).toBe(domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["caef8a59-39eb-48b5-ad59-a7642d3a1e8f"]) + // } + // ) - console.log("result XXXXXXXXXXXXXXXXXXXXXXXXXXXXX", JSON.stringify(queryResult, circularReplacer(), 2)); + // // ########################################################################################### + // it('select 1 object from the uuid found in an attribute of another object from Domain State', + // () => { + + // const queryParam: ExtractorForRecordOfExtractors = { + // queryType: "extractorForRecordOfExtractors", + // deploymentUuid: adminConfigurationDeploymentLibrary.uuid, + // contextResults: { elementType: "object", elementValue: {} }, + // pageParams: { elementType: "object", elementValue: {} }, + // queryParams: { elementType: "object", elementValue: {} }, + // extractors: { + // book: { + // queryType: "selectObjectByDirectReference", + // parentName: "Book", + // parentUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "e8ba151b-d68e-4cc3-9a83-3459d309ccf5", + // }, + // instanceUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "caef8a59-39eb-48b5-ad59-a7642d3a1e8f", + // }, + // }, + // }, + // fetchQuery: { + // publisher: { + // queryType: "selectObjectByRelation", + // parentName: "Publisher", + // parentUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "a027c379-8468-43a5-ba4d-bf618be25cab", + // }, + // objectReference: { + // queryTemplateType: "queryContextReference", + // referenceName: "book", + // }, + // AttributeOfObjectToCompareToReferenceUuid: "publisher", + // }, + // }, + // }; + + // const queryResult:any = extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam)); + + // console.log("result XXXXXXXXXXXXXXXXXXXXXXXXXXXXX", JSON.stringify(queryResult, circularReplacer(), 2)); - expect(queryResult.elementType).toBe("object") - expect((queryResult.elementValue as any)["publisher"].elementValue).toBe( - domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["a027c379-8468-43a5-ba4d-bf618be25cab"][ - "516a7366-39e7-4998-82cb-80199a7fa667" - ] - ); - } - ) - - // ########################################################################################### - it('select Authors', - () => { + // expect(queryResult.elementType).toBe("object") + // expect((queryResult.elementValue as any)["publisher"].elementValue).toBe( + // domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["a027c379-8468-43a5-ba4d-bf618be25cab"][ + // "516a7366-39e7-4998-82cb-80199a7fa667" + // ] + // ); + // } + // ) - const queryParam: ExtractorForRecordOfExtractors = { - queryType: "extractorForRecordOfExtractors", - deploymentUuid: adminConfigurationDeploymentLibrary.uuid, - contextResults: { elementType: "object", elementValue: {} }, - pageParams: { - elementType: "object", - elementValue: { - applicationSection: { - elementType: "string", - elementValue: "data", - }, - }, - }, - queryParams: { elementType: "object", elementValue: {} }, - extractors: { - authors: { - queryType: "extractObjectListByEntity", - parentName: "Author", - parentUuid: { - queryTemplateType: "constantUuid", - constantUuidValue: "d7a144ff-d1b9-4135-800c-a7cfc1f38733", - }, - }, - }, - fetchQuery: { - }, - }; - - const queryResult:any = extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam)); - - console.log("result", queryResult); + // // ########################################################################################### + // it('select Authors', + // () => { + + // const queryParam: ExtractorForRecordOfExtractors = { + // queryType: "extractorForRecordOfExtractors", + // deploymentUuid: adminConfigurationDeploymentLibrary.uuid, + // contextResults: { elementType: "object", elementValue: {} }, + // pageParams: { + // elementType: "object", + // elementValue: { + // applicationSection: { + // elementType: "string", + // elementValue: "data", + // }, + // }, + // }, + // queryParams: { elementType: "object", elementValue: {} }, + // extractors: { + // authors: { + // queryType: "extractObjectListByEntity", + // parentName: "Author", + // parentUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "d7a144ff-d1b9-4135-800c-a7cfc1f38733", + // }, + // }, + // }, + // fetchQuery: { + // }, + // }; + + // const queryResult:any = extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam)); + + // console.log("result", queryResult); - expect((queryResult.elementValue as any)["authors"].elementValue).toEqual({ - '4441169e-0c22-4fbc-81b2-28c87cf48ab2': { - uuid: '4441169e-0c22-4fbc-81b2-28c87cf48ab2', - parentName: 'Author', - parentUuid: 'd7a144ff-d1b9-4135-800c-a7cfc1f38733', - name: 'Don Norman' - }, - 'ce7b601d-be5f-4bc6-a5af-14091594046a': { - uuid: 'ce7b601d-be5f-4bc6-a5af-14091594046a', - parentName: 'Author', - parentUuid: 'd7a144ff-d1b9-4135-800c-a7cfc1f38733', - name: 'Paul Veyne' - }, - 'd14c1c0c-eb2e-42d1-8ac1-2d58f5143c17': { - uuid: 'd14c1c0c-eb2e-42d1-8ac1-2d58f5143c17', - parentName: 'Author', - parentUuid: 'd7a144ff-d1b9-4135-800c-a7cfc1f38733', - conceptLevel: 'Data', - name: 'Cornell Woolrich' - }, - 'e4376314-d197-457c-aa5e-d2da5f8d5977': { - uuid: 'e4376314-d197-457c-aa5e-d2da5f8d5977', - parentName: 'Author', - parentUuid: 'd7a144ff-d1b9-4135-800c-a7cfc1f38733', - conceptLevel: 'Data', - name: 'Catherine Guérard' - } - }); - } - ) - - // ########################################################################################### - it('select Authors with filter', - () => { - - const queryParam: ExtractorForRecordOfExtractors = { - queryType: "extractorForRecordOfExtractors", - deploymentUuid: adminConfigurationDeploymentLibrary.uuid, - contextResults: { elementType: "object", elementValue: {} }, - pageParams: { - elementType: "object", - elementValue: { - applicationSection: { - elementType: "string", - elementValue: "data", - }, - }, - }, - queryParams: { elementType: "object", elementValue: {} }, - extractors: { - authors: { - queryType: "extractObjectListByEntity", - parentName: "Author", - parentUuid: { - queryTemplateType: "constantUuid", - constantUuidValue: "d7a144ff-d1b9-4135-800c-a7cfc1f38733", - }, - filter: { - attributeName: "name", - value: { - queryTemplateType: "constantString", - definition: "or", - }, - }, - }, - }, - }; + // expect((queryResult.elementValue as any)["authors"].elementValue).toEqual({ + // '4441169e-0c22-4fbc-81b2-28c87cf48ab2': { + // uuid: '4441169e-0c22-4fbc-81b2-28c87cf48ab2', + // parentName: 'Author', + // parentUuid: 'd7a144ff-d1b9-4135-800c-a7cfc1f38733', + // name: 'Don Norman' + // }, + // 'ce7b601d-be5f-4bc6-a5af-14091594046a': { + // uuid: 'ce7b601d-be5f-4bc6-a5af-14091594046a', + // parentName: 'Author', + // parentUuid: 'd7a144ff-d1b9-4135-800c-a7cfc1f38733', + // name: 'Paul Veyne' + // }, + // 'd14c1c0c-eb2e-42d1-8ac1-2d58f5143c17': { + // uuid: 'd14c1c0c-eb2e-42d1-8ac1-2d58f5143c17', + // parentName: 'Author', + // parentUuid: 'd7a144ff-d1b9-4135-800c-a7cfc1f38733', + // conceptLevel: 'Data', + // name: 'Cornell Woolrich' + // }, + // 'e4376314-d197-457c-aa5e-d2da5f8d5977': { + // uuid: 'e4376314-d197-457c-aa5e-d2da5f8d5977', + // parentName: 'Author', + // parentUuid: 'd7a144ff-d1b9-4135-800c-a7cfc1f38733', + // conceptLevel: 'Data', + // name: 'Catherine Guérard' + // } + // }); + // } + // ) - const queryResult:any = extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam)); - - console.log("result", queryResult); + // // ########################################################################################### + // it('select Authors with filter', + // () => { + + // const queryParam: ExtractorForRecordOfExtractors = { + // queryType: "extractorForRecordOfExtractors", + // deploymentUuid: adminConfigurationDeploymentLibrary.uuid, + // contextResults: { elementType: "object", elementValue: {} }, + // pageParams: { + // elementType: "object", + // elementValue: { + // applicationSection: { + // elementType: "string", + // elementValue: "data", + // }, + // }, + // }, + // queryParams: { elementType: "object", elementValue: {} }, + // extractors: { + // authors: { + // queryType: "extractObjectListByEntity", + // parentName: "Author", + // parentUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "d7a144ff-d1b9-4135-800c-a7cfc1f38733", + // }, + // filter: { + // attributeName: "name", + // value: { + // queryTemplateType: "constantString", + // definition: "or", + // }, + // }, + // }, + // }, + // }; + + // const queryResult:any = extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam)); + + // console.log("result", queryResult); - expect((queryResult.elementValue as any)["authors"].elementValue).toEqual({ - '4441169e-0c22-4fbc-81b2-28c87cf48ab2': { - uuid: '4441169e-0c22-4fbc-81b2-28c87cf48ab2', - parentName: 'Author', - parentUuid: 'd7a144ff-d1b9-4135-800c-a7cfc1f38733', - name: 'Don Norman' - }, - 'd14c1c0c-eb2e-42d1-8ac1-2d58f5143c17': { - uuid: 'd14c1c0c-eb2e-42d1-8ac1-2d58f5143c17', - parentName: 'Author', - parentUuid: 'd7a144ff-d1b9-4135-800c-a7cfc1f38733', - conceptLevel: 'Data', - name: 'Cornell Woolrich' - }, - }); - } - ) + // expect((queryResult.elementValue as any)["authors"].elementValue).toEqual({ + // '4441169e-0c22-4fbc-81b2-28c87cf48ab2': { + // uuid: '4441169e-0c22-4fbc-81b2-28c87cf48ab2', + // parentName: 'Author', + // parentUuid: 'd7a144ff-d1b9-4135-800c-a7cfc1f38733', + // name: 'Don Norman' + // }, + // 'd14c1c0c-eb2e-42d1-8ac1-2d58f5143c17': { + // uuid: 'd14c1c0c-eb2e-42d1-8ac1-2d58f5143c17', + // parentName: 'Author', + // parentUuid: 'd7a144ff-d1b9-4135-800c-a7cfc1f38733', + // conceptLevel: 'Data', + // name: 'Cornell Woolrich' + // }, + // }); + // } + // ) - // ########################################################################################### - it('select Books of Publisher of given Book from Domain State', - () => { + // // ########################################################################################### + // it('select Books of Publisher of given Book from Domain State', + // () => { + + // const queryParam: ExtractorForRecordOfExtractors = { + // queryType: "extractorForRecordOfExtractors", + // deploymentUuid: adminConfigurationDeploymentLibrary.uuid, + // contextResults: { elementType: "object", elementValue: {} }, + // pageParams: { + // elementType: "object", + // elementValue: { + // applicationSection: { + // elementType: "string", + // elementValue: "data", + // }, + // }, + // }, + // queryParams: { elementType: "object", elementValue: {} }, + // extractors: { + // book: { + // queryType: "selectObjectByDirectReference", + // parentName: "Book", + // parentUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "e8ba151b-d68e-4cc3-9a83-3459d309ccf5", + // }, + // instanceUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "caef8a59-39eb-48b5-ad59-a7642d3a1e8f", + // }, + // }, + // }, + // fetchQuery: { + // publisher: { + // queryType: "selectObjectByRelation", + // parentName: "Publisher", + // parentUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "a027c379-8468-43a5-ba4d-bf618be25cab", + // }, + // objectReference: { + // queryTemplateType: "queryContextReference", + // referenceName: "book", + // }, + // AttributeOfObjectToCompareToReferenceUuid: "publisher", + // }, + // booksOfPublisher: { //join with only constant references + // queryType: "selectObjectListByRelation", + // parentName: "Book", + // parentUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "e8ba151b-d68e-4cc3-9a83-3459d309ccf5", + // }, + // objectReference: { + // queryTemplateType: "queryContextReference", + // referenceName: "publisher", + // }, + // AttributeOfListObjectToCompareToReferenceUuid: "publisher", + // }, + // }, + // }; + + // const queryResult:any = extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam)); + + // console.log("result", queryResult); + + // expect((queryResult.elementValue as any)["booksOfPublisher"].elementValue).toEqual({ + // "4cb917b3-3c53-4f9b-b000-b0e4c07a81f7": domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["4cb917b3-3c53-4f9b-b000-b0e4c07a81f7"], + // "c6852e89-3c3c-447f-b827-4b5b9d830975": domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["c6852e89-3c3c-447f-b827-4b5b9d830975"], + // "caef8a59-39eb-48b5-ad59-a7642d3a1e8f": domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["caef8a59-39eb-48b5-ad59-a7642d3a1e8f"], + // }) + // } + // ) - const queryParam: ExtractorForRecordOfExtractors = { - queryType: "extractorForRecordOfExtractors", - deploymentUuid: adminConfigurationDeploymentLibrary.uuid, - contextResults: { elementType: "object", elementValue: {} }, - pageParams: { - elementType: "object", - elementValue: { - applicationSection: { - elementType: "string", - elementValue: "data", - }, - }, - }, - queryParams: { elementType: "object", elementValue: {} }, - extractors: { - book: { - queryType: "selectObjectByDirectReference", - parentName: "Book", - parentUuid: { - queryTemplateType: "constantUuid", - constantUuidValue: "e8ba151b-d68e-4cc3-9a83-3459d309ccf5", - }, - instanceUuid: { - queryTemplateType: "constantUuid", - constantUuidValue: "caef8a59-39eb-48b5-ad59-a7642d3a1e8f", - }, - }, - }, - fetchQuery: { - publisher: { - queryType: "selectObjectByRelation", - parentName: "Publisher", - parentUuid: { - queryTemplateType: "constantUuid", - constantUuidValue: "a027c379-8468-43a5-ba4d-bf618be25cab", - }, - objectReference: { - queryTemplateType: "queryContextReference", - referenceName: "book", - }, - AttributeOfObjectToCompareToReferenceUuid: "publisher", - }, - booksOfPublisher: { //join with only constant references - queryType: "selectObjectListByRelation", - parentName: "Book", - parentUuid: { - queryTemplateType: "constantUuid", - constantUuidValue: "e8ba151b-d68e-4cc3-9a83-3459d309ccf5", - }, - objectReference: { - queryTemplateType: "constantUuid", - constantUuidValue: "516a7366-39e7-4998-82cb-80199a7fa667", - }, - AttributeOfListObjectToCompareToReferenceUuid: "publisher", - }, - }, - }; + // // ########################################################################################### + // it('select custom-built result: Books of Publisher of given Book from Domain State', + // () => { + + // const queryParam: ExtractorForRecordOfExtractors = { + // queryType: "extractorForRecordOfExtractors", + // deploymentUuid: adminConfigurationDeploymentLibrary.uuid, + // contextResults: { elementType: "object", elementValue: {} }, + // pageParams: { + // elementType: "object", + // elementValue: { + // applicationSection: { + // elementType: "string", + // elementValue: "data", + // }, + // }, + // }, + // queryParams: { elementType: "object", elementValue: {} }, + // extractors: { + // book: { + // queryType: "selectObjectByDirectReference", + // parentName: "Book", + // parentUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "e8ba151b-d68e-4cc3-9a83-3459d309ccf5", + // }, + // instanceUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "caef8a59-39eb-48b5-ad59-a7642d3a1e8f", + // }, + // }, + // }, + // fetchQuery: { + // publisher: { + // queryType: "selectObjectByRelation", + // parentName: "Publisher", + // parentUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "a027c379-8468-43a5-ba4d-bf618be25cab", + // }, + // objectReference: { + // queryTemplateType: "queryContextReference", + // referenceName: "book", + // }, + // AttributeOfObjectToCompareToReferenceUuid: "publisher", + // }, + // booksOfPublisher: { + // queryType: "selectObjectListByRelation", + // parentName: "Book", + // parentUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "e8ba151b-d68e-4cc3-9a83-3459d309ccf5", + // }, + // objectReference: { + // queryTemplateType: "queryContextReference", + // referenceName: "publisher", + // }, + // AttributeOfListObjectToCompareToReferenceUuid: "publisher", + // }, + // result1: { + // queryType: "wrapperReturningObject", + // definition: { + // "caef8a59-39eb-48b5-ad59-a7642d3a1e8f": { + // queryType: "queryContextReference", + // queryReference: "booksOfPublisher", + // }, + // }, + // }, + // result2: { + // queryType: "wrapperReturningList", + // definition: [ + // { queryType: "queryContextReference", queryReference: "booksOfPublisher" }, + // { queryType: "queryContextReference", queryReference: "booksOfPublisher" }, + // ], + // }, + // }, + // }; + + // const queryResult:any = extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam)); + + // const expectedValue = { + // "4cb917b3-3c53-4f9b-b000-b0e4c07a81f7": domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["4cb917b3-3c53-4f9b-b000-b0e4c07a81f7"], + // "c6852e89-3c3c-447f-b827-4b5b9d830975": domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["c6852e89-3c3c-447f-b827-4b5b9d830975"], + // "caef8a59-39eb-48b5-ad59-a7642d3a1e8f": domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["caef8a59-39eb-48b5-ad59-a7642d3a1e8f"], + // }; + + // expect((queryResult.elementValue as any)["result1"].elementValue["caef8a59-39eb-48b5-ad59-a7642d3a1e8f"].elementValue).toEqual(expectedValue) + + // expect((queryResult.elementValue as any)["result2"].elementValue[0].elementValue).toEqual(expectedValue); + // expect((queryResult.elementValue as any)["result2"].elementValue[1].elementValue).toEqual(expectedValue); + // } + // ) - const queryResult:any = extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam)); + // // ########################################################################################### + // it('select custom-built result with queryCombiner: instances of all Entites from Domain State, indexed by Entity Uuid', + // () => { + + // const queryParam: ExtractorForRecordOfExtractors = { + // queryType: "extractorForRecordOfExtractors", + // deploymentUuid: adminConfigurationDeploymentLibrary.uuid, + // contextResults: { elementType: "object", elementValue: {} }, + // pageParams: { + // elementType: "object", + // elementValue: { + // applicationSection: { + // elementType: "string", + // elementValue: "data", + // }, + // }, + // }, + // queryParams: { elementType: "object", elementValue: {} }, + // extractors: { + // entities: { + // queryType: "extractObjectListByEntity", + // applicationSection: "model", + // parentName: "Entity", + // parentUuid: { + // queryTemplateType: "constantUuid", + // constantUuidValue: "16dbfe28-e1d7-4f20-9ba4-c1a9873202ad", + // }, + // }, + // }, + // fetchQuery: { + // instancesOfEntities: { + // queryType: "queryCombiner", // heteronomous many-to-many join, not possible with SQL + // rootQuery: { + // queryType: "queryContextReference", + // queryReference: "entities", + // }, + // subQuery: { + // query: { + // queryType: "extractObjectListByEntity", + // parentUuid: { + // queryTemplateType: "queryParameterReference", + // referenceName: "uuid", + // }, + // }, + // rootQueryObjectTransformer: { + // transformerType: "recordOfTransformers", + // definition: { + // uuid: { + // transformerType: "objectTransformer", + // attributeName: "uuid", + // }, + // }, + // }, + // }, + // }, + // }, + // }; + + // const queryResult:any = extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam)); + // // console.log("result", result.elementValue.instancesOfEntities); + // const expectedValue = { + // elementType: "object", + // elementValue: Object.fromEntries( + // Object.entries(domainState[adminConfigurationDeploymentLibrary.uuid]["data"]).map((e) => [ + // e[0], + // { elementType: "instanceUuidIndex", elementValue: e[1] }, + // ]) + // ) + // } + // // console.log("expectedValue", expectedValue); + // expect(queryResult.elementValue.instancesOfEntities).toEqual(expectedValue); + // } + // ) - console.log("result", queryResult); - - expect((queryResult.elementValue as any)["booksOfPublisher"].elementValue).toEqual({ - "4cb917b3-3c53-4f9b-b000-b0e4c07a81f7": domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["4cb917b3-3c53-4f9b-b000-b0e4c07a81f7"], - "c6852e89-3c3c-447f-b827-4b5b9d830975": domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["c6852e89-3c3c-447f-b827-4b5b9d830975"], - "caef8a59-39eb-48b5-ad59-a7642d3a1e8f": domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["caef8a59-39eb-48b5-ad59-a7642d3a1e8f"], - }) - } - ) // ########################################################################################### - it('select custom-built result: Books of Publisher of given Book from Domain State', + it('select Unique Publisher Uuids of Books', () => { const queryParam: ExtractorForRecordOfExtractors = { @@ -532,158 +700,43 @@ describe("domainSelector", () => { }, queryParams: { elementType: "object", elementValue: {} }, extractors: { - book: { - queryType: "selectObjectByDirectReference", + books: { + queryType: "extractObjectListByEntity", parentName: "Book", parentUuid: { queryTemplateType: "constantUuid", constantUuidValue: "e8ba151b-d68e-4cc3-9a83-3459d309ccf5", }, - instanceUuid: { - queryTemplateType: "constantUuid", - constantUuidValue: "caef8a59-39eb-48b5-ad59-a7642d3a1e8f", - }, }, }, fetchQuery: { - publisher: { - queryType: "selectObjectByRelation", - parentName: "Publisher", - parentUuid: { - queryTemplateType: "constantUuid", - constantUuidValue: "a027c379-8468-43a5-ba4d-bf618be25cab", - }, - objectReference: { - queryTemplateType: "queryContextReference", - referenceName: "book", - }, - AttributeOfObjectToCompareToReferenceUuid: "publisher", - }, - booksOfPublisher: { - queryType: "selectObjectListByRelation", - parentName: "Book", - parentUuid: { - queryTemplateType: "constantUuid", - constantUuidValue: "e8ba151b-d68e-4cc3-9a83-3459d309ccf5", - }, - objectReference: { + publishers: { + queryType: "extractorTransformer", + referencedQuery: { queryTemplateType: "queryContextReference", - referenceName: "publisher", - }, - AttributeOfListObjectToCompareToReferenceUuid: "publisher", - }, - result1: { - queryType: "wrapperReturningObject", - definition: { - "caef8a59-39eb-48b5-ad59-a7642d3a1e8f": { - queryType: "queryContextReference", - queryReference: "booksOfPublisher", - }, + referenceName: "books", }, - }, - result2: { - queryType: "wrapperReturningList", - definition: [ - { queryType: "queryContextReference", queryReference: "booksOfPublisher" }, - { queryType: "queryContextReference", queryReference: "booksOfPublisher" }, - ], + attribute: "publisher", }, }, }; const queryResult:any = extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam)); - const expectedValue = { - "4cb917b3-3c53-4f9b-b000-b0e4c07a81f7": domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["4cb917b3-3c53-4f9b-b000-b0e4c07a81f7"], - "c6852e89-3c3c-447f-b827-4b5b9d830975": domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["c6852e89-3c3c-447f-b827-4b5b9d830975"], - "caef8a59-39eb-48b5-ad59-a7642d3a1e8f": domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["caef8a59-39eb-48b5-ad59-a7642d3a1e8f"], - }; - - expect((queryResult.elementValue as any)["result1"].elementValue["caef8a59-39eb-48b5-ad59-a7642d3a1e8f"].elementValue).toEqual(expectedValue) + console.log("result", JSON.stringify(queryResult, null, 2)); - expect((queryResult.elementValue as any)["result2"].elementValue[0].elementValue).toEqual(expectedValue); - expect((queryResult.elementValue as any)["result2"].elementValue[1].elementValue).toEqual(expectedValue); - } - ) - - // ########################################################################################### - it('select custom-built result with queryCombiner: instances of all Entites from Domain State, indexed by Entity Uuid', - () => { - - const queryParam: ExtractorForRecordOfExtractors = { - queryType: "extractorForRecordOfExtractors", - deploymentUuid: adminConfigurationDeploymentLibrary.uuid, - contextResults: { elementType: "object", elementValue: {} }, - pageParams: { - elementType: "object", - elementValue: { - applicationSection: { - elementType: "string", - elementValue: "data", - }, - }, - }, - queryParams: { elementType: "object", elementValue: {} }, - extractors: { - entities: { - queryType: "extractObjectListByEntity", - applicationSection: "model", - parentName: "Entity", - parentUuid: { - queryTemplateType: "constantUuid", - constantUuidValue: "16dbfe28-e1d7-4f20-9ba4-c1a9873202ad", - }, - }, - }, - fetchQuery: { - instancesOfEntities: { - queryType: "queryCombiner", // heteronomous many-to-many join, not possible with SQL - rootQuery: { - queryType: "queryContextReference", - queryReference: "entities", - }, - subQuery: { - query: { - queryType: "extractObjectListByEntity", - parentUuid: { - queryTemplateType: "queryParameterReference", - referenceName: "uuid", - }, - }, - rootQueryObjectTransformer: { - transformerType: "recordOfTransformers", - definition: { - uuid: { - transformerType: "objectTransformer", - attributeName: "uuid", - }, - }, - }, - }, - }, - }, - }; - - const queryResult:any = extractWithExtractorFromDomainState(domainState, getSelectorParams(queryParam)); - // console.log("result", result.elementValue.instancesOfEntities); - const expectedValue = { - elementType: "object", - elementValue: Object.fromEntries( - Object.entries(domainState[adminConfigurationDeploymentLibrary.uuid]["data"]).map((e) => [ - e[0], - { elementType: "instanceUuidIndex", elementValue: e[1] }, - ]) - ) - } - // console.log("expectedValue", expectedValue); - expect(queryResult.elementValue.instancesOfEntities).toEqual(expectedValue); + expect((queryResult.elementValue as any)["publishers"].elementValue).toEqual( + [ + "516a7366-39e7-4998-82cb-80199a7fa667", + "c1c97d54-aba8-4599-883a-7fe8f3874095", + "1f550a2a-33f5-4a56-83ee-302701039494" + ] + ) } ) - - // // ########################################################################################### // it("getEntityDefinition query: get entity definition from entity Uuid", () => { // const queryParam: DomainModelQueryJzodSchemaParams = {