@lightdash/common 0.1475.0 → 0.1477.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -42,6 +42,7 @@ export declare enum QueryExecutionContext {
|
|
42
42
|
DASHBOARD = "dashboardView",
|
43
43
|
AUTOREFRESHED_DASHBOARD = "autorefreshedDashboard",
|
44
44
|
EXPLORE = "exploreView",
|
45
|
+
FILTER_AUTOCOMPLETE = "filterAutocomplete",
|
45
46
|
CHART = "chartView",
|
46
47
|
SQL_CHART = "sqlChartView",
|
47
48
|
SQL_RUNNER = "sqlRunner",
|
package/dist/types/analytics.js
CHANGED
@@ -6,6 +6,7 @@ var QueryExecutionContext;
|
|
6
6
|
QueryExecutionContext["DASHBOARD"] = "dashboardView";
|
7
7
|
QueryExecutionContext["AUTOREFRESHED_DASHBOARD"] = "autorefreshedDashboard";
|
8
8
|
QueryExecutionContext["EXPLORE"] = "exploreView";
|
9
|
+
QueryExecutionContext["FILTER_AUTOCOMPLETE"] = "filterAutocomplete";
|
9
10
|
QueryExecutionContext["CHART"] = "chartView";
|
10
11
|
QueryExecutionContext["SQL_CHART"] = "sqlChartView";
|
11
12
|
QueryExecutionContext["SQL_RUNNER"] = "sqlRunner";
|
package/dist/types/errors.d.ts
CHANGED
@@ -129,5 +129,10 @@ export declare class UnexpectedGoogleSheetsError extends LightdashError {
|
|
129
129
|
[key: string]: AnyType;
|
130
130
|
});
|
131
131
|
}
|
132
|
+
export declare class GoogleSheetsTransientError extends LightdashError {
|
133
|
+
constructor(message?: string, data?: {
|
134
|
+
[key: string]: AnyType;
|
135
|
+
});
|
136
|
+
}
|
132
137
|
export declare const getErrorMessage: (e: unknown) => string;
|
133
138
|
export {};
|
package/dist/types/errors.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.getErrorMessage = exports.UnexpectedGoogleSheetsError = exports.SlackInstallationNotFoundError = exports.KnexPaginationError = exports.NotEnoughResults = exports.MissingConfigError = exports.AlreadyExistsError = exports.AlreadyProcessingError = exports.SmptError = exports.WarehouseQueryError = exports.WarehouseConnectionError = exports.InvalidUser = exports.NotFoundError = exports.DbtError = exports.FieldReferenceError = exports.CompileError = exports.ParseError = exports.UnexpectedDatabaseError = exports.UnexpectedGitError = exports.UnexpectedIndexError = exports.UnexpectedServerError = exports.MissingWarehouseCredentialsError = exports.MissingCatalogEntryError = exports.NonCompiledModelError = exports.ParameterError = exports.ExpiredError = exports.NotExistsError = exports.AuthorizationError = exports.DeactivatedAccountError = exports.ForbiddenError = exports.LightdashError = void 0;
|
3
|
+
exports.getErrorMessage = exports.GoogleSheetsTransientError = exports.UnexpectedGoogleSheetsError = exports.SlackInstallationNotFoundError = exports.KnexPaginationError = exports.NotEnoughResults = exports.MissingConfigError = exports.AlreadyExistsError = exports.AlreadyProcessingError = exports.SmptError = exports.WarehouseQueryError = exports.WarehouseConnectionError = exports.InvalidUser = exports.NotFoundError = exports.DbtError = exports.FieldReferenceError = exports.CompileError = exports.ParseError = exports.UnexpectedDatabaseError = exports.UnexpectedGitError = exports.UnexpectedIndexError = exports.UnexpectedServerError = exports.MissingWarehouseCredentialsError = exports.MissingCatalogEntryError = exports.NonCompiledModelError = exports.ParameterError = exports.ExpiredError = exports.NotExistsError = exports.AuthorizationError = exports.DeactivatedAccountError = exports.ForbiddenError = exports.LightdashError = void 0;
|
4
4
|
class LightdashError extends Error {
|
5
5
|
constructor({ message, name, statusCode, data }) {
|
6
6
|
super(message);
|
@@ -330,5 +330,16 @@ class UnexpectedGoogleSheetsError extends LightdashError {
|
|
330
330
|
}
|
331
331
|
}
|
332
332
|
exports.UnexpectedGoogleSheetsError = UnexpectedGoogleSheetsError;
|
333
|
+
class GoogleSheetsTransientError extends LightdashError {
|
334
|
+
constructor(message = 'Unexpected error in Google Sheets API', data = {}) {
|
335
|
+
super({
|
336
|
+
message,
|
337
|
+
name: 'GoogleSheetsTransientError',
|
338
|
+
statusCode: 500,
|
339
|
+
data,
|
340
|
+
});
|
341
|
+
}
|
342
|
+
}
|
343
|
+
exports.GoogleSheetsTransientError = GoogleSheetsTransientError;
|
333
344
|
const getErrorMessage = (e) => e instanceof Error ? e.message : `Unknown ${typeof e} error`;
|
334
345
|
exports.getErrorMessage = getErrorMessage;
|
@@ -1,8 +1,18 @@
|
|
1
1
|
import { type WeekDay } from '../utils/timeFrames';
|
2
|
+
import { type QueryExecutionContext } from './analytics';
|
2
3
|
import { type AnyType } from './any';
|
3
4
|
import { type SupportedDbtAdapter } from './dbt';
|
4
5
|
import { type DimensionType, type Metric } from './field';
|
5
6
|
import { type CreateWarehouseCredentials } from './projects';
|
7
|
+
export type RunQueryTags = {
|
8
|
+
project_uuid?: string;
|
9
|
+
user_uuid?: string;
|
10
|
+
organization_uuid?: string;
|
11
|
+
chart_uuid?: string;
|
12
|
+
dashboard_uuid?: string;
|
13
|
+
explore_name?: string;
|
14
|
+
query_context: QueryExecutionContext;
|
15
|
+
};
|
6
16
|
export type WarehouseTableSchema = {
|
7
17
|
[column: string]: DimensionType;
|
8
18
|
};
|