@digital-ai/dot-components 5.5.1 → 5.6.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.
Files changed (30) hide show
  1. package/index.esm.js +506 -660
  2. package/package.json +1 -1
  3. package/src/lib/components/analytics/dashboard-actions/DashboardOptionsMenu.d.ts +1 -3
  4. package/src/lib/components/analytics/dashboard-dialog/DashboardDialog.d.ts +2 -2
  5. package/src/lib/components/analytics/metadata-api/openapi/core/ApiError.d.ts +1 -3
  6. package/src/lib/components/analytics/metadata-api/openapi/core/ApiRequestOptions.d.ts +1 -2
  7. package/src/lib/components/analytics/metadata-api/openapi/core/OpenAPI.d.ts +7 -8
  8. package/src/lib/components/analytics/metadata-api/openapi/core/request.d.ts +4 -25
  9. package/src/lib/components/analytics/metadata-api/openapi/index.d.ts +0 -3
  10. package/src/lib/components/analytics/metadata-api/openapi/models/DashboardCreateBody.d.ts +0 -4
  11. package/src/lib/components/analytics/metadata-api/openapi/models/DashboardPatchBody.d.ts +0 -4
  12. package/src/lib/components/analytics/metadata-api/openapi/models/DashboardPutBody.d.ts +0 -4
  13. package/src/lib/components/analytics/metadata-api/openapi/models/DashboardView.d.ts +1 -5
  14. package/src/lib/components/analytics/metadata-api/openapi/models/HelpContentCreateBody.d.ts +1 -1
  15. package/src/lib/components/analytics/metadata-api/openapi/models/HelpContentPutBody.d.ts +1 -1
  16. package/src/lib/components/analytics/metadata-api/openapi/services/BiService.d.ts +6 -7
  17. package/src/lib/components/analytics/metadata-api/openapi/services/CategoriesService.d.ts +2 -3
  18. package/src/lib/components/analytics/metadata-api/openapi/services/DashboardsService.d.ts +16 -17
  19. package/src/lib/components/analytics/metadata-api/openapi/services/DatalakeService.d.ts +1 -2
  20. package/src/lib/components/analytics/metadata-api/openapi/services/EntitiesService.d.ts +5 -6
  21. package/src/lib/components/analytics/metadata-api/openapi/services/EntityAttributesService.d.ts +6 -7
  22. package/src/lib/components/analytics/metadata-api/openapi/services/EntityClassService.d.ts +5 -6
  23. package/src/lib/components/analytics/metadata-api/openapi/services/HelpContentService.d.ts +7 -8
  24. package/src/lib/components/analytics/metadata-api/openapi/services/MrProxyService.d.ts +4 -5
  25. package/src/lib/components/analytics/metadata-api/openapi/services/OriginInstancesService.d.ts +5 -6
  26. package/src/lib/components/analytics/metadata-api/openapi/services/OriginsService.d.ts +5 -6
  27. package/src/lib/components/analytics/metadata-api/openapi/services/ProductsService.d.ts +10 -11
  28. package/src/lib/components/analytics/metadata-api/openapi/services/UtilityService.d.ts +6 -7
  29. package/src/lib/components/analytics/metadata-api/openapi/core/CancelablePromise.d.ts +0 -20
  30. package/src/lib/components/analytics/metadata-api/openapi/models/X_Digitalai_Account_ID.d.ts +0 -4
package/index.esm.js CHANGED
@@ -2076,19 +2076,6 @@ 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
-
2092
2079
  typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
2093
2080
  var e = new Error(message);
2094
2081
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
@@ -2273,7 +2260,7 @@ function getResponseBody$1(response) {
2273
2260
  return null;
2274
2261
  });
2275
2262
  }
