@lightdash/common 0.1415.2 → 0.1416.1
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/types/errors.d.ts
    CHANGED
    
    | 
         @@ -118,4 +118,9 @@ export declare class KnexPaginationError extends LightdashError { 
     | 
|
| 
       118 
118 
     | 
    
         
             
            export declare class SlackInstallationNotFoundError extends LightdashError {
         
     | 
| 
       119 
119 
     | 
    
         
             
                constructor(message?: string);
         
     | 
| 
       120 
120 
     | 
    
         
             
            }
         
     | 
| 
      
 121 
     | 
    
         
            +
            export declare class UnexpectedGoogleSheetsError extends LightdashError {
         
     | 
| 
      
 122 
     | 
    
         
            +
                constructor(message?: string, data?: {
         
     | 
| 
      
 123 
     | 
    
         
            +
                    [key: string]: any;
         
     | 
| 
      
 124 
     | 
    
         
            +
                });
         
     | 
| 
      
 125 
     | 
    
         
            +
            }
         
     | 
| 
       121 
126 
     | 
    
         
             
            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.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.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.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.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);
         
     | 
| 
         @@ -308,3 +308,14 @@ class SlackInstallationNotFoundError extends LightdashError { 
     | 
|
| 
       308 
308 
     | 
    
         
             
                }
         
     | 
| 
       309 
309 
     | 
    
         
             
            }
         
     | 
| 
       310 
310 
     | 
    
         
             
            exports.SlackInstallationNotFoundError = SlackInstallationNotFoundError;
         
     | 
| 
      
 311 
     | 
    
         
            +
            class UnexpectedGoogleSheetsError extends LightdashError {
         
     | 
| 
      
 312 
     | 
    
         
            +
                constructor(message = 'Unexpected error in Google sheets client', data = {}) {
         
     | 
| 
      
 313 
     | 
    
         
            +
                    super({
         
     | 
| 
      
 314 
     | 
    
         
            +
                        message,
         
     | 
| 
      
 315 
     | 
    
         
            +
                        name: 'UnexpectedGoogleSheetsError',
         
     | 
| 
      
 316 
     | 
    
         
            +
                        statusCode: 400,
         
     | 
| 
      
 317 
     | 
    
         
            +
                        data,
         
     | 
| 
      
 318 
     | 
    
         
            +
                    });
         
     | 
| 
      
 319 
     | 
    
         
            +
                }
         
     | 
| 
      
 320 
     | 
    
         
            +
            }
         
     | 
| 
      
 321 
     | 
    
         
            +
            exports.UnexpectedGoogleSheetsError = UnexpectedGoogleSheetsError;
         
     | 
| 
         @@ -330,10 +330,11 @@ const getAvailableSegmentDimensions = (dimensions) => dimensions 
     | 
|
| 
       330 
330 
     | 
    
         
             
                .filter((d) => !!d)
         
     | 
| 
       331 
331 
     | 
    
         
             
                .filter((d) => d.type !== field_1.DimensionType.DATE &&
         
     | 
| 
       332 
332 
     | 
    
         
             
                d.type !== field_1.DimensionType.TIMESTAMP &&
         
     | 
| 
       333 
     | 
    
         
            -
                d.type !== field_1.DimensionType.NUMBER 
     | 
| 
      
 333 
     | 
    
         
            +
                d.type !== field_1.DimensionType.NUMBER &&
         
     | 
| 
      
 334 
     | 
    
         
            +
                !d.timeIntervalBaseDimensionName);
         
     | 
| 
       334 
335 
     | 
    
         
             
            exports.getAvailableSegmentDimensions = getAvailableSegmentDimensions;
         
     | 
| 
       335 
336 
     | 
    
         
             
            const getAvailableCompareMetrics = (metrics) => metrics
         
     | 
| 
       336 
     | 
    
         
            -
                .filter((metric) => !!metric. 
     | 
| 
      
 337 
     | 
    
         
            +
                .filter((metric) => !!metric.defaultTimeDimension)
         
     | 
| 
       337 
338 
     | 
    
         
             
                .filter((metric) => metric.type !== field_1.MetricType.STRING &&
         
     | 
| 
       338 
339 
     | 
    
         
             
                metric.type !== field_1.MetricType.BOOLEAN &&
         
     | 
| 
       339 
340 
     | 
    
         
             
                metric.type !== field_1.MetricType.DATE &&
         
     |