"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ValidationTarget = exports.isDashboardValidationError = exports.isChartValidationError = exports.isTableValidationError = exports.ValidationSourceType = exports.DashboardFilterValidationErrorType = exports.ValidationErrorType = void 0;
exports.isValidationTargetValid = isValidationTargetValid;
var ValidationErrorType;
(function (ValidationErrorType) {
    ValidationErrorType["Chart"] = "chart";
    ValidationErrorType["Sorting"] = "sorting";
    ValidationErrorType["Filter"] = "filter";
    ValidationErrorType["Metric"] = "metric";
    ValidationErrorType["Model"] = "model";
    ValidationErrorType["Dimension"] = "dimension";
    ValidationErrorType["CustomMetric"] = "custom metric";
    ValidationErrorType["ChartConfiguration"] = "chart configuration";
})(ValidationErrorType || (exports.ValidationErrorType = ValidationErrorType = {}));
var DashboardFilterValidationErrorType;
(function (DashboardFilterValidationErrorType) {
    DashboardFilterValidationErrorType["FieldDoesNotExist"] = "field_does_not_exist";
    DashboardFilterValidationErrorType["TableNotUsedByAnyChart"] = "table_not_used_by_any_chart";
    DashboardFilterValidationErrorType["TableDoesNotExist"] = "table_does_not_exist";
})(DashboardFilterValidationErrorType || (exports.DashboardFilterValidationErrorType = DashboardFilterValidationErrorType = {}));
var ValidationSourceType;
(function (ValidationSourceType) {
    ValidationSourceType["Chart"] = "chart";
    ValidationSourceType["Dashboard"] = "dashboard";
    ValidationSourceType["Table"] = "table";
})(ValidationSourceType || (exports.ValidationSourceType = ValidationSourceType = {}));
const isTableValidationError = (error) => error.source === ValidationSourceType.Table;
exports.isTableValidationError = isTableValidationError;
const isChartValidationError = (error) => error.source === ValidationSourceType.Chart;
exports.isChartValidationError = isChartValidationError;
const isDashboardValidationError = (error) => error.source === ValidationSourceType.Dashboard;
exports.isDashboardValidationError = isDashboardValidationError;
var ValidationTarget;
(function (ValidationTarget) {
    ValidationTarget["CHARTS"] = "charts";
    ValidationTarget["DASHBOARDS"] = "dashboards";
    ValidationTarget["TABLES"] = "tables";
})(ValidationTarget || (exports.ValidationTarget = ValidationTarget = {}));
function isValidationTargetValid(validationTarget) {
    return Object.values(ValidationTarget).includes(validationTarget);
}
//# sourceMappingURL=validation.js.map