2276
- function catchErrors(options, result) {
2263
+ function catchErrors$1(options, result) {
2277
2264
  const errors = Object.assign({
2278
2265
  400: 'Bad Request',
2279
2266
  401: 'Unauthorized',
@@ -2310,7 +2297,7 @@ function request$1(options) {
2310
2297
  statusText: response.statusText,
2311
2298
  body: responseHeader || responseBody
2312
2299
  };
2313
- catchErrors(options, result);
2300
+ catchErrors$1(options, result);
2314
2301
  return result;
2315
2302
  });
2316
2303
  }
@@ -9533,126 +9520,25 @@ const DotPill = ({
9533
9520
  };
9534
9521
 
9535
9522
  class ApiError extends Error {
9536
- constructor(request, response, message) {
9523
+ constructor(response, message) {
9537
9524
  super(message);
9538
- this.name = 'ApiError';
9539
9525
  this.url = response.url;
9540
9526
  this.status = response.status;
9541
9527
  this.statusText = response.statusText;
9542
9528
  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");
9641
9529
  }
9642
9530
  }
9643
9531
 
9644
9532
  const OpenAPI = {
9645
9533
  BASE: '',
9646
- VERSION: '0.1',
9647
- WITH_CREDENTIALS: false,
9648
- CREDENTIALS: 'include',
9649
9534
  TOKEN: undefined,
9650
9535
  USERNAME: undefined,
9651
9536
  PASSWORD: undefined,
9652
- HEADERS: undefined,
9653
- ENCODE_PATH: undefined
9654
- };
9537
+ HEADERS: undefined};
9655
9538
 
9539
+ /* istanbul ignore file */
9540
+ /* tslint:disable */
9541
+ /* eslint-disable */
9656
9542
  var DashboardCreateBody;
9657
9543
  (function (DashboardCreateBody) {
9658
9544
  (function (lifecycle_state) {
@@ -9665,6 +9551,9 @@ var DashboardCreateBody;
9665
9551
  })(DashboardCreateBody.bi_type || (DashboardCreateBody.bi_type = {}));
9666
9552
  })(DashboardCreateBody || (DashboardCreateBody = {}));
9667
9553
 
9554
+ /* istanbul ignore file */
9555
+ /* tslint:disable */
9556
+ /* eslint-disable */
9668
9557
  var DashboardPatchBody;
9669
9558
  (function (DashboardPatchBody) {
9670
9559
  (function (lifecycle_state) {
@@ -9677,6 +9566,9 @@ var DashboardPatchBody;
9677
9566
  })(DashboardPatchBody.bi_type || (DashboardPatchBody.bi_type = {}));
9678
9567
  })(DashboardPatchBody || (DashboardPatchBody = {}));
9679
9568
 
9569
+ /* istanbul ignore file */
9570
+ /* tslint:disable */
9571
+ /* eslint-disable */
9680
9572
  var DashboardPutBody;
9681
9573
  (function (DashboardPutBody) {
9682
9574
  (function (lifecycle_state) {
@@ -9689,6 +9581,9 @@ var DashboardPutBody;
9689
9581
  })(DashboardPutBody.bi_type || (DashboardPutBody.bi_type = {}));
9690
9582
  })(DashboardPutBody || (DashboardPutBody = {}));
9691
9583
 
9584
+ /* istanbul ignore file */
9585
+ /* tslint:disable */
9586
+ /* eslint-disable */
9692
9587
  var DashboardView;
9693
9588
  (function (DashboardView) {
9694
9589
  (function (lifecycle_state) {
@@ -9701,180 +9596,159 @@ var DashboardView;
9701
9596
  })(DashboardView.bi_type || (DashboardView.bi_type = {}));
9702
9597
  })(DashboardView || (DashboardView = {}));
9703
9598
 
9704
- const isDefined = value => {
9599
+ function isDefined(value) {
9705
9600
  return value !== undefined && value !== null;
9706
- };
9707
- const isString = value => {
9601
+ }
9602
+ function isString(value) {
9708
9603
  return typeof value === 'string';
9709
- };
9710
- const isStringWithValue = value => {
9604
+ }
9605
+ function isStringWithValue(value) {
9711
9606
  return isString(value) && value !== '';
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 => {
9607
+ }
9608
+ function isBlob(value) {
9609
+ return value instanceof Blob;
9610
+ }
9611
+ function base64(str) {
9720
9612
  try {
9721
9613
  return btoa(str);
9722
9614
  } catch (err) {
9723
- // @ts-ignore
9724
9615
  return Buffer.from(str).toString('base64');
9725
9616
  }
9726
- };
9727
- const getQueryString = params => {
9617
+ }
9618
+ function getQueryString(params) {
9728
9619
  const qs = [];
9729
- const append = (key, value) => {
9730
- qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
9731
- };
9732
- const process = (key, value) => {
9620
+ Object.keys(params).forEach(key => {
9621
+ const value = params[key];
9733
9622
  if (isDefined(value)) {
9734
9623
  if (Array.isArray(value)) {
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);
9624
+ value.forEach(value => {
9625
+ qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
9741
9626
  });
9742
9627
  } else {
9743
- append(key, value);
9628
+ qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
9744
9629
  }
9745
9630
  }
9746
- };
9747
- Object.entries(params).forEach(([key, value]) => {
9748
- process(key, value);
9749
9631
  });
9750
9632
  if (qs.length > 0) {
9751
9633
  return `?${qs.join('&')}`;
9752
9634
  }
9753
9635
  return '';
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}`;
9636
+ }
9637
+ function getUrl(options) {
9638
+ const path = options.path;
9639
+ const url = `${OpenAPI.BASE}${path}`;
9765
9640
  if (options.query) {
9766
9641
  return `${url}${getQueryString(options.query)}`;
9767
9642
  }
9768
9643
  return url;
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);
9776
- } else {
9777
- formData.append(key, JSON.stringify(value));
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));
9644
+ }
9645
+ function getFormData(params) {
9646
+ const formData = new FormData();
9647
+ Object.keys(params).forEach(key => {
9648
+ const value = params[key];
9649
+ if (isDefined(value)) {
9650
+ formData.append(key, value);
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');
9783
9689
  } else {
9784
- process(key, value);
9690
+ headers.append('Content-Type', 'application/json');
9785
9691
  }
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';
9820
9692
  }
9821
- }
9822
- return new Headers(headers);
9823
- });
9824
- const getRequestBody = options => {
9693
+ return headers;
9694
+ });
9695
+ }
9696
+ function getRequestBody(options) {
9825
9697
  var _a;
9826
- if (options.body !== undefined) {
9698
+ if (options.formData) {
9699
+ return getFormData(options.formData);
9700
+ }
9701
+ if (options.body) {
9827
9702
  if ((_a = options.mediaType) === null || _a === void 0 ? void 0 : _a.includes('/json')) {
9828
9703
  return JSON.stringify(options.body);
9829
- } else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {
9704
+ } else if (isString(options.body) || isBlob(options.body)) {
9830
9705
  return options.body;
9831
9706
  } else {
9832
9707
  return JSON.stringify(options.body);
9833
9708
  }
9834
9709
  }
9835
9710
  return undefined;
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) => {
9711
+ }
9712
+ function sendRequest(options, url) {
9713
+ return __awaiter(this, void 0, void 0, function* () {
9714
+ const request = {
9715
+ method: options.method,
9716
+ headers: yield getHeaders(options),
9717
+ body: getRequestBody(options)
9718
+ };
9719
+ return yield fetch(url, request);
9720
+ });
9721
+ }
9722
+ function getResponseHeader(response, responseHeader) {
9849
9723
  if (responseHeader) {
9850
9724
  const content = response.headers.get(responseHeader);
9851
9725
  if (isString(content)) {
9852
9726
  return content;
9853
9727
  }
9854
9728
  }
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();
9729
+ return null;
9730
+ }
9731
+ function getResponseBody(response) {
9732
+ return __awaiter(this, void 0, void 0, function* () {
9733
+ if (response.status !== 204) {
9734
+ try {
9735
+ const contentType = response.headers.get('Content-Type');
9736
+ if (contentType) {
9737
+ const isJSON = contentType.toLowerCase().startsWith('application/json');
9738
+ if (isJSON) {
9739
+ return yield response.json();
9740
+ } else {
9741
+ return yield response.text();
9742
+ }
9868
9743
  }
9744
+ } catch (error) {
9745
+ console.error(error);
9869
9746
  }
9870
- } catch (error) {
9871
- console.error(error);
9872
9747
  }
9873
- }
9874
- return undefined;
9875
- });
9876
- const catchErrorCodes = (options, result) => {
9877
- var _a, _b;
9748
+ return null;
9749
+ });
9750
+ }
9751
+ function catchErrors(options, result) {
9878
9752
  const errors = Object.assign({
9879
9753
  400: 'Bad Request',
9880
9754
  401: 'Unauthorized',
@@ -9886,54 +9760,35 @@ const catchErrorCodes = (options, result) => {
9886
9760
  }, options.errors);
9887
9761
  const error = errors[result.status];
9888
9762
  if (error) {
9889
- throw new ApiError(options, result, error);
9763
+ throw new ApiError(result, error);
9890
9764
  }
9891
9765
  if (!result.ok) {
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}`);
9766
+ throw new ApiError(result, 'Generic Error');
9902
9767
  }
9903
- };
9768
+ }
9904
9769
  /**
9905
- * Request method
9906
- * @param config The OpenAPI configuration object
9907
- * @param options The request options from the service
9908
- * @returns CancelablePromise<T>
9770
+ * Request using fetch client
9771
+ * @param options The request options from the the service
9772
+ * @returns ApiResult
9909
9773
  * @throws ApiError
9910
9774
  */
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
- };
9775
+ function request(options) {
9776
+ return __awaiter(this, void 0, void 0, function* () {
9777
+ const url = getUrl(options);
9778
+ const response = yield sendRequest(options, url);
9779
+ const responseBody = yield getResponseBody(response);
9780
+ const responseHeader = getResponseHeader(response, options.responseHeader);
9781
+ const result = {
9782
+ url,
9783
+ ok: response.ok,
9784
+ status: response.status,
9785
+ statusText: response.statusText,
9786
+ body: responseHeader || responseBody
9787
+ };
9788
+ catchErrors(options, result);
9789
+ return result;
9790
+ });
9791
+ }
9937
9792
 
