bruce-models 7.1.14 → 7.1.16
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/bruce-models.es5.js +16 -64
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +16 -64
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/data-lab/data-lab.js +11 -2
- package/dist/lib/data-lab/data-lab.js.map +1 -1
- package/dist/lib/entity/entity-type-trigger.js +4 -61
- package/dist/lib/entity/entity-type-trigger.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/data-lab/data-lab.d.ts +2 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -8303,7 +8303,7 @@
|
|
|
8303
8303
|
}
|
|
8304
8304
|
const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
8305
8305
|
try {
|
|
8306
|
-
const data = yield
|
|
8306
|
+
const data = yield api.GET(`entityTypeTrigger/${entityTypeTriggerId}`, exports.Api.PrepReqParams(reqParams));
|
|
8307
8307
|
res({
|
|
8308
8308
|
trigger: ParseResponse(data)
|
|
8309
8309
|
});
|
|
@@ -8334,7 +8334,7 @@
|
|
|
8334
8334
|
if (!api) {
|
|
8335
8335
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
8336
8336
|
}
|
|
8337
|
-
yield
|
|
8337
|
+
yield api.DELETE(`entityTypeTrigger/${entityTypeTriggerId}`, exports.Api.PrepReqParams(reqParams));
|
|
8338
8338
|
api.Cache.Remove(GetCacheKey(entityTypeTriggerId));
|
|
8339
8339
|
api.Cache.RemoveByStartsWith(GetListCacheKey());
|
|
8340
8340
|
});
|
|
@@ -8357,7 +8357,7 @@
|
|
|
8357
8357
|
}
|
|
8358
8358
|
const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
8359
8359
|
try {
|
|
8360
|
-
const data = yield
|
|
8360
|
+
const data = yield api.GET(entityTypeId ? `entityType/${entityTypeId}/triggers` : "entityTypeTriggers", exports.Api.PrepReqParams(reqParams));
|
|
8361
8361
|
res({
|
|
8362
8362
|
triggers: ParseListResponse(data)
|
|
8363
8363
|
});
|
|
@@ -8391,7 +8391,7 @@
|
|
|
8391
8391
|
if (data.ID == null || data.ID === "") {
|
|
8392
8392
|
data.ID = exports.ObjectUtils.UId();
|
|
8393
8393
|
}
|
|
8394
|
-
const res = yield
|
|
8394
|
+
const res = yield api.POST(`entityTypeTrigger/${data.ID}`, data, exports.Api.PrepReqParams(reqParams));
|
|
8395
8395
|
api.Cache.Remove(GetCacheKey(data.ID));
|
|
8396
8396
|
api.Cache.RemoveByStartsWith(GetListCacheKey());
|
|
8397
8397
|
return {
|
|
@@ -8462,63 +8462,6 @@
|
|
|
8462
8462
|
}
|
|
8463
8463
|
return data;
|
|
8464
8464
|
}
|
|
8465
|
-
function getSingleEndpoints(id) {
|
|
8466
|
-
return dedupe([
|
|
8467
|
-
`v1/entityTypeTrigger/${id}`,
|
|
8468
|
-
`v1/entityTypeTriggers/${id}`,
|
|
8469
|
-
`entityTypeTrigger/${id}`,
|
|
8470
|
-
`entityTypeTriggers/${id}`
|
|
8471
|
-
]);
|
|
8472
|
-
}
|
|
8473
|
-
function getListEndpoints(entityTypeId) {
|
|
8474
|
-
if (entityTypeId) {
|
|
8475
|
-
return dedupe([
|
|
8476
|
-
`v1/entityType/${entityTypeId}/entityTypeTriggers`,
|
|
8477
|
-
`v1/entityType/${entityTypeId}/triggers`,
|
|
8478
|
-
`entityType/${entityTypeId}/entityTypeTriggers`,
|
|
8479
|
-
`entityType/${entityTypeId}/triggers`
|
|
8480
|
-
]);
|
|
8481
|
-
}
|
|
8482
|
-
return dedupe([
|
|
8483
|
-
"v1/entityTypeTriggers",
|
|
8484
|
-
"entityTypeTriggers"
|
|
8485
|
-
]);
|
|
8486
|
-
}
|
|
8487
|
-
function dedupe(values) {
|
|
8488
|
-
return [...new Set(values)];
|
|
8489
|
-
}
|
|
8490
|
-
function requestWithFallback(urls, perform) {
|
|
8491
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
8492
|
-
let lastErr;
|
|
8493
|
-
for (let i = 0; i < urls.length; i++) {
|
|
8494
|
-
const url = urls[i];
|
|
8495
|
-
try {
|
|
8496
|
-
return yield perform(url);
|
|
8497
|
-
}
|
|
8498
|
-
catch (e) {
|
|
8499
|
-
lastErr = e;
|
|
8500
|
-
const hasNext = i < urls.length - 1;
|
|
8501
|
-
if (!hasNext || !isUnknownEdgeError(e)) {
|
|
8502
|
-
throw e;
|
|
8503
|
-
}
|
|
8504
|
-
}
|
|
8505
|
-
}
|
|
8506
|
-
throw lastErr;
|
|
8507
|
-
});
|
|
8508
|
-
}
|
|
8509
|
-
function isUnknownEdgeError(error) {
|
|
8510
|
-
var _a, _b, _c, _d, _e;
|
|
8511
|
-
const status = (_b = (_a = error === null || error === void 0 ? void 0 : error.StatusCode) !== null && _a !== void 0 ? _a : error === null || error === void 0 ? void 0 : error.status) !== null && _b !== void 0 ? _b : error === null || error === void 0 ? void 0 : error.statusCode;
|
|
8512
|
-
if (status === 404) {
|
|
8513
|
-
return true;
|
|
8514
|
-
}
|
|
8515
|
-
const rawMessage = (_e = (_d = (_c = error === null || error === void 0 ? void 0 : error.Message) !== null && _c !== void 0 ? _c : error === null || error === void 0 ? void 0 : error.message) !== null && _d !== void 0 ? _d : error === null || error === void 0 ? void 0 : error.Result) !== null && _e !== void 0 ? _e : error;
|
|
8516
|
-
const message = typeof rawMessage === "string" ? rawMessage : JSON.stringify(rawMessage || {});
|
|
8517
|
-
return (message.toLowerCase().includes("specified edge is not found")
|
|
8518
|
-
|| message.toLowerCase().includes("doesn't support requested method")
|
|
8519
|
-
|| message.toLowerCase().includes("does not support requested method")
|
|
8520
|
-
|| message.toLowerCase().includes("not found"));
|
|
8521
|
-
}
|
|
8522
8465
|
|
|
8523
8466
|
(function (MathUtils) {
|
|
8524
8467
|
/**
|
|
@@ -15253,14 +15196,23 @@
|
|
|
15253
15196
|
if (!params) {
|
|
15254
15197
|
params = {};
|
|
15255
15198
|
}
|
|
15256
|
-
let { api, req, expandGroups } = params;
|
|
15199
|
+
let { api, req, expandGroups, isActionableOnly, IsActionableOnly } = params;
|
|
15257
15200
|
if (!api) {
|
|
15258
15201
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
15259
15202
|
}
|
|
15260
15203
|
let url = "entities/datalab/savedQueries";
|
|
15204
|
+
const urlParams = new URLSearchParams();
|
|
15205
|
+
let hasUrlParams = false;
|
|
15261
15206
|
if (expandGroups) {
|
|
15262
|
-
const urlParams = new URLSearchParams();
|
|
15263
15207
|
urlParams.append("ExpandGroups", "true");
|
|
15208
|
+
hasUrlParams = true;
|
|
15209
|
+
}
|
|
15210
|
+
const actionableOnly = isActionableOnly !== null && isActionableOnly !== void 0 ? isActionableOnly : IsActionableOnly;
|
|
15211
|
+
if (actionableOnly === true) {
|
|
15212
|
+
urlParams.append("IsActionableOnly", "true");
|
|
15213
|
+
hasUrlParams = true;
|
|
15214
|
+
}
|
|
15215
|
+
if (hasUrlParams) {
|
|
15264
15216
|
url += "?" + urlParams.toString();
|
|
15265
15217
|
}
|
|
15266
15218
|
const res = yield api.GET(url, exports.Api.PrepReqParams(req));
|
|
@@ -17165,7 +17117,7 @@
|
|
|
17165
17117
|
})(exports.ChangeSet || (exports.ChangeSet = {}));
|
|
17166
17118
|
|
|
17167
17119
|
// This is updated with the package.json version on build.
|
|
17168
|
-
const VERSION = "7.1.
|
|
17120
|
+
const VERSION = "7.1.16";
|
|
17169
17121
|
|
|
17170
17122
|
exports.VERSION = VERSION;
|
|
17171
17123
|
exports.AbstractApi = AbstractApi;
|