@cubejs-client/core 0.29.29 → 0.29.43

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 (3) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/index.d.ts +18 -15
  3. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -3,6 +3,36 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.29.43](https://github.com/cube-js/cube.js/compare/v0.29.42...v0.29.43) (2022-04-07)
7
+
8
+ **Note:** Version bump only for package @cubejs-client/core
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.29.42](https://github.com/cube-js/cube.js/compare/v0.29.41...v0.29.42) (2022-04-04)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **playground:** rollup designer count distinct warning ([#4309](https://github.com/cube-js/cube.js/issues/4309)) ([add2dd3](https://github.com/cube-js/cube.js/commit/add2dd3106f7fd9deb3ea88fa74467ccd1b9244f))
20
+
21
+
22
+
23
+
24
+
25
+ ## [0.29.33](https://github.com/cube-js/cube.js/compare/v0.29.32...v0.29.33) (2022-03-17)
26
+
27
+
28
+ ### Features
29
+
30
+ * **playground:** non-additive measures message ([#4236](https://github.com/cube-js/cube.js/issues/4236)) ([ae18bbc](https://github.com/cube-js/cube.js/commit/ae18bbcb9030d0eef03c74410c25902602ec6d43))
31
+
32
+
33
+
34
+
35
+
6
36
  ## [0.29.29](https://github.com/cube-js/cube.js/compare/v0.29.28...v0.29.29) (2022-03-03)
7
37
 
8
38
 
package/index.d.ts CHANGED
@@ -8,7 +8,6 @@
8
8
  */
9
9
 
10
10
  declare module '@cubejs-client/core' {
11
-
12
11
  export type TransportOptions = {
13
12
  /**
14
13
  * [jwt auth token](security)
@@ -27,21 +26,13 @@ declare module '@cubejs-client/core' {
27
26
  };
28
27
 
29
28
  export interface ITransportResponse<R> {
30
- subscribe: <CBResult>(
31
- cb: (
32
- result: R,
33
- resubscribe: () => Promise<CBResult>
34
- ) => CBResult
35
- ) => Promise<CBResult>;
29
+ subscribe: <CBResult>(cb: (result: R, resubscribe: () => Promise<CBResult>) => CBResult) => Promise<CBResult>;
36
30
  // Optional, supported in WebSocketTransport
37
31
  unsubscribe?: () => Promise<void>;
38
32
  }
39
33
 
40
34
  export interface ITransport<R> {
41
- request(
42
- method: string,
43
- params: Record<string, unknown>
44
- ): ITransportResponse<R>;
35
+ request(method: string, params: Record<string, unknown>): ITransportResponse<R>;
45
36
  }
46
37
 
47
38
  /**
@@ -140,6 +131,12 @@ declare module '@cubejs-client/core' {
140
131
 
141
132
  type QueryType = 'regularQuery' | 'compareDateRangeQuery' | 'blendingQuery';
142
133
 
134
+ type LeafMeasure = {
135
+ measure: string;
136
+ additive: boolean;
137
+ type: 'count' | 'countDistinct' | 'sum' | 'min' | 'max' | 'number' | 'countDistinctApprox'
138
+ };
139
+
143
140
  export type TransformedQuery = {
144
141
  allFiltersWithinSelectedDimensions: boolean;
145
142
  granularityHierarchies: Record<string, string[]>;
@@ -151,6 +148,7 @@ declare module '@cubejs-client/core' {
151
148
  measures: string[];
152
149
  sortedDimensions: string[];
153
150
  sortedTimeDimensions: [[string, string]];
151
+ measureToLeafMeasures?: Record<string, LeafMeasure[]>;
154
152
  };
155
153
 
156
154
  export type PreAggregationType = 'rollup' | 'rollupJoin' | 'originalSql';
@@ -168,7 +166,7 @@ declare module '@cubejs-client/core' {
168
166
  external: boolean | null;
169
167
  dbType: string;
170
168
  extDbType: string;
171
- requestId?: string,
169
+ requestId?: string;
172
170
  usedPreAggregations?: Record<string, UsedPreAggregation>;
173
171
  transformedQuery?: TransformedQuery;
174
172
  };
@@ -467,7 +465,7 @@ declare module '@cubejs-client/core' {
467
465
  /**
468
466
  * Base method for pivoting [ResultSet](#result-set) data.
469
467
  * Most of the times shouldn't be used directly and [chartPivot](#result-set-chart-pivot)
470
- * or (tablePivot)[#table-pivot] should be used instead.
468
+ * or [tablePivot](#table-pivot) should be used instead.
471
469
  *
472
470
  * You can find the examples of using the `pivotConfig` [here](#types-pivot-config)
473
471
  * ```js
@@ -799,7 +797,7 @@ declare module '@cubejs-client/core' {
799
797
  timezone?: string;
800
798
  renewQuery?: boolean;
801
799
  ungrouped?: boolean;
802
- responseFormat?: 'compact' | 'default'
800
+ responseFormat?: 'compact' | 'default';
803
801
  }
804
802
 
805
803
  export class ProgressResult {
@@ -1003,7 +1001,12 @@ declare module '@cubejs-client/core' {
1003
1001
  * @param query - [Query object](query-format)
1004
1002
  */
1005
1003
  load(query: Query | Query[], options?: LoadMethodOptions, callback?: LoadMethodCallback<ResultSet>): void;
1006
- load(query: Query | Query[], options?: LoadMethodOptions, callback?: LoadMethodCallback<ResultSet>, responseFormat?: string): Promise<ResultSet>;
1004
+ load(
1005
+ query: Query | Query[],
1006
+ options?: LoadMethodOptions,
1007
+ callback?: LoadMethodCallback<ResultSet>,
1008
+ responseFormat?: string
1009
+ ): Promise<ResultSet>;
1007
1010
 
1008
1011
  /**
1009
1012
  * Allows you to fetch data and receive updates over time. See [Real-Time Data Fetch](real-time-data-fetch)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cubejs-client/core",
3
- "version": "0.29.29",
3
+ "version": "0.29.43",
4
4
  "engines": {},
5
5
  "repository": {
6
6
  "type": "git",
@@ -46,5 +46,5 @@
46
46
  "eslint-plugin-node": "^5.2.1",
47
47
  "jest": "^26.0.1"
48
48
  },
49
- "gitHead": "23638ee42cceb8fc80e821486ab30825e2b9a483"
49
+ "gitHead": "4fde50fecf7e642e73d363a9cdd9126a3533fa43"
50
50
  }