9938
9793
  class DashboardsService {
9939
9794
  /**
@@ -9945,7 +9800,7 @@ class DashboardsService {
9945
9800
  * @param sort Sort ordering to apply to the query.
9946
9801
  * @param filter List of filters (each filter is a separate query param, and they are OR'ed).
9947
9802
  *
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
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
9949
9804
  * * **Searchable field names**: author_fullname, categories, description, name, updated_by_fullname
9950
9805
  *
9951
9806
  * @param favorite Boolean flag to only return dashboards marked as favorites.
@@ -9964,36 +9819,39 @@ class DashboardsService {
9964
9819
  * @returns Error Default error response
9965
9820
  * @throws ApiError
9966
9821
  */
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
- }
9822
+ static getDashboards() {
9823
+ return __awaiter(this, arguments, void 0, function* (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) {
9824
+ const result = yield request({
9825
+ method: 'GET',
9826
+ path: `/metadata/bi/dashboards`,
9827
+ headers: {
9828
+ 'X-Digitalai-Account-ID': xDigitalaiAccountId
9829
+ },
9830
+ query: {
9831
+ start: start,
9832
+ count: count,
9833
+ sort: sort,
9834
+ filter: filter,
9835
+ favorite: favorite,
9836
+ q: q,
9837
+ author_fullname: authorFullname,
9838
+ author_id: authorId,
9839
+ bi_type: biType,
9840
+ description: description,
9841
+ id: id,
9842
+ is_ootb_dashboard: isOotbDashboard,
9843
+ lifecycle_state: lifecycleState,
9844
+ name: name,
9845
+ target_app: targetApp,
9846
+ view_modified: viewModified
9847
+ },
9848
+ errors: {
9849
+ 400: `An unknown parameter was specified.`,
9850
+ 401: `Could not resolve a valid Tenant from the provided API Token.`,
9851
+ 422: `Unprocessable Entity`
9852
+ }
9853
+ });
9854
+ return result.body;
9997
9855
  });
9998
9856
  }
