"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CustomViewType = exports.isSummaryExploreError = exports.isExploreError = exports.InlineErrorType = exports.ExploreType = exports.JoinRelationship = void 0;
var JoinRelationship;
(function (JoinRelationship) {
    JoinRelationship["ONE_TO_MANY"] = "one-to-many";
    JoinRelationship["MANY_TO_ONE"] = "many-to-one";
    JoinRelationship["ONE_TO_ONE"] = "one-to-one";
    JoinRelationship["MANY_TO_MANY"] = "many-to-many";
})(JoinRelationship || (exports.JoinRelationship = JoinRelationship = {}));
var ExploreType;
(function (ExploreType) {
    ExploreType["VIRTUAL"] = "virtual";
    ExploreType["DEFAULT"] = "default";
    ExploreType["PRE_AGGREGATE"] = "pre_aggregate";
})(ExploreType || (exports.ExploreType = ExploreType = {}));
var InlineErrorType;
(function (InlineErrorType) {
    // Fatal error types (ExploreError - explore is broken)
    InlineErrorType["METADATA_PARSE_ERROR"] = "METADATA_PARSE_ERROR";
    InlineErrorType["NO_DIMENSIONS_FOUND"] = "NO_DIMENSIONS_FOUND";
    // Warning types (Explore.warnings - explore still usable)
    InlineErrorType["SKIPPED_JOIN"] = "SKIPPED_JOIN";
    InlineErrorType["MISSING_TABLE"] = "MISSING_TABLE";
    InlineErrorType["FIELD_ERROR"] = "FIELD_ERROR";
    InlineErrorType["SET_VALIDATION_ERROR"] = "SET_VALIDATION_ERROR";
    InlineErrorType["INVALID_PARAMETER"] = "INVALID_PARAMETER";
    InlineErrorType["DUPLICATE_FIELD_NAME"] = "DUPLICATE_FIELD_NAME";
    InlineErrorType["WAREHOUSE_COLUMN_ERROR"] = "WAREHOUSE_COLUMN_ERROR";
})(InlineErrorType || (exports.InlineErrorType = InlineErrorType = {}));
/**
 * Check if an explore is an ExploreError (failed to compile completely).
 * ExploreError has 'errors' field, working Explore does not.
 */
const isExploreError = (explore) => 'errors' in explore;
exports.isExploreError = isExploreError;
/**
 * Check if a SummaryExplore is from an ExploreError (completely failed to compile).
 * ExploreError has 'errors' field with actual errors, working Explore may have 'warnings'.
 */
const isSummaryExploreError = (summary) => 'errors' in summary &&
    summary.errors !== null &&
    summary.errors !== undefined;
exports.isSummaryExploreError = isSummaryExploreError;
var CustomViewType;
(function (CustomViewType) {
    CustomViewType["VIRTUAL"] = "virtual";
    CustomViewType["WRITE_BACK"] = "write_back";
})(CustomViewType || (exports.CustomViewType = CustomViewType = {}));
//# sourceMappingURL=explore.js.map