/** * 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. */ import { type IngestDefinition } from '@finos/legend-graph'; import type { PlainObject } from '@finos/legend-shared'; import { type IngestMaterializedView, type IngestMaterializedViewOptions } from '../../graph-modifier/DSL_Ingest_GraphModifierHelper.js'; import type { EditorStore } from '../EditorStore.js'; /** * Legend Cube, opened full screen from an ingest definition's editor to build * a materialized view of it from the project's ingest data sets (Create * MatView). Studio's own shortcuts are off while it is open. Cube * itself, and its host, are loaded with the dialog (`EmbeddedCube`), so * nothing here imports them. */ export declare class EmbeddedCubeState { readonly editorStore: EditorStore; /** The definition the materialized view is added to; none while closed */ ingest: IngestDefinition | undefined; /** * The materialized view opened to edit (Edit MatView, PLAN ยง11.18), by * name: Cube opens on its lambda, and Save MatView replaces it; none for a * new one */ matView: string | undefined; constructor(editorStore: EditorStore); get isOpen(): boolean; /** Opens Cube on a new materialized view of the definition, or on one of its views to edit */ open(ingest: IngestDefinition, matView?: string): void; close(): void; /** The materialized view opened to edit, as the definition holds it */ get matViewDataSet(): IngestMaterializedView | undefined; /** The lambda (protocol JSON) of the materialized view opened to edit */ get matViewLambda(): PlainObject | undefined; /** Why the name can't be the new materialized view's; none when it can */ getMaterializedViewNameProblem(name: string): string | undefined; /** * The classifications a materialized view's data can take: those a data * product's access points offer; none when Studio's config gives none, * and the classification is then typed */ get classifications(): string[]; /** Why the classification can't be the new materialized view's; none when it can */ getMaterializedViewClassificationProblem(sensitivity: string): string | undefined; /** * The columns of the step that runs a materialized view's primary key can * take: all but the milestoning columns a write mode adds */ getMaterializedViewKeyColumns(columns: readonly string[]): string[]; /** * Adds the lambda to the ingest definition as a materialized view, with * its primary key and the classification of its data, closes the cube and * shows the definition with it */ addMaterializedView(name: string, lambda: PlainObject, options: IngestMaterializedViewOptions): void; /** * Why Save MatView must ask again before it replaces the view opened to * edit with the step that runs, given the step's columns (unknown, the key * isn't checked): its data has no classification, as Studio wrote a view * before it asked for one, or one that isn't among the classifications; or * its primary key has a column the step no longer has, or a milestoning * column. None when the view can be saved as it is */ getMaterializedViewSaveProblems(columns: readonly string[] | undefined): string[]; /** * Replaces the lambda of the materialized view opened to edit, in place * (Save MatView), with the primary key and classification given, or its * own; closes the cube and shows the definition with it. As a view added, * a view saved has a classification of its data */ saveMaterializedView(lambda: PlainObject, options?: IngestMaterializedViewOptions): void; /** Closes the cube, then shows the definition's grammar with the change */ private closeOn; } //# sourceMappingURL=EmbeddedCubeState.d.ts.map