9999
9857
  /**
@@ -10005,20 +9863,23 @@ class DashboardsService {
10005
9863
  * @returns Error Default error response
10006
9864
  * @throws ApiError
10007
9865
  */
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
- }
9866
+ static postDashboards(requestBody_1) {
9867
+ return __awaiter(this, arguments, void 0, function* (requestBody, xDigitalaiAccountId = null) {
9868
+ const result = yield request({
9869
+ method: 'POST',
9870
+ path: `/metadata/bi/dashboards`,
9871
+ headers: {
9872
+ 'X-Digitalai-Account-ID': xDigitalaiAccountId
9873
+ },
9874
+ body: requestBody,
9875
+ mediaType: 'application/json',
9876
+ errors: {
9877
+ 400: `The provided data is not valid.`,
9878
+ 404: `The dashboard could not be found.`,
9879
+ 422: `Unprocessable Entity`
9880
+ }
9881
+ });
9882
+ return result.body;
10022
9883
  });
10023
9884
  }
10024
9885
  /**
@@ -10030,21 +9891,21 @@ class DashboardsService {
10030
9891
  * @returns Error Default error response
10031
9892
  * @throws ApiError
10032
9893
  */
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
- }
9894
+ static getDashboard(dashboardId_1) {
9895
+ return __awaiter(this, arguments, void 0, function* (dashboardId, xDigitalaiAccountId = null) {
9896
+ const result = yield request({
9897
+ method: 'GET',
9898
+ path: `/metadata/bi/dashboards/${dashboardId}`,
9899
+ headers: {
9900
+ 'X-Digitalai-Account-ID': xDigitalaiAccountId
9901
+ },
9902
+ errors: {
9903
+ 400: `An unknown parameter was specified.`,
9904
+ 401: `Could not resolve a valid Tenant from the provided API Token.`,
9905
+ 404: `The dashboard could not be found.`
9906
+ }
9907
+ });
9908
+ return result.body;
10048
9909
  });
10049
9910
  }
10050
9911
  /**
@@ -10058,28 +9919,28 @@ class DashboardsService {
10058
9919
  * @returns Error Default error response
10059
9920
  * @throws ApiError
10060
9921
  */
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
- }
9922
+ static putDashboard(dashboardId_1, requestBody_1) {
9923
+ return __awaiter(this, arguments, void 0, function* (dashboardId, requestBody, xDigitalaiAccountId = null, isSync = null) {
9924
+ const result = yield request({
9925
+ method: 'PUT',
9926
+ path: `/metadata/bi/dashboards/${dashboardId}`,
9927
+ headers: {
9928
+ 'X-Digitalai-Account-ID': xDigitalaiAccountId
9929
+ },
9930
+ query: {
9931
+ is_sync: isSync
9932
+ },
9933
+ body: requestBody,
9934
+ mediaType: 'application/json',
9935
+ errors: {
9936
+ 400: `The provided data is not valid.`,
9937
+ 401: `Could not resolve a valid Tenant from the provided API Token.`,
9938
+ 404: `The dashboard could not be found.`,
9939
+ 409: `Unable to update object because IDs are different.`,
9940
+ 422: `Unprocessable Entity`
9941
+ }
9942
+ });
9943
+ return result.body;
10083
9944
  });
10084
9945
  }
