@vizzly/services 0.14.4 → 0.15.0-dev-4c548c2a9cdc29d779838ea3325029fe7e640235

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.
Files changed (91) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/results-driver/src/driver/VizzlyQuery/AreaChart/toQueries.d.ts +1 -1
  3. package/dist/results-driver/src/driver/VizzlyQuery/BarChart/toQueries.d.ts +1 -1
  4. package/dist/results-driver/src/driver/VizzlyQuery/BarChartV2/toQueries.d.ts +4 -0
  5. package/dist/results-driver/src/driver/VizzlyQuery/BasicTable/toQueries.d.ts +1 -1
  6. package/dist/results-driver/src/driver/VizzlyQuery/BubbleChart/toQueries.d.ts +10 -0
  7. package/dist/results-driver/src/driver/VizzlyQuery/BubbleChartV2/toQueries.d.ts +10 -0
  8. package/dist/results-driver/src/driver/VizzlyQuery/ComboChartV2/toQueries.d.ts +10 -0
  9. package/dist/results-driver/src/driver/VizzlyQuery/FunnelChart/toQueries.d.ts +1 -1
  10. package/dist/results-driver/src/driver/VizzlyQuery/HorizontalBarChart/toQueries.d.ts +1 -1
  11. package/dist/results-driver/src/driver/VizzlyQuery/LineChart/toQueries.d.ts +1 -1
  12. package/dist/results-driver/src/driver/VizzlyQuery/LineChartV2/toQueries.d.ts +1 -1
  13. package/dist/results-driver/src/driver/VizzlyQuery/PieChart/toQueries.d.ts +1 -1
  14. package/dist/results-driver/src/driver/VizzlyQuery/PivotTable/toQueries.d.ts +1 -1
  15. package/dist/results-driver/src/driver/VizzlyQuery/RadarChart/toQueries.d.ts +4 -0
  16. package/dist/results-driver/src/driver/VizzlyQuery/RichText/toQueries.d.ts +1 -1
  17. package/dist/results-driver/src/driver/VizzlyQuery/SunburstChart/toQueries.d.ts +4 -0
  18. package/dist/results-driver/src/driver/VizzlyQuery/WaterfallChart/toQueries.d.ts +4 -0
  19. package/dist/results-driver/src/driver/VizzlyQuery/buildVizzlyQuery.d.ts +5 -0
  20. package/dist/results-driver/src/driver/VizzlyQuery/commonToQueries.d.ts +1 -1
  21. package/dist/services/src/Services/View.d.ts +17 -1
  22. package/dist/services/src/index.d.ts +6 -2
  23. package/dist/shared-logic/src/AreaChartV2/attributesSchema.d.ts +3 -0
  24. package/dist/shared-logic/src/AreaChartV2/constants.d.ts +3 -0
  25. package/dist/shared-logic/src/AreaChartV2/index.d.ts +4 -0
  26. package/dist/shared-logic/src/AreaChartV2/setAttributes.d.ts +4 -0
  27. package/dist/shared-logic/src/BarChartV2/attributesSchema.d.ts +3 -0
  28. package/dist/shared-logic/src/BarChartV2/constants.d.ts +3 -0
  29. package/dist/shared-logic/src/BarChartV2/index.d.ts +4 -0
  30. package/dist/shared-logic/src/BarChartV2/setAttributes.d.ts +4 -0
  31. package/dist/shared-logic/src/BubbleChart/attributesSchema.d.ts +3 -0
  32. package/dist/shared-logic/src/BubbleChart/constants.d.ts +3 -0
  33. package/dist/shared-logic/src/BubbleChart/index.d.ts +4 -0
  34. package/dist/shared-logic/src/BubbleChart/setAttributes.d.ts +4 -0
  35. package/dist/shared-logic/src/BubbleChartV2/attributesSchema.d.ts +3 -0
  36. package/dist/shared-logic/src/BubbleChartV2/constants.d.ts +3 -0
  37. package/dist/shared-logic/src/BubbleChartV2/index.d.ts +4 -0
  38. package/dist/shared-logic/src/BubbleChartV2/setAttributes.d.ts +4 -0
  39. package/dist/shared-logic/src/ComboChart/upcast.d.ts +1 -2
  40. package/dist/shared-logic/src/ComboChartV2/attributesSchema.d.ts +3 -0
  41. package/dist/shared-logic/src/ComboChartV2/constants.d.ts +3 -0
  42. package/dist/shared-logic/src/ComboChartV2/index.d.ts +4 -0
  43. package/dist/shared-logic/src/ComboChartV2/setAttributes.d.ts +4 -0
  44. package/dist/shared-logic/src/Component/sharedSchemas.d.ts +2 -1
  45. package/dist/shared-logic/src/Component/types.d.ts +149 -5
  46. package/dist/shared-logic/src/Component/usedFields.d.ts +5 -1
  47. package/dist/shared-logic/src/ComponentInterface/types/namespaces.types.d.ts +12 -3
  48. package/dist/shared-logic/src/ComponentInterface/types.d.ts +2 -1
  49. package/dist/shared-logic/src/CustomField/CustomField.d.ts +1 -1
  50. package/dist/shared-logic/src/CustomField/CustomMetric/build.d.ts +3 -7
  51. package/dist/shared-logic/src/CustomField/CustomMetric/index.d.ts +3 -10
  52. package/dist/shared-logic/src/CustomField/CustomMetric/init.d.ts +4 -0
  53. package/dist/shared-logic/src/CustomField/CustomMetric/types.d.ts +21 -15
  54. package/dist/shared-logic/src/CustomField/CustomMetric/validate.d.ts +2 -0
  55. package/dist/shared-logic/src/CustomField/index.d.ts +1 -0
  56. package/dist/shared-logic/src/CustomField/metricValuesHaveAggregates.d.ts +2 -0
  57. package/dist/shared-logic/src/CustomField/types.d.ts +30 -26
  58. package/dist/shared-logic/src/CustomView/types.d.ts +2 -5
  59. package/dist/shared-logic/src/Dashboard/Dashboard.d.ts +2 -0
  60. package/dist/shared-logic/src/Dashboard/fromRaw.d.ts +1 -0
  61. package/dist/shared-logic/src/Dashboard/types.d.ts +1 -0
  62. package/dist/shared-logic/src/DataPanelConfig/types.d.ts +1 -1
  63. package/dist/shared-logic/src/DataSet/DataSet.d.ts +1 -3
  64. package/dist/shared-logic/src/DataSet/fieldFilterOptions.d.ts +2 -0
  65. package/dist/shared-logic/src/Display/Display.d.ts +1 -0
  66. package/dist/shared-logic/src/Field/Field.d.ts +2 -12
  67. package/dist/shared-logic/src/FormatPanelConfig/types.d.ts +2 -1
  68. package/dist/shared-logic/src/Query/Query.d.ts +1 -16
  69. package/dist/shared-logic/src/RadarChart/attributesSchema.d.ts +3 -0
  70. package/dist/shared-logic/src/RadarChart/constants.d.ts +3 -0
  71. package/dist/shared-logic/src/RadarChart/index.d.ts +4 -0
  72. package/dist/shared-logic/src/RadarChart/setAttributes.d.ts +4 -0
  73. package/dist/shared-logic/src/Result/types.d.ts +6 -8
  74. package/dist/shared-logic/src/SunburstChart/attributesSchema.d.ts +3 -0
  75. package/dist/shared-logic/src/SunburstChart/constants.d.ts +3 -0
  76. package/dist/shared-logic/src/SunburstChart/index.d.ts +4 -0
  77. package/dist/shared-logic/src/ValueAlias/ValueAlias.d.ts +7 -0
  78. package/dist/shared-logic/src/ValueAlias/types.d.ts +10 -0
  79. package/dist/shared-logic/src/WaterfallChart/attributesSchema.d.ts +3 -0
  80. package/dist/shared-logic/src/WaterfallChart/constants.d.ts +3 -0
  81. package/dist/shared-logic/src/WaterfallChart/index.d.ts +4 -0
  82. package/dist/shared-logic/src/WaterfallChart/setAttributes.d.ts +4 -0
  83. package/dist/shared-logic/src/getComponentInterface.d.ts +8 -0
  84. package/package.json +2 -2
  85. package/dist/shared-logic/src/Query/validate.d.ts +0 -13
  86. package/dist/shared-logic/src/QueryEngineConfig/bigquery.d.ts +0 -2
  87. package/dist/shared-logic/src/QueryEngineConfig/mariadb.d.ts +0 -2
  88. package/dist/shared-logic/src/QueryEngineConfig/mysql.d.ts +0 -2
  89. package/dist/shared-logic/src/QueryEngineConfig/postgres.d.ts +0 -2
  90. package/dist/shared-logic/src/QueryEngineConfig/redshift.d.ts +0 -2
  91. package/dist/shared-logic/src/QueryEngineConfig/snowflake.d.ts +0 -2
