@digital-ai/dot-components 5.7.0 → 5.8.0
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/index.esm.js +660 -506
- package/package.json +1 -1
- package/src/lib/components/analytics/dashboard-actions/DashboardOptionsMenu.d.ts +3 -1
- package/src/lib/components/analytics/dashboard-dialog/DashboardDialog.d.ts +2 -2
- package/src/lib/components/analytics/metadata-api/openapi/core/ApiError.d.ts +3 -1
- package/src/lib/components/analytics/metadata-api/openapi/core/ApiRequestOptions.d.ts +2 -1
- package/src/lib/components/analytics/metadata-api/openapi/core/CancelablePromise.d.ts +20 -0
- package/src/lib/components/analytics/metadata-api/openapi/core/OpenAPI.d.ts +8 -7
- package/src/lib/components/analytics/metadata-api/openapi/core/request.d.ts +25 -4
- package/src/lib/components/analytics/metadata-api/openapi/index.d.ts +3 -0
- package/src/lib/components/analytics/metadata-api/openapi/models/DashboardCreateBody.d.ts +4 -0
- package/src/lib/components/analytics/metadata-api/openapi/models/DashboardPatchBody.d.ts +4 -0
- package/src/lib/components/analytics/metadata-api/openapi/models/DashboardPutBody.d.ts +4 -0
- package/src/lib/components/analytics/metadata-api/openapi/models/DashboardView.d.ts +5 -1
- package/src/lib/components/analytics/metadata-api/openapi/models/HelpContentCreateBody.d.ts +1 -1
- package/src/lib/components/analytics/metadata-api/openapi/models/HelpContentPutBody.d.ts +1 -1
- package/src/lib/components/analytics/metadata-api/openapi/models/X_Digitalai_Account_ID.d.ts +4 -0
- package/src/lib/components/analytics/metadata-api/openapi/services/BiService.d.ts +7 -6
- package/src/lib/components/analytics/metadata-api/openapi/services/CategoriesService.d.ts +3 -2
- package/src/lib/components/analytics/metadata-api/openapi/services/DashboardsService.d.ts +17 -16
- package/src/lib/components/analytics/metadata-api/openapi/services/DatalakeService.d.ts +2 -1
- package/src/lib/components/analytics/metadata-api/openapi/services/EntitiesService.d.ts +6 -5
- package/src/lib/components/analytics/metadata-api/openapi/services/EntityAttributesService.d.ts +7 -6
- package/src/lib/components/analytics/metadata-api/openapi/services/EntityClassService.d.ts +6 -5
- package/src/lib/components/analytics/metadata-api/openapi/services/HelpContentService.d.ts +8 -7
- package/src/lib/components/analytics/metadata-api/openapi/services/MrProxyService.d.ts +5 -4
- package/src/lib/components/analytics/metadata-api/openapi/services/OriginInstancesService.d.ts +6 -5
- package/src/lib/components/analytics/metadata-api/openapi/services/OriginsService.d.ts +6 -5
- package/src/lib/components/analytics/metadata-api/openapi/services/ProductsService.d.ts +11 -10
- package/src/lib/components/analytics/metadata-api/openapi/services/UtilityService.d.ts +7 -6
package/index.esm.js
CHANGED
|
@@ -2076,6 +2076,19 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
2076
2076
|
});
|
|
2077
2077
|
}
|
|
2078
2078
|
|
|
2079
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
2080
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
2081
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
2082
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
2086
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
2087
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
2088
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
2089
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
2090
|
+
}
|
|
2091
|
+
|
|
2079
2092
|
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
2080
2093
|
var e = new Error(message);
|
|
2081
2094
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
@@ -2260,7 +2273,7 @@ function getResponseBody$1(response) {
|
|
|
2260
2273
|
return null;
|
|
2261
2274
|
});
|
|
2262
2275
|
}
|
|
2263
|
-
function catchErrors
|
|
2276
|
+
function catchErrors(options, result) {
|
|
2264
2277
|
const errors = Object.assign({
|
|
2265
2278
|
400: 'Bad Request',
|
|
2266
2279
|
401: 'Unauthorized',
|
|
@@ -2297,7 +2310,7 @@ function request$1(options) {
|
|
|
2297
2310
|
statusText: response.statusText,
|
|
2298
2311
|
body: responseHeader || responseBody
|
|
2299
2312
|
};
|
|
2300
|
-
catchErrors
|
|
2313
|
+
catchErrors(options, result);
|
|
2301
2314
|
return result;
|
|
2302
2315
|
});
|
|
2303
2316
|
}
|
|
@@ -9520,25 +9533,126 @@ const DotPill = ({
|
|
|
9520
9533
|
};
|
|
9521
9534
|
|
|
9522
9535
|
class ApiError extends Error {
|
|
9523
|
-
constructor(response, message) {
|
|
9536
|
+
constructor(request, response, message) {
|
|
9524
9537
|
super(message);
|
|
9538
|
+
this.name = 'ApiError';
|
|
9525
9539
|
this.url = response.url;
|
|
9526
9540
|
this.status = response.status;
|
|
9527
9541
|
this.statusText = response.statusText;
|
|
9528
9542
|
this.body = response.body;
|
|
9543
|
+
this.request = request;
|
|
9544
|
+
}
|
|
9545
|
+
}
|
|
9546
|
+
|
|
9547
|
+
var _CancelablePromise_isResolved, _CancelablePromise_isRejected, _CancelablePromise_isCancelled, _CancelablePromise_cancelHandlers, _CancelablePromise_promise, _CancelablePromise_resolve, _CancelablePromise_reject;
|
|
9548
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
9549
|
+
/* istanbul ignore file */
|
|
9550
|
+
/* tslint:disable */
|
|
9551
|
+
/* eslint-disable */
|
|
9552
|
+
class CancelError extends Error {
|
|
9553
|
+
constructor(message) {
|
|
9554
|
+
super(message);
|
|
9555
|
+
this.name = 'CancelError';
|
|
9556
|
+
}
|
|
9557
|
+
get isCancelled() {
|
|
9558
|
+
return true;
|
|
9559
|
+
}
|
|
9560
|
+
}
|
|
9561
|
+
class CancelablePromise {
|
|
9562
|
+
constructor(executor) {
|
|
9563
|
+
_CancelablePromise_isResolved.set(this, void 0);
|
|
9564
|
+
_CancelablePromise_isRejected.set(this, void 0);
|
|
9565
|
+
_CancelablePromise_isCancelled.set(this, void 0);
|
|
9566
|
+
_CancelablePromise_cancelHandlers.set(this, void 0);
|
|
9567
|
+
_CancelablePromise_promise.set(this, void 0);
|
|
9568
|
+
_CancelablePromise_resolve.set(this, void 0);
|
|
9569
|
+
_CancelablePromise_reject.set(this, void 0);
|
|
9570
|
+
__classPrivateFieldSet(this, _CancelablePromise_isResolved, false, "f");
|
|
9571
|
+
__classPrivateFieldSet(this, _CancelablePromise_isRejected, false, "f");
|
|
9572
|
+
__classPrivateFieldSet(this, _CancelablePromise_isCancelled, false, "f");
|
|
9573
|
+
__classPrivateFieldSet(this, _CancelablePromise_cancelHandlers, [], "f");
|
|
9574
|
+
__classPrivateFieldSet(this, _CancelablePromise_promise, new Promise((resolve, reject) => {
|
|
9575
|
+
__classPrivateFieldSet(this, _CancelablePromise_resolve, resolve, "f");
|
|
9576
|
+
__classPrivateFieldSet(this, _CancelablePromise_reject, reject, "f");
|
|
9577
|
+
const onResolve = value => {
|
|
9578
|
+
if (__classPrivateFieldGet(this, _CancelablePromise_isResolved, "f") || __classPrivateFieldGet(this, _CancelablePromise_isRejected, "f") || __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f")) {
|
|
9579
|
+
return;
|
|
9580
|
+
}
|
|
9581
|
+
__classPrivateFieldSet(this, _CancelablePromise_isResolved, true, "f");
|
|
9582
|
+
if (__classPrivateFieldGet(this, _CancelablePromise_resolve, "f")) __classPrivateFieldGet(this, _CancelablePromise_resolve, "f").call(this, value);
|
|
9583
|
+
};
|
|
9584
|
+
const onReject = reason => {
|
|
9585
|
+
if (__classPrivateFieldGet(this, _CancelablePromise_isResolved, "f") || __classPrivateFieldGet(this, _CancelablePromise_isRejected, "f") || __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f")) {
|
|
9586
|
+
return;
|
|
9587
|
+
}
|
|
9588
|
+
__classPrivateFieldSet(this, _CancelablePromise_isRejected, true, "f");
|
|
9589
|
+
if (__classPrivateFieldGet(this, _CancelablePromise_reject, "f")) __classPrivateFieldGet(this, _CancelablePromise_reject, "f").call(this, reason);
|
|
9590
|
+
};
|
|
9591
|
+
const onCancel = cancelHandler => {
|
|
9592
|
+
if (__classPrivateFieldGet(this, _CancelablePromise_isResolved, "f") || __classPrivateFieldGet(this, _CancelablePromise_isRejected, "f") || __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f")) {
|
|
9593
|
+
return;
|
|
9594
|
+
}
|
|
9595
|
+
__classPrivateFieldGet(this, _CancelablePromise_cancelHandlers, "f").push(cancelHandler);
|
|
9596
|
+
};
|
|
9597
|
+
Object.defineProperty(onCancel, 'isResolved', {
|
|
9598
|
+
get: () => __classPrivateFieldGet(this, _CancelablePromise_isResolved, "f")
|
|
9599
|
+
});
|
|
9600
|
+
Object.defineProperty(onCancel, 'isRejected', {
|
|
9601
|
+
get: () => __classPrivateFieldGet(this, _CancelablePromise_isRejected, "f")
|
|
9602
|
+
});
|
|
9603
|
+
Object.defineProperty(onCancel, 'isCancelled', {
|
|
9604
|
+
get: () => __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f")
|
|
9605
|
+
});
|
|
9606
|
+
return executor(onResolve, onReject, onCancel);
|
|
9607
|
+
}), "f");
|
|
9608
|
+
}
|
|
9609
|
+
get [(_CancelablePromise_isResolved = new WeakMap(), _CancelablePromise_isRejected = new WeakMap(), _CancelablePromise_isCancelled = new WeakMap(), _CancelablePromise_cancelHandlers = new WeakMap(), _CancelablePromise_promise = new WeakMap(), _CancelablePromise_resolve = new WeakMap(), _CancelablePromise_reject = new WeakMap(), Symbol.toStringTag)]() {
|
|
9610
|
+
return 'Cancellable Promise';
|
|
9611
|
+
}
|
|
9612
|
+
then(onFulfilled, onRejected) {
|
|
9613
|
+
return __classPrivateFieldGet(this, _CancelablePromise_promise, "f").then(onFulfilled, onRejected);
|
|
9614
|
+
}
|
|
9615
|
+
catch(onRejected) {
|
|
9616
|
+
return __classPrivateFieldGet(this, _CancelablePromise_promise, "f").catch(onRejected);
|
|
9617
|
+
}
|
|
9618
|
+
finally(onFinally) {
|
|
9619
|
+
return __classPrivateFieldGet(this, _CancelablePromise_promise, "f").finally(onFinally);
|
|
9620
|
+
}
|
|
9621
|
+
cancel() {
|
|
9622
|
+
if (__classPrivateFieldGet(this, _CancelablePromise_isResolved, "f") || __classPrivateFieldGet(this, _CancelablePromise_isRejected, "f") || __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f")) {
|
|
9623
|
+
return;
|
|
9624
|
+
}
|
|
9625
|
+
__classPrivateFieldSet(this, _CancelablePromise_isCancelled, true, "f");
|
|
9626
|
+
if (__classPrivateFieldGet(this, _CancelablePromise_cancelHandlers, "f").length) {
|
|
9627
|
+
try {
|
|
9628
|
+
for (const cancelHandler of __classPrivateFieldGet(this, _CancelablePromise_cancelHandlers, "f")) {
|
|
9629
|
+
cancelHandler();
|
|
9630
|
+
}
|
|
9631
|
+
} catch (error) {
|
|
9632
|
+
console.warn('Cancellation threw an error', error);
|
|
9633
|
+
return;
|
|
9634
|
+
}
|
|
9635
|
+
}
|
|
9636
|
+
__classPrivateFieldGet(this, _CancelablePromise_cancelHandlers, "f").length = 0;
|
|
9637
|
+
if (__classPrivateFieldGet(this, _CancelablePromise_reject, "f")) __classPrivateFieldGet(this, _CancelablePromise_reject, "f").call(this, new CancelError('Request aborted'));
|
|
9638
|
+
}
|
|
9639
|
+
get isCancelled() {
|
|
9640
|
+
return __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f");
|
|
9529
9641
|
}
|
|
9530
9642
|
}
|
|
9531
9643
|
|
|
9532
9644
|
const OpenAPI = {
|
|
9533
9645
|
BASE: '',
|
|
9646
|
+
VERSION: '0.1',
|
|
9647
|
+
WITH_CREDENTIALS: false,
|
|
9648
|
+
CREDENTIALS: 'include',
|
|
9534
9649
|
TOKEN: undefined,
|
|
9535
9650
|
USERNAME: undefined,
|
|
9536
9651
|
PASSWORD: undefined,
|
|
9537
|
-
HEADERS: undefined
|
|
9652
|
+
HEADERS: undefined,
|
|
9653
|
+
ENCODE_PATH: undefined
|
|
9654
|
+
};
|
|
9538
9655
|
|
|
9539
|
-
/* istanbul ignore file */
|
|
9540
|
-
/* tslint:disable */
|
|
9541
|
-
/* eslint-disable */
|
|
9542
9656
|
var DashboardCreateBody;
|
|
9543
9657
|
(function (DashboardCreateBody) {
|
|
9544
9658
|
(function (lifecycle_state) {
|
|
@@ -9551,9 +9665,6 @@ var DashboardCreateBody;
|
|
|
9551
9665
|
})(DashboardCreateBody.bi_type || (DashboardCreateBody.bi_type = {}));
|
|
9552
9666
|
})(DashboardCreateBody || (DashboardCreateBody = {}));
|
|
9553
9667
|
|
|
9554
|
-
/* istanbul ignore file */
|
|
9555
|
-
/* tslint:disable */
|
|
9556
|
-
/* eslint-disable */
|
|
9557
9668
|
var DashboardPatchBody;
|
|
9558
9669
|
(function (DashboardPatchBody) {
|
|
9559
9670
|
(function (lifecycle_state) {
|
|
@@ -9566,9 +9677,6 @@ var DashboardPatchBody;
|
|
|
9566
9677
|
})(DashboardPatchBody.bi_type || (DashboardPatchBody.bi_type = {}));
|
|
9567
9678
|
})(DashboardPatchBody || (DashboardPatchBody = {}));
|
|
9568
9679
|
|
|
9569
|
-
/* istanbul ignore file */
|
|
9570
|
-
/* tslint:disable */
|
|
9571
|
-
/* eslint-disable */
|
|
9572
9680
|
var DashboardPutBody;
|
|
9573
9681
|
(function (DashboardPutBody) {
|
|
9574
9682
|
(function (lifecycle_state) {
|
|
@@ -9581,9 +9689,6 @@ var DashboardPutBody;
|
|
|
9581
9689
|
})(DashboardPutBody.bi_type || (DashboardPutBody.bi_type = {}));
|
|
9582
9690
|
})(DashboardPutBody || (DashboardPutBody = {}));
|
|
9583
9691
|
|
|
9584
|
-
/* istanbul ignore file */
|
|
9585
|
-
/* tslint:disable */
|
|
9586
|
-
/* eslint-disable */
|
|
9587
9692
|
var DashboardView;
|
|
9588
9693
|
(function (DashboardView) {
|
|
9589
9694
|
(function (lifecycle_state) {
|
|
@@ -9596,159 +9701,180 @@ var DashboardView;
|
|
|
9596
9701
|
})(DashboardView.bi_type || (DashboardView.bi_type = {}));
|
|
9597
9702
|
})(DashboardView || (DashboardView = {}));
|
|
9598
9703
|
|
|
9599
|
-
|
|
9704
|
+
const isDefined = value => {
|
|
9600
9705
|
return value !== undefined && value !== null;
|
|
9601
|
-
}
|
|
9602
|
-
|
|
9706
|
+
};
|
|
9707
|
+
const isString = value => {
|
|
9603
9708
|
return typeof value === 'string';
|
|
9604
|
-
}
|
|
9605
|
-
|
|
9709
|
+
};
|
|
9710
|
+
const isStringWithValue = value => {
|
|
9606
9711
|
return isString(value) && value !== '';
|
|
9607
|
-
}
|
|
9608
|
-
|
|
9609
|
-
return value
|
|
9610
|
-
}
|
|
9611
|
-
|
|
9712
|
+
};
|
|
9713
|
+
const isBlob = value => {
|
|
9714
|
+
return typeof value === 'object' && typeof value.type === 'string' && typeof value.stream === 'function' && typeof value.arrayBuffer === 'function' && typeof value.constructor === 'function' && typeof value.constructor.name === 'string' && /^(Blob|File)$/.test(value.constructor.name) && /^(Blob|File)$/.test(value[Symbol.toStringTag]);
|
|
9715
|
+
};
|
|
9716
|
+
const isFormData = value => {
|
|
9717
|
+
return value instanceof FormData;
|
|
9718
|
+
};
|
|
9719
|
+
const base64 = str => {
|
|
9612
9720
|
try {
|
|
9613
9721
|
return btoa(str);
|
|
9614
9722
|
} catch (err) {
|
|
9723
|
+
// @ts-ignore
|
|
9615
9724
|
return Buffer.from(str).toString('base64');
|
|
9616
9725
|
}
|
|
9617
|
-
}
|
|
9618
|
-
|
|
9726
|
+
};
|
|
9727
|
+
const getQueryString = params => {
|
|
9619
9728
|
const qs = [];
|
|
9620
|
-
|
|
9621
|
-
|
|
9729
|
+
const append = (key, value) => {
|
|
9730
|
+
qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
|
|
9731
|
+
};
|
|
9732
|
+
const process = (key, value) => {
|
|
9622
9733
|
if (isDefined(value)) {
|
|
9623
9734
|
if (Array.isArray(value)) {
|
|
9624
|
-
value.forEach(
|
|
9625
|
-
|
|
9735
|
+
value.forEach(v => {
|
|
9736
|
+
process(key, v);
|
|
9737
|
+
});
|
|
9738
|
+
} else if (typeof value === 'object') {
|
|
9739
|
+
Object.entries(value).forEach(([k, v]) => {
|
|
9740
|
+
process(`${key}[${k}]`, v);
|
|
9626
9741
|
});
|
|
9627
9742
|
} else {
|
|
9628
|
-
|
|
9743
|
+
append(key, value);
|
|
9629
9744
|
}
|
|
9630
9745
|
}
|
|
9746
|
+
};
|
|
9747
|
+
Object.entries(params).forEach(([key, value]) => {
|
|
9748
|
+
process(key, value);
|
|
9631
9749
|
});
|
|
9632
9750
|
if (qs.length > 0) {
|
|
9633
9751
|
return `?${qs.join('&')}`;
|
|
9634
9752
|
}
|
|
9635
9753
|
return '';
|
|
9636
|
-
}
|
|
9637
|
-
|
|
9638
|
-
const
|
|
9639
|
-
const
|
|
9754
|
+
};
|
|
9755
|
+
const getUrl = (config, options) => {
|
|
9756
|
+
const encoder = encodeURI;
|
|
9757
|
+
const path = options.url.replace('{api-version}', config.VERSION).replace(/{(.*?)}/g, (substring, group) => {
|
|
9758
|
+
var _a;
|
|
9759
|
+
if ((_a = options.path) === null || _a === void 0 ? void 0 : _a.hasOwnProperty(group)) {
|
|
9760
|
+
return encoder(String(options.path[group]));
|
|
9761
|
+
}
|
|
9762
|
+
return substring;
|
|
9763
|
+
});
|
|
9764
|
+
const url = `${config.BASE}${path}`;
|
|
9640
9765
|
if (options.query) {
|
|
9641
9766
|
return `${url}${getQueryString(options.query)}`;
|
|
9642
9767
|
}
|
|
9643
9768
|
return url;
|
|
9644
|
-
}
|
|
9645
|
-
|
|
9646
|
-
|
|
9647
|
-
|
|
9648
|
-
const
|
|
9649
|
-
|
|
9650
|
-
|
|
9651
|
-
}
|
|
9652
|
-
});
|
|
9653
|
-
return formData;
|
|
9654
|
-
}
|
|
9655
|
-
function resolve(options, resolver) {
|
|
9656
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
9657
|
-
if (typeof resolver === 'function') {
|
|
9658
|
-
return resolver(options);
|
|
9659
|
-
}
|
|
9660
|
-
return resolver;
|
|
9661
|
-
});
|
|
9662
|
-
}
|
|
9663
|
-
function getHeaders(options) {
|
|
9664
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
9665
|
-
const token = yield resolve(options, OpenAPI.TOKEN);
|
|
9666
|
-
const username = yield resolve(options, OpenAPI.USERNAME);
|
|
9667
|
-
const password = yield resolve(options, OpenAPI.PASSWORD);
|
|
9668
|
-
const additionalHeaders = yield resolve(options, OpenAPI.HEADERS);
|
|
9669
|
-
const defaultHeaders = Object.entries(Object.assign(Object.assign({
|
|
9670
|
-
Accept: 'application/json'
|
|
9671
|
-
}, additionalHeaders), options.headers)).filter(([key, value]) => isDefined(value)).reduce((headers, [key, value]) => Object.assign(Object.assign({}, headers), {
|
|
9672
|
-
[key]: value
|
|
9673
|
-
}), {});
|
|
9674
|
-
const headers = new Headers(defaultHeaders);
|
|
9675
|
-
if (isStringWithValue(token)) {
|
|
9676
|
-
headers.append('Authorization', `Bearer ${token}`);
|
|
9677
|
-
}
|
|
9678
|
-
if (isStringWithValue(username) && isStringWithValue(password)) {
|
|
9679
|
-
const credentials = base64(`${username}:${password}`);
|
|
9680
|
-
headers.append('Authorization', `Basic ${credentials}`);
|
|
9681
|
-
}
|
|
9682
|
-
if (options.body) {
|
|
9683
|
-
if (options.mediaType) {
|
|
9684
|
-
headers.append('Content-Type', options.mediaType);
|
|
9685
|
-
} else if (isBlob(options.body)) {
|
|
9686
|
-
headers.append('Content-Type', options.body.type || 'application/octet-stream');
|
|
9687
|
-
} else if (isString(options.body)) {
|
|
9688
|
-
headers.append('Content-Type', 'text/plain');
|
|
9769
|
+
};
|
|
9770
|
+
const getFormData = options => {
|
|
9771
|
+
if (options.formData) {
|
|
9772
|
+
const formData = new FormData();
|
|
9773
|
+
const process = (key, value) => {
|
|
9774
|
+
if (isString(value) || isBlob(value)) {
|
|
9775
|
+
formData.append(key, value);
|
|
9689
9776
|
} else {
|
|
9690
|
-
|
|
9777
|
+
formData.append(key, JSON.stringify(value));
|
|
9691
9778
|
}
|
|
9779
|
+
};
|
|
9780
|
+
Object.entries(options.formData).filter(([_, value]) => isDefined(value)).forEach(([key, value]) => {
|
|
9781
|
+
if (Array.isArray(value)) {
|
|
9782
|
+
value.forEach(v => process(key, v));
|
|
9783
|
+
} else {
|
|
9784
|
+
process(key, value);
|
|
9785
|
+
}
|
|
9786
|
+
});
|
|
9787
|
+
return formData;
|
|
9788
|
+
}
|
|
9789
|
+
return undefined;
|
|
9790
|
+
};
|
|
9791
|
+
const resolve = (options, resolver) => __awaiter(void 0, void 0, void 0, function* () {
|
|
9792
|
+
if (typeof resolver === 'function') {
|
|
9793
|
+
return resolver(options);
|
|
9794
|
+
}
|
|
9795
|
+
return resolver;
|
|
9796
|
+
});
|
|
9797
|
+
const getHeaders = (config, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
9798
|
+
const [token, username, password, additionalHeaders] = yield Promise.all([resolve(options, config.TOKEN), resolve(options, config.USERNAME), resolve(options, config.PASSWORD), resolve(options, config.HEADERS)]);
|
|
9799
|
+
const headers = Object.entries(Object.assign(Object.assign({
|
|
9800
|
+
Accept: 'application/json'
|
|
9801
|
+
}, additionalHeaders), options.headers)).filter(([_, value]) => isDefined(value)).reduce((headers, [key, value]) => Object.assign(Object.assign({}, headers), {
|
|
9802
|
+
[key]: String(value)
|
|
9803
|
+
}), {});
|
|
9804
|
+
if (isStringWithValue(token)) {
|
|
9805
|
+
headers['Authorization'] = `Bearer ${token}`;
|
|
9806
|
+
}
|
|
9807
|
+
if (isStringWithValue(username) && isStringWithValue(password)) {
|
|
9808
|
+
const credentials = base64(`${username}:${password}`);
|
|
9809
|
+
headers['Authorization'] = `Basic ${credentials}`;
|
|
9810
|
+
}
|
|
9811
|
+
if (options.body !== undefined) {
|
|
9812
|
+
if (options.mediaType) {
|
|
9813
|
+
headers['Content-Type'] = options.mediaType;
|
|
9814
|
+
} else if (isBlob(options.body)) {
|
|
9815
|
+
headers['Content-Type'] = options.body.type || 'application/octet-stream';
|
|
9816
|
+
} else if (isString(options.body)) {
|
|
9817
|
+
headers['Content-Type'] = 'text/plain';
|
|
9818
|
+
} else if (!isFormData(options.body)) {
|
|
9819
|
+
headers['Content-Type'] = 'application/json';
|
|
9692
9820
|
}
|
|
9693
|
-
return headers;
|
|
9694
|
-
});
|
|
9695
|
-
}
|
|
9696
|
-
function getRequestBody(options) {
|
|
9697
|
-
var _a;
|
|
9698
|
-
if (options.formData) {
|
|
9699
|
-
return getFormData(options.formData);
|
|
9700
9821
|
}
|
|
9701
|
-
|
|
9822
|
+
return new Headers(headers);
|
|
9823
|
+
});
|
|
9824
|
+
const getRequestBody = options => {
|
|
9825
|
+
var _a;
|
|
9826
|
+
if (options.body !== undefined) {
|
|
9702
9827
|
if ((_a = options.mediaType) === null || _a === void 0 ? void 0 : _a.includes('/json')) {
|
|
9703
9828
|
return JSON.stringify(options.body);
|
|
9704
|
-
} else if (isString(options.body) || isBlob(options.body)) {
|
|
9829
|
+
} else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {
|
|
9705
9830
|
return options.body;
|
|
9706
9831
|
} else {
|
|
9707
9832
|
return JSON.stringify(options.body);
|
|
9708
9833
|
}
|
|
9709
9834
|
}
|
|
9710
9835
|
return undefined;
|
|
9711
|
-
}
|
|
9712
|
-
|
|
9713
|
-
|
|
9714
|
-
|
|
9715
|
-
|
|
9716
|
-
|
|
9717
|
-
|
|
9718
|
-
|
|
9719
|
-
|
|
9720
|
-
|
|
9721
|
-
|
|
9722
|
-
|
|
9836
|
+
};
|
|
9837
|
+
const sendRequest = (config, options, url, body, formData, headers, onCancel) => __awaiter(void 0, void 0, void 0, function* () {
|
|
9838
|
+
const controller = new AbortController();
|
|
9839
|
+
const request = {
|
|
9840
|
+
headers,
|
|
9841
|
+
body: body !== null && body !== void 0 ? body : formData,
|
|
9842
|
+
method: options.method,
|
|
9843
|
+
signal: controller.signal
|
|
9844
|
+
};
|
|
9845
|
+
onCancel(() => controller.abort());
|
|
9846
|
+
return yield fetch(url, request);
|
|
9847
|
+
});
|
|
9848
|
+
const getResponseHeader = (response, responseHeader) => {
|
|
9723
9849
|
if (responseHeader) {
|
|
9724
9850
|
const content = response.headers.get(responseHeader);
|
|
9725
9851
|
if (isString(content)) {
|
|
9726
9852
|
return content;
|
|
9727
9853
|
}
|
|
9728
9854
|
}
|
|
9729
|
-
return
|
|
9730
|
-
}
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
|
|
9736
|
-
|
|
9737
|
-
|
|
9738
|
-
|
|
9739
|
-
|
|
9740
|
-
|
|
9741
|
-
|
|
9742
|
-
}
|
|
9855
|
+
return undefined;
|
|
9856
|
+
};
|
|
9857
|
+
const getResponseBody = response => __awaiter(void 0, void 0, void 0, function* () {
|
|
9858
|
+
if (response.status !== 204) {
|
|
9859
|
+
try {
|
|
9860
|
+
const contentType = response.headers.get('Content-Type');
|
|
9861
|
+
if (contentType) {
|
|
9862
|
+
const jsonTypes = ['application/json', 'application/problem+json'];
|
|
9863
|
+
const isJSON = jsonTypes.some(type => contentType.toLowerCase().startsWith(type));
|
|
9864
|
+
if (isJSON) {
|
|
9865
|
+
return yield response.json();
|
|
9866
|
+
} else {
|
|
9867
|
+
return yield response.text();
|
|
9743
9868
|
}
|
|
9744
|
-
} catch (error) {
|
|
9745
|
-
console.error(error);
|
|
9746
9869
|
}
|
|
9870
|
+
} catch (error) {
|
|
9871
|
+
console.error(error);
|
|
9747
9872
|
}
|
|
9748
|
-
|
|
9749
|
-
|
|
9750
|
-
}
|
|
9751
|
-
|
|
9873
|
+
}
|
|
9874
|
+
return undefined;
|
|
9875
|
+
});
|
|
9876
|
+
const catchErrorCodes = (options, result) => {
|
|
9877
|
+
var _a, _b;
|
|
9752
9878
|
const errors = Object.assign({
|
|
9753
9879
|
400: 'Bad Request',
|
|
9754
9880
|
401: 'Unauthorized',
|
|
@@ -9760,35 +9886,54 @@ function catchErrors(options, result) {
|
|
|
9760
9886
|
}, options.errors);
|
|
9761
9887
|
const error = errors[result.status];
|
|
9762
9888
|
if (error) {
|
|
9763
|
-
throw new ApiError(result, error);
|
|
9889
|
+
throw new ApiError(options, result, error);
|
|
9764
9890
|
}
|
|
9765
9891
|
if (!result.ok) {
|
|
9766
|
-
|
|
9892
|
+
const errorStatus = (_a = result.status) !== null && _a !== void 0 ? _a : 'unknown';
|
|
9893
|
+
const errorStatusText = (_b = result.statusText) !== null && _b !== void 0 ? _b : 'unknown';
|
|
9894
|
+
const errorBody = (() => {
|
|
9895
|
+
try {
|
|
9896
|
+
return JSON.stringify(result.body, null, 2);
|
|
9897
|
+
} catch (e) {
|
|
9898
|
+
return undefined;
|
|
9899
|
+
}
|
|
9900
|
+
})();
|
|
9901
|
+
throw new ApiError(options, result, `Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`);
|
|
9767
9902
|
}
|
|
9768
|
-
}
|
|
9903
|
+
};
|
|
9769
9904
|
/**
|
|
9770
|
-
* Request
|
|
9771
|
-
* @param
|
|
9772
|
-
* @
|
|
9905
|
+
* Request method
|
|
9906
|
+
* @param config The OpenAPI configuration object
|
|
9907
|
+
* @param options The request options from the service
|
|
9908
|
+
* @returns CancelablePromise<T>
|
|
9773
9909
|
* @throws ApiError
|
|
9774
9910
|
*/
|
|
9775
|
-
|
|
9776
|
-
return __awaiter(
|
|
9777
|
-
|
|
9778
|
-
|
|
9779
|
-
|
|
9780
|
-
|
|
9781
|
-
|
|
9782
|
-
|
|
9783
|
-
|
|
9784
|
-
|
|
9785
|
-
|
|
9786
|
-
|
|
9787
|
-
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
|
|
9791
|
-
|
|
9911
|
+
const request = (config, options) => {
|
|
9912
|
+
return new CancelablePromise((resolve, reject, onCancel) => __awaiter(void 0, void 0, void 0, function* () {
|
|
9913
|
+
try {
|
|
9914
|
+
const url = getUrl(config, options);
|
|
9915
|
+
const formData = getFormData(options);
|
|
9916
|
+
const body = getRequestBody(options);
|
|
9917
|
+
const headers = yield getHeaders(config, options);
|
|
9918
|
+
if (!onCancel.isCancelled) {
|
|
9919
|
+
const response = yield sendRequest(config, options, url, body, formData, headers, onCancel);
|
|
9920
|
+
const responseBody = yield getResponseBody(response);
|
|
9921
|
+
const responseHeader = getResponseHeader(response, options.responseHeader);
|
|
9922
|
+
const result = {
|
|
9923
|
+
url,
|
|
9924
|
+
ok: response.ok,
|
|
9925
|
+
status: response.status,
|
|
9926
|
+
statusText: response.statusText,
|
|
9927
|
+
body: responseHeader !== null && responseHeader !== void 0 ? responseHeader : responseBody
|
|
9928
|
+
};
|
|
9929
|
+
catchErrorCodes(options, result);
|
|
9930
|
+
resolve(result.body);
|
|
9931
|
+
}
|
|
9932
|
+
} catch (error) {
|
|
9933
|
+
reject(error);
|
|
9934
|
+
}
|
|
9935
|
+
}));
|
|
9936
|
+
};
|
|
9792
9937
|
|
|
9793
9938
|
class DashboardsService {
|
|
9794
9939
|
/**
|
|
@@ -9800,7 +9945,7 @@ class DashboardsService {
|
|
|
9800
9945
|
* @param sort Sort ordering to apply to the query.
|
|
9801
9946
|
* @param filter List of filters (each filter is a separate query param, and they are OR'ed).
|
|
9802
9947
|
*
|
|
9803
|
-
* * **Filterable field names**: author_fullname, author_id, bi_type, categories, created_dt, dataset_id, description, external_embedding_id, external_id, id, is_ootb_dashboard, lifecycle_state, name, target_apps, updated_by_fullname, updated_by_id, updated_dt
|
|
9948
|
+
* * **Filterable field names**: author_fullname, author_id, bi_type, categories, created_dt, dataset_id, description, external_embedding_id, external_id, featured, id, is_ootb_dashboard, lifecycle_state, name, target_apps, updated_by_fullname, updated_by_id, updated_dt
|
|
9804
9949
|
* * **Searchable field names**: author_fullname, categories, description, name, updated_by_fullname
|
|
9805
9950
|
*
|
|
9806
9951
|
* @param favorite Boolean flag to only return dashboards marked as favorites.
|
|
@@ -9819,39 +9964,36 @@ class DashboardsService {
|
|
|
9819
9964
|
* @returns Error Default error response
|
|
9820
9965
|
* @throws ApiError
|
|
9821
9966
|
*/
|
|
9822
|
-
static getDashboards() {
|
|
9823
|
-
return
|
|
9824
|
-
|
|
9825
|
-
|
|
9826
|
-
|
|
9827
|
-
|
|
9828
|
-
|
|
9829
|
-
|
|
9830
|
-
|
|
9831
|
-
|
|
9832
|
-
|
|
9833
|
-
|
|
9834
|
-
|
|
9835
|
-
|
|
9836
|
-
|
|
9837
|
-
|
|
9838
|
-
|
|
9839
|
-
|
|
9840
|
-
|
|
9841
|
-
|
|
9842
|
-
|
|
9843
|
-
|
|
9844
|
-
|
|
9845
|
-
|
|
9846
|
-
|
|
9847
|
-
|
|
9848
|
-
|
|
9849
|
-
|
|
9850
|
-
|
|
9851
|
-
|
|
9852
|
-
}
|
|
9853
|
-
});
|
|
9854
|
-
return result.body;
|
|
9967
|
+
static getDashboards(xDigitalaiAccountId = null, start, count = 20, sort = 'id', filter, favorite = null, q = null, authorFullname = null, authorId = null, biType = 'MICROSTRATEGY', description = null, id = null, isOotbDashboard = null, lifecycleState = null, name = null, targetApp = null, viewModified = false) {
|
|
9968
|
+
return request(OpenAPI, {
|
|
9969
|
+
method: 'GET',
|
|
9970
|
+
url: '/metadata/bi/dashboards',
|
|
9971
|
+
headers: {
|
|
9972
|
+
'X-Digitalai-Account-ID': xDigitalaiAccountId
|
|
9973
|
+
},
|
|
9974
|
+
query: {
|
|
9975
|
+
start: start,
|
|
9976
|
+
count: count,
|
|
9977
|
+
sort: sort,
|
|
9978
|
+
filter: filter,
|
|
9979
|
+
favorite: favorite,
|
|
9980
|
+
q: q,
|
|
9981
|
+
author_fullname: authorFullname,
|
|
9982
|
+
author_id: authorId,
|
|
9983
|
+
bi_type: biType,
|
|
9984
|
+
description: description,
|
|
9985
|
+
id: id,
|
|
9986
|
+
is_ootb_dashboard: isOotbDashboard,
|
|
9987
|
+
lifecycle_state: lifecycleState,
|
|
9988
|
+
name: name,
|
|
9989
|
+
target_app: targetApp,
|
|
9990
|
+
view_modified: viewModified
|
|
9991
|
+
},
|
|
9992
|
+
errors: {
|
|
9993
|
+
400: `An unknown parameter was specified.`,
|
|
9994
|
+
401: `Could not resolve a valid Tenant from the provided API Token.`,
|
|
9995
|
+
422: `Unprocessable Entity`
|
|
9996
|
+
}
|
|
9855
9997
|
});
|
|
9856
9998
|
}
|
|
9857
9999
|
/**
|
|
@@ -9863,23 +10005,20 @@ class DashboardsService {
|
|
|
9863
10005
|
* @returns Error Default error response
|
|
9864
10006
|
* @throws ApiError
|
|
9865
10007
|
*/
|
|
9866
|
-
static postDashboards(
|
|
9867
|
-
return
|
|
9868
|
-
|
|
9869
|
-
|
|
9870
|
-
|
|
9871
|
-
|
|
9872
|
-
|
|
9873
|
-
|
|
9874
|
-
|
|
9875
|
-
|
|
9876
|
-
|
|
9877
|
-
|
|
9878
|
-
|
|
9879
|
-
|
|
9880
|
-
}
|
|
9881
|
-
});
|
|
9882
|
-
return result.body;
|
|
10008
|
+
static postDashboards(requestBody, xDigitalaiAccountId = null) {
|
|
10009
|
+
return request(OpenAPI, {
|
|
10010
|
+
method: 'POST',
|
|
10011
|
+
url: '/metadata/bi/dashboards',
|
|
10012
|
+
headers: {
|
|
10013
|
+
'X-Digitalai-Account-ID': xDigitalaiAccountId
|
|
10014
|
+
},
|
|
10015
|
+
body: requestBody,
|
|
10016
|
+
mediaType: 'application/json',
|
|
10017
|
+
errors: {
|
|
10018
|
+
400: `The provided data is not valid.`,
|
|
10019
|
+
404: `The dashboard could not be found.`,
|
|
10020
|
+
422: `Unprocessable Entity`
|
|
10021
|
+
}
|
|
9883
10022
|
});
|
|
9884
10023
|
}
|
|
9885
10024
|
/**
|
|
@@ -9891,21 +10030,21 @@ class DashboardsService {
|
|
|
9891
10030
|
* @returns Error Default error response
|
|
9892
10031
|
* @throws ApiError
|
|
9893
10032
|
*/
|
|
9894
|
-
static getDashboard(
|
|
9895
|
-
return
|
|
9896
|
-
|
|
9897
|
-
|
|
9898
|
-
|
|
9899
|
-
|
|
9900
|
-
|
|
9901
|
-
|
|
9902
|
-
|
|
9903
|
-
|
|
9904
|
-
|
|
9905
|
-
|
|
9906
|
-
|
|
9907
|
-
|
|
9908
|
-
|
|
10033
|
+
static getDashboard(dashboardId, xDigitalaiAccountId = null) {
|
|
10034
|
+
return request(OpenAPI, {
|
|
10035
|
+
method: 'GET',
|
|
10036
|
+
url: '/metadata/bi/dashboards/{dashboard_id}',
|
|
10037
|
+
path: {
|
|
10038
|
+
dashboard_id: dashboardId
|
|
10039
|
+
},
|
|
10040
|
+
headers: {
|
|
10041
|
+
'X-Digitalai-Account-ID': xDigitalaiAccountId
|
|
10042
|
+
},
|
|
10043
|
+
errors: {
|
|
10044
|
+
400: `An unknown parameter was specified.`,
|
|
10045
|
+
401: `Could not resolve a valid Tenant from the provided API Token.`,
|
|
10046
|
+
404: `The dashboard could not be found.`
|
|
10047
|
+
}
|
|
9909
10048
|
});
|
|
9910
10049
|
}
|
|
9911
10050
|
/**
|
|
@@ -9919,28 +10058,28 @@ class DashboardsService {
|
|
|
9919
10058
|
* @returns Error Default error response
|
|
9920
10059
|
* @throws ApiError
|
|
9921
10060
|
*/
|
|
9922
|
-
static putDashboard(
|
|
9923
|
-
return
|
|
9924
|
-
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
|
|
9928
|
-
|
|
9929
|
-
|
|
9930
|
-
|
|
9931
|
-
|
|
9932
|
-
|
|
9933
|
-
|
|
9934
|
-
|
|
9935
|
-
|
|
9936
|
-
|
|
9937
|
-
|
|
9938
|
-
|
|
9939
|
-
|
|
9940
|
-
|
|
9941
|
-
|
|
9942
|
-
|
|
9943
|
-
|
|
10061
|
+
static putDashboard(dashboardId, requestBody, xDigitalaiAccountId = null, isSync = null) {
|
|
10062
|
+
return request(OpenAPI, {
|
|
10063
|
+
method: 'PUT',
|
|
10064
|
+
url: '/metadata/bi/dashboards/{dashboard_id}',
|
|
10065
|
+
path: {
|
|
10066
|
+
dashboard_id: dashboardId
|
|
10067
|
+
},
|
|
10068
|
+
headers: {
|
|
10069
|
+
'X-Digitalai-Account-ID': xDigitalaiAccountId
|
|
10070
|
+
},
|
|
10071
|
+
query: {
|
|
10072
|
+
is_sync: isSync
|
|
10073
|
+
},
|
|
10074
|
+
body: requestBody,
|
|
10075
|
+
mediaType: 'application/json',
|
|
10076
|
+
errors: {
|
|
10077
|
+
400: `The provided data is not valid.`,
|
|
10078
|
+
401: `Could not resolve a valid Tenant from the provided API Token.`,
|
|
10079
|
+
404: `The dashboard could not be found.`,
|
|
10080
|
+
409: `Unable to update object because IDs are different.`,
|
|
10081
|
+
422: `Unprocessable Entity`
|
|
10082
|
+
}
|
|
9944
10083
|
});
|
|
9945
10084
|
}
|
|
9946
10085
|
/**
|
|
@@ -9954,28 +10093,28 @@ class DashboardsService {
|
|
|
9954
10093
|
* @returns Error Default error response
|
|
9955
10094
|
* @throws ApiError
|
|
9956
10095
|
*/
|
|
9957
|
-
static patchDashboard(
|
|
9958
|
-
return
|
|
9959
|
-
|
|
9960
|
-
|
|
9961
|
-
|
|
9962
|
-
|
|
9963
|
-
|
|
9964
|
-
|
|
9965
|
-
|
|
9966
|
-
|
|
9967
|
-
|
|
9968
|
-
|
|
9969
|
-
|
|
9970
|
-
|
|
9971
|
-
|
|
9972
|
-
|
|
9973
|
-
|
|
9974
|
-
|
|
9975
|
-
|
|
9976
|
-
|
|
9977
|
-
|
|
9978
|
-
|
|
10096
|
+
static patchDashboard(dashboardId, requestBody, xDigitalaiAccountId = null, isSync = null) {
|
|
10097
|
+
return request(OpenAPI, {
|
|
10098
|
+
method: 'PATCH',
|
|
10099
|
+
url: '/metadata/bi/dashboards/{dashboard_id}',
|
|
10100
|
+
path: {
|
|
10101
|
+
dashboard_id: dashboardId
|
|
10102
|
+
},
|
|
10103
|
+
headers: {
|
|
10104
|
+
'X-Digitalai-Account-ID': xDigitalaiAccountId
|
|
10105
|
+
},
|
|
10106
|
+
query: {
|
|
10107
|
+
is_sync: isSync
|
|
10108
|
+
},
|
|
10109
|
+
body: requestBody,
|
|
10110
|
+
mediaType: 'application/json',
|
|
10111
|
+
errors: {
|
|
10112
|
+
400: `The provided data is not valid.`,
|
|
10113
|
+
401: `Could not resolve a valid Tenant from the provided API Token.`,
|
|
10114
|
+
404: `The dashboard could not be found.`,
|
|
10115
|
+
409: `Unable to update object because IDs are different.`,
|
|
10116
|
+
422: `Unprocessable Entity`
|
|
10117
|
+
}
|
|
9979
10118
|
});
|
|
9980
10119
|
}
|
|
9981
10120
|
/**
|
|
@@ -9986,16 +10125,16 @@ class DashboardsService {
|
|
|
9986
10125
|
* @returns Error Default error response
|
|
9987
10126
|
* @throws ApiError
|
|
9988
10127
|
*/
|
|
9989
|
-
static deleteDashboard(
|
|
9990
|
-
return
|
|
9991
|
-
|
|
9992
|
-
|
|
9993
|
-
|
|
9994
|
-
|
|
9995
|
-
|
|
9996
|
-
|
|
9997
|
-
|
|
9998
|
-
|
|
10128
|
+
static deleteDashboard(dashboardId, xDigitalaiAccountId = null) {
|
|
10129
|
+
return request(OpenAPI, {
|
|
10130
|
+
method: 'DELETE',
|
|
10131
|
+
url: '/metadata/bi/dashboards/{dashboard_id}',
|
|
10132
|
+
path: {
|
|
10133
|
+
dashboard_id: dashboardId
|
|
10134
|
+
},
|
|
10135
|
+
headers: {
|
|
10136
|
+
'X-Digitalai-Account-ID': xDigitalaiAccountId
|
|
10137
|
+
}
|
|
9999
10138
|
});
|
|
10000
10139
|
}
|
|
10001
10140
|
/**
|
|
@@ -10007,21 +10146,21 @@ class DashboardsService {
|
|
|
10007
10146
|
* @returns Error Default error response
|
|
10008
10147
|
* @throws ApiError
|
|
10009
10148
|
*/
|
|
10010
|
-
static getInProgressDashboard(
|
|
10011
|
-
return
|
|
10012
|
-
|
|
10013
|
-
|
|
10014
|
-
|
|
10015
|
-
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
|
|
10019
|
-
|
|
10020
|
-
|
|
10021
|
-
|
|
10022
|
-
|
|
10023
|
-
|
|
10024
|
-
|
|
10149
|
+
static getInProgressDashboard(dashboardId, xDigitalaiAccountId = null) {
|
|
10150
|
+
return request(OpenAPI, {
|
|
10151
|
+
method: 'GET',
|
|
10152
|
+
url: '/metadata/bi/dashboards/{dashboard_id}/inprogress',
|
|
10153
|
+
path: {
|
|
10154
|
+
dashboard_id: dashboardId
|
|
10155
|
+
},
|
|
10156
|
+
headers: {
|
|
10157
|
+
'X-Digitalai-Account-ID': xDigitalaiAccountId
|
|
10158
|
+
},
|
|
10159
|
+
errors: {
|
|
10160
|
+
400: `An unknown parameter was specified.`,
|
|
10161
|
+
401: `Could not resolve a valid Tenant from the provided API Token.`,
|
|
10162
|
+
404: `The dashboard could not be found.`
|
|
10163
|
+
}
|
|
10025
10164
|
});
|
|
10026
10165
|
}
|
|
10027
10166
|
/**
|
|
@@ -10034,24 +10173,24 @@ class DashboardsService {
|
|
|
10034
10173
|
* @returns Error Default error response
|
|
10035
10174
|
* @throws ApiError
|
|
10036
10175
|
*/
|
|
10037
|
-
static postInProgressDashboard(
|
|
10038
|
-
return
|
|
10039
|
-
|
|
10040
|
-
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
|
|
10044
|
-
|
|
10045
|
-
|
|
10046
|
-
|
|
10047
|
-
|
|
10048
|
-
|
|
10049
|
-
|
|
10050
|
-
|
|
10051
|
-
|
|
10052
|
-
|
|
10053
|
-
|
|
10054
|
-
|
|
10176
|
+
static postInProgressDashboard(dashboardId, xDigitalaiAccountId = null, requestBody) {
|
|
10177
|
+
return request(OpenAPI, {
|
|
10178
|
+
method: 'POST',
|
|
10179
|
+
url: '/metadata/bi/dashboards/{dashboard_id}/inprogress',
|
|
10180
|
+
path: {
|
|
10181
|
+
dashboard_id: dashboardId
|
|
10182
|
+
},
|
|
10183
|
+
headers: {
|
|
10184
|
+
'X-Digitalai-Account-ID': xDigitalaiAccountId
|
|
10185
|
+
},
|
|
10186
|
+
body: requestBody,
|
|
10187
|
+
mediaType: 'application/json',
|
|
10188
|
+
errors: {
|
|
10189
|
+
400: `The provided data is not valid.`,
|
|
10190
|
+
404: `The dashboard could not be found.`,
|
|
10191
|
+
409: `Unable to update object because IDs are different.`,
|
|
10192
|
+
422: `Unprocessable Entity`
|
|
10193
|
+
}
|
|
10055
10194
|
});
|
|
10056
10195
|
}
|
|
10057
10196
|
/**
|
|
@@ -10065,28 +10204,28 @@ class DashboardsService {
|
|
|
10065
10204
|
* @returns Error Default error response
|
|
10066
10205
|
* @throws ApiError
|
|
10067
10206
|
*/
|
|
10068
|
-
static putInProgressDashboard(
|
|
10069
|
-
return
|
|
10070
|
-
|
|
10071
|
-
|
|
10072
|
-
|
|
10073
|
-
|
|
10074
|
-
|
|
10075
|
-
|
|
10076
|
-
|
|
10077
|
-
|
|
10078
|
-
|
|
10079
|
-
|
|
10080
|
-
|
|
10081
|
-
|
|
10082
|
-
|
|
10083
|
-
|
|
10084
|
-
|
|
10085
|
-
|
|
10086
|
-
|
|
10087
|
-
|
|
10088
|
-
|
|
10089
|
-
|
|
10207
|
+
static putInProgressDashboard(dashboardId, requestBody, xDigitalaiAccountId = null, isSync = null) {
|
|
10208
|
+
return request(OpenAPI, {
|
|
10209
|
+
method: 'PUT',
|
|
10210
|
+
url: '/metadata/bi/dashboards/{dashboard_id}/inprogress',
|
|
10211
|
+
path: {
|
|
10212
|
+
dashboard_id: dashboardId
|
|
10213
|
+
},
|
|
10214
|
+
headers: {
|
|
10215
|
+
'X-Digitalai-Account-ID': xDigitalaiAccountId
|
|
10216
|
+
},
|
|
10217
|
+
query: {
|
|
10218
|
+
is_sync: isSync
|
|
10219
|
+
},
|
|
10220
|
+
body: requestBody,
|
|
10221
|
+
mediaType: 'application/json',
|
|
10222
|
+
errors: {
|
|
10223
|
+
400: `The provided data is not valid.`,
|
|
10224
|
+
401: `Could not resolve a valid Tenant from the provided API Token.`,
|
|
10225
|
+
404: `The dashboard could not be found.`,
|
|
10226
|
+
409: `Unable to update object because IDs are different.`,
|
|
10227
|
+
422: `Unprocessable Entity`
|
|
10228
|
+
}
|
|
10090
10229
|
});
|
|
10091
10230
|
}
|
|
10092
10231
|
/**
|
|
@@ -10100,28 +10239,28 @@ class DashboardsService {
|
|
|
10100
10239
|
* @returns Error Default error response
|
|
10101
10240
|
* @throws ApiError
|
|
10102
10241
|
*/
|
|
10103
|
-
static patchInProgressDashboard(
|
|
10104
|
-
return
|
|
10105
|
-
|
|
10106
|
-
|
|
10107
|
-
|
|
10108
|
-
|
|
10109
|
-
|
|
10110
|
-
|
|
10111
|
-
|
|
10112
|
-
|
|
10113
|
-
|
|
10114
|
-
|
|
10115
|
-
|
|
10116
|
-
|
|
10117
|
-
|
|
10118
|
-
|
|
10119
|
-
|
|
10120
|
-
|
|
10121
|
-
|
|
10122
|
-
|
|
10123
|
-
|
|
10124
|
-
|
|
10242
|
+
static patchInProgressDashboard(dashboardId, requestBody, xDigitalaiAccountId = null, isSync = null) {
|
|
10243
|
+
return request(OpenAPI, {
|
|
10244
|
+
method: 'PATCH',
|
|
10245
|
+
url: '/metadata/bi/dashboards/{dashboard_id}/inprogress',
|
|
10246
|
+
path: {
|
|
10247
|
+
dashboard_id: dashboardId
|
|
10248
|
+
},
|
|
10249
|
+
headers: {
|
|
10250
|
+
'X-Digitalai-Account-ID': xDigitalaiAccountId
|
|
10251
|
+
},
|
|
10252
|
+
query: {
|
|
10253
|
+
is_sync: isSync
|
|
10254
|
+
},
|
|
10255
|
+
body: requestBody,
|
|
10256
|
+
mediaType: 'application/json',
|
|
10257
|
+
errors: {
|
|
10258
|
+
400: `The provided data is not valid.`,
|
|
10259
|
+
401: `Could not resolve a valid Tenant from the provided API Token.`,
|
|
10260
|
+
404: `The dashboard could not be found.`,
|
|
10261
|
+
409: `Unable to update object because IDs are different.`,
|
|
10262
|
+
422: `Unprocessable Entity`
|
|
10263
|
+
}
|
|
10125
10264
|
});
|
|
10126
10265
|
}
|
|
10127
10266
|
/**
|
|
@@ -10133,22 +10272,22 @@ class DashboardsService {
|
|
|
10133
10272
|
* @returns Error Default error response
|
|
10134
10273
|
* @throws ApiError
|
|
10135
10274
|
*/
|
|
10136
|
-
static deleteInProgressDashboard(
|
|
10137
|
-
return
|
|
10138
|
-
|
|
10139
|
-
|
|
10140
|
-
|
|
10141
|
-
|
|
10142
|
-
|
|
10143
|
-
|
|
10144
|
-
|
|
10145
|
-
|
|
10146
|
-
|
|
10147
|
-
|
|
10148
|
-
|
|
10149
|
-
|
|
10150
|
-
|
|
10151
|
-
|
|
10275
|
+
static deleteInProgressDashboard(dashboardId, xDigitalaiAccountId = null, publish = false) {
|
|
10276
|
+
return request(OpenAPI, {
|
|
10277
|
+
method: 'DELETE',
|
|
10278
|
+
url: '/metadata/bi/dashboards/{dashboard_id}/inprogress',
|
|
10279
|
+
path: {
|
|
10280
|
+
dashboard_id: dashboardId
|
|
10281
|
+
},
|
|
10282
|
+
headers: {
|
|
10283
|
+
'X-Digitalai-Account-ID': xDigitalaiAccountId
|
|
10284
|
+
},
|
|
10285
|
+
query: {
|
|
10286
|
+
publish: publish
|
|
10287
|
+
},
|
|
10288
|
+
errors: {
|
|
10289
|
+
422: `Unprocessable Entity`
|
|
10290
|
+
}
|
|
10152
10291
|
});
|
|
10153
10292
|
}
|
|
10154
10293
|
/**
|
|
@@ -10161,23 +10300,23 @@ class DashboardsService {
|
|
|
10161
10300
|
* @returns Error Default error response
|
|
10162
10301
|
* @throws ApiError
|
|
10163
10302
|
*/
|
|
10164
|
-
static copyDashboard(
|
|
10165
|
-
return
|
|
10166
|
-
|
|
10167
|
-
|
|
10168
|
-
|
|
10169
|
-
|
|
10170
|
-
|
|
10171
|
-
|
|
10172
|
-
|
|
10173
|
-
|
|
10174
|
-
|
|
10175
|
-
|
|
10176
|
-
|
|
10177
|
-
|
|
10178
|
-
|
|
10179
|
-
|
|
10180
|
-
|
|
10303
|
+
static copyDashboard(dashboardId, xDigitalaiAccountId = null, requestBody) {
|
|
10304
|
+
return request(OpenAPI, {
|
|
10305
|
+
method: 'POST',
|
|
10306
|
+
url: '/metadata/bi/dashboards/{dashboard_id}/copy',
|
|
10307
|
+
path: {
|
|
10308
|
+
dashboard_id: dashboardId
|
|
10309
|
+
},
|
|
10310
|
+
headers: {
|
|
10311
|
+
'X-Digitalai-Account-ID': xDigitalaiAccountId
|
|
10312
|
+
},
|
|
10313
|
+
body: requestBody,
|
|
10314
|
+
mediaType: 'application/json',
|
|
10315
|
+
errors: {
|
|
10316
|
+
400: `The provided data is not valid.`,
|
|
10317
|
+
404: `The dashboard could not be found.`,
|
|
10318
|
+
422: `Unprocessable Entity`
|
|
10319
|
+
}
|
|
10181
10320
|
});
|
|
10182
10321
|
}
|
|
10183
10322
|
/**
|
|
@@ -10189,20 +10328,20 @@ class DashboardsService {
|
|
|
10189
10328
|
* @returns Error Default error response
|
|
10190
10329
|
* @throws ApiError
|
|
10191
10330
|
*/
|
|
10192
|
-
static favoriteDashboard(
|
|
10193
|
-
return
|
|
10194
|
-
|
|
10195
|
-
|
|
10196
|
-
|
|
10197
|
-
|
|
10198
|
-
|
|
10199
|
-
|
|
10200
|
-
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
|
|
10204
|
-
|
|
10205
|
-
|
|
10331
|
+
static favoriteDashboard(dashboardId, xDigitalaiAccountId = null) {
|
|
10332
|
+
return request(OpenAPI, {
|
|
10333
|
+
method: 'POST',
|
|
10334
|
+
url: '/metadata/bi/dashboards/{dashboard_id}/favorite',
|
|
10335
|
+
path: {
|
|
10336
|
+
dashboard_id: dashboardId
|
|
10337
|
+
},
|
|
10338
|
+
headers: {
|
|
10339
|
+
'X-Digitalai-Account-ID': xDigitalaiAccountId
|
|
10340
|
+
},
|
|
10341
|
+
errors: {
|
|
10342
|
+
400: `The provided data is not valid.`,
|
|
10343
|
+
404: `The dashboard could not be found.`
|
|
10344
|
+
}
|
|
10206
10345
|
});
|
|
10207
10346
|
}
|
|
10208
10347
|
/**
|
|
@@ -10214,20 +10353,20 @@ class DashboardsService {
|
|
|
10214
10353
|
* @returns Error Default error response
|
|
10215
10354
|
* @throws ApiError
|
|
10216
10355
|
*/
|
|
10217
|
-
static unfavoriteDashboard(
|
|
10218
|
-
return
|
|
10219
|
-
|
|
10220
|
-
|
|
10221
|
-
|
|
10222
|
-
|
|
10223
|
-
|
|
10224
|
-
|
|
10225
|
-
|
|
10226
|
-
|
|
10227
|
-
|
|
10228
|
-
|
|
10229
|
-
|
|
10230
|
-
|
|
10356
|
+
static unfavoriteDashboard(dashboardId, xDigitalaiAccountId = null) {
|
|
10357
|
+
return request(OpenAPI, {
|
|
10358
|
+
method: 'DELETE',
|
|
10359
|
+
url: '/metadata/bi/dashboards/{dashboard_id}/favorite',
|
|
10360
|
+
path: {
|
|
10361
|
+
dashboard_id: dashboardId
|
|
10362
|
+
},
|
|
10363
|
+
headers: {
|
|
10364
|
+
'X-Digitalai-Account-ID': xDigitalaiAccountId
|
|
10365
|
+
},
|
|
10366
|
+
errors: {
|
|
10367
|
+
400: `The provided data is not valid.`,
|
|
10368
|
+
404: `The dashboard could not be found.`
|
|
10369
|
+
}
|
|
10231
10370
|
});
|
|
10232
10371
|
}
|
|
10233
10372
|
/**
|
|
@@ -10247,28 +10386,25 @@ class DashboardsService {
|
|
|
10247
10386
|
* @returns Error Default error response
|
|
10248
10387
|
* @throws ApiError
|
|
10249
10388
|
*/
|
|
10250
|
-
static getDashboardsMetadata() {
|
|
10251
|
-
return
|
|
10252
|
-
|
|
10253
|
-
|
|
10254
|
-
|
|
10255
|
-
|
|
10256
|
-
|
|
10257
|
-
|
|
10258
|
-
|
|
10259
|
-
|
|
10260
|
-
|
|
10261
|
-
|
|
10262
|
-
|
|
10263
|
-
|
|
10264
|
-
|
|
10265
|
-
|
|
10266
|
-
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
}
|
|
10270
|
-
});
|
|
10271
|
-
return result.body;
|
|
10389
|
+
static getDashboardsMetadata(xDigitalaiAccountId = null, filter, targetApp = null, biType = 'MICROSTRATEGY', isOotbDashboard = null, lifecycleState = null) {
|
|
10390
|
+
return request(OpenAPI, {
|
|
10391
|
+
method: 'GET',
|
|
10392
|
+
url: '/metadata/bi/dashboards/metadata',
|
|
10393
|
+
headers: {
|
|
10394
|
+
'X-Digitalai-Account-ID': xDigitalaiAccountId
|
|
10395
|
+
},
|
|
10396
|
+
query: {
|
|
10397
|
+
filter: filter,
|
|
10398
|
+
target_app: targetApp,
|
|
10399
|
+
bi_type: biType,
|
|
10400
|
+
is_ootb_dashboard: isOotbDashboard,
|
|
10401
|
+
lifecycle_state: lifecycleState
|
|
10402
|
+
},
|
|
10403
|
+
errors: {
|
|
10404
|
+
400: `Given query params are not valid.`,
|
|
10405
|
+
401: `Could not resolve a valid Tenant from the provided API Token.`,
|
|
10406
|
+
422: `Unprocessable Entity`
|
|
10407
|
+
}
|
|
10272
10408
|
});
|
|
10273
10409
|
}
|
|
10274
10410
|
}
|
|
@@ -10282,47 +10418,42 @@ class HelpContentService {
|
|
|
10282
10418
|
* @returns Error Default error response
|
|
10283
10419
|
* @throws ApiError
|
|
10284
10420
|
*/
|
|
10285
|
-
static getHelpContent() {
|
|
10286
|
-
return
|
|
10287
|
-
|
|
10288
|
-
|
|
10289
|
-
|
|
10290
|
-
|
|
10291
|
-
|
|
10292
|
-
|
|
10293
|
-
|
|
10294
|
-
|
|
10295
|
-
|
|
10296
|
-
}
|
|
10297
|
-
});
|
|
10298
|
-
return result.body;
|
|
10421
|
+
static getHelpContent(xDigitalaiAccountId = null) {
|
|
10422
|
+
return request(OpenAPI, {
|
|
10423
|
+
method: 'GET',
|
|
10424
|
+
url: '/metadata/bi/helpcontent',
|
|
10425
|
+
headers: {
|
|
10426
|
+
'X-Digitalai-Account-ID': xDigitalaiAccountId
|
|
10427
|
+
},
|
|
10428
|
+
errors: {
|
|
10429
|
+
400: `An unknown parameter was specified.`,
|
|
10430
|
+
401: `Could not resolve a valid Tenant from the provided API Token.`
|
|
10431
|
+
}
|
|
10299
10432
|
});
|
|
10300
10433
|
}
|
|
10301
10434
|
/**
|
|
10302
10435
|
* Upload an HTML file to be displayed as help content.
|
|
10303
10436
|
* Upload help content.
|
|
10304
|
-
* @param
|
|
10437
|
+
* @param formData
|
|
10305
10438
|
* @param xDigitalaiAccountId Perform the requested operation in the context of the Digital.ai account represented by this GUID. <em>Requires elevated permissions.</em>
|
|
10306
10439
|
* @returns HelpContent Content uploaded.
|
|
10307
10440
|
* @returns Error Default error response
|
|
10308
10441
|
* @throws ApiError
|
|
10309
10442
|
*/
|
|
10310
|
-
static createHelpContent(
|
|
10311
|
-
return
|
|
10312
|
-
|
|
10313
|
-
|
|
10314
|
-
|
|
10315
|
-
|
|
10316
|
-
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10322
|
-
|
|
10323
|
-
|
|
10324
|
-
});
|
|
10325
|
-
return result.body;
|
|
10443
|
+
static createHelpContent(formData, xDigitalaiAccountId = null) {
|
|
10444
|
+
return request(OpenAPI, {
|
|
10445
|
+
method: 'POST',
|
|
10446
|
+
url: '/metadata/bi/helpcontent',
|
|
10447
|
+
headers: {
|
|
10448
|
+
'X-Digitalai-Account-ID': xDigitalaiAccountId
|
|
10449
|
+
},
|
|
10450
|
+
formData: formData,
|
|
10451
|
+
mediaType: 'multipart/form-data',
|
|
10452
|
+
errors: {
|
|
10453
|
+
400: `The provided data is not valid.`,
|
|
10454
|
+
401: `Could not resolve a valid Tenant from the provided API Token.`,
|
|
10455
|
+
422: `Unprocessable Entity`
|
|
10456
|
+
}
|
|
10326
10457
|
});
|
|
10327
10458
|
}
|
|
10328
10459
|
/**
|
|
@@ -10334,50 +10465,51 @@ class HelpContentService {
|
|
|
10334
10465
|
* @returns Error Default error response
|
|
10335
10466
|
* @throws ApiError
|
|
10336
10467
|
*/
|
|
10337
|
-
static getHelpContentById(
|
|
10338
|
-
return
|
|
10339
|
-
|
|
10340
|
-
|
|
10341
|
-
|
|
10342
|
-
|
|
10343
|
-
|
|
10344
|
-
|
|
10345
|
-
|
|
10346
|
-
|
|
10347
|
-
|
|
10348
|
-
|
|
10349
|
-
|
|
10350
|
-
|
|
10351
|
-
|
|
10468
|
+
static getHelpContentById(helpContentId, xDigitalaiAccountId = null) {
|
|
10469
|
+
return request(OpenAPI, {
|
|
10470
|
+
method: 'GET',
|
|
10471
|
+
url: '/metadata/bi/helpcontent/{help_content_id}',
|
|
10472
|
+
path: {
|
|
10473
|
+
help_content_id: helpContentId
|
|
10474
|
+
},
|
|
10475
|
+
headers: {
|
|
10476
|
+
'X-Digitalai-Account-ID': xDigitalaiAccountId
|
|
10477
|
+
},
|
|
10478
|
+
errors: {
|
|
10479
|
+
400: `An unknown parameter was specified.`,
|
|
10480
|
+
401: `Could not resolve a valid Tenant from the provided API Token.`,
|
|
10481
|
+
404: `The help content could not be found.`
|
|
10482
|
+
}
|
|
10352
10483
|
});
|
|
10353
10484
|
}
|
|
10354
10485
|
/**
|
|
10355
10486
|
* Update a help content definition.
|
|
10356
10487
|
* Update a single help content definition, selected by ID.
|
|
10357
10488
|
* @param helpContentId
|
|
10358
|
-
* @param
|
|
10489
|
+
* @param formData
|
|
10359
10490
|
* @param xDigitalaiAccountId Perform the requested operation in the context of the Digital.ai account represented by this GUID. <em>Requires elevated permissions.</em>
|
|
10360
10491
|
* @returns HelpContent OK
|
|
10361
10492
|
* @returns Error Default error response
|
|
10362
10493
|
* @throws ApiError
|
|
10363
10494
|
*/
|
|
10364
|
-
static putHelpContentById(
|
|
10365
|
-
return
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
|
|
10370
|
-
|
|
10371
|
-
|
|
10372
|
-
|
|
10373
|
-
|
|
10374
|
-
|
|
10375
|
-
|
|
10376
|
-
|
|
10377
|
-
|
|
10378
|
-
|
|
10379
|
-
|
|
10380
|
-
|
|
10495
|
+
static putHelpContentById(helpContentId, formData, xDigitalaiAccountId = null) {
|
|
10496
|
+
return request(OpenAPI, {
|
|
10497
|
+
method: 'PUT',
|
|
10498
|
+
url: '/metadata/bi/helpcontent/{help_content_id}',
|
|
10499
|
+
path: {
|
|
10500
|
+
help_content_id: helpContentId
|
|
10501
|
+
},
|
|
10502
|
+
headers: {
|
|
10503
|
+
'X-Digitalai-Account-ID': xDigitalaiAccountId
|
|
10504
|
+
},
|
|
10505
|
+
formData: formData,
|
|
10506
|
+
mediaType: 'multipart/form-data',
|
|
10507
|
+
errors: {
|
|
10508
|
+
400: `An unknown parameter was specified.`,
|
|
10509
|
+
401: `Could not resolve a valid Tenant from the provided API Token.`,
|
|
10510
|
+
404: `The help content could not be found.`,
|
|
10511
|
+
422: `Unprocessable Entity`
|
|
10512
|
+
}
|
|
10381
10513
|
});
|
|
10382
10514
|
}
|
|
10383
10515
|
/**
|
|
@@ -10388,21 +10520,21 @@ class HelpContentService {
|
|
|
10388
10520
|
* @returns Error Default error response
|
|
10389
10521
|
* @throws ApiError
|
|
10390
10522
|
*/
|
|
10391
|
-
static deleteHelpContentById(
|
|
10392
|
-
return
|
|
10393
|
-
|
|
10394
|
-
|
|
10395
|
-
|
|
10396
|
-
|
|
10397
|
-
|
|
10398
|
-
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
|
|
10403
|
-
|
|
10404
|
-
|
|
10405
|
-
|
|
10523
|
+
static deleteHelpContentById(helpContentId, xDigitalaiAccountId = null) {
|
|
10524
|
+
return request(OpenAPI, {
|
|
10525
|
+
method: 'DELETE',
|
|
10526
|
+
url: '/metadata/bi/helpcontent/{help_content_id}',
|
|
10527
|
+
path: {
|
|
10528
|
+
help_content_id: helpContentId
|
|
10529
|
+
},
|
|
10530
|
+
headers: {
|
|
10531
|
+
'X-Digitalai-Account-ID': xDigitalaiAccountId
|
|
10532
|
+
},
|
|
10533
|
+
errors: {
|
|
10534
|
+
400: `An unknown parameter was specified.`,
|
|
10535
|
+
401: `Could not resolve a valid Tenant from the provided API Token.`,
|
|
10536
|
+
404: `The help content could not be found.`
|
|
10537
|
+
}
|
|
10406
10538
|
});
|
|
10407
10539
|
}
|
|
10408
10540
|
}
|
|
@@ -10951,6 +11083,9 @@ const DotMetadataApiProvider = ({
|
|
|
10951
11083
|
if (dashboard.in_progress_changes) {
|
|
10952
11084
|
// If the dashboard is published and has in-progress changes, we need to update the in-progress dashboard
|
|
10953
11085
|
response = yield DashboardsService.patchInProgressDashboard(dashboard.id, updatePayload, accountId, isSync);
|
|
11086
|
+
} else if (Object.keys(updatePayload).length === 1 && 'featured' in updatePayload) {
|
|
11087
|
+
// If the dashboard is published and only update is related to 'featured' flag, we can update the published dashboard directly
|
|
11088
|
+
response = yield DashboardsService.patchDashboard(dashboard.id, updatePayload, accountId, isSync);
|
|
10954
11089
|
} else {
|
|
10955
11090
|
// If the dashboard is published and has no in-progress changes, we need to create an in-progress dashboard
|
|
10956
11091
|
response = yield DashboardsService.postInProgressDashboard(dashboard.id, accountId, updatePayload);
|
|
@@ -12808,6 +12943,7 @@ function DotDashboardOptionsMenu({
|
|
|
12808
12943
|
currentUser,
|
|
12809
12944
|
isEdit = false,
|
|
12810
12945
|
menuPlacement,
|
|
12946
|
+
onFeature,
|
|
12811
12947
|
onStartDelete,
|
|
12812
12948
|
onStartDuplicate,
|
|
12813
12949
|
onStartStatusChange,
|
|
@@ -12870,6 +13006,21 @@ function DotDashboardOptionsMenu({
|
|
|
12870
13006
|
const isDraft = !dashboard.parent_id && dashboard.lifecycle_state === DashboardView.lifecycle_state.DRAFT;
|
|
12871
13007
|
const isPublished = dashboard.parent_id || dashboard.lifecycle_state === DashboardView.lifecycle_state.PUBLISHED;
|
|
12872
13008
|
const menuItems = [];
|
|
13009
|
+
if (onFeature && isPublished && !dashboard.in_progress_changes) {
|
|
13010
|
+
const label = dashboard.featured ? 'Remove from featured page' : 'Add to featured page';
|
|
13011
|
+
menuItems.push({
|
|
13012
|
+
children: jsx(DotButton, {
|
|
13013
|
+
"data-testid": `feature-dashboard-action-button-${dashboard.id}`,
|
|
13014
|
+
ariaLabel: label,
|
|
13015
|
+
type: "text",
|
|
13016
|
+
startIcon: jsx(DotIcon, {
|
|
13017
|
+
iconId: "add-outlined"
|
|
13018
|
+
}),
|
|
13019
|
+
children: label
|
|
13020
|
+
}, `feature-dashboard-action-button-${dashboard.id}`),
|
|
13021
|
+
key: 'feature'
|
|
13022
|
+
});
|
|
13023
|
+
}
|
|
12873
13024
|
if (!isEdit && onViewMode && !dashboard.is_ootb_dashboard && !dashboardLocked(dashboard, currentUser)) {
|
|
12874
13025
|
menuItems.push({
|
|
12875
13026
|
children: jsx(DotButton, {
|
|
@@ -13067,6 +13218,9 @@ function DotDashboardOptionsMenu({
|
|
|
13067
13218
|
case 'unpublish':
|
|
13068
13219
|
onStartStatusChange(dashboard, DashboardView.lifecycle_state.DRAFT);
|
|
13069
13220
|
break;
|
|
13221
|
+
case 'feature':
|
|
13222
|
+
onFeature(dashboard);
|
|
13223
|
+
break;
|
|
13070
13224
|
}
|
|
13071
13225
|
handleMenuClose();
|
|
13072
13226
|
}, [menuItems, handleMenuClose]);
|