10085
9946
  /**
@@ -10093,28 +9954,28 @@ class DashboardsService {
10093
9954
  * @returns Error Default error response
10094
9955
  * @throws ApiError
10095
9956
  */
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
- }
9957
+ static patchDashboard(dashboardId_1, requestBody_1) {
9958
+ return __awaiter(this, arguments, void 0, function* (dashboardId, requestBody, xDigitalaiAccountId = null, isSync = null) {
9959
+ const result = yield request({
9960
+ method: 'PATCH',
9961
+ path: `/metadata/bi/dashboards/${dashboardId}`,
9962
+ headers: {
9963
+ 'X-Digitalai-Account-ID': xDigitalaiAccountId
9964
+ },
9965
+ query: {
9966
+ is_sync: isSync
9967
+ },
9968
+ body: requestBody,
9969
+ mediaType: 'application/json',
9970
+ errors: {
9971
+ 400: `The provided data is not valid.`,
9972
+ 401: `Could not resolve a valid Tenant from the provided API Token.`,
9973
+ 404: `The dashboard could not be found.`,
9974
+ 409: `Unable to update object because IDs are different.`,
9975
+ 422: `Unprocessable Entity`
9976
+ }
9977
+ });
9978
+ return result.body;
10118
9979
  });
10119
9980
  }
10120
9981
  /**
@@ -10125,16 +9986,16 @@ class DashboardsService {
10125
9986
  * @returns Error Default error response
10126
9987
  * @throws ApiError
10127
9988
  */
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
- }
9989
+ static deleteDashboard(dashboardId_1) {
9990
+ return __awaiter(this, arguments, void 0, function* (dashboardId, xDigitalaiAccountId = null) {
9991
+ const result = yield request({
9992
+ method: 'DELETE',
9993
+ path: `/metadata/bi/dashboards/${dashboardId}`,
9994
+ headers: {
9995
+ 'X-Digitalai-Account-ID': xDigitalaiAccountId
9996
+ }
9997
+ });
9998
+ return result.body;
10138
9999
  });
10139
10000
  }
10140
10001
  /**
@@ -10146,21 +10007,21 @@ class DashboardsService {
10146
10007
  * @returns Error Default error response
10147
10008
  * @throws ApiError
10148
10009
  */
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
- }
10010
+ static getInProgressDashboard(dashboardId_1) {
10011
+ return __awaiter(this, arguments, void 0, function* (dashboardId, xDigitalaiAccountId = null) {
10012
+ const result = yield request({
10013
+ method: 'GET',
10014
+ path: `/metadata/bi/dashboards/${dashboardId}/inprogress`,
10015
+ headers: {
10016
+ 'X-Digitalai-Account-ID': xDigitalaiAccountId
10017
+ },
10018
+ errors: {
10019
+ 400: `An unknown parameter was specified.`,
10020
+ 401: `Could not resolve a valid Tenant from the provided API Token.`,
10021
+ 404: `The dashboard could not be found.`
10022
+ }
10023
+ });
10024
+ return result.body;
10164
10025
  });
10165
10026
  }
10166
10027
  /**
@@ -10173,24 +10034,24 @@ class DashboardsService {
10173
10034
  * @returns Error Default error response
10174
10035
  * @throws ApiError
10175
10036
  */
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
- }
10037
+ static postInProgressDashboard(dashboardId_1) {
10038
+ return __awaiter(this, arguments, void 0, function* (dashboardId, xDigitalaiAccountId = null, requestBody) {
10039
+ const result = yield request({
10040
+ method: 'POST',
10041
+ path: `/metadata/bi/dashboards/${dashboardId}/inprogress`,
10042
+ headers: {
10043
+ 'X-Digitalai-Account-ID': xDigitalaiAccountId
10044
+ },
10045
+ body: requestBody,
10046
+ mediaType: 'application/json',
10047
+ errors: {
10048
+ 400: `The provided data is not valid.`,
10049
+ 404: `The dashboard could not be found.`,
10050
+ 409: `Unable to update object because IDs are different.`,
10051
+ 422: `Unprocessable Entity`
10052
+ }
10053
+ });
10054
+ return result.body;
10194
10055
  });
10195
10056
  }
10196
10057
  /**
@@ -10204,28 +10065,28 @@ class DashboardsService {
10204
10065
  * @returns Error Default error response
10205
10066
  * @throws ApiError
10206
10067
  */
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
- }
10068
+ static putInProgressDashboard(dashboardId_1, requestBody_1) {
10069
+ return __awaiter(this, arguments, void 0, function* (dashboardId, requestBody, xDigitalaiAccountId = null, isSync = null) {
10070
+ const result = yield request({
10071
+ method: 'PUT',
10072
+ path: `/metadata/bi/dashboards/${dashboardId}/inprogress`,
10073
+ headers: {
10074
+ 'X-Digitalai-Account-ID': xDigitalaiAccountId
10075
+ },
10076
+ query: {
10077
+ is_sync: isSync
10078
+ },
10079
+ body: requestBody,
10080
+ mediaType: 'application/json',
10081
+ errors: {
10082
+ 400: `The provided data is not valid.`,
10083
+ 401: `Could not resolve a valid Tenant from the provided API Token.`,
10084
+ 404: `The dashboard could not be found.`,
10085
+ 409: `Unable to update object because IDs are different.`,
10086
+ 422: `Unprocessable Entity`
10087
+ }
10088
+ });
10089
+ return result.body;
10229
10090
  });
10230
10091
  }
