/** * 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 QuerySearchSpecification, type RawLambda, type V1_DataProductArtifact } from '@finos/legend-graph'; import { type DepotServerClient } from '@finos/legend-server-depot'; import { type GeneratorFn } from '@finos/legend-shared'; import { type QueryBuilderState } from '@finos/legend-query-builder'; import { type ProjectGAVCoordinates, type DepotEntityWithOrigin } from '@finos/legend-storage'; import { QueryEditorStore, type QueryPersistConfiguration } from '../QueryEditorStore.js'; import type { LegendQueryApplicationStore } from '../LegendQueryBaseStore.js'; import { type DataSpaceQueryBuilderState, type ResolvedDataSpaceEntityWithOrigin } from '@finos/legend-extension-dsl-data-space/application'; import { DataProductSelectorState } from './DataProductSelectorState.js'; import { type VisitedLegacyDataProduct, type VisitedDataProduct } from '../../__lib__/LegendQueryUserDataSpaceHelper.js'; import { LegendQueryBareQueryBuilderState } from './LegendQueryBareQueryBuilderState.js'; import type { LegendQueryDataProductQueryBuilderState } from '../data-product/query-builder/LegendQueryDataProductQueryBuilderState.js'; export declare abstract class LegendQueryableElement { readonly groupId: string; readonly artifactId: string; readonly versionId: string; constructor(groupId: string, artifactId: string, versionId: string); abstract get path(): string; abstract get execContext(): string; } export declare class QueryableLegacyDataProduct extends LegendQueryableElement { readonly dataSpacePath: string; readonly executionContext: string; readonly runtimePath?: string | undefined; readonly classPath?: string | undefined; constructor(groupId: string, artifactId: string, versionId: string, dataSpacePath: string, executionContext: string, runtimePath?: string | undefined, classPath?: string | undefined); get path(): string; get execContext(): string; } export declare class QueryableDataProduct extends LegendQueryableElement { readonly dataProductPath: string; readonly dataProductType: string; readonly id: string; constructor(groupId: string, artifactId: string, versionId: string, dataProductPath: string, dataProductType: string, id: string); get path(): string; get execContext(): string; } declare const enum VisitedEntityType { DATASPACE = "DATASPACE", DATAPRODUCT = "DATAPRODUCT" } export declare class DataProductQueryCreatorStore extends QueryEditorStore { queryableElement: LegendQueryableElement | undefined; productSelectorState: DataProductSelectorState; queryBuilderState: DataSpaceQueryBuilderState | LegendQueryDataProductQueryBuilderState | LegendQueryBareQueryBuilderState | undefined; constructor(applicationStore: LegendQueryApplicationStore, depotServerClient: DepotServerClient, queryableElement: LegendQueryableElement | undefined); get canPersistToSavedQuery(): boolean; get isViewProjectActionDisabled(): boolean; getProjectInfo(): ProjectGAVCoordinates | undefined; setQueryableElement(val: LegendQueryableElement | undefined): void; reConfigureWithDataSpaceInfo(info: ResolvedDataSpaceEntityWithOrigin): boolean; reConfigureWithDataProductInfo(info: DepotEntityWithOrigin, artifact: V1_DataProductArtifact): QueryableDataProduct | undefined; initialize(): GeneratorFn; initializeQueryBuilderState(): Promise; /** * Returns the most recently visited entity (data product or data space) * based on `lastViewedAt` timestamp. No network verification is performed; * if the entity no longer exists, `onInitializeFailure()` will handle * cleanup and fall back to the bare selector UI. */ getMostRecentlyVisited(): { type: VisitedEntityType; visited: VisitedLegacyDataProduct | VisitedDataProduct; } | undefined; initializeQueryBuilderStateWithDataProduct(queryableDataProduct: QueryableDataProduct, _artifact: V1_DataProductArtifact | undefined): Promise; initializeQueryBuilderStateWithQueryableDataSpace(queryableDataSpace: QueryableLegacyDataProduct): Promise; changeDataSpace(val: ResolvedDataSpaceEntityWithOrigin): GeneratorFn; changeDataProduct(val: DepotEntityWithOrigin): GeneratorFn; buildGraph(): GeneratorFn; addVisitedProduct(element: QueryableDataProduct, artifact?: V1_DataProductArtifact | undefined): void; addVisitedDataSpace(element: LegendQueryableElement): void; getPersistConfiguration(lambda: RawLambda, options?: { update?: boolean | undefined; }): QueryPersistConfiguration | undefined; onInitializeFailure(): void; decorateSearchSpecification(val: QuerySearchSpecification): QuerySearchSpecification; } export {}; //# sourceMappingURL=DataProductQueryCreatorStore.d.ts.map