"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isApiSqlRunnerJobPivotQuerySuccessResponse = exports.isApiSqlRunnerJobErrorResponse = exports.isApiSqlRunnerJobSuccessResponse = exports.SqlRunnerFilterRelativeTimeValue = exports.SqlRunnerFilterBaseOperator = exports.SqlRunnerFieldType = void 0;
exports.isErrorDetails = isErrorDetails;
const scheduler_1 = require("./scheduler");
var SqlRunnerFieldType;
(function (SqlRunnerFieldType) {
    SqlRunnerFieldType["TIME"] = "time";
    SqlRunnerFieldType["NUMBER"] = "number";
    SqlRunnerFieldType["STRING"] = "string";
    SqlRunnerFieldType["BOOLEAN"] = "boolean";
})(SqlRunnerFieldType || (exports.SqlRunnerFieldType = SqlRunnerFieldType = {}));
var SqlRunnerTimeGranularity;
(function (SqlRunnerTimeGranularity) {
    SqlRunnerTimeGranularity["NANOSECOND"] = "NANOSECOND";
    SqlRunnerTimeGranularity["MICROSECOND"] = "MICROSECOND";
    SqlRunnerTimeGranularity["MILLISECOND"] = "MILLISECOND";
    SqlRunnerTimeGranularity["SECOND"] = "SECOND";
    SqlRunnerTimeGranularity["MINUTE"] = "MINUTE";
    SqlRunnerTimeGranularity["HOUR"] = "HOUR";
    SqlRunnerTimeGranularity["DAY"] = "DAY";
    SqlRunnerTimeGranularity["WEEK"] = "WEEK";
    SqlRunnerTimeGranularity["MONTH"] = "MONTH";
    SqlRunnerTimeGranularity["QUARTER"] = "QUARTER";
    SqlRunnerTimeGranularity["YEAR"] = "YEAR";
})(SqlRunnerTimeGranularity || (SqlRunnerTimeGranularity = {}));
var SqlRunnerFilterBaseOperator;
(function (SqlRunnerFilterBaseOperator) {
    SqlRunnerFilterBaseOperator["IS"] = "IS";
    SqlRunnerFilterBaseOperator["IS_NOT"] = "IS_NOT";
})(SqlRunnerFilterBaseOperator || (exports.SqlRunnerFilterBaseOperator = SqlRunnerFilterBaseOperator = {}));
var SqlRunnerFilterRelativeTimeValue;
(function (SqlRunnerFilterRelativeTimeValue) {
    SqlRunnerFilterRelativeTimeValue["TODAY"] = "TODAY";
    SqlRunnerFilterRelativeTimeValue["YESTERDAY"] = "YESTERDAY";
    SqlRunnerFilterRelativeTimeValue["LAST_7_DAYS"] = "LAST_7_DAYS";
    SqlRunnerFilterRelativeTimeValue["LAST_30_DAYS"] = "LAST_30_DAYS";
})(SqlRunnerFilterRelativeTimeValue || (exports.SqlRunnerFilterRelativeTimeValue = SqlRunnerFilterRelativeTimeValue = {}));
function isErrorDetails(results) {
    return results.error !== undefined;
}
const isApiSqlRunnerJobSuccessResponse = (response) => response.status === scheduler_1.SchedulerJobStatus.COMPLETED;
exports.isApiSqlRunnerJobSuccessResponse = isApiSqlRunnerJobSuccessResponse;
const isApiSqlRunnerJobErrorResponse = (response) => response.status === scheduler_1.SchedulerJobStatus.ERROR;
exports.isApiSqlRunnerJobErrorResponse = isApiSqlRunnerJobErrorResponse;
const isApiSqlRunnerJobPivotQuerySuccessResponse = (response) => response.status === scheduler_1.SchedulerJobStatus.COMPLETED;
exports.isApiSqlRunnerJobPivotQuerySuccessResponse = isApiSqlRunnerJobPivotQuerySuccessResponse;
//# sourceMappingURL=sqlRunner.js.map