10231
10092
  /**
@@ -10239,28 +10100,28 @@ class DashboardsService {
10239
10100
  * @returns Error Default error response
10240
10101
  * @throws ApiError
10241
10102
  */
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
- }
10103
+ static patchInProgressDashboard(dashboardId_1, requestBody_1) {
10104
+ return __awaiter(this, arguments, void 0, function* (dashboardId, requestBody, xDigitalaiAccountId = null, isSync = null) {
10105
+ const result = yield request({
10106
+ method: 'PATCH',
10107
+ path: `/metadata/bi/dashboards/${dashboardId}/inprogress`,
10108
+ headers: {
10109
+ 'X-Digitalai-Account-ID': xDigitalaiAccountId
10110
+ },
10111
+ query: {
10112
+ is_sync: isSync
10113
+ },
10114
+ body: requestBody,
10115
+ mediaType: 'application/json',
10116
+ errors: {
10117
+ 400: `The provided data is not valid.`,
10118
+ 401: `Could not resolve a valid Tenant from the provided API Token.`,
10119
+ 404: `The dashboard could not be found.`,
10120
+ 409: `Unable to update object because IDs are different.`,
10121
+ 422: `Unprocessable Entity`
10122
+ }
10123
+ });
10124
+ return result.body;
10264
10125
  });
10265
10126
  }
10266
10127
  /**
@@ -10272,22 +10133,22 @@ class DashboardsService {
10272
10133
  * @returns Error Default error response
10273
10134
  * @throws ApiError
10274
10135
  */
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
- }
10136
+ static deleteInProgressDashboard(dashboardId_1) {
10137
+ return __awaiter(this, arguments, void 0, function* (dashboardId, xDigitalaiAccountId = null, publish = false) {
10138
+ const result = yield request({
10139
+ method: 'DELETE',
10140
+ path: `/metadata/bi/dashboards/${dashboardId}/inprogress`,
10141
+ headers: {
10142
+ 'X-Digitalai-Account-ID': xDigitalaiAccountId
10143
+ },
10144
+ query: {
10145
+ publish: publish
10146
+ },
10147
+ errors: {
10148
+ 422: `Unprocessable Entity`
10149
+ }
10150
+ });
10151
+ return result.body;
10291
10152
  });
10292
10153
  }
10293
10154
  /**
@@ -10300,23 +10161,23 @@ class DashboardsService {
10300
10161
  * @returns Error Default error response
10301
10162
  * @throws ApiError
10302
10163
  */
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
- }
10164
+ static copyDashboard(dashboardId_1) {
10165
+ return __awaiter(this, arguments, void 0, function* (dashboardId, xDigitalaiAccountId = null, requestBody) {
10166
+ const result = yield request({
10167
+ method: 'POST',
10168
+ path: `/metadata/bi/dashboards/${dashboardId}/copy`,
10169
+ headers: {
10170
+ 'X-Digitalai-Account-ID': xDigitalaiAccountId
10171
+ },
10172
+ body: requestBody,
10173
+ mediaType: 'application/json',
10174
+ errors: {
10175
+ 400: `The provided data is not valid.`,
10176
+ 404: `The dashboard could not be found.`,
10177
+ 422: `Unprocessable Entity`
10178
+ }
10179
+ });
10180
+ return result.body;
10320
10181
  });
10321
10182
  }
10322
10183
  /**
@@ -10328,20 +10189,20 @@ class DashboardsService {
10328
10189
  * @returns Error Default error response
10329
10190
  * @throws ApiError
10330
10191
  */
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
- }
10192
+ static favoriteDashboard(dashboardId_1) {
10193
+ return __awaiter(this, arguments, void 0, function* (dashboardId, xDigitalaiAccountId = null) {
10194
+ const result = yield request({
10195
+ method: 'POST',
10196
+ path: `/metadata/bi/dashboards/${dashboardId}/favorite`,
10197
+ headers: {
10198
+ 'X-Digitalai-Account-ID': xDigitalaiAccountId
10199
+ },
10200
+ errors: {
10201
+ 400: `The provided data is not valid.`,
10202
+ 404: `The dashboard could not be found.`
10203
+ }
10204
+ });
10205
+ return result.body;
10345
10206
  });
10346
10207
  }
