/**
 * 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 { V1_AppliedFunction, V1_Lambda } from '@finos/legend-graph';
import type { DataCubeConfiguration } from './model/DataCubeConfiguration.js';
import { type PlainObject } from '@finos/legend-shared';
import type { DataCubeOperationValue, DataCubeQuerySortDirection } from './DataCubeQueryEngine.js';
import type { DataCubeColumn } from './model/DataCubeColumn.js';
import type { DataCubeDimensionalTree } from '../view/grid/DataCubeGridDimensionalTree.js';
export type DataCubeSnapshotFilterCondition = DataCubeColumn & {
    value: DataCubeOperationValue;
    operator: string;
    not?: boolean | undefined;
};
export type DataCubeSnapshotFilter = {
    groupOperator: string;
    conditions: (DataCubeSnapshotFilterCondition | DataCubeSnapshotFilter)[];
    not?: boolean | undefined;
};
export type DataCubeSnapshotExtendedColumn = DataCubeColumn & {
    windowFn?: PlainObject<V1_AppliedFunction> | undefined;
    mapFn: PlainObject<V1_Lambda>;
    reduceFn?: PlainObject<V1_Lambda> | undefined;
};
export type DataCubeSnapshotAggregateColumn = DataCubeColumn & {
    parameterValues: DataCubeOperationValue[];
    operator: string;
};
export type DataCubeSnapshotSortColumn = DataCubeColumn & {
    direction: DataCubeQuerySortDirection;
};
export type DataCubeSnapshotGroupBy = {
    columns: DataCubeColumn[];
};
export type DataCubeSnapshotPivot = {
    columns: DataCubeColumn[];
    castColumns: DataCubeColumn[];
};
export type DataCubeSnapshotProcessingContext = {
    snapshot: DataCubeSnapshot;
    pivotAggColumns?: DataCubeSnapshotAggregateColumn[] | undefined;
    pivotSortColumns?: DataCubeSnapshotSortColumn[] | undefined;
    groupByAggColumns?: DataCubeSnapshotAggregateColumn[] | undefined;
    groupBySortColumns?: DataCubeSnapshotSortColumn[] | undefined;
};
export type DataCubeSnapshotData = {
    configuration: PlainObject<DataCubeConfiguration>;
    sourceColumns: DataCubeColumn[];
    leafExtendedColumns: DataCubeSnapshotExtendedColumn[];
    filter?: DataCubeSnapshotFilter | undefined;
    selectColumns: DataCubeColumn[];
    pivot?: DataCubeSnapshotPivot | undefined;
    groupBy?: DataCubeSnapshotGroupBy | undefined;
    groupExtendedColumns: DataCubeSnapshotExtendedColumn[];
    sortColumns: DataCubeSnapshotSortColumn[];
    limit: number | undefined;
    dimensionalTree?: DataCubeDimensionalTree | undefined;
};
export declare class DataCubeSnapshot {
    readonly uuid: string;
    readonly data: DataCubeSnapshotData;
    private _isPatchChange;
    private _finalized;
    private _hashCode?;
    private constructor();
    static create(configuration: PlainObject<DataCubeConfiguration>): DataCubeSnapshot;
    /**
     * When we support undo/redo, patch changes should be grouped
     * together with the most recent non-patch change snapshot and treated
     * as a single step.
     *
     * e.g. if we have a stack of snapshots [A, B, C, D] where D is the current
     * snapshot and C is a patch change. When undo, we should go back to C.
     * When undo again, we should go back to A instead of B.
     */
    markAsPatchChange(): void;
    isPatchChange(): boolean;
    isFinalized(): boolean;
    finalize(): this;
    get hashCode(): string;
    clone(): DataCubeSnapshot;
    /**
     * Only use this if an absolute identical clone is needed.
     * This should rarely be used, and ideally by core engine only.
     */
    INTERNAL__fullClone(): DataCubeSnapshot;
    serialize(): {
        uuid: string;
        data: DataCubeSnapshotData;
        _isPatchChange: boolean;
        _finalized: boolean;
        _hashCode: string | undefined;
    };
}
//# sourceMappingURL=DataCubeSnapshot.d.ts.map