/** * 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 GeneratorFn } from '@finos/legend-shared'; import type { DepotServerClient } from '@finos/legend-server-depot'; import { type ProjectGAVCoordinates } from '@finos/legend-storage'; import { type QueryBuilderState } from '@finos/legend-query-builder'; import { type RawLambda, IngestDefinition } from '@finos/legend-graph'; import type { LegendQueryApplicationStore } from '../LegendQueryBaseStore.js'; import { QueryEditorStore, type QueryPersistConfiguration } from '../QueryEditorStore.js'; import { IngestLegendQueryBuilderState } from './IngestLegendQueryBuilderState.js'; /** * Creator store backing the `INGEST_QUERY` route. * * Unlike the data-product creator (which builds a full graph to back the * editor's element browsing), the ingest flow only needs the single ingest * definition entity. We therefore override {@link QueryEditorStore.buildGraph} * to fetch JUST that entity from Depot and build a minimal graph containing * it — no dependency resolution, no full project entity fetch. */ export declare class IngestQueryCreatorStore extends QueryEditorStore { readonly groupId: string; readonly artifactId: string; readonly versionId: string; readonly ingestDefinitionPath: string; readonly dataSet: string; /** * All ingest definition entities for this project version, keyed by path. * Populated up front by {@link buildGraph} so the source dropdown can list * every ingest without forcing us to build them all into the graph. The * entity payloads are kept so {@link swapIngestDefinition} can build a * different one on demand. */ private _ingestEntitiesByPath; queryBuilderState: IngestLegendQueryBuilderState | undefined; constructor(applicationStore: LegendQueryApplicationStore, depotServerClient: DepotServerClient, groupId: string, artifactId: string, versionId: string, ingestDefinitionPath: string, dataSet: string); getProjectInfo(): ProjectGAVCoordinates; /** * Fetch every ingest definition entity in the project (so the source * dropdown can show them all) but only build the requested one into the * graph. The remaining entity payloads are cached on * {@link _ingestEntitiesByPath} and built on demand when the user swaps * ingests via {@link swapIngestDefinition}. * * TODO: revisit once `IngestDefinition` is properly modelled. Today the * entity is self-contained, but materialized views can reference other * elements (mappings, classes, runtimes, etc.) — at that point we'll need * to either fetch those dependent entities too, or fall back to a full * project build like the data-product creator does. */ buildGraph(): GeneratorFn; /** * Remove the currently built ingest from the graph and build the entity at * `path` in its place. Backs {@link IngestLegendQueryBuilderState.swapIngest} * — see that callsite for why we don't pre-build every ingest. */ swapIngestDefinition(path: string): Promise; initializeQueryBuilderState(): Promise; getPersistConfiguration(lambda: RawLambda, options?: { update?: boolean | undefined; }): QueryPersistConfiguration; } //# sourceMappingURL=IngestQueryCreatorStore.d.ts.map