@@ -1,19 +1,8 @@
1
- import { PreAggregatedQuery, PreparedQuery, Query, SubQuery } from './types';
1
+ import { PreAggregatedQuery, PreparedQuery, Query } from './types';
2
2
  import { QueryAttributes } from '../QueryAttributes/types';
3
3
  import { QueryEngineConfig, SupportedFeature as SupportedFeatureType } from '../QueryEngineConfig/types';
4
4
  import { DataSet } from '../DataSet/types';
5
- import { JSQueryEngineMathsOp } from '../JSQueryEngine/types';
6
5
  import { Result } from '../Result/types';
7
- import { AdditionalFilter, TimeRangeOptions } from '../AdditionalFilter/types';
8
- import { DataSetDashboardFilters } from '../CustomView/types';
9
- export { validate } from './validate';
10
- export declare const isValidMathsOp: (value: string) => value is JSQueryEngineMathsOp;
11
- export declare const containsSubquery: (measures: Query['measure']) => boolean;
12
- export declare const containsAggregates: (query: Query | SubQuery) => boolean;
13
- export declare const hasGroups: (query: Query) => boolean;
14
- export declare const setQueryLimit: (query: Query, limit: number) => Query;
15
- export declare const isRunnable: (query: Query | null, queryEngineConfig: QueryEngineConfig) => boolean;
16
- export declare const takeRunnableQueries: (queries: (Query | null)[], queryEngineConfig: QueryEngineConfig) => Query<string, string, string>[];
17
6
  export declare const build: (dataSet: DataSet<DataSet.Field>, measureAttr: QueryAttributes.Measure[], orderAttr: QueryAttributes.Order[], dimensionAttr: QueryAttributes.Dimension[], timeDimensionAttr: QueryAttributes.TimeDimension | null, limitAttr: number | undefined, offsetAttr: number | undefined, queryEngineConfig: import("@vizzly/semantic-layer-public/dist/types").QueryEngineConfig, params: import("../../../results-driver/src/types").Params, prebuiltFilters?: QueryAttributes.Filter[][] | undefined) => {
18
7
  query: Query<string, string, string>;
19
8
  measureDescription: import("./types").MeasureDescription[];
@@ -21,7 +10,6 @@ export declare const build: (dataSet: DataSet<DataSet.Field>, measureAttr: Query
21
10
  export declare const hasDimensions: (query: {
22
11
  group: Query['group'];
23
12
  }) => boolean;
24
- export declare const getMeasures: (query: Query) => Query['measure'];
25
13
  export declare const buildPreAggregatedPreparedQuery: (query: PreAggregatedQuery, dataSet: DataSet) => {
26
14
  query: PreAggregatedQuery;
27
15
  resultFields: Result.Field[];
@@ -31,7 +19,4 @@ export declare const buildUniqueArrayValuesPreparedQuery: (dataSetId: string, da
31
19
  resultFields: Result.Field[];
32
20
  };
33
21
  export declare const buildFilterQuery: (dataSet: DataSet, fieldId: string, optionsFilters?: QueryAttributes.Filter[], optionsOrders?: QueryAttributes.Order[]) => QueryAttributes;
34
- export declare const requiredFields: (query: Query) => Array<string>;
35
22
  export declare const supportsFeature: (queryEngineConfig: QueryEngineConfig, feature: SupportedFeatureType) => boolean;
36
- export declare const toDataSetDashboardFilters: (dataSets: DataSet[], additionalFilters: AdditionalFilter[], dateFilterOptions: TimeRangeOptions) => DataSetDashboardFilters;
37
- export declare function addGlobalFiltersToQueries(queries: QueryAttributes[], dashboardFilters?: DataSetDashboardFilters): QueryAttributes[];
@@ -0,0 +1,3 @@
1
+ import Joi from '@vizzly/joi';
2
+ import { ComponentInterfaceConfig } from '../ComponentInterface/types';
3
+ export declare const attributesSchema: (config: ComponentInterfaceConfig) => Joi.ObjectSchema<any>;
@@ -0,0 +1,3 @@
1
+ import { ViewConstants } from '../ComponentInterface/types/namespaces.types';
2
+ declare const CONSTANTS: ViewConstants;
3
+ export default CONSTANTS;
@@ -0,0 +1,4 @@
1
+ import { Component } from '../Component/types';
2
+ import { LoadComponentInterface } from '../ComponentInterface/types';
3
+ declare const RadarChart: LoadComponentInterface<Component.RadarChartAttributes, Component.RadarChartAttributes>;
4
+ export default RadarChart;
@@ -0,0 +1,4 @@
1
+ import { Component } from '../Component/types';
2
+ import { ComponentInterfaceConfig } from '../ComponentInterface/types';
3
+ declare const _default: (config: ComponentInterfaceConfig) => (radarChart: Component.RadarChartAttributes, partial: Partial<Component.RadarChartAttributes>) => Component.RadarChartAttributes;
4
+ export default _default;
@@ -19,16 +19,14 @@ export declare type Result = {
19
19
  * Result, but with extra information baked into the
20
20
  * content to determine how it should be displayed.
21
21
  */
22
+ export declare type FormattedChartData = {
23
+ formattedValue: string;
24
+ value: any;
25
+ };
22
26
  export declare type FormattedResult = {
23
- content: {
24
- value: any;
25
- formattedValue: string;
26
- }[][];
27
+ content: FormattedChartData[][];
27
28
  contentMapped: Array<{
28
- [key: string]: {
29
- value: any;
30
- formattedValue: string;
31
- };
29
+ [key: string]: FormattedChartData;
32
30
  }>;
33
31
  fields: Result.Field[];
34
32
  hasMoreResults?: boolean | null;
@@ -0,0 +1,3 @@
1
+ import Joi from '@vizzly/joi';
2
+ import { ComponentInterfaceConfig } from '../ComponentInterface/types';
3
+ export declare const attributesSchema: (config: ComponentInterfaceConfig) => Joi.ObjectSchema<any>;
@@ -0,0 +1,3 @@
1
+ import { ViewConstants } from '../ComponentInterface/types/namespaces.types';
2
+ declare const CONSTANTS: ViewConstants;
3
+ export default CONSTANTS;
@@ -0,0 +1,4 @@
1
+ import { Component } from '../Component/types';
2
+ import { LoadComponentInterface } from '../ComponentInterface/types';
3
+ declare const SunburstChart: LoadComponentInterface<Component.SunburstChartAttributes, Component.SunburstChartAttributes>;
4
+ export default SunburstChart;
@@ -0,0 +1,7 @@
1
+ import { AdditionalFilter } from '../AdditionalFilter/types';
2
+ import { ValueAlias } from './types';
3
+ export declare const build: (value: string | number | null, valueAlias?: ValueAlias, options?: {
4
+ fieldId?: string | null;
5
+ filter?: AdditionalFilter;
6
+ dataSetId?: string;
7
+ }) => string | number | null | undefined;
@@ -0,0 +1,10 @@
1
+ import { Component } from '../Component/types';
2
+ export declare type ValueAlias = {
3
+ [id: string]: string | number;
4
+ } | ValueAliasFunction;
5
+ export declare type ValueAliasFunction = (options?: Component.ValueAliasOptions) => string | number | undefined;
6
+ export declare type ValueAliasFunctionV2 = (params: {
7
+ fieldId: string;
8
+ value: any;
9
+ function: string;
10
+ }) => string | undefined;
@@ -0,0 +1,3 @@
1
+ import Joi from '@vizzly/joi';
2
+ import { ComponentInterfaceConfig } from '../ComponentInterface/types';
3
+ export declare const attributesSchema: (config: ComponentInterfaceConfig) => Joi.ObjectSchema<any>;
@@ -0,0 +1,3 @@
1
+ import { ViewConstants } from '../ComponentInterface/types/namespaces.types';
2
+ declare const CONSTANTS: ViewConstants;
3
+ export default CONSTANTS;
@@ -0,0 +1,4 @@
1
+ import { Component } from '../Component/types';
2
+ import { LoadComponentInterface } from '../ComponentInterface/types';
3
+ declare const WaterfallChart: LoadComponentInterface<Component.WaterfallChartAttributes, Component.WaterfallChartAttributes>;
4
+ export default WaterfallChart;
@@ -0,0 +1,4 @@
1
+ import { Component } from '../Component/types';
2
+ import { ComponentInterfaceConfig } from '../ComponentInterface/types';
3
+ declare const _default: (config: ComponentInterfaceConfig) => (waterfallChart: Component.WaterfallChartAttributes, partial: Partial<Component.WaterfallChartAttributes>) => Component.WaterfallChartAttributes;
4
+ export default _default;
@@ -3,6 +3,9 @@ import { ComponentInterface, ComponentInterfaceConfig } from './ComponentInterfa
3
3
  import { BasicTableComponentInterface } from './BasicTable';
4
4
  declare function getComponentInterface(type: 'custom', config?: ComponentInterfaceConfig): ComponentInterface<Component.CustomViewAttributes>;
5
5
  declare function getComponentInterface(type: 'pieChart', config?: ComponentInterfaceConfig): ComponentInterface<Component.PieChartAttributes>;
6
+ declare function getComponentInterface(type: 'bubbleChart', config?: ComponentInterfaceConfig): ComponentInterface<Component.BubbleChartAttributes>;
7
+ declare function getComponentInterface(type: 'bubbleChartV2', config?: ComponentInterfaceConfig): ComponentInterface<Component.BubbleChartV2Attributes>;
8
+ declare function getComponentInterface(type: 'sunburstChart', config?: ComponentInterfaceConfig): ComponentInterface<Component.SunburstChartAttributes>;
6
9
  declare function getComponentInterface(type: 'scatterChart', config?: ComponentInterfaceConfig): ComponentInterface<Component.ScatterChartAttributes>;
7
10
  declare function getComponentInterface(type: 'mercatorMap', config?: ComponentInterfaceConfig): ComponentInterface<Component.MercatorMapAttributes>;
8
11
  declare function getComponentInterface(type: 'singleStat', config?: ComponentInterfaceConfig): ComponentInterface<Component.SingleStatAttributes>;
@@ -14,7 +17,12 @@ declare function getComponentInterface(type: 'horizontalBarChart', config?: Comp
14
17
  declare function getComponentInterface(type: 'areaChart', config?: ComponentInterfaceConfig): ComponentInterface<Component.AreaChartAttributes>;
15
18
  declare function getComponentInterface(type: 'lineChart', config?: ComponentInterfaceConfig): ComponentInterface<Component.LineChartAttributes>;
16
19
  declare function getComponentInterface(type: 'lineChartV2', config?: ComponentInterfaceConfig): ComponentInterface<Component.LineChartV2Attributes>;
20
+ declare function getComponentInterface(type: 'barChartV2', config?: ComponentInterfaceConfig): ComponentInterface<Component.BarChartV2Attributes>;
21
+ declare function getComponentInterface(type: 'areaChartV2', config?: ComponentInterfaceConfig): ComponentInterface<Component.AreaChartV2Attributes>;
22
+ declare function getComponentInterface(type: 'comboChartV2', config?: ComponentInterfaceConfig): ComponentInterface<Component.ComboChartV2Attributes>;
17
23
  declare function getComponentInterface(type: 'barChart', config?: ComponentInterfaceConfig): ComponentInterface<Component.BarChartAttributes>;
18
24
  declare function getComponentInterface(type: 'funnelChart', config?: ComponentInterfaceConfig): ComponentInterface<Component.FunnelChartAttributes>;
25
+ declare function getComponentInterface(type: 'waterfallChart', config?: ComponentInterfaceConfig): ComponentInterface<Component.WaterfallChartAttributes>;
26
+ declare function getComponentInterface(type: 'radarChart', config?: ComponentInterfaceConfig): ComponentInterface<Component.RadarChartAttributes>;
19
27
  declare function getComponentInterface(type: ComponentType, config?: ComponentInterfaceConfig): ComponentInterface<Component.Attributes>;
20
28
  export default getComponentInterface;
package/package.json CHANGED
@@ -26,9 +26,9 @@
26
26
  "fix-type-alias": "tsc-alias -p tsconfig.json",
27
27
  "prepare": "yarn build"
28
28
  },
29
- "version": "0.14.4",
29
+ "version": "0.15.0-dev-4c548c2a9cdc29d779838ea3325029fe7e640235",
30
30
  "dependencies": {
31
- "@vizzly/api-client": "0.0.43",
31
+ "@vizzly/api-client": "0.0.57",
32
32
  "@vizzly/joi": "^17.11.0",
33
33
  "lodash": "^4.17.21"
34
34
  }
@@ -1,13 +0,0 @@
1
- import Joi from '@vizzly/joi';
2
- import { QueryEngineConfig } from '../QueryEngineConfig/types';
3
- import { Query } from './types';
4
- import { JoiOptions } from '../validations';
5
- export declare class InvalidQuery extends Error {
6
- }
7
- export declare const postgresQuerySchema: Joi.AlternativesSchema<unknown>;
8
- export declare const snowflakeQuerySchema: Joi.AlternativesSchema<unknown>;
9
- export declare const mariadbQuerySchema: Joi.AlternativesSchema<unknown>;
10
- export declare const mysqlQuerySchema: Joi.AlternativesSchema<unknown>;
11
- export declare const bigqueryQuerySchema: Joi.AlternativesSchema<unknown>;
12
- export declare const redshiftSchema: Joi.AlternativesSchema<unknown>;
13
- export declare const validate: (queries: Array<unknown>, queryEngineConfig: QueryEngineConfig, joiOptions: JoiOptions) => Array<Query>;
@@ -1,2 +0,0 @@
1
- import { QueryEngineConfig } from './types';
2
- export declare const queryEngineConfig: () => QueryEngineConfig;
@@ -1,2 +0,0 @@
1
- import { QueryEngineConfig } from './types';
2
- export declare const queryEngineConfig: () => QueryEngineConfig;
@@ -1,2 +0,0 @@
1
- import { QueryEngineConfig } from './types';
2
- export declare const queryEngineConfig: () => QueryEngineConfig;
@@ -1,2 +0,0 @@
1
- import { QueryEngineConfig } from './types';
2
- export declare const queryEngineConfig: () => QueryEngineConfig;
@@ -1,2 +0,0 @@
1
- import { QueryEngineConfig } from './types';
2
- export declare const queryEngineConfig: () => QueryEngineConfig;
@@ -1,2 +0,0 @@
1
- import { QueryEngineConfig } from './types';
2
- export declare const queryEngineConfig: () => QueryEngineConfig;