10347
10208
  /**
@@ -10353,20 +10214,20 @@ class DashboardsService {
10353
10214
  * @returns Error Default error response
10354
10215
  * @throws ApiError
10355
10216
  */
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
- }
10217
+ static unfavoriteDashboard(dashboardId_1) {
10218
+ return __awaiter(this, arguments, void 0, function* (dashboardId, xDigitalaiAccountId = null) {
10219
+ const result = yield request({
10220
+ method: 'DELETE',
10221
+ path: `/metadata/bi/dashboards/${dashboardId}/favorite`,
10222
+ headers: {
10223
+ 'X-Digitalai-Account-ID': xDigitalaiAccountId
10224
+ },
10225
+ errors: {
10226
+ 400: `The provided data is not valid.`,
10227
+ 404: `The dashboard could not be found.`
10228
+ }
10229
+ });
10230
+ return result.body;
10370
10231
  });
10371
10232
  }
10372
10233
  /**
@@ -10386,25 +10247,28 @@ class DashboardsService {
10386
10247
  * @returns Error Default error response
10387
10248
  * @throws ApiError
10388
10249
  */
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
- }
10250
+ static getDashboardsMetadata() {
10251
+ return __awaiter(this, arguments, void 0, function* (xDigitalaiAccountId = null, filter, targetApp = null, biType = 'MICROSTRATEGY', isOotbDashboard = null, lifecycleState = null) {
10252
+ const result = yield request({
10253
+ method: 'GET',
10254
+ path: `/metadata/bi/dashboards/metadata`,
10255
+ headers: {
10256
+ 'X-Digitalai-Account-ID': xDigitalaiAccountId
10257
+ },
10258
+ query: {
10259
+ filter: filter,
10260
+ target_app: targetApp,
10261
+ bi_type: biType,
10262
+ is_ootb_dashboard: isOotbDashboard,
10263
+ lifecycle_state: lifecycleState
10264
+ },
10265
+ errors: {
10266
+ 400: `Given query params are not valid.`,
10267
+ 401: `Could not resolve a valid Tenant from the provided API Token.`,
10268
+ 422: `Unprocessable Entity`
10269
+ }
10270
+ });
10271
+ return result.body;
10408
10272
  });
10409
10273
  }
10410
10274
  }
@@ -10418,42 +10282,47 @@ class HelpContentService {
10418
10282
  * @returns Error Default error response
10419
10283
  * @throws ApiError
10420
10284
  */
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
- }
10285
+ static getHelpContent() {
10286
+ return __awaiter(this, arguments, void 0, function* (xDigitalaiAccountId = null) {
10287
+ const result = yield request({
10288
+ method: 'GET',
10289
+ path: `/metadata/bi/helpcontent`,
10290
+ headers: {
10291
+ 'X-Digitalai-Account-ID': xDigitalaiAccountId
10292
+ },
10293
+ errors: {
10294
+ 400: `An unknown parameter was specified.`,
10295
+ 401: `Could not resolve a valid Tenant from the provided API Token.`
10296
+ }
10297
+ });
10298
+ return result.body;
10432
10299
  });
10433
10300
  }
10434
10301
  /**
10435
10302
  * Upload an HTML file to be displayed as help content.
10436
10303
  * Upload help content.
10437
- * @param formData
10304
+ * @param requestBody
10438
10305
  * @param xDigitalaiAccountId Perform the requested operation in the context of the Digital.ai account represented by this GUID. <em>Requires elevated permissions.</em>
10439
10306
  * @returns HelpContent Content uploaded.
10440
10307
  * @returns Error Default error response
10441
10308
  * @throws ApiError
10442
10309
  */
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
- }
10310
+ static createHelpContent(requestBody_1) {
10311
+ return __awaiter(this, arguments, void 0, function* (requestBody, xDigitalaiAccountId = null) {
10312
+ const result = yield request({
10313
+ method: 'POST',
10314
+ path: `/metadata/bi/helpcontent`,
10315
+ headers: {
10316
+ 'X-Digitalai-Account-ID': xDigitalaiAccountId
10317
+ },
10318
+ body: requestBody,
10319
+ errors: {
10320
+ 400: `The provided data is not valid.`,
10321
+ 401: `Could not resolve a valid Tenant from the provided API Token.`,
10322
+ 422: `Unprocessable Entity`
10323
+ }
10324
+ });
10325
+ return result.body;
10457
10326
  });
10458
10327
  }
10459
10328
  /**
@@ -10465,51 +10334,50 @@ class HelpContentService {
10465
10334
  * @returns Error Default error response
10466
10335
  * @throws ApiError
10467
10336
  */
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
- }
10337
+ static getHelpContentById(helpContentId_1) {
10338
+ return __awaiter(this, arguments, void 0, function* (helpContentId, xDigitalaiAccountId = null) {
10339
+ const result = yield request({
10340
+ method: 'GET',
10341
+ path: `/metadata/bi/helpcontent/${helpContentId}`,
10342
+ headers: {
10343
+ 'X-Digitalai-Account-ID': xDigitalaiAccountId
10344
+ },
10345
+ errors: {
10346
+ 400: `An unknown parameter was specified.`,
10347
+ 401: `Could not resolve a valid Tenant from the provided API Token.`,
10348
+ 404: `The help content could not be found.`
10349
+ }
10350
+ });
10351
+ return result.body;
10483
10352
  });
10484
10353
  }
