@cubejs-client/core 1.7.13 → 1.7.15
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/cubejs-client-core.cjs +16 -2
- package/dist/cubejs-client-core.cjs.map +1 -1
- package/dist/cubejs-client-core.umd.js +16 -2
- package/dist/cubejs-client-core.umd.js.map +1 -1
- package/dist/src/index.d.ts +11 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +13 -0
- package/dist/test/CubeApi.test.js +69 -0
- package/dist/test/HttpTransport.test.js +22 -0
- package/package.json +5 -4
|
@@ -3616,14 +3616,28 @@
|
|
|
3616
3616
|
value:
|
|
3617
3617
|
/**
|
|
3618
3618
|
* Get meta description of cubes available for querying.
|
|
3619
|
+
*
|
|
3620
|
+
* Pass `onlyViews: true` to request views only — the response's `cubes` array
|
|
3621
|
+
* then contains only entries whose `type` is `view`.
|
|
3622
|
+
*
|
|
3623
|
+
* ```js
|
|
3624
|
+
* const meta = await cubeApi.meta({ onlyViews: true });
|
|
3625
|
+
* ```
|
|
3626
|
+
*
|
|
3627
|
+
* Compatibility note: over HTTP, servers predating the flag ignore it and return
|
|
3628
|
+
* the full model, so callers should not assume the response is filtered. Over
|
|
3629
|
+
* `WebSocketTransport` such servers reject the message with a 400 instead, since
|
|
3630
|
+
* they validate `meta` params strictly.
|
|
3619
3631
|
*/
|
|
3620
3632
|
function meta(options, callback) {
|
|
3621
3633
|
var _this8 = this;
|
|
3622
3634
|
return this.loadMethod(function () {
|
|
3623
|
-
return _this8.request('meta', {
|
|
3635
|
+
return _this8.request('meta', _objectSpread2({
|
|
3624
3636
|
signal: options === null || options === void 0 ? void 0 : options.signal,
|
|
3625
3637
|
baseRequestId: options === null || options === void 0 ? void 0 : options.baseRequestId
|
|
3626
|
-
}
|
|
3638
|
+
}, options !== null && options !== void 0 && options.onlyViews ? {
|
|
3639
|
+
onlyViews: true
|
|
3640
|
+
} : {}));
|
|
3627
3641
|
}, function (body) {
|
|
3628
3642
|
return new Meta(body);
|
|
3629
3643
|
}, options, callback);
|