@finos/legend-graph
Version:
Legend graph and graph manager
389 lines • 29.1 kB
TypeScript
/**
* Copyright (c) 2020-present, Goldman Sachs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type ContentType, type LogService, type PlainObject, type ServerClientConfig, ActionState, TracerService } from '@finos/legend-shared';
import type { TEMPORARY__AbstractEngineConfig } from '../../../../graph-manager/action/TEMPORARY__AbstractEngineConfig.js';
import { AbstractPureGraphManager, type TEMPORARY__EngineSetupConfig, type GraphBuilderOptions, type ExecutionOptions, type ServiceRegistrationOptions } from '../../../../graph-manager/AbstractPureGraphManager.js';
import type { Mapping } from '../../../../graph/metamodel/pure/packageableElements/mapping/Mapping.js';
import type { Runtime } from '../../../../graph/metamodel/pure/packageableElements/runtime/Runtime.js';
import type { PackageableElement } from '../../../../graph/metamodel/pure/packageableElements/PackageableElement.js';
import { type SystemModel, type CoreModel, PureModel, type GraphTextInputOption } from '../../../../graph/PureModel.js';
import type { BasicModel } from '../../../../graph/BasicModel.js';
import type { DependencyManager } from '../../../../graph/DependencyManager.js';
import type { Class } from '../../../../graph/metamodel/pure/packageableElements/domain/Class.js';
import { RawLambda } from '../../../../graph/metamodel/pure/rawValueSpecification/RawLambda.js';
import type { RawValueSpecification } from '../../../../graph/metamodel/pure/rawValueSpecification/RawValueSpecification.js';
import type { FileGenerationSpecification } from '../../../../graph/metamodel/pure/packageableElements/fileGeneration/FileGenerationSpecification.js';
import type { GenerationConfigurationDescription, GenerationMode } from '../../../../graph-manager/action/generation/GenerationConfigurationDescription.js';
import { type ServiceRegistrationResult, ServiceRegistrationSuccess } from '../../../../graph-manager/action/service/ServiceRegistrationResult.js';
import type { GenerationOutput } from '../../../../graph-manager/action/generation/GenerationOutput.js';
import type { ValueSpecification } from '../../../../graph/metamodel/pure/valueSpecification/ValueSpecification.js';
import { ServiceExecutionMode } from '../../../../graph-manager/action/service/ServiceExecutionMode.js';
import { V1_PureModelContextData } from './model/context/V1_PureModelContextData.js';
import { type V1_PackageableElement } from './model/packageableElements/V1_PackageableElement.js';
import { V1_ExecuteInput } from './engine/execution/V1_ExecuteInput.js';
import { V1_Profile } from './model/packageableElements/domain/V1_Profile.js';
import { V1_Class } from './model/packageableElements/domain/V1_Class.js';
import { V1_Enumeration } from './model/packageableElements/domain/V1_Enumeration.js';
import { V1_Association } from './model/packageableElements/domain/V1_Association.js';
import { V1_Measure } from './model/packageableElements/domain/V1_Measure.js';
import { V1_Store } from './model/packageableElements/store/V1_Store.js';
import { V1_Service } from './model/packageableElements/service/V1_Service.js';
import { V1_PackageableRuntime } from './model/packageableElements/runtime/V1_PackageableRuntime.js';
import { V1_PackageableConnection } from './model/packageableElements/connection/V1_PackageableConnection.js';
import { V1_FileGenerationSpecification } from './model/packageableElements/fileGeneration/V1_FileGenerationSpecification.js';
import { V1_SectionIndex } from './model/packageableElements/section/V1_SectionIndex.js';
import { V1_GenerationSpecification } from './model/packageableElements/generationSpecification/V1_GenerationSpecification.js';
import { V1_Mapping } from './model/packageableElements/mapping/V1_Mapping.js';
import { V1_ConcreteFunctionDefinition } from './model/packageableElements/function/V1_ConcreteFunctionDefinition.js';
import type { V1_PureModelContext } from './model/context/V1_PureModelContext.js';
import type { V1_ElementBuilder } from './transformation/pureGraph/to/V1_ElementBuilder.js';
import { V1_GraphBuilderExtensions } from './transformation/pureGraph/to/V1_GraphBuilderExtensions.js';
import type { DatabaseBuilderInput } from '../../../../graph-manager/action/generation/DatabaseBuilderInput.js';
import type { RawRelationalOperationElement } from '../../../../graph/metamodel/pure/packageableElements/store/relational/model/RawRelationalOperationElement.js';
import type { ExecutionPlan, RawExecutionPlan } from '../../../../graph/metamodel/pure/executionPlan/ExecutionPlan.js';
import type { V1_ExecutionNode } from './model/executionPlan/nodes/V1_ExecutionNode.js';
import type { ExecutionNode } from '../../../../graph/metamodel/pure/executionPlan/nodes/ExecutionNode.js';
import type { V1_ExecutionPlan } from './model/executionPlan/V1_ExecutionPlan.js';
import { type LightQuery, type Query, type QueryInfo } from '../../../../graph-manager/action/query/Query.js';
import { type Entity, type EntitiesWithOrigin } from '@finos/legend-storage';
import { PureClientVersion } from '../../../../graph-manager/GraphManagerUtils.js';
import type { GraphManagerPluginManager } from '../../../GraphManagerPluginManager.js';
import type { QuerySearchSpecification } from '../../../../graph-manager/action/query/QuerySearchSpecification.js';
import type { ExternalFormatDescription } from '../../../../graph-manager/action/externalFormat/ExternalFormatDescription.js';
import type { ConfigurationProperty } from '../../../../graph/metamodel/pure/packageableElements/fileGeneration/ConfigurationProperty.js';
import { type GraphManagerOperationReport } from '../../../GraphManagerStatistics.js';
import { V1_DataElement } from './model/packageableElements/data/V1_DataElement.js';
import type { RunTestsTestableInput } from '../../../../graph/metamodel/pure/test/result/RunTestsTestableInput.js';
import { type TestResult } from '../../../../graph/metamodel/pure/test/result/TestResult.js';
import type { MappingModelCoverageAnalysisResult, RawMappingModelCoverageAnalysisResult } from '../../../../graph-manager/action/analytics/MappingModelCoverageAnalysis.js';
import { SchemaSet } from '../../../../graph/metamodel/pure/packageableElements/externalFormat/schemaSet/DSL_ExternalFormat_SchemaSet.js';
import type { CompilationResult, TextCompilationResult } from '../../../action/compilation/CompilationResult.js';
import type { ModelUnit } from '../../../../graph/metamodel/pure/packageableElements/externalFormat/store/DSL_ExternalFormat_ModelUnit.js';
import type { ParameterValue } from '../../../../graph/metamodel/pure/packageableElements/service/ParameterValue.js';
import type { Service } from '../../../../graph/metamodel/pure/packageableElements/service/Service.js';
import { V1_ExecutionEnvironmentInstance } from './model/packageableElements/service/V1_ExecutionEnvironmentInstance.js';
import { V1_StoreEntitlementAnalysisInput } from './engine/analytics/V1_StoreEntitlementAnalysis.js';
import type { DatasetEntitlementReport, DatasetSpecification } from '../../../action/analytics/StoreEntitlementAnalysis.js';
import { type GraphDataOrigin } from '../../../../graph/GraphDataOrigin.js';
import { type GraphData } from '../../../GraphData.js';
import type { DEPRECATED__MappingTest } from '../../../../graph/metamodel/pure/packageableElements/mapping/DEPRECATED__MappingTest.js';
import { V1_INTERNAL__UnknownPackageableElement } from './model/packageableElements/V1_INTERNAL__UnknownPackageableElement.js';
import type { SourceInformation } from '../../../action/SourceInformation.js';
import type { FunctionActivator } from '../../../../graph/metamodel/pure/packageableElements/function/FunctionActivator.js';
import { FunctionActivatorConfiguration } from '../../../action/functionActivator/FunctionActivatorConfiguration.js';
import { V1_FunctionActivator } from './model/packageableElements/function/V1_FunctionActivator.js';
import { type RelationalDatabaseConnection } from '../../../../STO_Relational_Exports.js';
import type { ArtifactGenerationExtensionResult } from '../../../action/generation/ArtifactGenerationExtensionResult.js';
import type { TestDataGenerationResult } from '../../../../graph/metamodel/pure/packageableElements/service/TestGenerationResult.js';
import { RelationalDatabaseTypeConfiguration } from '../../../action/relational/RelationalDatabaseTypeConfiguration.js';
import type { TableRowIdentifiers } from '../../../../graph/metamodel/pure/packageableElements/service/TableRowIdentifiers.js';
import { EngineError } from '../../../action/EngineError.js';
import type { ExecutionResult, ExecutionResultWithMetadata } from '../../../action/execution/ExecutionResult.js';
import { V1_INTERNAL__UnknownElement } from './model/packageableElements/V1_INTERNAL__UnknownElement.js';
import type { PostValidationAssertionResult } from '../../../../DSL_Service_Exports.js';
import type { TestDebug } from '../../../../graph/metamodel/pure/test/result/DebugTestsResult.js';
import type { V1_GraphManagerEngine } from './engine/V1_GraphManagerEngine.js';
import type { RelationTypeMetadata } from '../../../action/relation/RelationTypeMetadata.js';
import type { CodeCompletionResult } from '../../../action/compilation/Completion.js';
import type { DeploymentResult } from '../../../action/DeploymentResult.js';
import type { LightPersistentDataCube, PersistentDataCube } from '../../../action/query/PersistentDataCube.js';
import { V1_DataProduct } from './model/packageableElements/dataProduct/V1_DataProduct.js';
declare class V1_PureModelContextDataIndex {
elements: V1_PackageableElement[];
nativeElements: V1_PackageableElement[];
associations: V1_Association[];
classes: V1_Class[];
enumerations: V1_Enumeration[];
functions: V1_ConcreteFunctionDefinition[];
functionActivators: V1_FunctionActivator[];
profiles: V1_Profile[];
measures: V1_Measure[];
stores: V1_Store[];
mappings: V1_Mapping[];
connections: V1_PackageableConnection[];
runtimes: V1_PackageableRuntime[];
sectionIndices: V1_SectionIndex[];
fileGenerations: V1_FileGenerationSpecification[];
generationSpecifications: V1_GenerationSpecification[];
dataElements: V1_DataElement[];
services: V1_Service[];
executionEnvironments: V1_ExecutionEnvironmentInstance[];
products: V1_DataProduct[];
INTERNAL__UnknownElement: V1_INTERNAL__UnknownElement[];
INTERNAL__unknownElements: V1_INTERNAL__UnknownPackageableElement[];
otherElementsByBuilder: Map<V1_ElementBuilder<V1_PackageableElement>, V1_PackageableElement[]>;
}
export declare const V1_indexPureModelContextData: (report: GraphManagerOperationReport, data: V1_PureModelContextData, extensions: V1_GraphBuilderExtensions) => V1_PureModelContextDataIndex;
interface V1_PureGraphBuilderInput {
model: BasicModel;
data: V1_PureModelContextDataIndex;
origin?: GraphDataOrigin | undefined;
}
export interface V1_EngineSetupConfig {
env: string;
tabSize: number;
clientConfig: ServerClientConfig;
}
export declare class V1_PureGraphManager extends AbstractPureGraphManager {
private readonly elementClassifierPathMap;
private readonly subtypeInfo;
static readonly PURE_PROTOCOL_NAME = "pure";
static readonly DEV_PROTOCOL_VERSION = PureClientVersion.VX_X_X;
static readonly PROD_PROTOCOL_VERSION: undefined;
engine: V1_GraphManagerEngine;
readonly graphBuilderExtensions: V1_GraphBuilderExtensions;
constructor(pluginManager: GraphManagerPluginManager, logService: LogService, engine?: V1_GraphManagerEngine);
TEMPORARY__getEngineConfig(): TEMPORARY__AbstractEngineConfig;
initialize(config: TEMPORARY__EngineSetupConfig, options?: {
tracerService?: TracerService | undefined;
disableGraphConfiguration?: boolean | undefined;
engine?: V1_GraphManagerEngine;
}): Promise<void>;
private configureElementClassifierPathMap;
private configureSubtypeInfoMap;
getSupportedProtocolVersion(): string;
getElementEntities(entities: Entity[]): Entity[];
buildSystem(coreModel: CoreModel, systemModel: SystemModel, buildState: ActionState, options?: GraphBuilderOptions, _report?: GraphManagerOperationReport): Promise<void>;
buildDependencies(coreModel: CoreModel, systemModel: SystemModel, dependencyManager: DependencyManager, dependencyEntitiesIndex: Map<string, EntitiesWithOrigin>, buildState: ActionState, options?: GraphBuilderOptions, _report?: GraphManagerOperationReport): Promise<void>;
buildGraph(graph: PureModel, entities: Entity[], buildState: ActionState, options?: GraphBuilderOptions, _report?: GraphManagerOperationReport): Promise<void>;
buildLightGraph(graph: PureModel, entities: Entity[], buildState: ActionState, options?: GraphBuilderOptions, _report?: GraphManagerOperationReport): Promise<void>;
buildGenerations(graph: PureModel, generatedEntities: Map<string, Entity[]>, buildState: ActionState, options?: GraphBuilderOptions, _report?: GraphManagerOperationReport): Promise<void>;
private buildGraphFromInputs;
private buildLightGraphFromInputs;
private getBuilderContext;
/**
* This will run the first pass builder for all elements and index them.
* This process is needed so other core processes such as building the section indices
* or building processes that relies on the `existence` of other elements to refer to them,
* but not necessarily use them.
*
* NOTE: We aim to not do anything more than running the first pass and indexing the first pass.
*/
private initializeAndIndexElements;
private buildTypes;
private buildFunctionActivators;
private buildStores;
private buildMappings;
private buildConnectionsAndRuntimes;
private buildServices;
private buildDataElements;
private buildDataProducts;
private buildFileGenerations;
private buildGenerationSpecifications;
private buildSectionIndices;
private buildOtherElements;
private visitWithGraphBuilderErrorHandling;
graphToPureCode(graph: PureModel, options?: {
pretty?: boolean | undefined;
excludeUnknown?: boolean | undefined;
}): Promise<string>;
prettyLambdaContent(lambda: string): Promise<string>;
entitiesToPureCode(entities: Entity[], options?: {
pretty?: boolean | undefined;
}): Promise<string>;
pureCodeToEntities(code: string, options?: {
sourceInformationIndex?: Map<string, SourceInformation>;
TEMPORARY__keepSectionIndex?: boolean;
}): Promise<Entity[]>;
pureCodeToLambda(lambda: string, lambdaId?: string, options?: {
pruneSourceInformation?: boolean;
}): Promise<RawLambda>;
lambdaToPureCode(lambda: RawLambda, pretty?: boolean): Promise<string>;
lambdasToPureCode(lambdas: Map<string, RawLambda>, pretty?: boolean): Promise<Map<string, string>>;
valueSpecificationsToPureCode(lambdas: Map<string, ValueSpecification>, pretty?: boolean | undefined): Promise<Map<string, string>>;
valueSpecificationToPureCode(valSpec: PlainObject<ValueSpecification>, pretty?: boolean | undefined): Promise<string>;
pureCodeToValueSpecification(valSpec: string, returnSourceInformation?: boolean): Promise<PlainObject<ValueSpecification>>;
pureCodeToValueSpecifications(lambdas: Map<string, string>, graph: PureModel): Promise<Map<string, ValueSpecification>>;
pureCodeToRelationalOperationElement(operation: string, operationId: string): Promise<RawRelationalOperationElement>;
relationalOperationElementToPureCode(operations: Map<string, RawRelationalOperationElement>): Promise<Map<string, string>>;
compileEntities(entities: Entity[]): Promise<void>;
compileGraph(graph: PureModel, options?: {
onError?: (() => void) | undefined;
keepSourceInformation?: boolean | undefined;
} | undefined, _report?: GraphManagerOperationReport): Promise<CompilationResult>;
compileText(graphGrammar: string, graph: PureModel, options?: {
onError?: () => void;
}, _report?: GraphManagerOperationReport): Promise<TextCompilationResult>;
getLambdaReturnType(lambda: RawLambda, graph: PureModel, options?: {
keepSourceInformation?: boolean;
}): Promise<string>;
getLambdaRelationType(lambda: RawLambda, graph: PureModel, options?: {
keepSourceInformation?: boolean;
}): Promise<RelationTypeMetadata>;
getCodeComplete(codeBlock: string, graph: PureModel, offset: number | undefined, options?: {
ignoreElements: string[] | undefined;
}): Promise<CodeCompletionResult>;
getLambdasReturnType(lambdas: Map<string, RawLambda>, graph: PureModel, options?: {
keepSourceInformation?: boolean;
}): Promise<{
results: Map<string, string>;
errors: Map<string, EngineError>;
}>;
TEMPORARY__getLambdaReturnType(key: string, lambda: RawLambda, plainGraph: PlainObject<V1_PureModelContext>, finalResult: {
results: Map<string, string>;
errors: Map<string, EngineError>;
}, options?: {
keepSourceInformation?: boolean;
}): Promise<void>;
private buildLambdaReturnTypeInput;
private buildV1RawLambda;
getAvailableGenerationConfigurationDescriptions(): Promise<GenerationConfigurationDescription[]>;
private buildPMCDWithOptions;
generateArtifacts(graph: PureModel, graphOptions?: GraphTextInputOption): Promise<ArtifactGenerationExtensionResult>;
generateFile(fileGeneration: FileGenerationSpecification, generationMode: GenerationMode, graph: PureModel, graphOptions?: GraphTextInputOption): Promise<GenerationOutput[]>;
generateModel(generationElement: PackageableElement, graph: PureModel, graphOptions?: GraphTextInputOption): Promise<Entity[]>;
generateTestData(query: RawLambda, mapping: string, runtime: string, graph: PureModel): Promise<TestDataGenerationResult>;
runTests(inputs: RunTestsTestableInput[], graph: PureModel): Promise<TestResult[]>;
debugTests(inputs: RunTestsTestableInput[], graph: PureModel): Promise<TestDebug[]>;
buildValueSpecification(json: PlainObject, graph: PureModel): ValueSpecification;
serializeValueSpecification(valueSpecification: ValueSpecification): PlainObject;
transformValueSpecToRawValueSpec(valueSpecification: ValueSpecification, graph: PureModel): RawValueSpecification;
buildRawValueSpecification(json: object, graph: PureModel): RawValueSpecification;
serializeRawValueSpecification(metamodel: RawValueSpecification): PlainObject;
createGetAllRawLambda(_class: Class): RawLambda;
createDefaultBasicRawLambda(options?: {
addDummyParameter?: boolean;
}): RawLambda;
getAvailableExternalFormatsDescriptions(): Promise<ExternalFormatDescription[]>;
generateModelFromExternalFormat(schemaSet: SchemaSet, targetBinding: string | undefined, configurationProperties: ConfigurationProperty[], graph: PureModel): Promise<string>;
generateSchemaFromExternalFormatConfig(modelUnit: ModelUnit, targetBinding: string | undefined, configurationProperties: ConfigurationProperty[], currentGraph: PureModel): Promise<SchemaSet[]>;
getExamplePureProtocolText(): string;
getExampleExternalFormatImportText(): string;
entitiesToPureProtocolText(entities: Entity[]): Promise<string>;
pureProtocolTextToEntities: (protocol: string) => Entity[];
private prepareExecutionContextGraphData;
createExecutionInput: (graph: PureModel, mapping: Mapping | undefined, lambda: RawLambda, runtime: Runtime | undefined, clientVersion: string | undefined, parameterValues?: ParameterValue[]) => V1_ExecuteInput;
private createExecutionInputWithPureModelContext;
private createExecutionInputWithPureModelContextWithV1;
runQueryWithUncompiledGraph(lambda: RawLambda | string, mapping: string | undefined, runtime: string | undefined, graph: PureModel, options?: ExecutionOptions, _report?: GraphManagerOperationReport): Promise<ExecutionResultWithMetadata>;
runQuery(lambda: RawLambda, mapping: Mapping, runtime: Runtime, graph: PureModel, options?: ExecutionOptions, _report?: GraphManagerOperationReport): Promise<ExecutionResultWithMetadata>;
_runQuery(createV1ExecuteInputFunc: () => V1_ExecuteInput, options?: ExecutionOptions, _report?: GraphManagerOperationReport): Promise<ExecutionResultWithMetadata>;
exportData(lambda: RawLambda, mapping: Mapping, runtime: Runtime, graph: PureModel, options?: ExecutionOptions | undefined, _report?: GraphManagerOperationReport | undefined, contentType?: ContentType | undefined): Promise<Response>;
DEPRECATED__runLegacyMappingTests(tests: {
test: DEPRECATED__MappingTest;
runtime: Runtime;
handleResult: (val: ExecutionResult) => void;
handleError: (message: Error) => void;
}[], mapping: Mapping, graph: PureModel, options?: ExecutionOptions, _report?: GraphManagerOperationReport): Promise<void>;
private DEPRECATED__runLegacyMappingTest;
generateExecutionPlan(lambda: RawLambda, mapping: Mapping | undefined, runtime: Runtime | undefined, graph: PureModel, _report?: GraphManagerOperationReport): Promise<RawExecutionPlan>;
debugExecutionPlanGeneration(lambda: RawLambda, mapping: Mapping | undefined, runtime: Runtime | undefined, graph: PureModel, _report?: GraphManagerOperationReport): Promise<{
plan: RawExecutionPlan;
debug: string;
}>;
generateExecuteTestData(lambda: RawLambda, parameters: (string | number | boolean)[], mapping: Mapping, runtime: Runtime, graph: PureModel, options?: {
anonymizeGeneratedData?: boolean;
parameterValues?: ParameterValue[];
}, _report?: GraphManagerOperationReport): Promise<string>;
generateExecuteTestDataWithSeedData(lambda: RawLambda, tableRowIdentifiers: TableRowIdentifiers[], mapping: Mapping, runtime: Runtime, graph: PureModel, options?: {
anonymizeGeneratedData?: boolean;
parameterValues?: ParameterValue[];
}, _report?: GraphManagerOperationReport): Promise<string>;
buildExecutionPlan(executionPlanJson: PlainObject<V1_ExecutionPlan>, graph: PureModel): ExecutionPlan;
serializeExecutionPlan(executionPlan: ExecutionPlan): PlainObject<V1_ExecutionPlan>;
serializeExecutionNode(executionNode: ExecutionNode): PlainObject<V1_ExecutionNode>;
cancelUserExecutions(broadcastToCluster: boolean): Promise<string>;
analyzeExecuteInput(data: PlainObject, executablePath: string): Promise<{
origin: GraphDataOrigin;
entities: Entity[];
}>;
searchQueries(searchSpecification: QuerySearchSpecification): Promise<LightQuery[]>;
getQueries(queryIds: string[]): Promise<LightQuery[]>;
getLightQuery(queryId: string): Promise<LightQuery>;
getQuery(queryId: string, graph: PureModel): Promise<Query>;
getQueryInfo(queryId: string): Promise<QueryInfo>;
createQuery(query: Query, graph: PureModel): Promise<Query>;
updateQuery(query: Query, graph: PureModel): Promise<Query>;
patchQuery(query: Partial<Query>, graph: PureModel): Promise<Query>;
renameQuery(queryId: string, queryName: string): Promise<LightQuery>;
deleteQuery(queryId: string): Promise<void>;
productionizeQueryToServiceEntity(query: QueryInfo, serviceConfig: {
name: string;
packageName: string;
pattern: string;
serviceOwners: string[];
}, graph: Entity[]): Promise<Entity>;
resolveQueryInfoExecutionContext(query: QueryInfo, graphLoader: () => Promise<PlainObject<Entity>[]>): Promise<{
mapping: string | undefined;
runtime: string;
}>;
searchDataCubes(searchSpecification: QuerySearchSpecification): Promise<LightPersistentDataCube[]>;
getDataCubes(ids: string[]): Promise<LightPersistentDataCube[]>;
getDataCube(id: string): Promise<PersistentDataCube>;
createDataCube(dataCube: PersistentDataCube): Promise<PersistentDataCube>;
updateDataCube(dataCube: PersistentDataCube): Promise<PersistentDataCube>;
deleteDataCube(id: string): Promise<void>;
analyzeMappingModelCoverage(mapping: Mapping, graph: PureModel): Promise<MappingModelCoverageAnalysisResult>;
buildMappingModelCoverageAnalysisResult(input: RawMappingModelCoverageAnalysisResult, mapping: Mapping): MappingModelCoverageAnalysisResult;
generateStoreEntitlementAnalysisInput(mapping: string, runtime: string, query: RawLambda | undefined, graphData: GraphData): V1_StoreEntitlementAnalysisInput;
surveyDatasets(mapping: string, runtime: string, query: RawLambda | undefined, graphData: GraphData): Promise<DatasetSpecification[]>;
checkDatasetEntitlements(datasets: DatasetSpecification[], mapping: string, runtime: string, query: RawLambda | undefined, graphData: GraphData): Promise<DatasetEntitlementReport[]>;
buildDatabase(input: DatabaseBuilderInput): Promise<Entity[]>;
executeRawSQL(connection: RelationalDatabaseConnection, sql: string): Promise<string>;
getAvailableFunctionActivatorConfigurations(coreModel: CoreModel, systemModel: SystemModel): Promise<FunctionActivatorConfiguration[]>;
validateFunctionActivator(functionActivator: FunctionActivator, graphData: GraphData): Promise<void>;
publishFunctionActivatorToSandbox(functionActivator: FunctionActivator, graphData: GraphData): Promise<DeploymentResult>;
generateModelsFromDatabaseSpecification(databasePath: string, targetPackage: undefined | string, graph: PureModel): Promise<Entity[]>;
getAvailableRelationalDatabaseTypeConfigurations(): Promise<RelationalDatabaseTypeConfiguration[] | undefined>;
registerService(service: Service, graph: PureModel, groupId: string, artifactId: string, version: string | undefined, server: string, executionMode: ServiceExecutionMode, options?: ServiceRegistrationOptions): Promise<ServiceRegistrationSuccess>;
bulkServiceRegistration(services: Service[], graph: PureModel, groupId: string, artifactId: string, version: string | undefined, server: string, executionMode: ServiceExecutionMode, options?: ServiceRegistrationOptions): Promise<ServiceRegistrationResult[]>;
activateService(serviceUrl: string, serviceId: string): Promise<void>;
runServicePostValidations(service: Service, graph: PureModel, assertionId: string): Promise<PostValidationAssertionResult>;
createSandboxProject(): Promise<{
projectId: string;
webUrl: string | undefined;
owner: string;
}>;
userHasPrototypeProjectAccess(userId: string): Promise<boolean>;
buildHashesIndex(entities: Entity[]): Promise<Map<string, string>>;
elementToEntity: (element: PackageableElement, options?: {
pruneSourceInformation?: boolean;
}) => Entity;
elementsToPureCode(elements: PackageableElement[], options?: {
pruneSourceInformation?: boolean;
pretty?: boolean;
}): Promise<string>;
private prunePureModelContextData;
private buildPureModelSDLCPointer;
/**
* This method helps indexing the graph from graph and dependencies' entities
* This will produce a _light_ graph with empty unprocesed elements, they are just indexed in the graph
* and the Pure model context data which can be used to further build the graph
*
* There are a few simple analytics we want to do on the graph which does not necessarily
* require us to build the full-graph, in fact, doing so would be too costly. In those scenarios,
* we need to build the _light_ graph, hence the existence of this utility method
*
* TODO?: do we need to account for system elements?
*/
indexLightGraph(graph: PureModel, entities: Entity[], dependencyEntitiesIndex: Map<string, EntitiesWithOrigin>, entityFilterFn?: ((entity: Entity) => boolean) | undefined, entityProcessorFn?: ((entity: Entity) => Entity) | undefined): Promise<V1_PureGraphBuilderInput[]>;
private getFullGraphModelContext;
getFullGraphModelData(graph: PureModel, options?: {
keepSourceInformation?: boolean | undefined;
} | undefined): V1_PureModelContextData;
elementProtocolToEntity: (elementProtocol: V1_PackageableElement) => Entity;
pureModelContextDataToEntities: (graphProtocol: V1_PureModelContextData) => Entity[];
private entitiesToPureModelContextData;
elementToProtocol: <T extends V1_PackageableElement>(element: PackageableElement, options?: {
keepSourceInformation?: boolean | undefined;
} | undefined) => T;
private getElementPath;
private getElementClassiferPath;
private graphToPureModelContextData;
private getGraphCompileContext;
}
export {};
//# sourceMappingURL=V1_PureGraphManager.d.ts.map