10485
10354
  /**
10486
10355
  * Update a help content definition.
10487
10356
  * Update a single help content definition, selected by ID.
10488
10357
  * @param helpContentId
10489
- * @param formData
10358
+ * @param requestBody
10490
10359
  * @param xDigitalaiAccountId Perform the requested operation in the context of the Digital.ai account represented by this GUID. <em>Requires elevated permissions.</em>
10491
10360
  * @returns HelpContent OK
10492
10361
  * @returns Error Default error response
10493
10362
  * @throws ApiError
10494
10363
  */
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
- }
10364
+ static putHelpContentById(helpContentId_1, requestBody_1) {
10365
+ return __awaiter(this, arguments, void 0, function* (helpContentId, requestBody, xDigitalaiAccountId = null) {
10366
+ const result = yield request({
10367
+ method: 'PUT',
10368
+ path: `/metadata/bi/helpcontent/${helpContentId}`,
10369
+ headers: {
10370
+ 'X-Digitalai-Account-ID': xDigitalaiAccountId
10371
+ },
10372
+ body: requestBody,
10373
+ errors: {
10374
+ 400: `An unknown parameter was specified.`,
10375
+ 401: `Could not resolve a valid Tenant from the provided API Token.`,
10376
+ 404: `The help content could not be found.`,
10377
+ 422: `Unprocessable Entity`
10378
+ }
10379
+ });
10380
+ return result.body;
10513
10381
  });
10514
10382
  }
10515
10383
  /**
@@ -10520,21 +10388,21 @@ class HelpContentService {
10520
10388
  * @returns Error Default error response
10521
10389
  * @throws ApiError
10522
10390
  */
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
- }
10391
+ static deleteHelpContentById(helpContentId_1) {
10392
+ return __awaiter(this, arguments, void 0, function* (helpContentId, xDigitalaiAccountId = null) {
10393
+ const result = yield request({
10394
+ method: 'DELETE',
10395
+ path: `/metadata/bi/helpcontent/${helpContentId}`,
10396
+ headers: {
10397
+ 'X-Digitalai-Account-ID': xDigitalaiAccountId
10398
+ },
10399
+ errors: {
10400
+ 400: `An unknown parameter was specified.`,
10401
+ 401: `Could not resolve a valid Tenant from the provided API Token.`,
10402
+ 404: `The help content could not be found.`
10403
+ }
10404
+ });
10405
+ return result.body;
10538
10406
  });
10539
10407
  }
10540
10408
  }
@@ -11083,9 +10951,6 @@ const DotMetadataApiProvider = ({
11083
10951
  if (dashboard.in_progress_changes) {
11084
10952
  // If the dashboard is published and has in-progress changes, we need to update the in-progress dashboard
11085
10953
  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);
11089
10954
  } else {
11090
10955
  // If the dashboard is published and has no in-progress changes, we need to create an in-progress dashboard
11091
10956
  response = yield DashboardsService.postInProgressDashboard(dashboard.id, accountId, updatePayload);
@@ -12943,7 +12808,6 @@ function DotDashboardOptionsMenu({
12943
12808
  currentUser,
12944
12809
  isEdit = false,
12945
12810
  menuPlacement,
12946
- onFeature,
12947
12811
  onStartDelete,
12948
12812
  onStartDuplicate,
12949
12813
  onStartStatusChange,
@@ -13006,21 +12870,6 @@ function DotDashboardOptionsMenu({
13006
12870
  const isDraft = !dashboard.parent_id && dashboard.lifecycle_state === DashboardView.lifecycle_state.DRAFT;
13007
12871
  const isPublished = dashboard.parent_id || dashboard.lifecycle_state === DashboardView.lifecycle_state.PUBLISHED;
13008
12872
  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
- }
13024
12873
  if (!isEdit && onViewMode && !dashboard.is_ootb_dashboard && !dashboardLocked(dashboard, currentUser)) {
13025
12874
  menuItems.push({
13026
12875
  children: jsx(DotButton, {
@@ -13218,9 +13067,6 @@ function DotDashboardOptionsMenu({
13218
13067
  case 'unpublish':
13219
13068
  onStartStatusChange(dashboard, DashboardView.lifecycle_state.DRAFT);
13220
13069
  break;
13221
- case 'feature':
13222
- onFeature(dashboard);
13223
- break;
13224
13070
  }
13225
13071
  handleMenuClose();
13226
13072
  }, [menuItems, handleMenuClose]);