autoql-fe-utils 1.7.21 → 1.7.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +22 -1
- package/dist/index.global.js +52 -0
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +61 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +58 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -11053,8 +11053,61 @@ var removeNotificationChannel = ({ channelId, domain, apiKey, token }) => {
|
|
|
11053
11053
|
});
|
|
11054
11054
|
};
|
|
11055
11055
|
|
|
11056
|
-
// src/Api/
|
|
11056
|
+
// src/Api/dashboardService.ts
|
|
11057
11057
|
import axios4 from "axios";
|
|
11058
|
+
var getDashboardRefreshInterval = ({ domain, apiKey, token, dashboard, scope = "single" }) => {
|
|
11059
|
+
if (!token || !apiKey || !domain || !(dashboard == null ? void 0 : dashboard.id)) {
|
|
11060
|
+
return Promise.reject(new Error("UNAUTHORIZED"));
|
|
11061
|
+
}
|
|
11062
|
+
const url = `${domain}/autoql/management/api/v1/dashboards/refresh-intervals/${dashboard.id}?key=${apiKey}&scope=${scope}`;
|
|
11063
|
+
const config = {
|
|
11064
|
+
headers: {
|
|
11065
|
+
Authorization: `Bearer ${token}`
|
|
11066
|
+
}
|
|
11067
|
+
};
|
|
11068
|
+
return axios4.get(url, config).then((response) => Promise.resolve(response)).catch((error) => {
|
|
11069
|
+
var _a;
|
|
11070
|
+
return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
|
|
11071
|
+
});
|
|
11072
|
+
};
|
|
11073
|
+
var removeDashboardRefreshInterval = ({ domain, apiKey, token, dashboard }) => {
|
|
11074
|
+
if (!token || !apiKey || !domain || !(dashboard == null ? void 0 : dashboard.id)) {
|
|
11075
|
+
return Promise.reject(new Error("UNAUTHORIZED"));
|
|
11076
|
+
}
|
|
11077
|
+
const url = `${domain}/autoql/management/api/v1/dashboards/refresh-intervals/${dashboard.id}?key=${apiKey}`;
|
|
11078
|
+
const config = {
|
|
11079
|
+
headers: {
|
|
11080
|
+
Authorization: `Bearer ${token}`
|
|
11081
|
+
}
|
|
11082
|
+
};
|
|
11083
|
+
return axios4.delete(url, config).then((response) => Promise.resolve(response)).catch((error) => {
|
|
11084
|
+
var _a;
|
|
11085
|
+
return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
|
|
11086
|
+
});
|
|
11087
|
+
};
|
|
11088
|
+
var setDashboardRefreshInterval = ({ domain, apiKey, token, dashboard, refreshInterval }) => {
|
|
11089
|
+
if (!token || !apiKey || !domain || !(dashboard == null ? void 0 : dashboard.id) || refreshInterval === void 0) {
|
|
11090
|
+
return Promise.reject(new Error("UNAUTHORIZED"));
|
|
11091
|
+
}
|
|
11092
|
+
const url = `${domain}/autoql/management/api/v1/dashboards/refresh-intervals?key=${apiKey}`;
|
|
11093
|
+
const body = {
|
|
11094
|
+
interval: refreshInterval,
|
|
11095
|
+
level: "DASHBOARD",
|
|
11096
|
+
levelId: dashboard.id
|
|
11097
|
+
};
|
|
11098
|
+
const config = {
|
|
11099
|
+
headers: {
|
|
11100
|
+
Authorization: `Bearer ${token}`
|
|
11101
|
+
}
|
|
11102
|
+
};
|
|
11103
|
+
return axios4.post(url, body, config).then((response) => Promise.resolve(response)).catch((error) => {
|
|
11104
|
+
var _a;
|
|
11105
|
+
return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
|
|
11106
|
+
});
|
|
11107
|
+
};
|
|
11108
|
+
|
|
11109
|
+
// src/Api/trainingDataCollection.ts
|
|
11110
|
+
import axios5 from "axios";
|
|
11058
11111
|
var sendTrainingData = ({
|
|
11059
11112
|
trainingData,
|
|
11060
11113
|
apiKey,
|
|
@@ -11071,7 +11124,7 @@ var sendTrainingData = ({
|
|
|
11071
11124
|
Authorization: `Bearer ${token}`
|
|
11072
11125
|
}
|
|
11073
11126
|
};
|
|
11074
|
-
return
|
|
11127
|
+
return axios5.post(url, data, config).then((response) => Promise.resolve(response)).catch((error) => {
|
|
11075
11128
|
var _a;
|
|
11076
11129
|
return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
|
|
11077
11130
|
});
|
|
@@ -11971,6 +12024,7 @@ export {
|
|
|
11971
12024
|
getCombinedFilters,
|
|
11972
12025
|
getCurrencySymbol,
|
|
11973
12026
|
getCurrentTimezone,
|
|
12027
|
+
getDashboardRefreshInterval,
|
|
11974
12028
|
getDataAlertsByLabel,
|
|
11975
12029
|
getDataConfig,
|
|
11976
12030
|
getDataFormatting,
|
|
@@ -12147,6 +12201,7 @@ export {
|
|
|
12147
12201
|
potentiallySupportsPivot,
|
|
12148
12202
|
previewDataAlert,
|
|
12149
12203
|
previewManagementDataAlert,
|
|
12204
|
+
removeDashboardRefreshInterval,
|
|
12150
12205
|
removeElementAtIndex,
|
|
12151
12206
|
removeFromDOM,
|
|
12152
12207
|
removeHiddenLegendLabels,
|
|
@@ -12172,6 +12227,7 @@ export {
|
|
|
12172
12227
|
sendTrainingData,
|
|
12173
12228
|
setCaretPosition,
|
|
12174
12229
|
setColumnVisibility,
|
|
12230
|
+
setDashboardRefreshInterval,
|
|
12175
12231
|
setFilterFunction,
|
|
12176
12232
|
setFilters,
|
|
12177
12233
|
setHeaderFilterPlaceholder,
|