@finos/legend-data-cube
Version:
58 lines • 2.23 kB
TypeScript
/**
* 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 DataCubeLayoutService, type WindowConfiguration } from './DataCubeLayoutService.js';
import type { EngineError } from '@finos/legend-graph';
import type { DataCubeLogService } from './DataCubeLogService.js';
import type { DataCubeExecutionError } from '../core/DataCubeEngine.js';
export declare enum AlertType {
ERROR = "ERROR",
INFO = "INFO",
SUCCESS = "SUCCESS",
WARNING = "WARNING"
}
export type ActionAlertAction = {
label: string;
handler: () => void;
};
export type ActionAlert = {
title?: string | undefined;
message: string;
prompt?: string | undefined;
type: AlertType;
text?: string | undefined;
actions?: ActionAlertAction[] | undefined;
onClose?: () => void;
};
export type ActionAlertOptions = {
message: string;
text?: string | undefined;
actions?: ActionAlertAction[] | undefined;
windowTitle?: string | undefined;
windowConfig?: WindowConfiguration | undefined;
};
export declare class DataCubeAlertService {
private readonly _logService;
private readonly _layoutService;
constructor(logService: DataCubeLogService, layoutService: DataCubeLayoutService);
alert(options: ActionAlertOptions & {
type: AlertType;
}): void;
alertError(error: Error, options: ActionAlertOptions): void;
alertUnhandledError(error: Error): void;
alertCodeCheckError(error: EngineError, code: string, codePrefix: string, options: ActionAlertOptions): void;
alertExecutionError(error: DataCubeExecutionError, options: ActionAlertOptions): void;
}
//# sourceMappingURL=DataCubeAlertService.d.ts.map