autoql-fe-utils 1.0.47 → 1.0.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -61,6 +61,12 @@ declare enum DisplayTypes {
61
61
  SCATTERPLOT = "scatterplot",
62
62
  COLUMN_LINE = "column_line"
63
63
  }
64
+ declare enum QueryErrorTypes {
65
+ UNAUTHENTICATED = "Unauthenticated",
66
+ PARSE_ERROR = "Parse error",
67
+ NO_QUERY_SUPPLIED = "No query supplied",
68
+ NO_QUERY_ID_SUPPLIED = "No query ID supplied"
69
+ }
64
70
 
65
71
  type ColumnTypeParams = {
66
72
  type: string;
@@ -1797,6 +1803,7 @@ declare const GENERAL_QUERY_ERROR = "Internal Service Error: Our system is exper
1797
1803
  declare const GENERAL_HTML_ERROR = "Internal Service Error: Our system is experiencing an unexpected error. We're aware of this issue and are working to fix it as soon as possible.";
1798
1804
  declare const UNAUTHENTICATED_ERROR = "Uh oh.. It looks like you don't have access to this resource. Please double check that all required authentication fields are correct.";
1799
1805
  declare const REQUEST_CANCELLED_ERROR = "Request cancelled";
1806
+ declare const QUERY_TIMEOUT_ERROR = "Database Timeout Error: Your query has exceeded the time limit. To receive a response, try narrowing your query down to a specific time range (e.g., today, this week, this month), or contact your database administrator.";
1800
1807
 
1801
1808
  declare const isAggSeed: (subject: any) => any;
1802
1809
  declare const getSampleQueryRegex: (suggestionValues: any) => RegExp;
@@ -2054,7 +2061,7 @@ declare const runQueryValidation: ({ text, domain, apiKey, token, cancelToken, }
2054
2061
  token?: string;
2055
2062
  cancelToken?: any;
2056
2063
  }) => Promise<axios.AxiosResponse<any, any>>;
