/** * Copyright (c) 2026-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. */ /** * Shared utilities for Lakehouse test state: * used by both DataProductTestableState and IngestTestableState. */ import { type Accessor, type AbstractPureGraphManager, type BaseDataResolver, RelationElement, RelationElementsData, type PackageableElement } from '@finos/legend-graph'; import type { EditorStore } from '../../../EditorStore.js'; import { RelationElementsDataState } from '../data/EmbeddedDataState.js'; export declare const createEmptyRelationElement: (itemId: string, columns?: string[]) => RelationElement; export declare const buildRelationElementsDataWithColumns: (accessors: Accessor[]) => RelationElementsData; export declare const isIngestOrDataProductAccessor: (accessor: Accessor) => accessor is Accessor; export interface ElementDataItem { id: string; label: string; } export declare const getElementDataItems: (element: PackageableElement, graphManager: AbstractPureGraphManager) => ElementDataItem[]; /** * Wraps a single BaseDataResolver within a test suite's testData array. * Shared between DataProduct and Ingest test suite states — both populate * test data by wiring BaseDataResolver entries to PackageableElements. */ export declare class LakehouseElementTestDataState { readonly testData: BaseDataResolver; readonly editorStore: EditorStore; readonly relationElementsDataState: RelationElementsDataState | undefined; constructor(testData: BaseDataResolver, editorStore: EditorStore); get element(): PackageableElement; get itemLabel(): string; private initAccessorOptions; private refreshAccessorOptions; } /** * Structural interface satisfied by both DataProductTestDataState and * IngestTestDataState. Used to type the shared LakehouseTestDataEditor * component without importing the concrete state classes. */ export interface LakehouseTestDataStateBase { elementTestDataStates: LakehouseElementTestDataState[]; selectedElementTestDataState: LakehouseElementTestDataState | undefined; setSelectedElementTestDataState(val: LakehouseElementTestDataState | undefined): void; availableElementsToAdd: PackageableElement[]; showAddElementModal: boolean; setShowAddElementModal(val: boolean): void; addElement(path: string): void; deleteElement(state: LakehouseElementTestDataState): void; editorStore: EditorStore; } //# sourceMappingURL=LakehouseTestableUtils.d.ts.map