2057
- declare const runQuery: ({ query, userSelection, userSelectionFinal, debug, test, domain, apiKey, token, source, filters, orders, tableFilters, pageSize, allowSuggestions, cancelToken, enableQueryValidation, skipQueryValidation, scope, }?: QueryParams) => Promise<TransformedAxiosResponse | axios.AxiosResponse<any, any>>;
2064
+ declare const runQuery: ({ query, userSelection, userSelectionFinal, debug, test, domain, apiKey, token, source, filters, orders, tableFilters, pageSize, allowSuggestions, cancelToken, enableQueryValidation, skipQueryValidation, scope, }?: QueryParams) => Promise<any>;
2058
2065
  declare const exportCSV: ({ queryId, domain, apiKey, token, csvProgressCallback, }?: {
2059
2066
  queryId?: string;
2060
2067
  domain?: string;
@@ -2218,4 +2225,4 @@ declare function color(): {
2218
2225
  on(): any;
2219
2226
  };
2220
2227
 
2221
- export { AGG_TYPES, AXIS_TITLE_BORDER_PADDING_LEFT, AXIS_TITLE_BORDER_PADDING_TOP, AXIS_TITLE_PADDING_BOTTOM, AXIS_TITLE_PADDING_TOP, AggType, AggTypeParams, AggTypes, Authentication, AutoQLJWT, AxiosResponse, BUTTON_PADDING, CHARTS_WITHOUT_AGGREGATED_DATA, CHARTS_WITHOUT_AXES, CHARTS_WITHOUT_LEGENDS, CHART_PADDING, CHART_TYPES, COLUMN_TYPES, COMPARE_TYPE, CONTINUOUS_TYPE, CUSTOM_TYPE, Column, Column$1 as ColumnObj, ColumnType, ColumnTypes, DATA_ALERT_CONDITION_TYPES, DATA_ALERT_ENABLED_STATUSES, DATA_ALERT_FREQUENCY_TYPE_OPTIONS, DATA_ALERT_OPERATORS, DATA_ALERT_STATUSES, DATE_ONLY_CHART_TYPES, DAYJS_PRECISION_FORMATS, DEFAULT_AGG_TYPE, DEFAULT_CHART_CONFIG, DEFAULT_CSS_PREFIX, DEFAULT_DATA_PAGE_SIZE, DEFAULT_EVALUATION_FREQUENCY, DEFAULT_LEGEND_PADDING_BOTTOM, DEFAULT_LEGEND_PADDING_LEFT, DEFAULT_LEGEND_PADDING_RIGHT, DEFAULT_LEGEND_PADDING_TOP, DEFAULT_MAX_LEGEND_WIDTH, DEFAULT_SOURCE, DISPLAY_TYPES, DOUBLE_AXIS_CHART_TYPES, DOW_STYLES, DataExplorerSubject, DataExplorerSubjectInterface, DataExplorerSuggestion, DataExplorerTypes, DataFormatting, DateUTC, DisplayTypes, EVALUATION_FREQUENCY_OPTIONS, EXISTS_TYPE, FilterLock, FrontendReq, GENERAL_ERROR, GENERAL_HTML_ERROR, GENERAL_QUERY_ERROR, GROUP_TERM_TYPE, HORIZONTAL_LEGEND_SPACING, LABEL_FONT_SIZE, LEGEND_BORDER_PADDING, LEGEND_BORDER_THICKNESS, LEGEND_SHAPE_SIZE, LEGEND_TOP_ADJUSTMENT, LOAD_MORE_DROPDOWN_PADDING_BOTTOM, MAX_DATA_PAGE_SIZE, MAX_LEGEND_LABELS, MAX_RECENT_SEARCHES, MAX_ROWS_FOR_PIE_CHART, MINIMUM_INNER_HEIGHT, MINIMUM_INNER_WIDTH, MINIMUM_TITLE_LENGTH, MIN_HISTOGRAM_SAMPLE, MONTH_DAY_SELECT_OPTIONS, MONTH_NAMES, NUMBER_TERM_TYPE, PATH_SMOOTHING, PERIODIC_TYPE, PROJECT_TYPE, ParsedInterpretation, ParsedInterpretationChunk, PrecisionTypes, QUERY_TERM_TYPE, QueryData, QueryResponse, REQUEST_CANCELLED_ERROR, RESET_PERIOD_OPTIONS, RawColumn, Rows, SCHEDULED_TYPE, SCHEDULE_FREQUENCY_OPTIONS, SCHEDULE_INTERVAL_OPTIONS, SEASON_NAMES, SampleQueryReplacementTypes, Scale, SubjectSuggestion, TABLE_TYPES, TITLE_FONT_SIZE, TableConfig, Theme, ThemeType, TransformedAxiosResponse, TransformedQueryResponse, UNAUTHENTICATED_ERROR, VERTICAL_LEGEND_SPACING, ValueLabel, ValueLabelSuggestion, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, addSubjectToRecentSearches, addUserToProjectRule, adjustBottomTitleToFit, adjustMinAndMaxForScaleRatio, adjustTitleToFit, adjustTopTitleToFit, adjustVerticalTitleToFit, aggregateData, aggregateOtherCategory, animateInputText, applyLegendTitleStyles, applyStylesForHiddenSeries, areAllColumnsHidden, areSomeColumnsHidden, authenticationDefault, autoQLConfigDefault, bezierCommand, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToNumber, countDecimals, createDataAlert, createNotificationChannel, createSVGPath, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dataStructureChanged, dateSortFn, dateStringSortFn, deepEqual, deleteDataAlert, deleteNotification, difference, dismissAllNotifications, dismissNotification, distributeListsEvenly, doesElementOverflowContainer, exportCSV, fetchAutocomplete, fetchDataAlerts, fetchDataExplorerAutocomplete, fetchDataExplorerSampleQueries, fetchDataExplorerSuggestions, fetchDataPreview, fetchExploreQueries, fetchFilters, fetchNotificationChannels, fetchNotificationCount, fetchNotificationData, fetchNotificationFeed, fetchRule, fetchSubjectList, fetchSubjectListV2, fetchSuggestions, fetchTopics, fetchTopicsForVL, fetchVLAutocomplete, formatChartLabel, formatDatePivotMonth, formatDatePivotYear, formatDateStringType, formatDateType, formatElement, formatEpochDate, formatFiltersForAPI, formatISODateWithPrecision, formatNextScheduleDate, formatNumberFilterValue, formatQueryColumns, formatResetDate, formatSortersForAPI, formatStringDate, formatStringDateWithPrecision, formatTableParams, functionsEqual, generateDatePivotData, generateFilterDrilldownResponse, generatePivotData, generatePivotTableData, getAggConfig, getAuthentication, getAutoQLConfig, getAxis, getAxisLabelsBbox, getBBoxFromRef, getBandScale, getBarRectObj, getBinData, getBinLinearScale, getBubbleObj, getChartColorVars, getChartScaleRatio, getColorScale, getColorScales, getColumnDateRanges, getColumnIndexConfig, getColumnNameForDateRange, getColumnRectObj, getColumnTypeAmounts, getCombinedFilters, getCurrencySymbol, getDataConfig, getDataFormatting, getDateColumnIndex, getDateRangeIntersection, getDateRangesFromInterpretation, getDatesFromRT, getDayJSObj, getDayLocalStartDate, getDayjsObjForStringType, getDefaultBucketConfig, getDefaultDisplayType, getDrilldownData, getDrilldownGroupby, getEpochFromDate, getFilterDrilldown, getFilterPrecision, getFirstChartDisplayType, getGroupBys, getGroupBysFromPivotTable, getGroupBysFromTable, getGroupableColumns, getHeatmapRectObj, getHiddenColumns, getHistogramColumnObj, getHistogramScale, getInitialBucketSize, getInitialSelections, getKey, getKeyByValue, getLabelsBBox, getLegendLabels, getLegendLabelsForGroupbyQuery, getLegendLabelsForMultiSeries, getLegendLabelsForSingleColumn, getLegendLocation, getLegendScale, getLegendTitleFromColumns, getLineVertexObj, getLinearAxisTitle, getLinearScale, getLinearScales, getMaxLegendHeight, getMaxLegendSectionWidth, getMaxTickLabelWidth, getMaxValueFromKeyValueObj, getMinAndMaxValues, getMinValueFromKeyValueObj, getMonthLocalStartDate, getMultiSeriesColumnIndex, getNiceDateTickValues, getNiceTickValues, getNumberAxisUnits, getNumberColumnIndices, getNumberFormatConfig, getNumberOfGroupables, getNumberOfSeries, getObjSize, getOpacityScale, getPadding, getPieChartData, getPivotColumnIndexConfig, getPlainTextList, getPointObj, getPotentialDisplayTypes, getPrecisionForDayJS, getQueryFn, getQueryParams, getQueryRequestParams, getQueryValidationQueryText, getRadiusScale, getRangeForAxis, getRecentSearchesFromLocalStorage, getRecentSelectionID, getRowNumberListForPopover, getSVGBase64, getSampleQueryRegex, getSampleQueryText, getScheduleFrequencyObject, getStartAndEndDateFromDateStrs, getStringColumnIndices, getStringFromSource, getSuggestionLists, getSupportedConditionTypes, getSupportedDisplayTypes, getThemeType, getThemeValue, getTickSizeFromNumTicks, getTickValues, getTimeFrameTextFromChunk, getTimeObjFromTimeStamp, getTimeRangeFromDateArray, getTimeRangeFromRT, getTimeScale, getTitleCase, getTooltipContent, getTotalBottomPadding, getTotalHorizontalPadding, getTotalLeftPadding, getTotalPossibleLegendSections, getTotalRightPadding, getTotalTopPadding, getTotalVerticalPadding, getUniqueYearsForColumn, getUnitSymbol, getUnitsForColumn, getVisibleColumns, getWeekLocalStartDate, getWeekdayFromTimeStamp, getlegendLabelSections, handleTooltipBoundaryCollision, hasColumnIndex, hasData, hasDateColumn, hasMoreData, hasNumberColumn, hasStringColumn, initializeAlert, initializeQueryValidationOptions, invertArray, isAggSeed, isAggregation, isChartType, isColumnDateType, isColumnIndexConfigValid, isColumnIndexValid, isColumnIndicesValid, isColumnNumberType, isColumnStringType, isDataLimited, isDisplayTypeValid, isDrilldown, isError500Type, isExpressionQueryValid, isISODate, isInitialSelectionValid, isListQuery, isNumber, isObject, isSingleValueResponse, isTableType, color as legendColor, lineCommand, makeEmptyArray, markNotificationAsUnread, mergeBboxes, mergeBoundingClientRects, mergeSources, nameValueObject, numberIndicesArraysOverlap, onTableCellClick, onlySeriesVisibilityChanged, onlyUnique, parseJwt, potentiallySupportsDatePivot, potentiallySupportsPivot, removeElementAtIndex, removeFromDOM, removeHiddenLegendLabels, removeNotificationChannel, removeUserFromProjectRule, reportProblem, resetDateIsFuture, resetNotificationCount, rotateArray, roundDownToNearestMultiple, roundToNearestLog10, roundToNearestMultiple, roundUpToNearestMultiple, runDrilldown, runQuery, runQueryNewPage, runQueryOnly, runQueryValidation, scaleZero, sendDataToChannel, sendSuggestion, sendTrainingData, setCaretPosition, setColumnVisibility, setFilterFunction, setFilters, setHeaderFilterPlaceholder, setRecentSearchesInLocalStorage, setSorterFunction, setTickSize, setTickValues, shouldDisableChartScale, shouldLabelsRotate, shouldPlotMultiSeries, showEvaluationFrequencySetting, sortDataByDate, supportsDatePivotTable, supportsPieChart, supportsRegularPivotTable, svgPathD, svgToPng, tableFilterParams, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, transformLabels, transformQueryResponse, transformQueryResponseColumns, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression };
2228
+ export { AGG_TYPES, AXIS_TITLE_BORDER_PADDING_LEFT, AXIS_TITLE_BORDER_PADDING_TOP, AXIS_TITLE_PADDING_BOTTOM, AXIS_TITLE_PADDING_TOP, AggType, AggTypeParams, AggTypes, Authentication, AutoQLJWT, AxiosResponse, BUTTON_PADDING, CHARTS_WITHOUT_AGGREGATED_DATA, CHARTS_WITHOUT_AXES, CHARTS_WITHOUT_LEGENDS, CHART_PADDING, CHART_TYPES, COLUMN_TYPES, COMPARE_TYPE, CONTINUOUS_TYPE, CUSTOM_TYPE, Column, Column$1 as ColumnObj, ColumnType, ColumnTypes, DATA_ALERT_CONDITION_TYPES, DATA_ALERT_ENABLED_STATUSES, DATA_ALERT_FREQUENCY_TYPE_OPTIONS, DATA_ALERT_OPERATORS, DATA_ALERT_STATUSES, DATE_ONLY_CHART_TYPES, DAYJS_PRECISION_FORMATS, DEFAULT_AGG_TYPE, DEFAULT_CHART_CONFIG, DEFAULT_CSS_PREFIX, DEFAULT_DATA_PAGE_SIZE, DEFAULT_EVALUATION_FREQUENCY, DEFAULT_LEGEND_PADDING_BOTTOM, DEFAULT_LEGEND_PADDING_LEFT, DEFAULT_LEGEND_PADDING_RIGHT, DEFAULT_LEGEND_PADDING_TOP, DEFAULT_MAX_LEGEND_WIDTH, DEFAULT_SOURCE, DISPLAY_TYPES, DOUBLE_AXIS_CHART_TYPES, DOW_STYLES, DataExplorerSubject, DataExplorerSubjectInterface, DataExplorerSuggestion, DataExplorerTypes, DataFormatting, DateUTC, DisplayTypes, EVALUATION_FREQUENCY_OPTIONS, EXISTS_TYPE, FilterLock, FrontendReq, GENERAL_ERROR, GENERAL_HTML_ERROR, GENERAL_QUERY_ERROR, GROUP_TERM_TYPE, HORIZONTAL_LEGEND_SPACING, LABEL_FONT_SIZE, LEGEND_BORDER_PADDING, LEGEND_BORDER_THICKNESS, LEGEND_SHAPE_SIZE, LEGEND_TOP_ADJUSTMENT, LOAD_MORE_DROPDOWN_PADDING_BOTTOM, MAX_DATA_PAGE_SIZE, MAX_LEGEND_LABELS, MAX_RECENT_SEARCHES, MAX_ROWS_FOR_PIE_CHART, MINIMUM_INNER_HEIGHT, MINIMUM_INNER_WIDTH, MINIMUM_TITLE_LENGTH, MIN_HISTOGRAM_SAMPLE, MONTH_DAY_SELECT_OPTIONS, MONTH_NAMES, NUMBER_TERM_TYPE, PATH_SMOOTHING, PERIODIC_TYPE, PROJECT_TYPE, ParsedInterpretation, ParsedInterpretationChunk, PrecisionTypes, QUERY_TERM_TYPE, QUERY_TIMEOUT_ERROR, QueryData, QueryErrorTypes, QueryResponse, REQUEST_CANCELLED_ERROR, RESET_PERIOD_OPTIONS, RawColumn, Rows, SCHEDULED_TYPE, SCHEDULE_FREQUENCY_OPTIONS, SCHEDULE_INTERVAL_OPTIONS, SEASON_NAMES, SampleQueryReplacementTypes, Scale, SubjectSuggestion, TABLE_TYPES, TITLE_FONT_SIZE, TableConfig, Theme, ThemeType, TransformedAxiosResponse, TransformedQueryResponse, UNAUTHENTICATED_ERROR, VERTICAL_LEGEND_SPACING, ValueLabel, ValueLabelSuggestion, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, addSubjectToRecentSearches, addUserToProjectRule, adjustBottomTitleToFit, adjustMinAndMaxForScaleRatio, adjustTitleToFit, adjustTopTitleToFit, adjustVerticalTitleToFit, aggregateData, aggregateOtherCategory, animateInputText, applyLegendTitleStyles, applyStylesForHiddenSeries, areAllColumnsHidden, areSomeColumnsHidden, authenticationDefault, autoQLConfigDefault, bezierCommand, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToNumber, countDecimals, createDataAlert, createNotificationChannel, createSVGPath, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dataStructureChanged, dateSortFn, dateStringSortFn, deepEqual, deleteDataAlert, deleteNotification, difference, dismissAllNotifications, dismissNotification, distributeListsEvenly, doesElementOverflowContainer, exportCSV, fetchAutocomplete, fetchDataAlerts, fetchDataExplorerAutocomplete, fetchDataExplorerSampleQueries, fetchDataExplorerSuggestions, fetchDataPreview, fetchExploreQueries, fetchFilters, fetchNotificationChannels, fetchNotificationCount, fetchNotificationData, fetchNotificationFeed, fetchRule, fetchSubjectList, fetchSubjectListV2, fetchSuggestions, fetchTopics, fetchTopicsForVL, fetchVLAutocomplete, formatChartLabel, formatDatePivotMonth, formatDatePivotYear, formatDateStringType, formatDateType, formatElement, formatEpochDate, formatFiltersForAPI, formatISODateWithPrecision, formatNextScheduleDate, formatNumberFilterValue, formatQueryColumns, formatResetDate, formatSortersForAPI, formatStringDate, formatStringDateWithPrecision, formatTableParams, functionsEqual, generateDatePivotData, generateFilterDrilldownResponse, generatePivotData, generatePivotTableData, getAggConfig, getAuthentication, getAutoQLConfig, getAxis, getAxisLabelsBbox, getBBoxFromRef, getBandScale, getBarRectObj, getBinData, getBinLinearScale, getBubbleObj, getChartColorVars, getChartScaleRatio, getColorScale, getColorScales, getColumnDateRanges, getColumnIndexConfig, getColumnNameForDateRange, getColumnRectObj, getColumnTypeAmounts, getCombinedFilters, getCurrencySymbol, getDataConfig, getDataFormatting, getDateColumnIndex, getDateRangeIntersection, getDateRangesFromInterpretation, getDatesFromRT, getDayJSObj, getDayLocalStartDate, getDayjsObjForStringType, getDefaultBucketConfig, getDefaultDisplayType, getDrilldownData, getDrilldownGroupby, getEpochFromDate, getFilterDrilldown, getFilterPrecision, getFirstChartDisplayType, getGroupBys, getGroupBysFromPivotTable, getGroupBysFromTable, getGroupableColumns, getHeatmapRectObj, getHiddenColumns, getHistogramColumnObj, getHistogramScale, getInitialBucketSize, getInitialSelections, getKey, getKeyByValue, getLabelsBBox, getLegendLabels, getLegendLabelsForGroupbyQuery, getLegendLabelsForMultiSeries, getLegendLabelsForSingleColumn, getLegendLocation, getLegendScale, getLegendTitleFromColumns, getLineVertexObj, getLinearAxisTitle, getLinearScale, getLinearScales, getMaxLegendHeight, getMaxLegendSectionWidth, getMaxTickLabelWidth, getMaxValueFromKeyValueObj, getMinAndMaxValues, getMinValueFromKeyValueObj, getMonthLocalStartDate, getMultiSeriesColumnIndex, getNiceDateTickValues, getNiceTickValues, getNumberAxisUnits, getNumberColumnIndices, getNumberFormatConfig, getNumberOfGroupables, getNumberOfSeries, getObjSize, getOpacityScale, getPadding, getPieChartData, getPivotColumnIndexConfig, getPlainTextList, getPointObj, getPotentialDisplayTypes, getPrecisionForDayJS, getQueryFn, getQueryParams, getQueryRequestParams, getQueryValidationQueryText, getRadiusScale, getRangeForAxis, getRecentSearchesFromLocalStorage, getRecentSelectionID, getRowNumberListForPopover, getSVGBase64, getSampleQueryRegex, getSampleQueryText, getScheduleFrequencyObject, getStartAndEndDateFromDateStrs, getStringColumnIndices, getStringFromSource, getSuggestionLists, getSupportedConditionTypes, getSupportedDisplayTypes, getThemeType, getThemeValue, getTickSizeFromNumTicks, getTickValues, getTimeFrameTextFromChunk, getTimeObjFromTimeStamp, getTimeRangeFromDateArray, getTimeRangeFromRT, getTimeScale, getTitleCase, getTooltipContent, getTotalBottomPadding, getTotalHorizontalPadding, getTotalLeftPadding, getTotalPossibleLegendSections, getTotalRightPadding, getTotalTopPadding, getTotalVerticalPadding, getUniqueYearsForColumn, getUnitSymbol, getUnitsForColumn, getVisibleColumns, getWeekLocalStartDate, getWeekdayFromTimeStamp, getlegendLabelSections, handleTooltipBoundaryCollision, hasColumnIndex, hasData, hasDateColumn, hasMoreData, hasNumberColumn, hasStringColumn, initializeAlert, initializeQueryValidationOptions, invertArray, isAggSeed, isAggregation, isChartType, isColumnDateType, isColumnIndexConfigValid, isColumnIndexValid, isColumnIndicesValid, isColumnNumberType, isColumnStringType, isDataLimited, isDisplayTypeValid, isDrilldown, isError500Type, isExpressionQueryValid, isISODate, isInitialSelectionValid, isListQuery, isNumber, isObject, isSingleValueResponse, isTableType, color as legendColor, lineCommand, makeEmptyArray, markNotificationAsUnread, mergeBboxes, mergeBoundingClientRects, mergeSources, nameValueObject, numberIndicesArraysOverlap, onTableCellClick, onlySeriesVisibilityChanged, onlyUnique, parseJwt, potentiallySupportsDatePivot, potentiallySupportsPivot, removeElementAtIndex, removeFromDOM, removeHiddenLegendLabels, removeNotificationChannel, removeUserFromProjectRule, reportProblem, resetDateIsFuture, resetNotificationCount, rotateArray, roundDownToNearestMultiple, roundToNearestLog10, roundToNearestMultiple, roundUpToNearestMultiple, runDrilldown, runQuery, runQueryNewPage, runQueryOnly, runQueryValidation, scaleZero, sendDataToChannel, sendSuggestion, sendTrainingData, setCaretPosition, setColumnVisibility, setFilterFunction, setFilters, setHeaderFilterPlaceholder, setRecentSearchesInLocalStorage, setSorterFunction, setTickSize, setTickValues, shouldDisableChartScale, shouldLabelsRotate, shouldPlotMultiSeries, showEvaluationFrequencySetting, sortDataByDate, supportsDatePivotTable, supportsPieChart, supportsRegularPivotTable, svgPathD, svgToPng, tableFilterParams, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, transformLabels, transformQueryResponse, transformQueryResponseColumns, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression };
@@ -14140,6 +14140,13 @@
14140
14140
  DisplayTypes2["COLUMN_LINE"] = "column_line";
14141
14141
  return DisplayTypes2;
14142
14142
  })(DisplayTypes || {});
14143
+ var QueryErrorTypes = /* @__PURE__ */ ((QueryErrorTypes2) => {
14144
+ QueryErrorTypes2["UNAUTHENTICATED"] = "Unauthenticated";
14145
+ QueryErrorTypes2["PARSE_ERROR"] = "Parse error";
14146
+ QueryErrorTypes2["NO_QUERY_SUPPLIED"] = "No query supplied";
14147
+ QueryErrorTypes2["NO_QUERY_ID_SUPPLIED"] = "No query ID supplied";
14148
+ return QueryErrorTypes2;
14149
+ })(QueryErrorTypes || {});
14143
14150
 
14144
14151
  // src/Classes/ColumnType.ts
14145
14152
  var ColumnType = class {
@@ -18674,6 +18681,7 @@
18674
18681
  if (i === maxElements) {
18675
18682
  dataWithOther[maxElements] = row;
18676
18683
  dataWithOther[maxElements][columnIndexConfig.stringColumnIndex] = "Other";
18684
+ dataWithOther[maxElements].isOther = true;
18677
18685
  } else if (i > maxElements && ((_a = dataWithOther[maxElements]) == null ? void 0 : _a[columnIndexConfig.numberColumnIndex])) {
18678
18686
  let value = parseFloat((_b = sortedData[i]) == null ? void 0 : _b[columnIndexConfig.numberColumnIndex]);
18679
18687
  if (isNaN(value)) {
@@ -18730,7 +18738,7 @@
18730
18738
  prevRow = currentRow;
18731
18739
  return;
18732
18740
  });
18733
- if (maxElements) {
18741
+ if (maxElements && aggregatedData.length > maxElements) {
18734
18742
  return aggregateOtherCategory(aggregatedData, columnIndexConfig, maxElements);
18735
18743
  }
18736
18744
  return aggregatedData;
@@ -24297,6 +24305,7 @@
24297
24305
  var GENERAL_HTML_ERROR = "Internal Service Error: Our system is experiencing an unexpected error. We're aware of this issue and are working to fix it as soon as possible.";
24298
24306
  var UNAUTHENTICATED_ERROR = "Uh oh.. It looks like you don't have access to this resource. Please double check that all required authentication fields are correct.";
24299
24307
  var REQUEST_CANCELLED_ERROR = "Request cancelled";
24308
+ var QUERY_TIMEOUT_ERROR = "Database Timeout Error: Your query has exceeded the time limit. To receive a response, try narrowing your query down to a specific time range (e.g., today, this week, this month), or contact your database administrator.";
24300
24309
 
24301
24310
  // node_modules/axios/lib/helpers/bind.js
24302
24311
  function bind(fn, thisArg) {
@@ -27329,11 +27338,32 @@
27329
27338
  };
27330
27339
 
27331
27340
  // src/Api/queryService.ts
27341
+ var createErrorMessage = (message) => {
27342
+ return { data: { message } };
27343
+ };
27332
27344
  var formatErrorResponse = (error) => {
27345
+ var _a, _b, _c;
27333
27346
  if ((error == null ? void 0 : error.message) === REQUEST_CANCELLED_ERROR) {
27334
- return Promise.reject({
27335
- data: { message: REQUEST_CANCELLED_ERROR }
27336
- });
27347
+ return Promise.reject(createErrorMessage(REQUEST_CANCELLED_ERROR));
27348
+ }
27349
+ if ((error == null ? void 0 : error.message) === "Parse error" /* PARSE_ERROR */) {
27350
+ return Promise.reject(createErrorMessage(GENERAL_QUERY_ERROR));
27351
+ }
27352
+ if ((_b = (_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) {
27353
+ return Promise.reject(error == null ? void 0 : error.response);
27354
+ }
27355
+ const errorStatus = (_c = error == null ? void 0 : error.response) == null ? void 0 : _c.status;
27356
+ if (errorStatus) {
27357
+ switch (errorStatus) {
27358
+ case 401: {
27359
+ return Promise.reject(createErrorMessage(UNAUTHENTICATED_ERROR));
27360
+ }
27361
+ case 504: {
27362
+ return Promise.reject(createErrorMessage(QUERY_TIMEOUT_ERROR));
27363
+ }
27364
+ default: {
27365
+ }
27366
+ }
27337
27367
  }
27338
27368
  return Promise.reject(error == null ? void 0 : error.response);
27339
27369
  };
@@ -27381,10 +27411,10 @@
27381
27411
  cancelToken
27382
27412
  } = {}) => {
27383
27413
  if (!query) {
27384
- return Promise.reject(new Error("No query supplied"));
27414
+ return Promise.reject(new Error("No query supplied" /* NO_QUERY_SUPPLIED */));
27385
27415
  }
27386
27416
  if (!domain || !token || !apiKey) {
27387
- return Promise.reject(new Error("Unauthenticated"));
27417
+ return Promise.reject(new Error("Unauthenticated" /* UNAUTHENTICATED */));
27388
27418
  }
27389
27419
  let relatedQueriesUrl = `${domain}/autoql/api/v1/query/related-queries?key=${apiKey}&search=${encodeURIComponent(
27390
27420
  query
@@ -27410,10 +27440,10 @@
27410
27440
  } = {}) => {
27411
27441
  const url2 = `${domain}/autoql/api/v1/query/${queryId}/page?key=${apiKey}&page=${page}`;
27412
27442
  if (!queryId) {
27413
- return Promise.reject({ error: "No query ID supplied" });
27443
+ return Promise.reject({ error: "No query ID supplied" /* NO_QUERY_ID_SUPPLIED */ });
27414
27444
  }
27415
27445
  if (!apiKey || !domain || !token) {
27416
- return Promise.reject({ error: "Unauthenticated" });
27446
+ return Promise.reject({ error: "Unauthenticated" /* UNAUTHENTICATED */ });
27417
27447
  }
27418
27448
  const data = {
27419
27449
  date_format: "ISO8601"
@@ -27427,27 +27457,13 @@
27427
27457
  return axios_default.post(url2, data, config).then((response) => {
27428
27458
  var _a, _b;
27429
27459
  if (response.data && typeof response.data === "string") {
27430
- throw new Error("Parse error");
27460
+ throw new Error("Parse error" /* PARSE_ERROR */);
27431
27461
  }
27432
27462
  if ((_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) {
27433
27463
  response.data.data.page = page;
27434
27464
  }
27435
27465
  return Promise.resolve((_b = response == null ? void 0 : response.data) == null ? void 0 : _b.data);
27436
- }).catch((error) => {
27437
- var _a;
27438
- if ((error == null ? void 0 : error.message) === REQUEST_CANCELLED_ERROR) {
27439
- return Promise.reject({
27440
- data: { message: REQUEST_CANCELLED_ERROR }
27441
- });
27442
- }
27443
- if (error.message === "Parse error") {
27444
- return Promise.reject({ error: "Parse error" });
27445
- }
27446
- if (!((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data)) {
27447
- return Promise.reject({ error: "Unauthenticated" });
27448
- }
27449
- return Promise.reject(error == null ? void 0 : error.response);
27450
- });
27466
+ }).catch((error) => formatErrorResponse(error));
27451
27467
  };
27452
27468
  var runQueryOnly = ({
27453
27469
  query,
@@ -27488,11 +27504,11 @@
27488
27504
  };
27489
27505
  if (!query || !query.trim()) {
27490
27506
  console.error("No query supplied in request");
27491
- return Promise.reject({ error: "No query supplied" });
27507
+ return Promise.reject({ error: "No query supplied" /* NO_QUERY_SUPPLIED */ });
27492
27508
  }
27493
27509
  if (!apiKey || !domain || !token) {
27494
27510
  console.error("authentication invalid for request");
27495
- return Promise.reject({ error: "Unauthenticated" });
27511
+ return Promise.reject({ error: "Unauthenticated" /* UNAUTHENTICATED */ });
27496
27512
  }
27497
27513
  const config = {
27498
27514
  headers: {
@@ -27503,29 +27519,19 @@
27503
27519
  return axios_default.post(url2, data, config).then((response) => {
27504
27520
  var _a;
27505
27521
  if (!((_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data)) {
27506
- throw new Error("Parse error");
27522
+ throw new Error("Parse error" /* PARSE_ERROR */);
27507
27523
  }
27508
27524
  return Promise.resolve(transformQueryResponse(response));
27509
27525
  }).catch((error) => {
27510
- var _a, _b, _c, _d, _e, _f;
27511
- if ((error == null ? void 0 : error.message) === REQUEST_CANCELLED_ERROR) {
27512
- return Promise.reject({ data: { message: REQUEST_CANCELLED_ERROR } });
27513
- }
27514
- console.error(error);
27515
- if ((error == null ? void 0 : error.message) === "Parse error") {
27516
- return Promise.reject({ error: "Parse error" });
27517
- }
27518
- if (!((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data)) {
27519
- return Promise.reject({ error: "Unauthenticated" });
27520
- }
27521
- const referenceId = (_c = (_b = error == null ? void 0 : error.response) == null ? void 0 : _b.data) == null ? void 0 : _c.reference_id;
27526
+ var _a, _b, _c, _d, _e;
27527
+ const referenceId = (_b = (_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.reference_id;
27522
27528
  const isSubquery = (tableFilters == null ? void 0 : tableFilters.length) || (orders == null ? void 0 : orders.length);
27523
27529
  const needsSuggestions = referenceId === "1.1.430" || referenceId === "1.1.431" || isError500Type(referenceId);
27524
27530
  if (needsSuggestions && allowSuggestions && !isSubquery) {
27525
- const queryId = (_f = (_e = (_d = error == null ? void 0 : error.response) == null ? void 0 : _d.data) == null ? void 0 : _e.data) == null ? void 0 : _f.query_id;
27531
+ const queryId = (_e = (_d = (_c = error == null ? void 0 : error.response) == null ? void 0 : _c.data) == null ? void 0 : _d.data) == null ? void 0 : _e.query_id;
27526
27532
  return fetchSuggestions({ query, queryId, domain, apiKey, token, cancelToken });
27527
27533
  }
27528
- return Promise.reject(error == null ? void 0 : error.response);
27534
+ return formatErrorResponse(error);
27529
27535
  });
27530
27536
  };
27531
27537
  var runQueryValidation = ({
@@ -27539,7 +27545,7 @@
27539
27545
  return Promise.reject(new Error("No text supplied"));
27540
27546
  }
27541
27547
  if (!token || !domain || !apiKey) {
27542
- return Promise.reject(new Error("Unauthenticated"));
27548
+ return Promise.reject(new Error("Unauthenticated" /* UNAUTHENTICATED */));
27543
27549
  }
27544
27550
  const url2 = `${domain}/autoql/api/v1/query/validate?text=${encodeURIComponent(text)}&key=${apiKey}`;
27545
27551
  const config = {
@@ -27548,12 +27554,7 @@
27548
27554
  },
27549
27555
  cancelToken
27550
27556
  };
27551
- return axios_default.get(url2, config).then((response) => Promise.resolve(response)).catch((error) => {
27552
- if ((error == null ? void 0 : error.message) === REQUEST_CANCELLED_ERROR) {
27553
- return Promise.reject(error);
27554
- }
27555
- return Promise.reject(error == null ? void 0 : error.response);
27556
- });
27557
+ return axios_default.get(url2, config).then((response) => Promise.resolve(response)).catch((error) => formatErrorResponse(error));
27557
27558
  };
27558
27559
  var runQuery = ({
27559
27560
  query,
@@ -27603,7 +27604,7 @@
27603
27604
  allowSuggestions,
27604
27605
  cancelToken,
27605
27606
  scope
27606
- });
27607
+ }).catch((error) => error);
27607
27608
  }).catch((error) => {
27608
27609
  if ((error == null ? void 0 : error.message) === REQUEST_CANCELLED_ERROR) {
27609
27610
  return Promise.reject({
@@ -27641,7 +27642,7 @@
27641
27642
  csvProgressCallback
27642
27643
  } = {}) => {
27643
27644
  if (!token || !domain || !apiKey) {
27644
- return Promise.reject(new Error("Unauthenticated"));
27645
+ return Promise.reject(new Error("Unauthenticated" /* UNAUTHENTICATED */));
27645
27646
  }
27646
27647
  const url2 = `${domain}/autoql/api/v1/query/${queryId}/export?key=${apiKey}`;
27647
27648
  const config = {
@@ -27677,8 +27678,8 @@
27677
27678
  return Promise.reject(new Error("Query ID not supplied"));
27678
27679
  }
27679
27680
  if (!token || !domain || !apiKey) {
27680
- console.error("Unauthenticated");
27681
- return Promise.reject(new Error("Unauthenticated"));
27681
+ console.error("Unauthenticated" /* UNAUTHENTICATED */);
27682
+ return Promise.reject(new Error("Unauthenticated" /* UNAUTHENTICATED */));
27682
27683
  }
27683
27684
  const requestData = {
27684
27685
  translation: debug ? "include" : "exclude",
@@ -27705,7 +27706,7 @@
27705
27706
  apiKey
27706
27707
  } = {}) => {
27707
27708
  if (!domain || !apiKey || !token) {
27708
- return Promise.reject(new Error("Unauthenticated"));
27709
+ return Promise.reject(new Error("Unauthenticated" /* UNAUTHENTICATED */));
27709
27710
  }
27710
27711
  const url2 = `${domain}/autoql/api/v1/topic-set?key=${apiKey}`;
27711
27712
  const config = {
@@ -27726,10 +27727,10 @@
27726
27727
  } = {}) => {
27727
27728
  var _a;
27728
27729
  if (!suggestion || !((_a = suggestion.trim) == null ? void 0 : _a.call(suggestion))) {
27729
- return Promise.reject(new Error("No query supplied"));
27730
+ return Promise.reject(new Error("No query supplied" /* NO_QUERY_SUPPLIED */));
27730
27731
  }
27731
27732
  if (!domain || !apiKey || !token) {
27732
- return Promise.reject(new Error("Unauthenticated"));
27733
+ return Promise.reject(new Error("Unauthenticated" /* UNAUTHENTICATED */));
27733
27734
  }
27734
27735
  const url2 = `${domain}/autoql/api/v1/query/autocomplete?text=${encodeURIComponent(suggestion)}&key=${apiKey}`;
27735
27736
  const config = {
@@ -27752,7 +27753,7 @@
27752
27753
  } = {}) => {
27753
27754
  var _a;
27754
27755
  if (!domain || !apiKey || !token) {
27755
- return Promise.reject(new Error("Unauthenticated"));
27756
+ return Promise.reject(new Error("Unauthenticated" /* UNAUTHENTICATED */));
27756
27757
  }
27757
27758
  const text = (_a = suggestion == null ? void 0 : suggestion.trim) == null ? void 0 : _a.call(suggestion);
27758
27759
  if (!text) {
@@ -27783,7 +27784,7 @@
27783
27784
  domain
27784
27785
  } = {}) => {
27785
27786
  if (!domain || !apiKey || !token) {
27786
- return Promise.reject(new Error("Unauthenticated"));
27787
+ return Promise.reject(new Error("Unauthenticated" /* UNAUTHENTICATED */));
27787
27788
  }
27788
27789
  const url2 = `${domain}/autoql/api/v1/query/filter-locking?key=${apiKey}`;
27789
27790
  const config = {
@@ -27803,7 +27804,7 @@
27803
27804
  filters
27804
27805
  } = {}) => {
27805
27806
  if (!domain || !apiKey || !token) {
27806
- return Promise.reject(new Error("Unauthenticated"));
27807
+ return Promise.reject(new Error("Unauthenticated" /* UNAUTHENTICATED */));
27807
27808
  }
27808
27809
  if (!(filters == null ? void 0 : filters.length)) {
27809
27810
  return Promise.reject(new Error("No filters provided"));
@@ -27827,7 +27828,7 @@
27827
27828
  filter: filter3
27828
27829
  } = {}) => {
27829
27830
  if (!domain || !apiKey || !token) {
27830
- return Promise.reject(new Error("Unauthenticated"));
27831
+ return Promise.reject(new Error("Unauthenticated" /* UNAUTHENTICATED */));
27831
27832
  }
27832
27833
  const url2 = `${domain}/autoql/api/v1/query/filter-locking/${filter3.id}?key=${apiKey}`;
27833
27834
  const config = {
@@ -27849,7 +27850,7 @@
27849
27850
  const url2 = `${domain}/autoql/api/v1/query/column-visibility?key=${apiKey}`;
27850
27851
  const data = { columns };
27851
27852
  if (!token || !domain || !apiKey) {
27852
- return Promise.reject(new Error("Unauthenticated"));
27853
+ return Promise.reject(new Error("Unauthenticated" /* UNAUTHENTICATED */));
27853
27854
  }
27854
27855
  const config = {
27855
27856
  headers: {
@@ -27871,7 +27872,7 @@
27871
27872
  const url2 = `${domain}/autoql/api/v1/query/${queryId}/suggestions?key=${apiKey}`;
27872
27873
  const data = { suggestion };
27873
27874
  if (!token || !domain || !apiKey) {
27874
- return Promise.reject(new Error("Unauthenticated"));
27875
+ return Promise.reject(new Error("Unauthenticated" /* UNAUTHENTICATED */));
27875
27876
  }
27876
27877
  const config = {
27877
27878
  headers: {
@@ -27897,7 +27898,7 @@
27897
27898
  commaSeparatedKeywords
27898
27899
  )}&page_size=${pageSize}&page=${pageNumber}&enable_history=false`;
27899
27900
  if (!token || !domain || !apiKey) {
27900
- return Promise.reject(new Error("Unauthenticated"));
27901
+ return Promise.reject(new Error("Unauthenticated" /* UNAUTHENTICATED */));
27901
27902
  }
27902
27903
  const config = {
27903
27904
  headers: {
@@ -27939,10 +27940,10 @@
27939
27940
  token
27940
27941
  } = {}) => {
27941
27942
  if (!queryId) {
27942
- return Promise.reject(new Error("No query ID supplied"));
27943
+ return Promise.reject(new Error("No query ID supplied" /* NO_QUERY_ID_SUPPLIED */));
27943
27944
  }
27944
27945
  if (!token || !domain || !apiKey) {
27945
- return Promise.reject(new Error("Unauthenticated"));
27946
+ return Promise.reject(new Error("Unauthenticated" /* UNAUTHENTICATED */));
27946
27947
  }
27947
27948
  const url2 = `${domain}/autoql/api/v1/query/${queryId}?key=${apiKey}`;
27948
27949
  const config = {